| Current File : /home/mmdealscpanel/yummmdeals.com/actions.tar |
__init__.py 0000755 00000000037 15051572243 0006664 0 ustar 00 #!/usr/libexec/platform-python
up2date_config.py 0000755 00000003673 15051572243 0010027 0 ustar 00 #!/usr/libexec/platform-python
# Copyright (c) 1999--2018 Red Hat, Inc. Distributed under GPLv2.
#
# Author: Adrian Likins <alikins@redhat.com>
#
import os
import re
from up2date_client import config
cfg = config.initUp2dateConfig()
__rhnexport__ = ["update", "get"]
argVerbose = 0
def update(configdict, cache_only=None):
"""Invoke this to change the ondisk configuration of up2date"""
if cache_only:
return (0, "no-ops for caching", {})
if argVerbose > 1:
print("called update_up2date_config")
if type(configdict) != type({}):
return (13, "Invalid arguments passed to function", {})
unknownparams = []
if cfg["disallowConfChanges"]:
skipParams = cfg["disallowConfChanges"]
else:
skipParams = []
for param in configdict.keys():
# dont touch params in the skip params list
if param in skipParams:
continue
# write out all params, even ones we dont know about
# could be useful
cfg.set(param, configdict[param])
if len(unknownparams):
return unknownparams
cfg.save()
return (0, "config updated", {})
def get(cache_only=None):
"""Reterieve the current configuration of up2date"""
if cache_only:
return (0, "no-ops for caching", {})
if argVerbose > 1:
print("called get_up2date_config")
ret = {}
for k in cfg.keys():
ret[k] = cfg[k]
return (0, "configuration retrived", {"data": ret})
def main():
configdatatup = get()
configdata = configdatatup[2]["data"]
import time
timestamp = time.time()
configdata["timeStampTest"] = timestamp
print(configdata)
import pprint
pprint.pprint(update(configdata))
configdata["serverURL"] = "https://xmlrpc.cln.cloudlinux.com/XMLRPC/"
configdata["serverURLipv6"] = "https://ipv6.xmlrpc.cln.cloudlinux.com/XMLRPC/"
pprint.pprint(update(configdata))
if __name__ == "__main__":
main()
__pycache__/hardware.cpython-36.pyc 0000644 00000001653 15051572243 0013210 0 ustar 00 3
ge8hI � @ sR d dl mZ d dl mZ d dl mZ d ZdgZd
dd�Zdd� Zed krNe� dS )� )�hardware)�up2dateAuth)� rpcServer�refresh_listNc C sh | rddi fS t j� }tj� }tdkr.td� y|jjtj � |� W n td� ddi fS ddi fS ) Nr zno-ops for caching� zCalled refresh_hardwarez3ERROR: sending hardware database for System Profile� z Error refreshing system hardwarezhardware list refreshed)
r ZHardwarer Z getServer�
argVerbose�printZregistrationZrefresh_hw_profiler ZgetSystemId)Z
cache_onlyZhardwareList�s� r �/usr/lib/python3.6/hardware.pyr s
c C s t t� � d S )N)r r r r r r �main( s r
�__main__)N) Zup2date_clientr r r r Z
__rhnexport__r r
�__name__r r r r �<module>
s
__pycache__/up2date_config.cpython-36.pyc 0000644 00000003211 15051572243 0014274 0 ustar 00 3
ge8h� � @ s^ d dl Z d dlZd dlmZ ej� ZddgZd Zd
dd�Zddd�Z dd� Z
ed krZe
� dS )� N)�config�update�getc C s� |rddi fS t dkrtd� t| �ti �kr8ddi fS g }td rNtd }ng }x*| j� D ]}||krjq\tj|| | � q\W t|�r�|S tj� ddi fS ) z9Invoke this to change the ondisk configuration of up2dater zno-ops for caching� zcalled update_up2date_config�
z$Invalid arguments passed to functionZdisallowConfChangeszconfig updated)�
argVerbose�print�type�cfg�keys�set�lenZsave)Z
configdict�
cache_onlyZ
unknownparamsZ
skipParamsZparam� r �$/usr/lib/python3.6/up2date_config.pyr s$
c C sN | rddi fS t dkrtd� i }xtj� D ]}t| ||<