diff --git a/vmware_nsx/plugins/nsx_v/drivers/distributed_router_driver.py b/vmware_nsx/plugins/nsx_v/drivers/distributed_router_driver.py index 46fbb3d745..6a92ac921b 100644 --- a/vmware_nsx/plugins/nsx_v/drivers/distributed_router_driver.py +++ b/vmware_nsx/plugins/nsx_v/drivers/distributed_router_driver.py @@ -16,10 +16,10 @@ import netaddr from oslo_log import log as logging from oslo_utils import excutils -from neutron.db import api as db_api from neutron.db import l3_db from neutron_lib import constants +from neutron_lib.db import api as db_api from neutron_lib import exceptions as n_exc from vmware_nsx.common import locking diff --git a/vmware_nsx/plugins/nsx_v/drivers/exclusive_router_driver.py b/vmware_nsx/plugins/nsx_v/drivers/exclusive_router_driver.py index ac1cb69a80..3f7ddf9959 100644 --- a/vmware_nsx/plugins/nsx_v/drivers/exclusive_router_driver.py +++ b/vmware_nsx/plugins/nsx_v/drivers/exclusive_router_driver.py @@ -14,8 +14,8 @@ from oslo_log import log as logging -from neutron.db import api as db_api from neutron_lib import constants as n_consts +from neutron_lib.db import api as db_api from neutron_lib.plugins import constants as plugin_const from vmware_nsx._i18n import _ diff --git a/vmware_nsx/plugins/nsx_v/drivers/shared_router_driver.py b/vmware_nsx/plugins/nsx_v/drivers/shared_router_driver.py index 2f95c088af..cefc24d438 100644 --- a/vmware_nsx/plugins/nsx_v/drivers/shared_router_driver.py +++ b/vmware_nsx/plugins/nsx_v/drivers/shared_router_driver.py @@ -15,12 +15,12 @@ import netaddr from oslo_config import cfg -from neutron.db import api as db_api from neutron.db import l3_db from neutron.db.models import l3 as l3_db_models from neutron.db import models_v2 from neutron_lib.api import validators from neutron_lib import constants +from neutron_lib.db import api as db_api from neutron_lib import exceptions as n_exc from oslo_log import log as logging diff --git a/vmware_nsx/plugins/nsx_v/plugin.py b/vmware_nsx/plugins/nsx_v/plugin.py index 3cccb56ba5..9c997a563f 100644 --- a/vmware_nsx/plugins/nsx_v/plugin.py +++ b/vmware_nsx/plugins/nsx_v/plugin.py @@ -37,6 +37,7 @@ from neutron_lib.callbacks import registry from neutron_lib.callbacks import resources from neutron_lib import constants from neutron_lib import context as n_context +from neutron_lib.db import api as lib_db_api from neutron_lib.db import constants as db_const from neutron_lib.db import utils as db_utils from neutron_lib import exceptions as n_exc @@ -1814,7 +1815,7 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin, filter(models_v2.Port.mac_address == mac_address). count()) - @db_api.retry_db_errors + @lib_db_api.retry_db_errors def base_create_port(self, context, port): created_port = super(NsxVPluginV2, self).create_port(context, port) self._extension_manager.process_create_port(