Esempio n. 1
0
    def __init__(self, topic=None):
        topic = topic if topic else cfg.CONF.mdns_topic

        notify_target = messaging.Target(topic=topic,
                                         namespace='notify',
                                         version=self.RPC_NOTIFY_API_VERSION)
        self.notify_client = rpc.get_client(notify_target, version_cap='2.0')

        xfr_target = messaging.Target(topic=topic,
                                      namespace='xfr',
                                      version=self.RPC_XFR_API_VERSION)
        self.xfr_client = rpc.get_client(xfr_target, version_cap='1.0')
Esempio n. 2
0
    def __init__(self, topic=None):
        topic = topic if topic else cfg.CONF.mdns_topic

        notify_target = messaging.Target(topic=topic,
                                         namespace='notify',
                                         version=self.RPC_NOTIFY_API_VERSION)
        self.notify_client = rpc.get_client(notify_target, version_cap='1.1')

        xfr_target = messaging.Target(topic=topic,
                                      namespace='xfr',
                                      version=self.RPC_XFR_API_VERSION)
        self.xfr_client = rpc.get_client(xfr_target, version_cap='1.0')
Esempio n. 3
0
    def __init__(self, topic=None):
        self.topic = topic if topic \
            else cfg.CONF['service:pool_manager'].pool_manager_topic

        target = messaging.Target(topic=self.topic,
                                  version=self.RPC_API_VERSION)
        self.client = rpc.get_client(target, version_cap='2.1')
Esempio n. 4
0
    def __init__(self, topic=None):
        self.topic = topic if topic \
            else cfg.CONF['service:pool_manager'].pool_manager_topic

        target = messaging.Target(topic=self.topic,
                                  version=self.RPC_API_VERSION)
        self.client = rpc.get_client(target, version_cap='2.1')
Esempio n. 5
0
def ping_host(topic, host):
    context = flask.request.environ.get('context')

    client = rpc.get_client(messaging.Target(topic=topic))
    cctxt = client.prepare(server=host, timeout=10)

    pong = cctxt.call(context, 'ping')

    return flask.jsonify(pong)
Esempio n. 6
0
def ping_host(topic, host):
    context = flask.request.environ.get('context')

    client = rpc.get_client(messaging.Target(topic=topic))
    cctxt = client.prepare(server=host, timeout=10)

    pong = cctxt.call(context, 'ping')

    return flask.jsonify(pong)
Esempio n. 7
0
    def __init__(self, topic=None):
        topic = topic if topic else cfg.CONF.central_topic

        target = messaging.Target(topic=topic, version=self.RPC_API_VERSION)
        self.client = rpc.get_client(target, version_cap='3.3')
Esempio n. 8
0
    def __init__(self, topic=None):
        topic = topic if topic else cfg.CONF.central_topic

        target = messaging.Target(topic=topic, version=self.RPC_API_VERSION)
        self.client = rpc.get_client(target, version_cap='5.1')
Esempio n. 9
0
    def __init__(self, topic=None):
        topic = topic if topic else cfg.CONF.mdns_topic

        notify_target = messaging.Target(topic=topic, namespace="notify", version=self.RPC_NOTIFY_API_VERSION)
        self.notify_client = rpc.get_client(notify_target, version_cap="0.1")
Esempio n. 10
0
    def __init__(self, topic=None):
        topic = topic if topic else cfg.CONF['service:worker'].worker_topic

        target = messaging.Target(topic=topic, version=self.RPC_API_VERSION)
        self.client = rpc.get_client(target, version_cap='1.0')
Esempio n. 11
0
    def __init__(self, topic=None):
        topic = topic if topic else cfg.CONF['service:worker'].worker_topic

        target = messaging.Target(topic=topic, version=self.RPC_API_VERSION)
        self.client = rpc.get_client(target, version_cap='1.0')
Esempio n. 12
0
    def __init__(self, topic=None):
        self.topic = topic if topic else cfg.CONF['service:central'].topic

        target = messaging.Target(topic=self.topic,
                                  version=self.RPC_API_VERSION)
        self.client = rpc.get_client(target, version_cap='6.2')