def __init__(self): super(ConductorAPI, self).__init__() target = messaging.Target(topic=CONF.xdrs_conductor_topic) version_cap = 1.0 serializer = objects_base.XdrsObjectSerializer() self.client = rpc.get_client(target, version_cap=version_cap, serializer=serializer)
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)
def get_client(self, target, serializer): return rpc.get_client(target, serializer=serializer)