Browse Source

Merge "Fix the plugin property in the OVSvAppAgentMechanismDriver"

Zuul 1 year ago
parent
commit
3e32fa35df
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      networking_vsphere/ml2/ovsvapp_mech_driver.py

+ 5
- 3
networking_vsphere/ml2/ovsvapp_mech_driver.py View File

@@ -23,12 +23,12 @@ from oslo_utils import timeutils
23 23
 
24 24
 from neutron.common import rpc as n_rpc
25 25
 
26
-from neutron import manager
27 26
 from neutron.plugins.ml2.drivers import mech_agent
28 27
 from neutron_lib.agent import topics
29 28
 from neutron_lib.api.definitions import portbindings
30 29
 from neutron_lib import constants as n_const
31 30
 from neutron_lib import context as neutron_context
31
+from neutron_lib.plugins import directory
32 32
 from neutron_lib.plugins.ml2 import api
33 33
 
34 34
 from networking_vsphere._i18n import _LE, _LI
@@ -53,7 +53,9 @@ class OVSvAppAgentMechanismDriver(mech_agent.SimpleAgentMechanismDriverBase):
53 53
         super(OVSvAppAgentMechanismDriver, self).__init__(
54 54
             ovsvapp_const.AGENT_TYPE_OVSVAPP,
55 55
             portbindings.VIF_TYPE_OTHER,
56
-            {portbindings.CAP_PORT_FILTER: True})
56
+            {portbindings.CAP_PORT_FILTER: True},
57
+            supported_vnic_types=[portbindings.VNIC_NORMAL])
58
+
57 59
         self.context = neutron_context.get_admin_context()
58 60
         self._start_rpc_listeners()
59 61
         self._plugin = None
@@ -73,7 +75,7 @@ class OVSvAppAgentMechanismDriver(mech_agent.SimpleAgentMechanismDriverBase):
73 75
     @property
74 76
     def plugin(self):
75 77
         if self._plugin is None:
76
-            self._plugin = manager.NeutronManager.get_plugin()
78
+            self._plugin = directory.get_plugin()
77 79
         return self._plugin
78 80
 
79 81
     @property

Loading…
Cancel
Save