Ejemplo n.º 1
0
 def test_port_delete(self):
     rpcapi = ana.AgentNotifierApi(topics.AGENT)
     self._test_hyperv_neutron_api(rpcapi,
                                   topics.get_topic_name(
                                       topics.AGENT, topics.PORT,
                                       topics.DELETE),
                                   'port_delete',
                                   rpc_method='fanout_cast',
                                   port_id='port_id')
Ejemplo n.º 2
0
 def test_delete_network(self):
     rpcapi = ana.AgentNotifierApi(topics.AGENT)
     self._test_hyperv_neutron_api(rpcapi,
                                   topics.get_topic_name(
                                       topics.AGENT, topics.NETWORK,
                                       topics.DELETE),
                                   'network_delete',
                                   rpc_method='fanout_cast',
                                   network_id='fake_request_spec')
Ejemplo n.º 3
0
 def test_tunnel_update(self):
     rpcapi = ana.AgentNotifierApi(topics.AGENT)
     self._test_hyperv_neutron_api(
         rpcapi,
         topics.get_topic_name(
             topics.AGENT,
             constants.TUNNEL,
             topics.UPDATE),
         'tunnel_update', rpc_method='fanout_cast',
         tunnel_ip='fake_ip', tunnel_id='fake_id')
Ejemplo n.º 4
0
 def _setup_rpc(self):
     # RPC support
     self.topic = topics.PLUGIN
     self.conn = rpc.create_connection(new=True)
     self.notifier = agent_notifier_api.AgentNotifierApi(topics.AGENT)
     self.callbacks = rpc_callbacks.HyperVRpcCallbacks(self.notifier)
     self.dispatcher = self.callbacks.create_rpc_dispatcher()
     self.conn.create_consumer(self.topic, self.dispatcher, fanout=False)
     # Consume from all consumers in a thread
     self.conn.consume_in_thread()
Ejemplo n.º 5
0
 def test_port_update(self):
     rpcapi = ana.AgentNotifierApi(topics.AGENT)
     self._test_hyperv_neutron_api(rpcapi,
                                   topics.get_topic_name(
                                       topics.AGENT, topics.PORT,
                                       topics.UPDATE),
                                   'port_update',
                                   rpc_method='fanout_cast',
                                   port='fake_port',
                                   network_type='fake_network_type',
                                   segmentation_id='fake_segmentation_id',
                                   physical_network='fake_physical_network')
Ejemplo n.º 6
0
 def _setup_rpc(self):
     # RPC support
     self.service_topics = {svc_constants.CORE: topics.PLUGIN,
                            svc_constants.L3_ROUTER_NAT: topics.L3PLUGIN}
     self.conn = rpc.create_connection(new=True)
     self.notifier = agent_notifier_api.AgentNotifierApi(
         topics.AGENT)
     self.callbacks = rpc_callbacks.HyperVRpcCallbacks(self.notifier)
     self.dispatcher = self.callbacks.create_rpc_dispatcher()
     for svc_topic in self.service_topics.values():
         self.conn.create_consumer(svc_topic, self.dispatcher, fanout=False)
     # Consume from all consumers in a thread
     self.conn.consume_in_thread()
Ejemplo n.º 7
0
 def _setup_rpc(self):
     # RPC support
     self.service_topics = {svc_constants.CORE: topics.PLUGIN,
                            svc_constants.L3_ROUTER_NAT: topics.L3PLUGIN}
     self.conn = n_rpc.create_connection(new=True)
     self.notifier = agent_notifier_api.AgentNotifierApi(
         topics.AGENT)
     self.endpoints = [rpc_callbacks.HyperVRpcCallbacks(self.notifier),
                       agents_db.AgentExtRpcCallback()]
     for svc_topic in self.service_topics.values():
         self.conn.create_consumer(svc_topic, self.endpoints, fanout=False)
     # Consume from all consumers in threads
     self.conn.consume_in_threads()