use neutron-lib trunk resource names
The trunk callback resource names now live in neutron-lib [1]. This patch switches over to use those constants from lib and they will be removed from neutron in a later patch once consumers switch over to lib as well. Also see [2]. This patch also bumps neutron-lib to version 1.24.0. [1] https://review.openstack.org/#/c/635209 [2] https://review.openstack.org/#/c/637004 Change-Id: I001721c8ed5e38090b7867e225a5d777fbc6f19c
This commit is contained in:
parent
25d7108d32
commit
8641481024
@ -50,7 +50,7 @@ msgpack-python==0.4.0
|
||||
munch==2.1.0
|
||||
netaddr==0.7.18
|
||||
netifaces==0.10.4
|
||||
neutron-lib==1.23.0
|
||||
neutron-lib==1.24.0
|
||||
octavia==3.0.0
|
||||
openstackdocstheme==1.18.1
|
||||
os-client-config==1.28.0
|
||||
|
@ -10,7 +10,7 @@ tenacity>=4.4.0 # Apache-2.0
|
||||
SQLAlchemy!=1.1.5,!=1.1.6,!=1.1.7,!=1.1.8,>=1.2.0 # MIT
|
||||
six>=1.10.0 # MIT
|
||||
stevedore>=1.20.0 # Apache-2.0
|
||||
neutron-lib>=1.23.0 # Apache-2.0
|
||||
neutron-lib>=1.24.0 # Apache-2.0
|
||||
osc-lib>=1.10.0 # Apache-2.0
|
||||
python-openstackclient>=3.16.0 # Apache-2.0
|
||||
oslo.concurrency>=3.26.0 # Apache-2.0
|
||||
|
@ -23,6 +23,7 @@ from neutron.services.trunk.drivers import base
|
||||
from neutron_lib.api.definitions import portbindings
|
||||
from neutron_lib.callbacks import events
|
||||
from neutron_lib.callbacks import registry
|
||||
from neutron_lib.callbacks import resources
|
||||
|
||||
from vmware_nsx.common import nsx_constants as nsx_consts
|
||||
from vmware_nsx.common import utils as nsx_utils
|
||||
@ -199,16 +200,16 @@ class NsxV3TrunkDriver(base.DriverBase):
|
||||
SUPPORTED_SEGMENTATION_TYPES,
|
||||
agent_type=None, can_trunk_bound_port=True)
|
||||
|
||||
@registry.receives(trunk_consts.TRUNK_PLUGIN, [events.AFTER_INIT])
|
||||
@registry.receives(resources.TRUNK_PLUGIN, [events.AFTER_INIT])
|
||||
def register(self, resource, event, trigger, payload=None):
|
||||
super(NsxV3TrunkDriver, self).register(
|
||||
resource, event, trigger, payload=payload)
|
||||
self._handler = NsxV3TrunkHandler(self.plugin_driver)
|
||||
for event in (events.AFTER_CREATE, events.AFTER_DELETE):
|
||||
registry.subscribe(self._handler.trunk_event,
|
||||
trunk_consts.TRUNK,
|
||||
resources.TRUNK,
|
||||
event)
|
||||
registry.subscribe(self._handler.subport_event,
|
||||
trunk_consts.SUBPORTS,
|
||||
resources.SUBPORTS,
|
||||
event)
|
||||
LOG.debug("VMware NSXv3 trunk driver initialized.")
|
||||
|
Loading…
Reference in New Issue
Block a user