]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Merge "Skip FWaaS config mismatch check if RPC method is unsupported"
authorJenkins <jenkins@review.openstack.org>
Tue, 19 Aug 2014 08:12:42 +0000 (08:12 +0000)
committerGerrit Code Review <review@openstack.org>
Tue, 19 Aug 2014 08:12:42 +0000 (08:12 +0000)
1  2 
neutron/agent/l3_agent.py
neutron/tests/unit/test_l3_agent.py

Simple merge
index 664b6e8c8263f46ec7054d36346652da8f765823,d64bf2e0d64806c85c99b655e9ff8e020406f0df..6f15e9c02e100bfd873460deec4298ef478bc5a9
@@@ -2041,9 -1946,23 +2043,23 @@@ class TestBasicRouterOperations(base.Ba
              self.mock_ip.del_veth.assert_called_once_with(
                  agent.get_fip_int_device_name(router['id']))
              self.mock_ip_dev.route.delete_gateway.assert_called_once_with(
 -                '11.22.33.42', table=16)
 +                str(fip_to_rtr.ip), table=16)
              f.assert_called_once_with(fip_ns_name)
  
+     def test_get_service_plugin_list(self):
+         service_plugins = [p_const.L3_ROUTER_NAT]
+         self.plugin_api.get_service_plugin_list.return_value = service_plugins
+         agent = l3_agent.L3NATAgent(HOSTNAME, self.conf)
+         self.assertEqual(service_plugins, agent.neutron_service_plugins)
+         self.assertTrue(self.plugin_api.get_service_plugin_list.called)
+     def test_get_service_plugin_list_failed(self):
+         raise_rpc = n_rpc.RemoteError()
+         self.plugin_api.get_service_plugin_list.side_effect = raise_rpc
+         agent = l3_agent.L3NATAgent(HOSTNAME, self.conf)
+         self.assertIsNone(agent.neutron_service_plugins)
+         self.assertTrue(self.plugin_api.get_service_plugin_list.called)
  
  class TestL3AgentEventHandler(base.BaseTestCase):