diff --git a/vmware_nsx/plugins/nsx_mh/plugin.py b/vmware_nsx/plugins/nsx_mh/plugin.py index 1b9a2569f8..b8bc5fbac4 100644 --- a/vmware_nsx/plugins/nsx_mh/plugin.py +++ b/vmware_nsx/plugins/nsx_mh/plugin.py @@ -1892,7 +1892,8 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin, context, {'id': floatingip_db.id, 'port_id': floatingip_db.fixed_port_id, 'fixed_ip_address': floatingip_db.fixed_ip_address, - 'tenant_id': floatingip_db.tenant_id}) + 'tenant_id': floatingip_db.tenant_id}, + floatingip_db.tenant_id) nsx_gw_port_id = routerlib.find_router_gw_port( context, self.cluster, nsx_old_router_id)['uuid'] self._retrieve_and_delete_nat_rules( diff --git a/vmware_nsx/tests/unit/services/qos/test_nsxv3_notification.py b/vmware_nsx/tests/unit/services/qos/test_nsxv3_notification.py index 12bdc00c79..a41bdff72b 100644 --- a/vmware_nsx/tests/unit/services/qos/test_nsxv3_notification.py +++ b/vmware_nsx/tests/unit/services/qos/test_nsxv3_notification.py @@ -48,6 +48,8 @@ class TestQosNsxV3Notification(base.BaseQosTestCase, "qos") self.qos_plugin = qos_plugin.QoSPlugin() self.ctxt = context.Context('fake_user', 'fake_tenant') + mock.patch.object(self.ctxt.session, 'refresh').start() + mock.patch.object(self.ctxt.session, 'expunge').start() self.policy_data = { 'policy': {'id': uuidutils.generate_uuid(), 'tenant_id': uuidutils.generate_uuid(), diff --git a/vmware_nsx/tests/unit/services/qos/test_nsxv_notification.py b/vmware_nsx/tests/unit/services/qos/test_nsxv_notification.py index 5b19d6a1b8..188d2fa444 100644 --- a/vmware_nsx/tests/unit/services/qos/test_nsxv_notification.py +++ b/vmware_nsx/tests/unit/services/qos/test_nsxv_notification.py @@ -63,6 +63,9 @@ class TestQosNsxVNotification(test_plugin.NsxVPluginV2TestCase, # Pre defined QoS data for the tests self.ctxt = context.Context('fake_user', 'fake_tenant') + mock.patch.object(self.ctxt.session, 'refresh').start() + mock.patch.object(self.ctxt.session, 'expunge').start() + self.policy_data = { 'policy': {'id': uuidutils.generate_uuid(), 'tenant_id': uuidutils.generate_uuid(),