Example #1
0
def _get_monhelper_url(name):
    sup_url = supcast.get_url(name)
    url = urllib.parse.urlparse(sup_url)
    port = url.port
    if port is None:
        raise ValueError("no port in url: %s" % sup_url)
    bits = list(url.netloc.partition(str(port)))
    bits[1] = str(port + 1)
    new_url = url._replace(netloc=''.join(bits))
    return urllib.parse.urlunparse(new_url)
Example #2
0
def _get_monhelper_url(name):
    sup_url = supcast.get_url(name)
    url = urllib.parse.urlparse(sup_url)
    port = url.port
    if port is None:
        raise ValueError("no port in url: %s" % sup_url)
    bits = list(url.netloc.partition(str(port)))
    bits[1] = str(port + 1)
    new_url = url._replace(netloc=''.join(bits))
    return urllib.parse.urlunparse(new_url)
Example #3
0
def _get_supervisor(name):
    url = supcast.get_url(name)
    supervisor = xmlrpc_client.ServerProxy(url, verbose=False)
    return supervisor
Example #4
0
def _get_supervisor(name):
    url = supcast.get_url(name)
    supervisor = xmlrpc_client.ServerProxy(url, verbose=False)
    return supervisor