Пример #1
0
 def __init__(self, topic):
     super(BaseAPI, self).__init__()
     target = messaging.Target(topic=topic,
                               namespace=_NAMESPACE,
                               version='1.0')
     version_cap = self.VERSION_ALIASES.get(CONF.upgrade_levels.baseapi,
                                            CONF.upgrade_levels.baseapi)
     self.client = rpc.get_client(target, version_cap=version_cap)
Пример #2
0
 def __init__(self):
     super(ResourceOperatorAPI, self).__init__()
     target = messaging.Target(
         topic=CONF.resourceoperator_topic, version='1.0')
     version_cap = self.VERSION_ALIASES.get(
         CONF.upgrade_levels.resourceoperator,
         CONF.upgrade_levels.resourceoperator)
     serializer = rack_object.RackObjectSerializer()
     self.client = rpc.get_client(target, version_cap=version_cap,
                                  serializer=serializer)