diff --git a/neutron/plugins/ml2/drivers/agent/capabilities.py b/neutron/plugins/ml2/drivers/agent/capabilities.py index 3545e1e23da..2c935917f55 100644 --- a/neutron/plugins/ml2/drivers/agent/capabilities.py +++ b/neutron/plugins/ml2/drivers/agent/capabilities.py @@ -17,7 +17,7 @@ from neutron_lib.callbacks import registry def notify_init_event(agent_type, agent): """Notify init event for the specified agent.""" - registry.notify(agent_type, events.AFTER_INIT, agent, agent=agent) + registry.publish(agent_type, events.AFTER_INIT, agent) def register(callback, agent_type): diff --git a/neutron/services/logapi/drivers/base.py b/neutron/services/logapi/drivers/base.py index 97eb9eea253..4e05996e982 100644 --- a/neutron/services/logapi/drivers/base.py +++ b/neutron/services/logapi/drivers/base.py @@ -48,7 +48,7 @@ class DriverBase(object): # logging plugin can discover which resources types are supported by # the log driver. @registry.receives(log_const.LOGGING_PLUGIN, [events.AFTER_INIT]) - def _register(self, resource, event, trigger, **kwargs): + def _register(self, resource, event, trigger, payload=None): if self.is_loaded: # trigger is the LoggingServiceDriverManager trigger.register_driver(self) diff --git a/neutron/services/logapi/drivers/manager.py b/neutron/services/logapi/drivers/manager.py index c2e702df6a4..3165707cf40 100644 --- a/neutron/services/logapi/drivers/manager.py +++ b/neutron/services/logapi/drivers/manager.py @@ -26,7 +26,7 @@ class LoggingServiceDriverManager(object): def __init__(self): self._drivers = set() - registry.notify(log_const.LOGGING_PLUGIN, events.AFTER_INIT, self) + registry.publish(log_const.LOGGING_PLUGIN, events.AFTER_INIT, self) @property def drivers(self): diff --git a/neutron/services/qos/drivers/manager.py b/neutron/services/qos/drivers/manager.py index db676e2a15f..2ac31c5647f 100644 --- a/neutron/services/qos/drivers/manager.py +++ b/neutron/services/qos/drivers/manager.py @@ -43,7 +43,7 @@ class QosServiceDriverManager(object): # notify any registered QoS driver that we're ready, those will # call the driver manager back with register_driver if they # are enabled - registry.notify(qos_consts.QOS_PLUGIN, events.AFTER_INIT, self) + registry.publish(qos_consts.QOS_PLUGIN, events.AFTER_INIT, self) if self.rpc_notifications_required: self.push_api = resources_rpc.ResourcesPushRpcApi() diff --git a/neutron/services/trunk/drivers/base.py b/neutron/services/trunk/drivers/base.py index 0deedd26d9e..46165dbc296 100644 --- a/neutron/services/trunk/drivers/base.py +++ b/neutron/services/trunk/drivers/base.py @@ -62,7 +62,7 @@ class DriverBase(object): return agent_type == self.agent_type @registry.receives(trunk_consts.TRUNK_PLUGIN, [events.AFTER_INIT]) - def register(self, resource, event, trigger, **kwargs): + def register(self, resource, event, trigger, payload=None): """Register the trunk driver. This method should be overridden so that the driver can subscribe diff --git a/neutron/services/trunk/plugin.py b/neutron/services/trunk/plugin.py index f5043de61fd..416ac8b1f1c 100644 --- a/neutron/services/trunk/plugin.py +++ b/neutron/services/trunk/plugin.py @@ -60,7 +60,7 @@ class TrunkPlugin(service_base.ServicePluginBase, drivers.register() registry.subscribe(rules.enforce_port_deletion_rules, resources.PORT, events.BEFORE_DELETE) - registry.notify(constants.TRUNK_PLUGIN, events.AFTER_INIT, self) + registry.publish(constants.TRUNK_PLUGIN, events.AFTER_INIT, self) for driver in self._drivers: LOG.debug('Trunk plugin loaded with driver %s', driver.name) self.check_compatibility() diff --git a/neutron/tests/unit/plugins/ml2/drivers/agent/test_capabilities.py b/neutron/tests/unit/plugins/ml2/drivers/agent/test_capabilities.py index 34a2bdfae1c..79f56de8124 100644 --- a/neutron/tests/unit/plugins/ml2/drivers/agent/test_capabilities.py +++ b/neutron/tests/unit/plugins/ml2/drivers/agent/test_capabilities.py @@ -31,10 +31,10 @@ class CapabilitiesTest(base.BaseTestCase): mock_agent_type = mock.Mock() mock_agent = mock.Mock() capabilities.notify_init_event(mock_agent_type, mock_agent) - self._mgr.notify.assert_called_with(mock_agent_type, + self._mgr.publish.assert_called_with(mock_agent_type, events.AFTER_INIT, mock_agent, - agent=mock_agent) + payload=None) def test_register(self): mock_callback = mock.Mock()