Merge "move import to top and rename to make more readable"
This commit is contained in:
commit
4c857ebb59
@ -49,6 +49,7 @@ from neutron import ipam
|
||||
from neutron.ipam import subnet_alloc
|
||||
from neutron import manager
|
||||
from neutron import neutron_plugin_base_v2
|
||||
from neutron.notifiers import nova as nova_notifier
|
||||
from neutron.plugins.common import constants as service_constants
|
||||
|
||||
|
||||
@ -97,10 +98,9 @@ class NeutronDbPluginV2(db_base_plugin_common.DbBasePluginCommon,
|
||||
def __init__(self):
|
||||
self.set_ipam_backend()
|
||||
if cfg.CONF.notify_nova_on_port_status_changes:
|
||||
from neutron.notifiers import nova
|
||||
# NOTE(arosen) These event listeners are here to hook into when
|
||||
# port status changes and notify nova about their change.
|
||||
self.nova_notifier = nova.Notifier()
|
||||
self.nova_notifier = nova_notifier.Notifier()
|
||||
event.listen(models_v2.Port, 'after_insert',
|
||||
self.nova_notifier.send_port_status)
|
||||
event.listen(models_v2.Port, 'after_update',
|
||||
|
Loading…
Reference in New Issue
Block a user