summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-08-09 20:02:38 +0000
committerGerrit Code Review <review@openstack.org>2018-08-09 20:02:38 +0000
commit1ec574486537948443048858bfed3f3c82d94ebc (patch)
treefbd83fb8057473f5fb9009b23e96e42c650d8cae
parentea8355284e8193958d6032cdba59e077599edd43 (diff)
parent20fa0fac69253b98925d8b0bfc294168bbb50116 (diff)
Merge "Add SecurityGroupAgentRpcCallbackMixin to OVSvAppAgent"
-rwxr-xr-xnetworking_vsphere/agent/ovsvapp_agent.py7
-rwxr-xr-xnetworking_vsphere/tests/unit/agent/test_ovsvapp_agent.py4
2 files changed, 8 insertions, 3 deletions
diff --git a/networking_vsphere/agent/ovsvapp_agent.py b/networking_vsphere/agent/ovsvapp_agent.py
index 9db6e4b..de75ac2 100755
--- a/networking_vsphere/agent/ovsvapp_agent.py
+++ b/networking_vsphere/agent/ovsvapp_agent.py
@@ -23,6 +23,7 @@ from oslo_config import cfg
23from oslo_log import log 23from oslo_log import log
24import oslo_messaging 24import oslo_messaging
25from oslo_service import loopingcall 25from oslo_service import loopingcall
26from osprofiler import profiler
26import six 27import six
27 28
28from neutron_lib.agent import topics 29from neutron_lib.agent import topics
@@ -33,6 +34,7 @@ from neutron_lib.utils import helpers
33 34
34from neutron.agent.common import ovs_lib 35from neutron.agent.common import ovs_lib
35from neutron.agent import rpc as agent_rpc 36from neutron.agent import rpc as agent_rpc
37from neutron.api.rpc.handlers import securitygroups_rpc as sg_rpc
36from neutron.common import rpc as n_rpc 38from neutron.common import rpc as n_rpc
37from neutron.plugins.ml2.drivers.openvswitch.agent.common import constants as ovs_const # noqa 39from neutron.plugins.ml2.drivers.openvswitch.agent.common import constants as ovs_const # noqa
38from neutron.plugins.ml2.drivers.openvswitch.agent import ovs_neutron_agent as ovs_agent # noqa 40from neutron.plugins.ml2.drivers.openvswitch.agent import ovs_neutron_agent as ovs_agent # noqa
@@ -80,7 +82,10 @@ class PortInfo(object):
80 self.network_type = network_type 82 self.network_type = network_type
81 83
82 84
83class OVSvAppAgent(agent.Agent, ovs_agent.OVSNeutronAgent): 85@profiler.trace_cls("rpc")
86class OVSvAppAgent(agent.Agent,
87 ovs_agent.OVSNeutronAgent,
88 sg_rpc.SecurityGroupAgentRpcCallbackMixin):
84 89
85 """OVSvApp Agent.""" 90 """OVSvApp Agent."""
86 91
diff --git a/networking_vsphere/tests/unit/agent/test_ovsvapp_agent.py b/networking_vsphere/tests/unit/agent/test_ovsvapp_agent.py
index 708084b..b489e12 100755
--- a/networking_vsphere/tests/unit/agent/test_ovsvapp_agent.py
+++ b/networking_vsphere/tests/unit/agent/test_ovsvapp_agent.py
@@ -341,8 +341,8 @@ class TestOVSvAppAgent(base.TestCase):
341 @mock.patch('networking_vsphere.agent.ovsvapp_agent.OVSvAppPluginApi') 341 @mock.patch('networking_vsphere.agent.ovsvapp_agent.OVSvAppPluginApi')
342 @mock.patch('neutron_lib.context.get_admin_context_without_session') 342 @mock.patch('neutron_lib.context.get_admin_context_without_session')
343 @mock.patch('neutron.agent.rpc.create_consumers') 343 @mock.patch('neutron.agent.rpc.create_consumers')
344 @mock.patch('neutron.plugins.ml2.drivers.openvswitch.agent.' 344 @mock.patch('networking_vsphere.agent.ovsvapp_agent.OVSvAppAgent.'
345 'ovs_neutron_agent.OVSNeutronAgent.setup_integration_br') 345 'setup_integration_br')
346 @mock.patch('networking_vsphere.agent.ovsvapp_agent.' 346 @mock.patch('networking_vsphere.agent.ovsvapp_agent.'
347 'OVSvAppAgent.check_ovsvapp_agent_restart') 347 'OVSvAppAgent.check_ovsvapp_agent_restart')
348 @mock.patch('networking_vsphere.agent.ovsvapp_agent.' 348 @mock.patch('networking_vsphere.agent.ovsvapp_agent.'