From 7bcac8c261881f8d0fcbb7329888b25032ca1ace Mon Sep 17 00:00:00 2001 From: Boden R Date: Fri, 5 Oct 2018 06:07:22 -0600 Subject: [PATCH] use retry_if_session_inactive from neutron-lib The retry_if_session_inactive decorator was rehomed into neutron-lib [1]. This patch consumes it by using neutron-libs version where appropriate in prep for [2]. [1] https://review.openstack.org/#/c/557040/ [2] https://review.openstack.org/#/c/607710/ Change-Id: I32905d95fe216d6113ff6b82de17aae650d0d736 --- vmware_nsx/plugins/nsx/plugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vmware_nsx/plugins/nsx/plugin.py b/vmware_nsx/plugins/nsx/plugin.py index bbd5ac8728..99787bb6ee 100644 --- a/vmware_nsx/plugins/nsx/plugin.py +++ b/vmware_nsx/plugins/nsx/plugin.py @@ -20,6 +20,7 @@ from neutron_lib.callbacks import events from neutron_lib.callbacks import registry from neutron_lib.callbacks import resources from neutron_lib import context as n_context +from neutron_lib.db import api as lib_db_api from neutron_lib.db import utils as db_utils from neutron_lib.plugins import constants as plugin_constants from neutron_lib.plugins import directory @@ -292,7 +293,7 @@ class NsxTVDPlugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin, p = self._get_plugin_from_project(context, tenant_id) return p.create_network(context, network) - @db_api.retry_if_session_inactive() + @lib_db_api.retry_if_session_inactive() def create_network_bulk(self, context, networks): #Implement create bulk so that the plugin calculation will be done once objects = []