def _start_rpc_listeners(self):
     self.notifier = ovsvapp_rpc.OVSvAppAgentNotifyAPI(topics.AGENT)
     self.endpoints = [ovsvapp_rpc.OVSvAppServerRpcCallback(self.notifier)]
     self.topic = constants.OVSVAPP
     self.conn = n_rpc.create_connection(new=True)
     self.conn.create_consumer(self.topic, self.endpoints, fanout=False)
     return self.conn.consume_in_threads()
 def _start_rpc_listeners(self):
     self.notifier = ovsvapp_rpc.OVSvAppAgentNotifyAPI(topics.AGENT)
     self.ovsvapp_sg_server_rpc = (
         ovsvapp_rpc.OVSvAppSecurityGroupServerRpcMixin())
     self.endpoints = [ovsvapp_rpc.OVSvAppServerRpcCallback(
                       self.notifier, self.ovsvapp_sg_server_rpc),
                       ovsvapp_rpc.OVSvAppSecurityGroupServerRpcCallback(
                       self.ovsvapp_sg_server_rpc)]
     self.topic = ovsvapp_const.OVSVAPP
     self.conn = n_rpc.create_connection()
     self.conn.create_consumer(self.topic, self.endpoints, fanout=False)
     return self.conn.consume_in_threads()
示例#3
0
 def setUp(self):
     super(OVSvAppServerRpcCallbackTest, self).setUp()
     self.ovsvapp_callbacks = ovsvapp_rpc.OVSvAppServerRpcCallback(
         mock.Mock(), mock.Mock())
     self.callbacks = plugin_rpc.RpcCallbacks(mock.Mock(), mock.Mock())
     self.plugin = self.manager.get_plugin()