Merge "move import to top and rename to make more readable"

This commit is contained in:
Jenkins 2015-11-13 12:50:40 +00:00 committed by Gerrit Code Review
commit 4c857ebb59
1 changed files with 2 additions and 2 deletions

View File

@ -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',