diff --git a/vmware_nsx/common/exceptions.py b/vmware_nsx/common/exceptions.py index 0af18d3ae5..e210474fbd 100644 --- a/vmware_nsx/common/exceptions.py +++ b/vmware_nsx/common/exceptions.py @@ -14,7 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.common import exceptions as n_exc +from neutron_lib import exceptions as n_exc from vmware_nsx._i18n import _ diff --git a/vmware_nsx/common/nsx_utils.py b/vmware_nsx/common/nsx_utils.py index b097f9ceea..6575b002fb 100644 --- a/vmware_nsx/common/nsx_utils.py +++ b/vmware_nsx/common/nsx_utils.py @@ -14,9 +14,9 @@ # under the License. from neutron.api.v2 import attributes as attr -from neutron.common import exceptions as n_exc from neutron.extensions import multiprovidernet as mpnet from neutron.extensions import providernet as pnet +from neutron_lib import exceptions as n_exc from oslo_log import log import six diff --git a/vmware_nsx/common/sync.py b/vmware_nsx/common/sync.py index cf9f3e9915..4b8d68ffe7 100644 --- a/vmware_nsx/common/sync.py +++ b/vmware_nsx/common/sync.py @@ -16,13 +16,13 @@ import random from neutron_lib import constants +from neutron_lib import exceptions from oslo_log import log from oslo_serialization import jsonutils from oslo_service import loopingcall from oslo_utils import timeutils import six -from neutron.common import exceptions from neutron import context from neutron.db import external_net_db from neutron.db import l3_db diff --git a/vmware_nsx/common/utils.py b/vmware_nsx/common/utils.py index 0a26991ad2..216ac263d8 100644 --- a/vmware_nsx/common/utils.py +++ b/vmware_nsx/common/utils.py @@ -16,8 +16,8 @@ import hashlib from neutron.api.v2 import attributes -from neutron.common import exceptions from neutron import version +from neutron_lib import exceptions from oslo_config import cfg from oslo_log import log import retrying diff --git a/vmware_nsx/db/networkgw_db.py b/vmware_nsx/db/networkgw_db.py index cdc02d74e3..bbad74840b 100644 --- a/vmware_nsx/db/networkgw_db.py +++ b/vmware_nsx/db/networkgw_db.py @@ -15,8 +15,8 @@ from sqlalchemy.orm import exc as sa_orm_exc from neutron.api.v2 import attributes -from neutron.common import exceptions from neutron.plugins.common import utils +from neutron_lib import exceptions from oslo_log import log as logging from oslo_utils import uuidutils import six diff --git a/vmware_nsx/dhcp_meta/lsnmanager.py b/vmware_nsx/dhcp_meta/lsnmanager.py index 8d9c27f79a..4598d980c9 100644 --- a/vmware_nsx/dhcp_meta/lsnmanager.py +++ b/vmware_nsx/dhcp_meta/lsnmanager.py @@ -15,7 +15,7 @@ # under the License. # -from neutron.common import exceptions as n_exc +from neutron_lib import exceptions as n_exc from oslo_config import cfg from oslo_db import exception as db_exc from oslo_log import log as logging diff --git a/vmware_nsx/dhcp_meta/migration.py b/vmware_nsx/dhcp_meta/migration.py index 77cf676d96..38b097a68a 100644 --- a/vmware_nsx/dhcp_meta/migration.py +++ b/vmware_nsx/dhcp_meta/migration.py @@ -15,9 +15,9 @@ # under the License. # -from neutron.common import exceptions as n_exc from neutron.extensions import external_net from neutron_lib import constants as const +from neutron_lib import exceptions as n_exc from oslo_log import log as logging from vmware_nsx._i18n import _, _LE diff --git a/vmware_nsx/dhcp_meta/nsx.py b/vmware_nsx/dhcp_meta/nsx.py index 814ee35e02..1906714e3b 100644 --- a/vmware_nsx/dhcp_meta/nsx.py +++ b/vmware_nsx/dhcp_meta/nsx.py @@ -16,12 +16,12 @@ # from neutron_lib import constants as const +from neutron_lib import exceptions as n_exc from oslo_config import cfg from oslo_log import log as logging from oslo_utils import excutils from neutron.api.v2 import attributes as attr -from neutron.common import exceptions as n_exc from neutron.db import db_base_plugin_v2 from neutron.db import l3_db from neutron.extensions import external_net diff --git a/vmware_nsx/dhcp_meta/rpc.py b/vmware_nsx/dhcp_meta/rpc.py index 0f1da2e1c7..c2277194e9 100644 --- a/vmware_nsx/dhcp_meta/rpc.py +++ b/vmware_nsx/dhcp_meta/rpc.py @@ -17,12 +17,12 @@ from eventlet import greenthread import netaddr from neutron_lib import constants as const +from neutron_lib import exceptions as ntn_exc from oslo_config import cfg from oslo_log import log as logging from neutron.api.rpc.agentnotifiers import dhcp_rpc_agent_api from neutron.api.v2 import attributes -from neutron.common import exceptions as ntn_exc from neutron.db import db_base_plugin_v2 from neutron.db import models_v2 diff --git a/vmware_nsx/dvs/dvs.py b/vmware_nsx/dvs/dvs.py index 0b8888b05c..4cf2be8e20 100644 --- a/vmware_nsx/dvs/dvs.py +++ b/vmware_nsx/dvs/dvs.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.common import exceptions +from neutron_lib import exceptions from oslo_log import log as logging from oslo_utils import excutils from oslo_vmware import vim_util diff --git a/vmware_nsx/extensions/qos.py b/vmware_nsx/extensions/qos.py index efd692c8be..3020fa0bcf 100644 --- a/vmware_nsx/extensions/qos.py +++ b/vmware_nsx/extensions/qos.py @@ -19,9 +19,10 @@ import abc from neutron.api import extensions from neutron.api.v2 import attributes as attr from neutron.api.v2 import base -from neutron.common import exceptions as nexception from neutron import manager +from neutron_lib import exceptions as nexception + from vmware_nsx._i18n import _ # For policy.json/Auth diff --git a/vmware_nsx/nsxlib/mh/__init__.py b/vmware_nsx/nsxlib/mh/__init__.py index 51d51d52e9..b9d882fc51 100644 --- a/vmware_nsx/nsxlib/mh/__init__.py +++ b/vmware_nsx/nsxlib/mh/__init__.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.common import exceptions as exception from neutron import version +from neutron_lib import exceptions as exception from oslo_log import log from oslo_serialization import jsonutils import six diff --git a/vmware_nsx/nsxlib/mh/lsn.py b/vmware_nsx/nsxlib/mh/lsn.py index 12f39c6e52..8fb4e039e4 100644 --- a/vmware_nsx/nsxlib/mh/lsn.py +++ b/vmware_nsx/nsxlib/mh/lsn.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.common import exceptions as exception +from neutron_lib import exceptions as exception from oslo_log import log from oslo_serialization import jsonutils import six diff --git a/vmware_nsx/nsxlib/mh/queue.py b/vmware_nsx/nsxlib/mh/queue.py index 7b40a81772..4830d92556 100644 --- a/vmware_nsx/nsxlib/mh/queue.py +++ b/vmware_nsx/nsxlib/mh/queue.py @@ -14,7 +14,7 @@ # under the License. from neutron.api.v2 import attributes as attr -from neutron.common import exceptions as exception +from neutron_lib import exceptions as exception from oslo_log import log from oslo_serialization import jsonutils from oslo_utils import excutils diff --git a/vmware_nsx/nsxlib/mh/router.py b/vmware_nsx/nsxlib/mh/router.py index 0d8b4dceda..0439f03758 100644 --- a/vmware_nsx/nsxlib/mh/router.py +++ b/vmware_nsx/nsxlib/mh/router.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.common import exceptions as exception +from neutron_lib import exceptions as exception from oslo_config import cfg from oslo_log import log from oslo_serialization import jsonutils diff --git a/vmware_nsx/nsxlib/mh/secgroup.py b/vmware_nsx/nsxlib/mh/secgroup.py index c93bff5a85..478fe1036d 100644 --- a/vmware_nsx/nsxlib/mh/secgroup.py +++ b/vmware_nsx/nsxlib/mh/secgroup.py @@ -14,12 +14,11 @@ # under the License. from neutron_lib import constants +from neutron_lib import exceptions from oslo_log import log from oslo_serialization import jsonutils from oslo_utils import excutils -from neutron.common import exceptions - from vmware_nsx._i18n import _LW from vmware_nsx.common import utils from vmware_nsx.nsxlib import mh as nsxlib diff --git a/vmware_nsx/nsxlib/mh/switch.py b/vmware_nsx/nsxlib/mh/switch.py index 7ce6823ec3..bfc93760c2 100644 --- a/vmware_nsx/nsxlib/mh/switch.py +++ b/vmware_nsx/nsxlib/mh/switch.py @@ -15,12 +15,11 @@ # from neutron_lib import constants +from neutron_lib import exceptions as exception from oslo_config import cfg from oslo_log import log from oslo_serialization import jsonutils -from neutron.common import exceptions as exception - from vmware_nsx._i18n import _, _LE, _LI, _LW from vmware_nsx.api_client import exception as api_exc from vmware_nsx.common import exceptions as nsx_exc diff --git a/vmware_nsx/nsxlib/v3/router.py b/vmware_nsx/nsxlib/v3/router.py index f0e8255de7..a8f5e0da8d 100644 --- a/vmware_nsx/nsxlib/v3/router.py +++ b/vmware_nsx/nsxlib/v3/router.py @@ -18,7 +18,7 @@ NSX-V3 Plugin router module """ import copy -from neutron.common import exceptions as n_exc +from neutron_lib import exceptions as n_exc from oslo_log import log from vmware_nsx._i18n import _, _LW diff --git a/vmware_nsx/plugins/dvs/plugin.py b/vmware_nsx/plugins/dvs/plugin.py index 739d6790d3..65cd27f12d 100644 --- a/vmware_nsx/plugins/dvs/plugin.py +++ b/vmware_nsx/plugins/dvs/plugin.py @@ -20,7 +20,6 @@ from oslo_utils import excutils from neutron.api import extensions as neutron_extensions from neutron.api.v2 import attributes as attr -from neutron.common import exceptions as n_exc from neutron.db import agentschedulers_db from neutron.db import allowedaddresspairs_db as addr_pair_db from neutron.db import db_base_plugin_v2 @@ -37,6 +36,7 @@ from neutron.extensions import providernet as pnet from neutron.extensions import securitygroup as ext_sg from neutron.plugins.common import constants from neutron.plugins.common import utils +from neutron_lib import exceptions as n_exc import vmware_nsx from vmware_nsx._i18n import _, _LE, _LW diff --git a/vmware_nsx/plugins/nsx_mh/plugin.py b/vmware_nsx/plugins/nsx_mh/plugin.py index 21537c7c6b..cb1fe2a699 100644 --- a/vmware_nsx/plugins/nsx_mh/plugin.py +++ b/vmware_nsx/plugins/nsx_mh/plugin.py @@ -16,6 +16,7 @@ import uuid from neutron_lib import constants +from neutron_lib import exceptions as n_exc from oslo_concurrency import lockutils from oslo_config import cfg from oslo_db import exception as db_exc @@ -29,7 +30,6 @@ import webob.exc from neutron.api import extensions as neutron_extensions from neutron.api.v2 import attributes as attr from neutron.api.v2 import base -from neutron.common import exceptions as n_exc from neutron import context as q_context from neutron.db import agentschedulers_db from neutron.db import allowedaddresspairs_db as addr_pair_db 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 758661bbce..ccd7ec344c 100644 --- a/vmware_nsx/plugins/nsx_v/drivers/distributed_router_driver.py +++ b/vmware_nsx/plugins/nsx_v/drivers/distributed_router_driver.py @@ -16,9 +16,10 @@ from oslo_log import log as logging from oslo_utils import excutils from neutron.api.v2 import attributes as attr -from neutron.common import exceptions as n_exc from neutron.db import l3_db +from neutron_lib import exceptions as n_exc + from vmware_nsx._i18n import _LE from vmware_nsx.common import locking from vmware_nsx.db import nsxv_db diff --git a/vmware_nsx/plugins/nsx_v/md_proxy.py b/vmware_nsx/plugins/nsx_v/md_proxy.py index fe2dff2dbc..6747fc89a6 100644 --- a/vmware_nsx/plugins/nsx_v/md_proxy.py +++ b/vmware_nsx/plugins/nsx_v/md_proxy.py @@ -20,7 +20,7 @@ import hmac import netaddr from neutron.api.v2 import attributes as attr from neutron import context as neutron_context -from neutron_lib import constants as constants +from neutron_lib import constants from oslo_config import cfg 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 07d4b395dd..d88c492385 100644 --- a/vmware_nsx/plugins/nsx_v/plugin.py +++ b/vmware_nsx/plugins/nsx_v/plugin.py @@ -19,6 +19,7 @@ import uuid import netaddr from neutron_lib import constants +from neutron_lib import exceptions as n_exc from oslo_config import cfg from oslo_log import log as logging from oslo_utils import excutils @@ -30,7 +31,6 @@ from neutron.api.v2 import attributes as attr from neutron.callbacks import events from neutron.callbacks import registry from neutron.callbacks import resources -from neutron.common import exceptions as n_exc from neutron.db import agents_db from neutron.db import allowedaddresspairs_db as addr_pair_db from neutron.db import db_base_plugin_v2 diff --git a/vmware_nsx/plugins/nsx_v/vshield/common/exceptions.py b/vmware_nsx/plugins/nsx_v/vshield/common/exceptions.py index 47e35fee57..397d507a55 100644 --- a/vmware_nsx/plugins/nsx_v/vshield/common/exceptions.py +++ b/vmware_nsx/plugins/nsx_v/vshield/common/exceptions.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.common import exceptions +from neutron_lib import exceptions from vmware_nsx._i18n import _ diff --git a/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py b/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py index 71efc03f27..204ff76b85 100644 --- a/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py +++ b/vmware_nsx/plugins/nsx_v/vshield/edge_utils.py @@ -26,11 +26,12 @@ from oslo_utils import uuidutils from six import moves from sqlalchemy.orm import exc as sa_exc -from neutron.common import exceptions as n_exc from neutron import context as q_context from neutron.extensions import l3 from neutron.plugins.common import constants as plugin_const +from neutron_lib import exceptions as n_exc + from vmware_nsx._i18n import _, _LE, _LW from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.common import locking diff --git a/vmware_nsx/plugins/nsx_v/vshield/tasks/tasks.py b/vmware_nsx/plugins/nsx_v/vshield/tasks/tasks.py index 8642a8b87f..e2012821a5 100644 --- a/vmware_nsx/plugins/nsx_v/vshield/tasks/tasks.py +++ b/vmware_nsx/plugins/nsx_v/vshield/tasks/tasks.py @@ -18,7 +18,7 @@ import uuid from eventlet import event from eventlet import greenthread -from neutron.common import exceptions +from neutron_lib import exceptions from oslo_log import log as logging from oslo_service import loopingcall import six diff --git a/vmware_nsx/plugins/nsx_v3/plugin.py b/vmware_nsx/plugins/nsx_v3/plugin.py index adfd58c08a..8dc9435741 100644 --- a/vmware_nsx/plugins/nsx_v3/plugin.py +++ b/vmware_nsx/plugins/nsx_v3/plugin.py @@ -23,7 +23,6 @@ from neutron.callbacks import events from neutron.callbacks import exceptions as callback_exc from neutron.callbacks import registry from neutron.callbacks import resources -from neutron.common import exceptions as n_exc from neutron.common import rpc as n_rpc from neutron.common import topics from neutron.common import utils as neutron_utils @@ -53,6 +52,7 @@ from neutron.extensions import securitygroup as ext_sg from neutron.plugins.common import constants as plugin_const from neutron.plugins.common import utils as n_utils from neutron_lib import constants as const +from neutron_lib import exceptions as n_exc from oslo_config import cfg from oslo_log import log from oslo_utils import excutils diff --git a/vmware_nsx/services/l2gateway/nsx_v/driver.py b/vmware_nsx/services/l2gateway/nsx_v/driver.py index eccd222b42..8cc8dae2fa 100644 --- a/vmware_nsx/services/l2gateway/nsx_v/driver.py +++ b/vmware_nsx/services/l2gateway/nsx_v/driver.py @@ -17,8 +17,8 @@ from networking_l2gw.db.l2gateway import l2gateway_db from networking_l2gw.services.l2gateway.common import constants as l2gw_const from networking_l2gw.services.l2gateway import exceptions as l2gw_exc -from neutron.common import exceptions as n_exc from neutron import manager +from neutron_lib import exceptions as n_exc from oslo_config import cfg from oslo_log import log as logging from oslo_utils import excutils diff --git a/vmware_nsx/services/l2gateway/nsx_v3/driver.py b/vmware_nsx/services/l2gateway/nsx_v3/driver.py index 59961f432e..b52c4808ec 100644 --- a/vmware_nsx/services/l2gateway/nsx_v3/driver.py +++ b/vmware_nsx/services/l2gateway/nsx_v3/driver.py @@ -27,11 +27,11 @@ from neutron.api.v2 import attributes from neutron.callbacks import events from neutron.callbacks import registry from neutron.callbacks import resources -from neutron.common import exceptions as n_exc from neutron import context from neutron.extensions import providernet from neutron import manager from neutron.plugins.common import utils as n_utils +from neutron_lib import exceptions as n_exc from vmware_nsx._i18n import _, _LE, _LI from vmware_nsx.common import exceptions as nsx_exc diff --git a/vmware_nsx/services/lbaas/nsx_v/lbaas_common.py b/vmware_nsx/services/lbaas/nsx_v/lbaas_common.py index 262a72fd52..74305060ee 100644 --- a/vmware_nsx/services/lbaas/nsx_v/lbaas_common.py +++ b/vmware_nsx/services/lbaas/nsx_v/lbaas_common.py @@ -16,7 +16,7 @@ import netaddr import xml.etree.ElementTree as et -from neutron.common import exceptions as n_exc +from neutron_lib import exceptions as n_exc from vmware_nsx._i18n import _ from vmware_nsx.common import locking diff --git a/vmware_nsx/services/lbaas/nsx_v/v1/edge_loadbalancer_driver.py b/vmware_nsx/services/lbaas/nsx_v/v1/edge_loadbalancer_driver.py index 8515e30303..364fbe2ef4 100644 --- a/vmware_nsx/services/lbaas/nsx_v/v1/edge_loadbalancer_driver.py +++ b/vmware_nsx/services/lbaas/nsx_v/v1/edge_loadbalancer_driver.py @@ -13,9 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -from neutron.common import exceptions as n_exc from neutron import manager from neutron.plugins.common import constants +from neutron_lib import exceptions as n_exc from oslo_log import log as logging from oslo_utils import excutils diff --git a/vmware_nsx/shell/admin/plugins/nsxv/resources/backup_edges.py b/vmware_nsx/shell/admin/plugins/nsxv/resources/backup_edges.py index ffccde0963..69ed363353 100644 --- a/vmware_nsx/shell/admin/plugins/nsxv/resources/backup_edges.py +++ b/vmware_nsx/shell/admin/plugins/nsxv/resources/backup_edges.py @@ -16,8 +16,8 @@ import logging from neutron.callbacks import registry -from neutron.common import exceptions from neutron.db import l3_db +from neutron_lib import exceptions from oslo_utils import uuidutils from vmware_nsx._i18n import _LE, _LI diff --git a/vmware_nsx/shell/admin/plugins/nsxv/resources/edges.py b/vmware_nsx/shell/admin/plugins/nsxv/resources/edges.py index 7155916248..19da34eb4a 100644 --- a/vmware_nsx/shell/admin/plugins/nsxv/resources/edges.py +++ b/vmware_nsx/shell/admin/plugins/nsxv/resources/edges.py @@ -24,7 +24,7 @@ import vmware_nsx.shell.admin.plugins.nsxv.resources.utils as utils import vmware_nsx.shell.nsxadmin as shell from neutron.callbacks import registry -from neutron.common import exceptions +from neutron_lib import exceptions from vmware_nsx._i18n import _LE, _LI from vmware_nsx.db import nsxv_db diff --git a/vmware_nsx/shell/admin/plugins/nsxv/resources/spoofguard_policy.py b/vmware_nsx/shell/admin/plugins/nsxv/resources/spoofguard_policy.py index 55855bb855..f08c723229 100644 --- a/vmware_nsx/shell/admin/plugins/nsxv/resources/spoofguard_policy.py +++ b/vmware_nsx/shell/admin/plugins/nsxv/resources/spoofguard_policy.py @@ -24,7 +24,7 @@ import vmware_nsx.shell.admin.plugins.nsxv.resources.utils as utils import vmware_nsx.shell.nsxadmin as shell from neutron.callbacks import registry -from neutron.common import exceptions +from neutron_lib import exceptions from vmware_nsx._i18n import _LE, _LI from vmware_nsx.db import nsxv_db diff --git a/vmware_nsx/tests/unit/dvs/test_plugin.py b/vmware_nsx/tests/unit/dvs/test_plugin.py index 8480d01e8a..0c63444264 100644 --- a/vmware_nsx/tests/unit/dvs/test_plugin.py +++ b/vmware_nsx/tests/unit/dvs/test_plugin.py @@ -17,12 +17,12 @@ import mock from oslo_config import cfg from oslo_utils import uuidutils -from neutron.common import exceptions as exp from neutron import context from neutron.extensions import portbindings from neutron import manager from neutron.tests import base import neutron.tests.unit.db.test_db_base_plugin_v2 as test_plugin +from neutron_lib import exceptions as exp from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.db import db as nsx_db from vmware_nsx.dvs import dvs diff --git a/vmware_nsx/tests/unit/extensions/test_metadata.py b/vmware_nsx/tests/unit/extensions/test_metadata.py index 39aea5e564..407de7e324 100644 --- a/vmware_nsx/tests/unit/extensions/test_metadata.py +++ b/vmware_nsx/tests/unit/extensions/test_metadata.py @@ -16,10 +16,10 @@ import mock import netaddr from neutron_lib import constants +from neutron_lib import exceptions as n_exc from oslo_config import cfg import webob.exc -from neutron.common import exceptions as n_exc from neutron import manager from vmware_nsx.api_client import exception as api_exc diff --git a/vmware_nsx/tests/unit/nsx_mh/test_dhcpmeta.py b/vmware_nsx/tests/unit/nsx_mh/test_dhcpmeta.py index 9a7f64b1ad..27a5d6910e 100644 --- a/vmware_nsx/tests/unit/nsx_mh/test_dhcpmeta.py +++ b/vmware_nsx/tests/unit/nsx_mh/test_dhcpmeta.py @@ -15,9 +15,9 @@ import mock from neutron_lib import constants as n_consts +from neutron_lib import exceptions as n_exc from oslo_config import cfg -from neutron.common import exceptions as n_exc from neutron import context from neutron.tests import base from neutron.tests.unit import testlib_api diff --git a/vmware_nsx/tests/unit/nsx_mh/test_plugin.py b/vmware_nsx/tests/unit/nsx_mh/test_plugin.py index 95021b0b86..1a98e3bb6d 100644 --- a/vmware_nsx/tests/unit/nsx_mh/test_plugin.py +++ b/vmware_nsx/tests/unit/nsx_mh/test_plugin.py @@ -17,7 +17,6 @@ import uuid import mock from neutron.api.v2 import attributes -from neutron.common import exceptions as ntn_exc from neutron import context from neutron.extensions import dvr from neutron.extensions import external_net @@ -35,6 +34,7 @@ import neutron.tests.unit.extensions.test_l3_ext_gw_mode as test_ext_gw_mode import neutron.tests.unit.extensions.test_securitygroup as ext_sg from neutron.tests.unit import testlib_api from neutron_lib import constants +from neutron_lib import exceptions as ntn_exc from oslo_config import cfg from oslo_db import exception as db_exc from oslo_log import log diff --git a/vmware_nsx/tests/unit/nsx_mh/test_sync.py b/vmware_nsx/tests/unit/nsx_mh/test_sync.py index c5cb2105ef..5b4235a774 100644 --- a/vmware_nsx/tests/unit/nsx_mh/test_sync.py +++ b/vmware_nsx/tests/unit/nsx_mh/test_sync.py @@ -19,12 +19,12 @@ import time import mock from neutron_lib import constants +from neutron_lib import exceptions as n_exc from oslo_config import cfg from oslo_log import log from oslo_serialization import jsonutils from neutron.api.v2 import attributes as attr -from neutron.common import exceptions as n_exc from neutron import context from neutron.extensions import l3 from neutron.tests import base diff --git a/vmware_nsx/tests/unit/nsx_v/test_plugin.py b/vmware_nsx/tests/unit/nsx_v/test_plugin.py index 85b1274136..2430e2e10d 100644 --- a/vmware_nsx/tests/unit/nsx_v/test_plugin.py +++ b/vmware_nsx/tests/unit/nsx_v/test_plugin.py @@ -18,7 +18,6 @@ from eventlet import greenthread import mock import netaddr from neutron.api.v2 import attributes -from neutron.common import exceptions as n_exc from neutron import context from neutron.extensions import dvr as dist_router from neutron.extensions import external_net @@ -38,6 +37,7 @@ import neutron.tests.unit.extensions.test_portsecurity as test_psec import neutron.tests.unit.extensions.test_securitygroup as ext_sg from neutron.tests.unit import testlib_api from neutron_lib import constants +from neutron_lib import exceptions as n_exc from oslo_config import cfg from oslo_db import exception as db_exc from oslo_utils import uuidutils diff --git a/vmware_nsx/tests/unit/nsx_v/vshield/test_edge_utils.py b/vmware_nsx/tests/unit/nsx_v/vshield/test_edge_utils.py index 320d598aec..e549d2302b 100644 --- a/vmware_nsx/tests/unit/nsx_v/vshield/test_edge_utils.py +++ b/vmware_nsx/tests/unit/nsx_v/vshield/test_edge_utils.py @@ -18,10 +18,10 @@ from oslo_config import cfg from oslo_utils import uuidutils from six import moves -from neutron.common import exceptions as n_exc from neutron import context from neutron.plugins.common import constants as plugin_const from neutron.tests.unit import testlib_api +from neutron_lib import exceptions as n_exc from vmware_nsx.common import nsxv_constants from vmware_nsx.db import nsxv_db from vmware_nsx.plugins.nsx_v.vshield.common import ( diff --git a/vmware_nsx/tests/unit/nsx_v3/test_plugin.py b/vmware_nsx/tests/unit/nsx_v3/test_plugin.py index d899711d29..096f40c8ab 100644 --- a/vmware_nsx/tests/unit/nsx_v3/test_plugin.py +++ b/vmware_nsx/tests/unit/nsx_v3/test_plugin.py @@ -17,7 +17,6 @@ import six from webob import exc from neutron.api.v2 import attributes -from neutron.common import exceptions as n_exc from neutron import context from neutron.db import models_v2 from neutron.extensions import availability_zone as az_ext @@ -41,6 +40,7 @@ from neutron.tests.unit.scheduler \ from neutron import version from neutron_lib import constants +from neutron_lib import exceptions as n_exc from oslo_config import cfg from oslo_serialization import jsonutils from oslo_utils import uuidutils diff --git a/vmware_nsx/tests/unit/nsxlib/mh/test_lsn.py b/vmware_nsx/tests/unit/nsxlib/mh/test_lsn.py index a24cc83f49..ae87aa84fb 100644 --- a/vmware_nsx/tests/unit/nsxlib/mh/test_lsn.py +++ b/vmware_nsx/tests/unit/nsxlib/mh/test_lsn.py @@ -14,8 +14,8 @@ # limitations under the License. import mock -from neutron.common import exceptions from neutron.tests import base +from neutron_lib import exceptions from oslo_serialization import jsonutils import six diff --git a/vmware_nsx/tests/unit/nsxlib/mh/test_queue.py b/vmware_nsx/tests/unit/nsxlib/mh/test_queue.py index 718bce17e5..27f7ad0090 100644 --- a/vmware_nsx/tests/unit/nsxlib/mh/test_queue.py +++ b/vmware_nsx/tests/unit/nsxlib/mh/test_queue.py @@ -15,7 +15,7 @@ # import mock -from neutron.common import exceptions +from neutron_lib import exceptions from vmware_nsx.api_client import exception as api_exc from vmware_nsx.nsxlib import mh as nsxlib diff --git a/vmware_nsx/tests/unit/nsxlib/mh/test_router.py b/vmware_nsx/tests/unit/nsxlib/mh/test_router.py index cd1ad49c71..f3de9e3d8e 100644 --- a/vmware_nsx/tests/unit/nsxlib/mh/test_router.py +++ b/vmware_nsx/tests/unit/nsxlib/mh/test_router.py @@ -15,8 +15,8 @@ # import mock -from neutron.common import exceptions from neutron.tests.unit.api.v2 import test_base +from neutron_lib import exceptions from oslo_config import cfg from oslo_utils import uuidutils diff --git a/vmware_nsx/tests/unit/nsxlib/mh/test_secgroup.py b/vmware_nsx/tests/unit/nsxlib/mh/test_secgroup.py index 83b081b251..fbbd44b660 100644 --- a/vmware_nsx/tests/unit/nsxlib/mh/test_secgroup.py +++ b/vmware_nsx/tests/unit/nsxlib/mh/test_secgroup.py @@ -14,9 +14,9 @@ # limitations under the License. # -from neutron.common import exceptions from neutron.tests.unit.api.v2 import test_base from neutron_lib import constants +from neutron_lib import exceptions from vmware_nsx.nsxlib import mh as nsxlib from vmware_nsx.nsxlib.mh import secgroup as secgrouplib diff --git a/vmware_nsx/tests/unit/nsxlib/mh/test_switch.py b/vmware_nsx/tests/unit/nsxlib/mh/test_switch.py index 7efefb7e0e..1c7dab0096 100644 --- a/vmware_nsx/tests/unit/nsxlib/mh/test_switch.py +++ b/vmware_nsx/tests/unit/nsxlib/mh/test_switch.py @@ -17,9 +17,9 @@ import hashlib import mock -from neutron.common import exceptions from neutron.tests.unit.api.v2 import test_base from neutron_lib import constants +from neutron_lib import exceptions from vmware_nsx.common import utils from vmware_nsx.nsxlib.mh import switch as switchlib 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 a4f688bd1c..9a2f689936 100644 --- a/vmware_nsx/tests/unit/services/l2gateway/test_nsxv3_driver.py +++ b/vmware_nsx/tests/unit/services/l2gateway/test_nsxv3_driver.py @@ -21,10 +21,10 @@ from oslo_config import cfg from oslo_utils import importutils from oslo_utils import uuidutils -from neutron.common import exceptions as n_exc from neutron import context from neutron.tests import base +from neutron_lib import exceptions as n_exc from vmware_nsx.common import nsx_constants from vmware_nsx.services.l2gateway.common import plugin as l2gw_plugin from vmware_nsx.services.l2gateway.nsx_v3 import driver as nsx_v3_driver diff --git a/vmware_nsx/tests/unit/services/l2gateway/test_nsxv_driver.py b/vmware_nsx/tests/unit/services/l2gateway/test_nsxv_driver.py index 89cd7dfff8..28d046a007 100644 --- a/vmware_nsx/tests/unit/services/l2gateway/test_nsxv_driver.py +++ b/vmware_nsx/tests/unit/services/l2gateway/test_nsxv_driver.py @@ -14,11 +14,11 @@ # under the License. import mock -from neutron.common import exceptions as n_exc from neutron import context from neutron.tests import base from networking_l2gw.db.l2gateway import l2gateway_db +from neutron_lib import exceptions as n_exc from vmware_nsx.common import exceptions as nsx_exc from vmware_nsx.db import nsxv_db from vmware_nsx.services.l2gateway.nsx_v import driver as nsx_v_driver