示例#1
0
 def _patch_uris(self, uris, handler="/XMLRPC"):
     #Handles patching the uris when they're in a list.
     if type(uris) == type([]):
         ret = []
         for i in range(len(uris)):
             t = list(utils.parse_url(uris[i]))
             t[2] = handler
             ret.append(utils.unparse_url(t))
     #Handles patching the uri when it's a string.
     else:
         t = list(utils.parse_url(uris))
         t[2] = handler
         ret = utils.unparse_url(t)
     return ret
示例#2
0
 def _patch_uris(self, uris, handler="/XMLRPC"):
     #Handles patching the uris when they're in a list.
     if type(uris) == type([]):
         ret = []
         for i in range(len(uris)):
             t = list(utils.parse_url(uris[i]))
             t[2] = handler
             ret.append(utils.unparse_url(t))
     #Handles patching the uri when it's a string.
     else:
         t = list(utils.parse_url(uris))
         t[2] = handler
         ret = utils.unparse_url(t)
     return ret
示例#3
0
def _init():
    cfg = config.initUp2dateConfig()
    cfg_dict = dict(cfg.items())
    server_url = config.getServerlURL()
    cfg_dict['proto'], cfg_dict['server_name'] = utils.parse_url(server_url[0], scheme="https")[:2]
    if len(server_url) > 1:
        cfg_dict['server_list'] = server_url
    local_config.init('rhncfg-client', defaults=cfg_dict)
    set_debug_level(int(local_config.get('debug_level') or 0))
    set_logfile("/var/log/rhncfg-actions")
示例#4
0
def _init():
    cfg = config.initUp2dateConfig()
    cfg_dict = dict(cfg.items())
    server_url = config.getServerlURL()
    cfg_dict['proto'], cfg_dict['server_name'] = utils.parse_url(server_url[0], scheme="https")[:2]
    if len(server_url) > 1:
        cfg_dict['server_list'] = server_url
    local_config.init('rhncfg-client', defaults=cfg_dict)
    set_debug_level(int(local_config.get('debug_level') or 0))
    set_logfile("/var/log/rhncfg-actions")