Beispiel #1
0
def rpc_call(_id, transport, messages, wait_after_msg, timeout):
    target = messaging.Target(topic='t1', server='moi')
    c = rpc.RPCClient(transport, target)
    c = c.prepare(timeout=timeout)
    for i in range(0, messages):
        payload = "test %d" % i
        LOG.info("SEND: %s" % payload)
        try:
            res = c.call({}, 'info', message=payload)
        except Exception:
            LOG.exception('no RCV for %s' % i)
        else:
            LOG.info("RCV: %s" % res)
        if wait_after_msg > 0:
            time.sleep(wait_after_msg)
Beispiel #2
0
 def __init__(self, transport):
     client_target = target.Target('murano', 'tasks')
     self._client = rpc.RPCClient(transport, client_target, timeout=15)
Beispiel #3
0
 def __init__(self, unix_transport):
     super(NamespaceProxyAgentApi, self).__init__()
     target_ = messaging.Target(topic=topics.SERVICEVM_AGENT_NAMEPSACE)
     self._client = rpc.RPCClient(unix_transport, target_)