def create_rpc_dispatcher(self): '''Get the rpc dispatcher for this manager. If a manager would like to set an rpc API version, or support more than one class as the target of rpc messages, override this method. ''' return q_rpc.PluginRpcDispatcher([self])
def create_rpc_dispatcher(self): """Get the rpc dispatcher for this manager. If a manager would like to set an rpc API version, or support more than one class as the target of rpc messages, override this method. """ return q_rpc.PluginRpcDispatcher([self, agents_db.AgentExtRpcCallback()])
def setup_rpc(self): self.topic = topics.PLUGIN self.conn = rpc.create_connection(new=True) self.notifier = NECPluginV2AgentNotifierApi(topics.AGENT) self.dhcp_agent_notifier = dhcp_rpc_agent_api.DhcpAgentNotifyAPI() self.l3_agent_notifier = l3_rpc_agent_api.L3AgentNotify # NOTE: callback_sg is referred to from the sg unit test. self.callback_sg = SecurityGroupServerRpcCallback() callbacks = [ NECPluginV2RPCCallbacks(self), DhcpRpcCallback(), L3RpcCallback(), self.callback_sg, agents_db.AgentExtRpcCallback() ] self.dispatcher = q_rpc.PluginRpcDispatcher(callbacks) self.conn.create_consumer(self.topic, self.dispatcher, fanout=False) # Consume from all consumers in a thread self.conn.consume_in_thread()
def create_rpc_dispatcher(self): return q_rpc.PluginRpcDispatcher([self])