Exemple #1
0
 def __init__(self, transport=None, context=None, topic=None):
     serializer = RequestContextSerializer(
         objects_base.MagnumObjectSerializer())
     if transport is None:
         exmods = rpc.get_allowed_exmods()
         transport = messaging.get_transport(cfg.CONF,
                                             allowed_remote_exmods=exmods,
                                             aliases=TRANSPORT_ALIASES)
     self._context = context
     if topic is None:
         topic = ''
     target = messaging.Target(topic=topic)
     self._client = messaging.RPCClient(transport, target,
                                        serializer=serializer)
Exemple #2
0
 def __init__(self, transport=None, context=None, topic=None, server=None,
              timeout=None):
     serializer = _init_serializer()
     if transport is None:
         exmods = rpc.get_allowed_exmods()
         transport = messaging.get_rpc_transport(
             CONF, allowed_remote_exmods=exmods)
     self._context = context
     if topic is None:
         topic = ''
     target = messaging.Target(topic=topic, server=server)
     self._client = messaging.RPCClient(transport, target,
                                        serializer=serializer,
                                        timeout=timeout)
Exemple #3
0
 def __init__(self, transport=None, context=None, topic=None):
     serializer = RequestContextSerializer(
         objects_base.MagnumObjectSerializer())
     if transport is None:
         exmods = rpc.get_allowed_exmods()
         transport = messaging.get_transport(cfg.CONF,
                                             allowed_remote_exmods=exmods,
                                             aliases=TRANSPORT_ALIASES)
     self._context = context
     if topic is None:
         topic = ''
     target = messaging.Target(topic=topic)
     self._client = messaging.RPCClient(transport,
                                        target,
                                        serializer=serializer)