diff --git a/vmware_nsx/services/flowclassifier/nsx_v/driver.py b/vmware_nsx/services/flowclassifier/nsx_v/driver.py index 027b35e42b..8edbfda945 100644 --- a/vmware_nsx/services/flowclassifier/nsx_v/driver.py +++ b/vmware_nsx/services/flowclassifier/nsx_v/driver.py @@ -117,7 +117,7 @@ class NsxvFlowClassifierDriver(fc_driver.FlowClassifierDriverBase): self._profile_id, et.tostring(profile_binding, encoding="us-ascii")) - def init_complete(self, resource, event, trigger, **kwargs): + def init_complete(self, resource, event, trigger, payload=None): if self._is_new_security_group: # add existing VMs to the new security group # This code must run after init is done diff --git a/vmware_nsx/services/fwaas/nsx_v3/edge_fwaas_driver_base.py b/vmware_nsx/services/fwaas/nsx_v3/edge_fwaas_driver_base.py index 0d81137bec..59791abf4b 100644 --- a/vmware_nsx/services/fwaas/nsx_v3/edge_fwaas_driver_base.py +++ b/vmware_nsx/services/fwaas/nsx_v3/edge_fwaas_driver_base.py @@ -72,7 +72,7 @@ class CommonEdgeFwaasV3Driver(fwaas_base.FwaasDriverBase): def nsx_router(self): return self.nsxlib.logical_router - def check_backend_version(self, resource, event, trigger, **kwargs): + def check_backend_version(self, resource, event, trigger, payload=None): if (self.core_plugin and not self.nsxlib.feature_supported(consts.FEATURE_ROUTER_FIREWALL)): # router firewall is not supported diff --git a/vmware_nsx/services/l2gateway/nsx_v3/driver.py b/vmware_nsx/services/l2gateway/nsx_v3/driver.py index ffb0eb126b..cf29c8fe0a 100644 --- a/vmware_nsx/services/l2gateway/nsx_v3/driver.py +++ b/vmware_nsx/services/l2gateway/nsx_v3/driver.py @@ -74,7 +74,8 @@ class NsxV3Driver(l2gateway_db.L2GatewayMixin): registry.subscribe(self._ensure_default_l2_gateway, resources.PROCESS, events.BEFORE_SPAWN) - def _ensure_default_l2_gateway(self, resource, event, trigger, **kwargs): + def _ensure_default_l2_gateway(self, resource, event, + trigger, payload=None): """ Create a default logical L2 gateway. diff --git a/vmware_nsx/tests/unit/services/l2gateway/test_nsxv3_driver.py b/vmware_nsx/tests/unit/services/l2gateway/test_nsxv3_driver.py index 566df0db3a..6716ad791a 100644 --- a/vmware_nsx/tests/unit/services/l2gateway/test_nsxv3_driver.py +++ b/vmware_nsx/tests/unit/services/l2gateway/test_nsxv3_driver.py @@ -82,8 +82,8 @@ class TestNsxV3L2GatewayDriver(test_l2gw_db.L2GWTestCase, "nsx_v3") nsx_v3_driver.NsxV3Driver(mock.MagicMock()) # fake the callback invoked after init - registry.notify(resources.PROCESS, events.BEFORE_SPAWN, - mock.MagicMock()) + registry.publish(resources.PROCESS, events.BEFORE_SPAWN, + mock.MagicMock()) l2gws = self.driver._get_l2_gateways(self.context) def_bridge_cluster_id = ( self.nsxlib.bridge_cluster.get_id_by_name_or_id( @@ -107,8 +107,8 @@ class TestNsxV3L2GatewayDriver(test_l2gw_db.L2GWTestCase, for i in range(0, 2): nsx_v3_driver.NsxV3Driver(mock.MagicMock()) # fake the callback invoked after init - registry.notify(resources.PROCESS, events.BEFORE_SPAWN, - mock.MagicMock()) + registry.publish(resources.PROCESS, events.BEFORE_SPAWN, + mock.MagicMock()) l2gws = self.driver._get_l2_gateways(self.context) # Verify whether only one default L2 gateway is created self.assertEqual(1, len(l2gws))