use retry_db_errors from neutron-lib
The externally consumed APIs from neutron.db.api were rehomed into neutron-lib with https://review.openstack.org/#/c/557040/ This patch consumes the retry_db_errors from lib in prep for https://review.openstack.org/#/c/570016 Change-Id: Id5cf5c0abe60fa1f3ca6193980e7f66cb3d48e1b
This commit is contained in:
parent
c4420c7a17
commit
50678f3e5a
@ -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
|
||||
|
@ -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 _
|
||||
|
@ -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
|
||||
|
||||
|
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user