diff --git a/devstack/lib/vmware_dvs b/devstack/lib/vmware_dvs index 08399a046f..f6693b87a5 100644 --- a/devstack/lib/vmware_dvs +++ b/devstack/lib/vmware_dvs @@ -61,7 +61,7 @@ function neutron_plugin_configure_common { mkdir -p /$Q_PLUGIN_CONF_PATH cp $DEST/$Q_PLUGIN_SRC_CONF_PATH/$Q_PLUGIN_CONF_FILENAME /$Q_PLUGIN_CONF_PATH/$Q_PLUGIN_CONF_FILENAME Q_DB_NAME="neutron_nsx" - Q_PLUGIN_CLASS="vmware_nsx.neutron.plugins.vmware.plugin.NsxDvsPlugin" + Q_PLUGIN_CLASS="vmware_nsx.plugin.NsxDvsPlugin" } function neutron_plugin_configure_debug_command { diff --git a/devstack/lib/vmware_nsx_v b/devstack/lib/vmware_nsx_v index 6c7ee0b8d8..7a330f4373 100644 --- a/devstack/lib/vmware_nsx_v +++ b/devstack/lib/vmware_nsx_v @@ -53,7 +53,7 @@ function neutron_plugin_configure_common { mkdir -p /$Q_PLUGIN_CONF_PATH cp $DEST/$Q_PLUGIN_SRC_CONF_PATH/$Q_PLUGIN_CONF_FILENAME /$Q_PLUGIN_CONF_PATH/$Q_PLUGIN_CONF_FILENAME Q_DB_NAME="neutron_nsx" - Q_PLUGIN_CLASS="vmware_nsx.neutron.plugins.vmware.plugin.NsxVPlugin" + Q_PLUGIN_CLASS="vmware_nsx.plugin.NsxVPlugin" } function neutron_plugin_configure_debug_command { diff --git a/devstack/lib/vmware_nsx_v3 b/devstack/lib/vmware_nsx_v3 index 06b80490a6..d27b5de75e 100644 --- a/devstack/lib/vmware_nsx_v3 +++ b/devstack/lib/vmware_nsx_v3 @@ -62,7 +62,7 @@ function neutron_plugin_configure_common { Q_PLUGIN_SRC_CONF_PATH=vmware-nsx/etc mkdir -p /$Q_PLUGIN_CONF_PATH cp $DEST/$Q_PLUGIN_SRC_CONF_PATH/$Q_PLUGIN_CONF_FILENAME /$Q_PLUGIN_CONF_PATH/$Q_PLUGIN_CONF_FILENAME - Q_PLUGIN_CLASS="vmware_nsx.neutron.plugins.vmware.plugins.nsx_v3_plugin.NsxV3Plugin" + Q_PLUGIN_CLASS="vmware_nsx.plugins.nsx_v3_plugin.NsxV3Plugin" } function neutron_plugin_configure_debug_command { diff --git a/setup.cfg b/setup.cfg index 6f48952a0d..92b74c27e9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,18 +26,18 @@ data_files = [entry_points] console_scripts = - neutron-check-nsx-config = vmware_nsx.neutron.plugins.vmware.check_nsx_config:main + neutron-check-nsx-config = vmware_nsx.check_nsx_config:main neutron.db.alembic_migrations = vmware-nsx = vmware_nsx.db.migration:alembic_migrations neutron.core_plugins = - vmware = vmware_nsx.neutron.plugins.vmware.plugin:NsxMhPlugin + vmware = vmware_nsx.plugin:NsxMhPlugin neutron.service_plugins = vmware_nsx_l2gw = vmware_nsx.services.l2gateway.plugin:NsxL2GatewayPlugin vmware_nsx_qos = vmware_nsx.services.qos.plugin:NsxQosPlugin vmware_nsx.neutron.nsxv.router_type_drivers = - shared = vmware_nsx.neutron.plugins.vmware.plugins.nsx_v_drivers.shared_router_driver:RouterSharedDriver - distributed = vmware_nsx.neutron.plugins.vmware.plugins.nsx_v_drivers.distributed_router_driver:RouterDistributedDriver - exclusive = vmware_nsx.neutron.plugins.vmware.plugins.nsx_v_drivers.exclusive_router_driver:RouterExclusiveDriver + shared = vmware_nsx.plugins.nsx_v_drivers.shared_router_driver:RouterSharedDriver + distributed = vmware_nsx.plugins.nsx_v_drivers.distributed_router_driver:RouterDistributedDriver + exclusive = vmware_nsx.plugins.nsx_v_drivers.exclusive_router_driver:RouterExclusiveDriver [build_sphinx] source-dir = doc/source build-dir = doc/build diff --git a/vmware_nsx/__init__.py b/vmware_nsx/__init__.py index e69de29bb2..a628188884 100644 --- a/vmware_nsx/__init__.py +++ b/vmware_nsx/__init__.py @@ -0,0 +1,3 @@ +import os + +NSX_EXT_PATH = os.path.join(os.path.dirname(__file__), 'extensions') diff --git a/vmware_nsx/neutron/plugins/vmware/api_client/__init__.py b/vmware_nsx/api_client/__init__.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/api_client/__init__.py rename to vmware_nsx/api_client/__init__.py diff --git a/vmware_nsx/neutron/plugins/vmware/api_client/base.py b/vmware_nsx/api_client/base.py similarity index 99% rename from vmware_nsx/neutron/plugins/vmware/api_client/base.py rename to vmware_nsx/api_client/base.py index e8c964333a..819c2880a2 100644 --- a/vmware_nsx/neutron/plugins/vmware/api_client/base.py +++ b/vmware_nsx/api_client/base.py @@ -23,7 +23,7 @@ from oslo_log import log as logging import six from six.moves import http_client as httplib -from vmware_nsx.neutron.plugins.vmware import api_client +from vmware_nsx import api_client LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/api_client/client.py b/vmware_nsx/api_client/client.py similarity index 94% rename from vmware_nsx/neutron/plugins/vmware/api_client/client.py rename to vmware_nsx/api_client/client.py index b5108d4314..8b1d77ebb4 100644 --- a/vmware_nsx/neutron/plugins/vmware/api_client/client.py +++ b/vmware_nsx/api_client/client.py @@ -20,11 +20,11 @@ from oslo_log import log as logging from six.moves import http_client as httplib from neutron.i18n import _LE -from vmware_nsx.neutron.plugins.vmware.api_client import base -from vmware_nsx.neutron.plugins.vmware.api_client import eventlet_client -from vmware_nsx.neutron.plugins.vmware.api_client import eventlet_request -from vmware_nsx.neutron.plugins.vmware.api_client import exception -from vmware_nsx.neutron.plugins.vmware.api_client import version +from vmware_nsx.api_client import base +from vmware_nsx.api_client import eventlet_client +from vmware_nsx.api_client import eventlet_request +from vmware_nsx.api_client import exception +from vmware_nsx.api_client import version LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/api_client/eventlet_client.py b/vmware_nsx/api_client/eventlet_client.py similarity index 97% rename from vmware_nsx/neutron/plugins/vmware/api_client/eventlet_client.py rename to vmware_nsx/api_client/eventlet_client.py index d4cae48a75..e98f86defc 100644 --- a/vmware_nsx/neutron/plugins/vmware/api_client/eventlet_client.py +++ b/vmware_nsx/api_client/eventlet_client.py @@ -22,8 +22,8 @@ eventlet.monkey_patch() from oslo_log import log as logging from neutron.i18n import _LE -from vmware_nsx.neutron.plugins.vmware.api_client import base -from vmware_nsx.neutron.plugins.vmware.api_client import eventlet_request +from vmware_nsx.api_client import base +from vmware_nsx.api_client import eventlet_request LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/api_client/eventlet_request.py b/vmware_nsx/api_client/eventlet_request.py similarity index 99% rename from vmware_nsx/neutron/plugins/vmware/api_client/eventlet_request.py rename to vmware_nsx/api_client/eventlet_request.py index b69ed29305..3e54954b62 100644 --- a/vmware_nsx/neutron/plugins/vmware/api_client/eventlet_request.py +++ b/vmware_nsx/api_client/eventlet_request.py @@ -22,7 +22,7 @@ from six.moves import http_client as httplib from six.moves.urllib import parse from neutron.i18n import _LI, _LW -from vmware_nsx.neutron.plugins.vmware.api_client import request +from vmware_nsx.api_client import request LOG = logging.getLogger(__name__) USER_AGENT = "Neutron eventlet client/2.0" diff --git a/vmware_nsx/neutron/plugins/vmware/api_client/exception.py b/vmware_nsx/api_client/exception.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/api_client/exception.py rename to vmware_nsx/api_client/exception.py diff --git a/vmware_nsx/neutron/plugins/vmware/api_client/request.py b/vmware_nsx/api_client/request.py similarity index 99% rename from vmware_nsx/neutron/plugins/vmware/api_client/request.py rename to vmware_nsx/api_client/request.py index 4080f0be99..ad60ee7155 100644 --- a/vmware_nsx/neutron/plugins/vmware/api_client/request.py +++ b/vmware_nsx/api_client/request.py @@ -28,7 +28,7 @@ from six.moves import http_client as httplib import six.moves.urllib.parse as urlparse from neutron.i18n import _LI, _LW -from vmware_nsx.neutron.plugins.vmware import api_client +from vmware_nsx import api_client LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/api_client/version.py b/vmware_nsx/api_client/version.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/api_client/version.py rename to vmware_nsx/api_client/version.py diff --git a/vmware_nsx/neutron/plugins/vmware/check_nsx_config.py b/vmware_nsx/check_nsx_config.py similarity index 96% rename from vmware_nsx/neutron/plugins/vmware/check_nsx_config.py rename to vmware_nsx/check_nsx_config.py index 169ec5020f..38275a3f58 100644 --- a/vmware_nsx/neutron/plugins/vmware/check_nsx_config.py +++ b/vmware_nsx/check_nsx_config.py @@ -20,9 +20,9 @@ import sys from oslo_config import cfg from neutron.common import config -from vmware_nsx.neutron.plugins.vmware.common import config as nsx_config # noqa -from vmware_nsx.neutron.plugins.vmware.common import nsx_utils -from vmware_nsx.neutron.plugins.vmware import nsxlib +from vmware_nsx.common import config as nsx_config # noqa +from vmware_nsx.common import nsx_utils +from vmware_nsx import nsxlib config.setup_logging() diff --git a/vmware_nsx/neutron/__init__.py b/vmware_nsx/common/__init__.py similarity index 100% rename from vmware_nsx/neutron/__init__.py rename to vmware_nsx/common/__init__.py diff --git a/vmware_nsx/neutron/plugins/vmware/common/config.py b/vmware_nsx/common/config.py similarity index 99% rename from vmware_nsx/neutron/plugins/vmware/common/config.py rename to vmware_nsx/common/config.py index e0de08bf7f..28ee6968a1 100644 --- a/vmware_nsx/neutron/plugins/vmware/common/config.py +++ b/vmware_nsx/common/config.py @@ -17,7 +17,7 @@ import logging from oslo_config import cfg from neutron.i18n import _LW -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc +from vmware_nsx.common import exceptions as nsx_exc LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/common/exceptions.py b/vmware_nsx/common/exceptions.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/common/exceptions.py rename to vmware_nsx/common/exceptions.py diff --git a/vmware_nsx/neutron/plugins/vmware/common/locking.py b/vmware_nsx/common/locking.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/common/locking.py rename to vmware_nsx/common/locking.py diff --git a/vmware_nsx/neutron/plugins/vmware/common/nsx_constants.py b/vmware_nsx/common/nsx_constants.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/common/nsx_constants.py rename to vmware_nsx/common/nsx_constants.py diff --git a/vmware_nsx/neutron/plugins/vmware/common/nsx_utils.py b/vmware_nsx/common/nsx_utils.py similarity index 94% rename from vmware_nsx/neutron/plugins/vmware/common/nsx_utils.py rename to vmware_nsx/common/nsx_utils.py index 66e39bd7e4..0deab82be1 100644 --- a/vmware_nsx/neutron/plugins/vmware/common/nsx_utils.py +++ b/vmware_nsx/common/nsx_utils.py @@ -21,16 +21,16 @@ from neutron.i18n import _LW from oslo_log import log import six -from vmware_nsx.neutron.plugins.vmware.api_client import client -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc -from vmware_nsx.neutron.plugins.vmware.common import utils as vmw_utils -from vmware_nsx.neutron.plugins.vmware.dbexts import db as nsx_db -from vmware_nsx.neutron.plugins.vmware.dbexts import networkgw_db -from vmware_nsx.neutron.plugins.vmware import nsx_cluster -from vmware_nsx.neutron.plugins.vmware.nsxlib import l2gateway as l2gwlib -from vmware_nsx.neutron.plugins.vmware.nsxlib import router as routerlib -from vmware_nsx.neutron.plugins.vmware.nsxlib import secgroup as secgrouplib -from vmware_nsx.neutron.plugins.vmware.nsxlib import switch as switchlib +from vmware_nsx.api_client import client +from vmware_nsx.api_client import exception as api_exc +from vmware_nsx.common import utils as vmw_utils +from vmware_nsx.db import db as nsx_db +from vmware_nsx.db import networkgw_db +from vmware_nsx import nsx_cluster +from vmware_nsx.nsxlib import l2gateway as l2gwlib +from vmware_nsx.nsxlib import router as routerlib +from vmware_nsx.nsxlib import secgroup as secgrouplib +from vmware_nsx.nsxlib import switch as switchlib LOG = log.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/common/nsxv_constants.py b/vmware_nsx/common/nsxv_constants.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/common/nsxv_constants.py rename to vmware_nsx/common/nsxv_constants.py diff --git a/vmware_nsx/neutron/plugins/vmware/common/securitygroups.py b/vmware_nsx/common/securitygroups.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/common/securitygroups.py rename to vmware_nsx/common/securitygroups.py index 283cd9dc55..f68f595a29 100644 --- a/vmware_nsx/neutron/plugins/vmware/common/securitygroups.py +++ b/vmware_nsx/common/securitygroups.py @@ -16,7 +16,7 @@ from oslo_log import log import six -from vmware_nsx.neutron.plugins.vmware.common import nsx_utils +from vmware_nsx.common import nsx_utils LOG = log.getLogger(__name__) # Protocol number look up for supported protocols diff --git a/vmware_nsx/neutron/plugins/vmware/common/sync.py b/vmware_nsx/common/sync.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/common/sync.py rename to vmware_nsx/common/sync.py index 09a8192e05..f5c147b7ba 100644 --- a/vmware_nsx/neutron/plugins/vmware/common/sync.py +++ b/vmware_nsx/common/sync.py @@ -30,12 +30,12 @@ from neutron.db import models_v2 from neutron.extensions import l3 from neutron.i18n import _LE, _LI, _LW -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import nsx_utils -from vmware_nsx.neutron.plugins.vmware import nsxlib -from vmware_nsx.neutron.plugins.vmware.nsxlib import router as routerlib -from vmware_nsx.neutron.plugins.vmware.nsxlib import switch as switchlib +from vmware_nsx.api_client import exception as api_exc +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import nsx_utils +from vmware_nsx import nsxlib +from vmware_nsx.nsxlib import router as routerlib +from vmware_nsx.nsxlib import switch as switchlib # Maximum page size for a single request # NOTE(salv-orlando): This might become a version-dependent map should the diff --git a/vmware_nsx/neutron/plugins/vmware/common/utils.py b/vmware_nsx/common/utils.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/common/utils.py rename to vmware_nsx/common/utils.py diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/db.py b/vmware_nsx/db/db.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/dbexts/db.py rename to vmware_nsx/db/db.py index a437c0640a..6148d414f3 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/db.py +++ b/vmware_nsx/db/db.py @@ -21,8 +21,8 @@ from sqlalchemy.orm import exc import neutron.db.api as db -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.dbexts import nsx_models +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.db import nsx_models LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/distributedrouter.py b/vmware_nsx/db/distributedrouter.py similarity index 93% rename from vmware_nsx/neutron/plugins/vmware/dbexts/distributedrouter.py rename to vmware_nsx/db/distributedrouter.py index 6a15d00782..9286d99307 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/distributedrouter.py +++ b/vmware_nsx/db/distributedrouter.py @@ -15,7 +15,7 @@ # from neutron.extensions import dvr as dist_rtr -from vmware_nsx.neutron.plugins.vmware.dbexts import nsxrouter +from vmware_nsx.db import nsxrouter class DistributedRouter_mixin(nsxrouter.NsxRouterMixin): diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/lsn_db.py b/vmware_nsx/db/lsn_db.py similarity index 96% rename from vmware_nsx/neutron/plugins/vmware/dbexts/lsn_db.py rename to vmware_nsx/db/lsn_db.py index da1fd1a338..2bc25a9a29 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/lsn_db.py +++ b/vmware_nsx/db/lsn_db.py @@ -19,8 +19,8 @@ from oslo_db import exception as d_exc from oslo_log import log as logging from sqlalchemy import orm -from vmware_nsx.neutron.plugins.vmware.common import exceptions as p_exc -from vmware_nsx.neutron.plugins.vmware.dbexts import nsx_models +from vmware_nsx.common import exceptions as p_exc +from vmware_nsx.db import nsx_models LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/maclearning.py b/vmware_nsx/db/maclearning.py similarity index 94% rename from vmware_nsx/neutron/plugins/vmware/dbexts/maclearning.py rename to vmware_nsx/db/maclearning.py index 12f45168c3..f44acaaecd 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/maclearning.py +++ b/vmware_nsx/db/maclearning.py @@ -20,8 +20,8 @@ from neutron.db import db_base_plugin_v2 from oslo_log import log as logging -from vmware_nsx.neutron.plugins.vmware.dbexts import nsx_models -from vmware_nsx.neutron.plugins.vmware.extensions import maclearning as mac +from vmware_nsx.db import nsx_models +from vmware_nsx.extensions import maclearning as mac LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/db/migration/models/head.py b/vmware_nsx/db/migration/models/head.py index c28e58138d..822d71655c 100644 --- a/vmware_nsx/db/migration/models/head.py +++ b/vmware_nsx/db/migration/models/head.py @@ -14,9 +14,9 @@ from neutron.db.migration.models import head -from vmware_nsx.neutron.plugins.vmware.dbexts import nsx_models # noqa -from vmware_nsx.neutron.plugins.vmware.dbexts import nsxv_models # noqa -from vmware_nsx.neutron.plugins.vmware.dbexts import vcns_models # noqa +from vmware_nsx.db import nsx_models # noqa +from vmware_nsx.db import nsxv_models # noqa +from vmware_nsx.db import vcns_models # noqa def get_metadata(): diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/networkgw_db.py b/vmware_nsx/db/networkgw_db.py similarity index 99% rename from vmware_nsx/neutron/plugins/vmware/dbexts/networkgw_db.py rename to vmware_nsx/db/networkgw_db.py index 8e34e59590..dffcc78ee8 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/networkgw_db.py +++ b/vmware_nsx/db/networkgw_db.py @@ -21,8 +21,8 @@ from oslo_log import log as logging from oslo_utils import uuidutils import six -from vmware_nsx.neutron.plugins.vmware.dbexts import nsx_models -from vmware_nsx.neutron.plugins.vmware.extensions import networkgw +from vmware_nsx.db import nsx_models +from vmware_nsx.extensions import networkgw LOG = logging.getLogger(__name__) DEVICE_OWNER_NET_GW_INTF = 'network:gateway-interface' diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/nsx_models.py b/vmware_nsx/db/nsx_models.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/dbexts/nsx_models.py rename to vmware_nsx/db/nsx_models.py diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/nsxrouter.py b/vmware_nsx/db/nsxrouter.py similarity index 97% rename from vmware_nsx/neutron/plugins/vmware/dbexts/nsxrouter.py rename to vmware_nsx/db/nsxrouter.py index 12e3e3d280..5a954e1c54 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/nsxrouter.py +++ b/vmware_nsx/db/nsxrouter.py @@ -17,7 +17,7 @@ from neutron.db import db_base_plugin_v2 from neutron.extensions import l3 from oslo_log import log as logging -from vmware_nsx.neutron.plugins.vmware.dbexts import nsxv_models +from vmware_nsx.db import nsxv_models LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/nsxv_db.py b/vmware_nsx/db/nsxv_db.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/dbexts/nsxv_db.py rename to vmware_nsx/db/nsxv_db.py index edbcfcdcbc..4a0535c077 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/nsxv_db.py +++ b/vmware_nsx/db/nsxv_db.py @@ -24,10 +24,10 @@ from sqlalchemy.sql import expression as expr from neutron.i18n import _, _LE -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import nsxv_constants -from vmware_nsx.neutron.plugins.vmware.dbexts import nsxv_models -from vmware_nsx.neutron.plugins.vmware.vshield.common import constants +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import nsxv_constants +from vmware_nsx.db import nsxv_models +from vmware_nsx.vshield.common import constants LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/nsxv_models.py b/vmware_nsx/db/nsxv_models.py similarity index 99% rename from vmware_nsx/neutron/plugins/vmware/dbexts/nsxv_models.py rename to vmware_nsx/db/nsxv_models.py index 18128831fc..226dec8560 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/nsxv_models.py +++ b/vmware_nsx/db/nsxv_models.py @@ -22,7 +22,7 @@ from neutron.db import l3_db from neutron.db import model_base from neutron.db import models_v2 -from vmware_nsx.neutron.plugins.vmware.common import nsxv_constants +from vmware_nsx.common import nsxv_constants class NsxvRouterBinding(model_base.BASEV2, models_v2.HasStatusDescription): diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/qos_db.py b/vmware_nsx/db/qos_db.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/dbexts/qos_db.py rename to vmware_nsx/db/qos_db.py index c4ffba5f14..fde1e4bb59 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/qos_db.py +++ b/vmware_nsx/db/qos_db.py @@ -23,8 +23,8 @@ from neutron.i18n import _LI from oslo_log import log from oslo_utils import uuidutils -from vmware_nsx.neutron.plugins.vmware.dbexts import nsx_models -from vmware_nsx.neutron.plugins.vmware.extensions import qos +from vmware_nsx.db import nsx_models +from vmware_nsx.extensions import qos LOG = log.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/routertype.py b/vmware_nsx/db/routertype.py similarity index 87% rename from vmware_nsx/neutron/plugins/vmware/dbexts/routertype.py rename to vmware_nsx/db/routertype.py index fd1b573781..84aa45505a 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/routertype.py +++ b/vmware_nsx/db/routertype.py @@ -14,9 +14,9 @@ # under the License. # -from vmware_nsx.neutron.plugins.vmware.dbexts import ( +from vmware_nsx.db import ( distributedrouter as dist_rtr) -from vmware_nsx.neutron.plugins.vmware.extensions import routertype as rt_rtr +from vmware_nsx.extensions import routertype as rt_rtr class RouterType_mixin(dist_rtr.DistributedRouter_mixin): diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/vcns_models.py b/vmware_nsx/db/vcns_models.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/dbexts/vcns_models.py rename to vmware_nsx/db/vcns_models.py diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/vnic_index_db.py b/vmware_nsx/db/vnic_index_db.py similarity index 94% rename from vmware_nsx/neutron/plugins/vmware/dbexts/vnic_index_db.py rename to vmware_nsx/db/vnic_index_db.py index 816ca8f319..6be2779dd6 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/vnic_index_db.py +++ b/vmware_nsx/db/vnic_index_db.py @@ -20,8 +20,8 @@ from neutron.db import db_base_plugin_v2 from oslo_log import log as logging -from vmware_nsx.neutron.plugins.vmware.dbexts import nsxv_models -from vmware_nsx.neutron.plugins.vmware.extensions import vnicindex as vnicidx +from vmware_nsx.db import nsxv_models +from vmware_nsx.extensions import vnicindex as vnicidx LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/__init__.py b/vmware_nsx/dhcp_meta/__init__.py similarity index 100% rename from vmware_nsx/neutron/plugins/__init__.py rename to vmware_nsx/dhcp_meta/__init__.py diff --git a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/combined.py b/vmware_nsx/dhcp_meta/combined.py similarity index 96% rename from vmware_nsx/neutron/plugins/vmware/dhcp_meta/combined.py rename to vmware_nsx/dhcp_meta/combined.py index f1b7032e06..116096c20c 100644 --- a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/combined.py +++ b/vmware_nsx/dhcp_meta/combined.py @@ -18,8 +18,8 @@ from neutron.api.rpc.agentnotifiers import dhcp_rpc_agent_api from neutron.common import constants as const from neutron.common import topics -from vmware_nsx.neutron.plugins.vmware.dhcp_meta import nsx as nsx_svc -from vmware_nsx.neutron.plugins.vmware.dhcp_meta import rpc as nsx_rpc +from vmware_nsx.dhcp_meta import nsx as nsx_svc +from vmware_nsx.dhcp_meta import rpc as nsx_rpc class DhcpAgentNotifyAPI(dhcp_rpc_agent_api.DhcpAgentNotifyAPI): diff --git a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/constants.py b/vmware_nsx/dhcp_meta/constants.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/dhcp_meta/constants.py rename to vmware_nsx/dhcp_meta/constants.py diff --git a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/lsnmanager.py b/vmware_nsx/dhcp_meta/lsnmanager.py similarity index 97% rename from vmware_nsx/neutron/plugins/vmware/dhcp_meta/lsnmanager.py rename to vmware_nsx/dhcp_meta/lsnmanager.py index 6ec85c8eb7..cd2ef6a700 100644 --- a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/lsnmanager.py +++ b/vmware_nsx/dhcp_meta/lsnmanager.py @@ -22,13 +22,13 @@ from oslo_log import log as logging from oslo_utils import excutils from neutron.i18n import _LE, _LW -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc -from vmware_nsx.neutron.plugins.vmware.common import exceptions as p_exc -from vmware_nsx.neutron.plugins.vmware.common import nsx_utils -from vmware_nsx.neutron.plugins.vmware.dbexts import lsn_db -from vmware_nsx.neutron.plugins.vmware.dhcp_meta import constants as const -from vmware_nsx.neutron.plugins.vmware.nsxlib import lsn as lsn_api -from vmware_nsx.neutron.plugins.vmware.nsxlib import switch as switch_api +from vmware_nsx.api_client import exception as api_exc +from vmware_nsx.common import exceptions as p_exc +from vmware_nsx.common import nsx_utils +from vmware_nsx.db import lsn_db +from vmware_nsx.dhcp_meta import constants as const +from vmware_nsx.nsxlib import lsn as lsn_api +from vmware_nsx.nsxlib import switch as switch_api LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/migration.py b/vmware_nsx/dhcp_meta/migration.py similarity index 97% rename from vmware_nsx/neutron/plugins/vmware/dhcp_meta/migration.py rename to vmware_nsx/dhcp_meta/migration.py index 284f9b8cf2..b31e1c0119 100644 --- a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/migration.py +++ b/vmware_nsx/dhcp_meta/migration.py @@ -21,9 +21,9 @@ from neutron.extensions import external_net from oslo_log import log as logging from neutron.i18n import _LE -from vmware_nsx.neutron.plugins.vmware.common import exceptions as p_exc -from vmware_nsx.neutron.plugins.vmware.dhcp_meta import nsx -from vmware_nsx.neutron.plugins.vmware.dhcp_meta import rpc +from vmware_nsx.common import exceptions as p_exc +from vmware_nsx.dhcp_meta import nsx +from vmware_nsx.dhcp_meta import rpc LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/nsx.py b/vmware_nsx/dhcp_meta/nsx.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/dhcp_meta/nsx.py rename to vmware_nsx/dhcp_meta/nsx.py index 1ef0dedd05..9fd79f9027 100644 --- a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/nsx.py +++ b/vmware_nsx/dhcp_meta/nsx.py @@ -26,9 +26,9 @@ from neutron.db import db_base_plugin_v2 from neutron.db import l3_db from neutron.extensions import external_net from neutron.i18n import _LE, _LI -from vmware_nsx.neutron.plugins.vmware.common import exceptions as p_exc -from vmware_nsx.neutron.plugins.vmware.dhcp_meta import constants as d_const -from vmware_nsx.neutron.plugins.vmware.nsxlib import lsn as lsn_api +from vmware_nsx.common import exceptions as p_exc +from vmware_nsx.dhcp_meta import constants as d_const +from vmware_nsx.nsxlib import lsn as lsn_api LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/rpc.py b/vmware_nsx/dhcp_meta/rpc.py similarity index 97% rename from vmware_nsx/neutron/plugins/vmware/dhcp_meta/rpc.py rename to vmware_nsx/dhcp_meta/rpc.py index e761f63162..f6afc387c3 100644 --- a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/rpc.py +++ b/vmware_nsx/dhcp_meta/rpc.py @@ -26,9 +26,9 @@ from neutron.common import exceptions as ntn_exc from neutron.db import db_base_plugin_v2 from neutron.db import models_v2 from neutron.i18n import _LE, _LI, _LW -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc -from vmware_nsx.neutron.plugins.vmware.common import config -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc +from vmware_nsx.api_client import exception as api_exc +from vmware_nsx.common import config +from vmware_nsx.common import exceptions as nsx_exc LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/dhcpmeta_modes.py b/vmware_nsx/dhcpmeta_modes.py similarity index 93% rename from vmware_nsx/neutron/plugins/vmware/dhcpmeta_modes.py rename to vmware_nsx/dhcpmeta_modes.py index 5efe888be3..2525aeba8e 100644 --- a/vmware_nsx/neutron/plugins/vmware/dhcpmeta_modes.py +++ b/vmware_nsx/dhcpmeta_modes.py @@ -29,14 +29,14 @@ from neutron.common import topics from neutron.db import agents_db from neutron.i18n import _LW -from vmware_nsx.neutron.plugins.vmware.common import config -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.dhcp_meta import combined -from vmware_nsx.neutron.plugins.vmware.dhcp_meta import lsnmanager -from vmware_nsx.neutron.plugins.vmware.dhcp_meta import migration -from vmware_nsx.neutron.plugins.vmware.dhcp_meta import nsx as nsx_svc -from vmware_nsx.neutron.plugins.vmware.dhcp_meta import rpc as nsx_rpc -from vmware_nsx.neutron.plugins.vmware.extensions import lsn +from vmware_nsx.common import config +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.dhcp_meta import combined +from vmware_nsx.dhcp_meta import lsnmanager +from vmware_nsx.dhcp_meta import migration +from vmware_nsx.dhcp_meta import nsx as nsx_svc +from vmware_nsx.dhcp_meta import rpc as nsx_rpc +from vmware_nsx.extensions import lsn LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/common/__init__.py b/vmware_nsx/dvs/__init__.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/common/__init__.py rename to vmware_nsx/dvs/__init__.py diff --git a/vmware_nsx/neutron/plugins/vmware/dvs/dvs.py b/vmware_nsx/dvs/dvs.py similarity index 97% rename from vmware_nsx/neutron/plugins/vmware/dvs/dvs.py rename to vmware_nsx/dvs/dvs.py index fa8753f54b..6941d59d96 100644 --- a/vmware_nsx/neutron/plugins/vmware/dvs/dvs.py +++ b/vmware_nsx/dvs/dvs.py @@ -18,8 +18,8 @@ from oslo_utils import excutils from oslo_vmware import vim_util from neutron.i18n import _LE, _LI -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.dvs import dvs_utils +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.dvs import dvs_utils LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/dvs/dvs_utils.py b/vmware_nsx/dvs/dvs_utils.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/dvs/dvs_utils.py rename to vmware_nsx/dvs/dvs_utils.py diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/__init__.py b/vmware_nsx/extensions/__init__.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/dbexts/__init__.py rename to vmware_nsx/extensions/__init__.py diff --git a/vmware_nsx/neutron/plugins/vmware/extensions/advancedserviceproviders.py b/vmware_nsx/extensions/advancedserviceproviders.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/extensions/advancedserviceproviders.py rename to vmware_nsx/extensions/advancedserviceproviders.py diff --git a/vmware_nsx/neutron/plugins/vmware/extensions/lsn.py b/vmware_nsx/extensions/lsn.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/extensions/lsn.py rename to vmware_nsx/extensions/lsn.py diff --git a/vmware_nsx/neutron/plugins/vmware/extensions/maclearning.py b/vmware_nsx/extensions/maclearning.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/extensions/maclearning.py rename to vmware_nsx/extensions/maclearning.py diff --git a/vmware_nsx/neutron/plugins/vmware/extensions/networkgw.py b/vmware_nsx/extensions/networkgw.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/extensions/networkgw.py rename to vmware_nsx/extensions/networkgw.py diff --git a/vmware_nsx/neutron/plugins/vmware/extensions/nvp_qos.py b/vmware_nsx/extensions/nvp_qos.py similarity index 94% rename from vmware_nsx/neutron/plugins/vmware/extensions/nvp_qos.py rename to vmware_nsx/extensions/nvp_qos.py index 44dba08fd1..969eca8513 100644 --- a/vmware_nsx/neutron/plugins/vmware/extensions/nvp_qos.py +++ b/vmware_nsx/extensions/nvp_qos.py @@ -17,7 +17,7 @@ # TODO(arosen): This is deprecated in Juno, and # to be removed in Kxxxx. -from vmware_nsx.neutron.plugins.vmware.extensions import qos +from vmware_nsx.extensions import qos class Nvp_qos(qos.Qos): diff --git a/vmware_nsx/neutron/plugins/vmware/extensions/qos.py b/vmware_nsx/extensions/qos.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/extensions/qos.py rename to vmware_nsx/extensions/qos.py diff --git a/vmware_nsx/neutron/plugins/vmware/extensions/routertype.py b/vmware_nsx/extensions/routertype.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/extensions/routertype.py rename to vmware_nsx/extensions/routertype.py diff --git a/vmware_nsx/neutron/plugins/vmware/extensions/vnicindex.py b/vmware_nsx/extensions/vnicindex.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/extensions/vnicindex.py rename to vmware_nsx/extensions/vnicindex.py diff --git a/vmware_nsx/neutron/plugins/vmware/__init__.py b/vmware_nsx/neutron/plugins/vmware/__init__.py deleted file mode 100644 index a628188884..0000000000 --- a/vmware_nsx/neutron/plugins/vmware/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -import os - -NSX_EXT_PATH = os.path.join(os.path.dirname(__file__), 'extensions') diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/__init__.py b/vmware_nsx/neutron/plugins/vmware/vshield/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/common/__init__.py b/vmware_nsx/neutron/plugins/vmware/vshield/common/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/tasks/__init__.py b/vmware_nsx/neutron/plugins/vmware/vshield/tasks/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/vmware_nsx/neutron/plugins/vmware/nsx_cluster.py b/vmware_nsx/nsx_cluster.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/nsx_cluster.py rename to vmware_nsx/nsx_cluster.py index a2c4fa6d2a..005f0e24a0 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsx_cluster.py +++ b/vmware_nsx/nsx_cluster.py @@ -18,7 +18,7 @@ from oslo_log import log as logging import six from neutron.i18n import _LI -from vmware_nsx.neutron.plugins.vmware.common import exceptions +from vmware_nsx.common import exceptions LOG = logging.getLogger(__name__) DEFAULT_PORT = 443 diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/__init__.py b/vmware_nsx/nsxlib/__init__.py similarity index 97% rename from vmware_nsx/neutron/plugins/vmware/nsxlib/__init__.py rename to vmware_nsx/nsxlib/__init__.py index fb8840da42..19abe24c05 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/__init__.py +++ b/vmware_nsx/nsxlib/__init__.py @@ -19,8 +19,8 @@ from oslo_log import log from oslo_serialization import jsonutils import six -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc +from vmware_nsx.api_client import exception as api_exc +from vmware_nsx.common import exceptions as nsx_exc HTTP_GET = "GET" HTTP_POST = "POST" diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/l2gateway.py b/vmware_nsx/nsxlib/l2gateway.py similarity index 96% rename from vmware_nsx/neutron/plugins/vmware/nsxlib/l2gateway.py rename to vmware_nsx/nsxlib/l2gateway.py index d095a911fc..5610d64250 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/l2gateway.py +++ b/vmware_nsx/nsxlib/l2gateway.py @@ -18,11 +18,11 @@ from neutron.i18n import _LE from oslo_log import log from oslo_serialization import jsonutils -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import utils -from vmware_nsx.neutron.plugins.vmware import nsxlib -from vmware_nsx.neutron.plugins.vmware.nsxlib import switch +from vmware_nsx.api_client import exception as api_exc +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import utils +from vmware_nsx import nsxlib +from vmware_nsx.nsxlib import switch HTTP_GET = "GET" HTTP_POST = "POST" diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/lsn.py b/vmware_nsx/nsxlib/lsn.py similarity index 97% rename from vmware_nsx/neutron/plugins/vmware/nsxlib/lsn.py rename to vmware_nsx/nsxlib/lsn.py index 288f8b3f34..31c4ba11d9 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/lsn.py +++ b/vmware_nsx/nsxlib/lsn.py @@ -18,10 +18,10 @@ from oslo_log import log from oslo_serialization import jsonutils import six -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import utils -from vmware_nsx.neutron.plugins.vmware import nsxlib +from vmware_nsx.api_client import exception as api_exc +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import utils +from vmware_nsx import nsxlib HTTP_GET = "GET" HTTP_POST = "POST" diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/queue.py b/vmware_nsx/nsxlib/queue.py similarity index 92% rename from vmware_nsx/neutron/plugins/vmware/nsxlib/queue.py rename to vmware_nsx/nsxlib/queue.py index 752245f7ad..c65341287c 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/queue.py +++ b/vmware_nsx/nsxlib/queue.py @@ -20,9 +20,9 @@ from oslo_serialization import jsonutils from oslo_utils import excutils import six -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc -from vmware_nsx.neutron.plugins.vmware.common import utils -from vmware_nsx.neutron.plugins.vmware import nsxlib +from vmware_nsx.api_client import exception as api_exc +from vmware_nsx.common import utils +from vmware_nsx import nsxlib HTTP_POST = "POST" HTTP_DELETE = "DELETE" diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/router.py b/vmware_nsx/nsxlib/router.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/nsxlib/router.py rename to vmware_nsx/nsxlib/router.py index 506449b182..ac90e4a800 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/router.py +++ b/vmware_nsx/nsxlib/router.py @@ -21,12 +21,12 @@ from oslo_utils import excutils import six from neutron.i18n import _LE, _LI, _LW -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import utils -from vmware_nsx.neutron.plugins.vmware import nsxlib -from vmware_nsx.neutron.plugins.vmware.nsxlib import switch -from vmware_nsx.neutron.plugins.vmware.nsxlib import versioning +from vmware_nsx.api_client import exception as api_exc +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import utils +from vmware_nsx import nsxlib +from vmware_nsx.nsxlib import switch +from vmware_nsx.nsxlib import versioning # @versioning.versioned decorator makes the apparent function body # totally unrelated to the real function. This confuses pylint :( diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/secgroup.py b/vmware_nsx/nsxlib/secgroup.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/nsxlib/secgroup.py rename to vmware_nsx/nsxlib/secgroup.py index be7f128863..a447f6747c 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/secgroup.py +++ b/vmware_nsx/nsxlib/secgroup.py @@ -21,8 +21,8 @@ from neutron.common import constants from neutron.common import exceptions from neutron.i18n import _LW -from vmware_nsx.neutron.plugins.vmware.common import utils -from vmware_nsx.neutron.plugins.vmware import nsxlib +from vmware_nsx.common import utils +from vmware_nsx import nsxlib HTTP_GET = "GET" HTTP_POST = "POST" diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/switch.py b/vmware_nsx/nsxlib/switch.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/nsxlib/switch.py rename to vmware_nsx/nsxlib/switch.py index 036fbe80bb..905d99a7e3 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/switch.py +++ b/vmware_nsx/nsxlib/switch.py @@ -22,10 +22,10 @@ from neutron.common import constants from neutron.common import exceptions as exception from neutron.i18n import _LE, _LI, _LW -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import utils -from vmware_nsx.neutron.plugins.vmware import nsxlib +from vmware_nsx.api_client import exception as api_exc +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import utils +from vmware_nsx import nsxlib HTTP_GET = "GET" HTTP_POST = "POST" diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/v3/__init__.py b/vmware_nsx/nsxlib/v3/__init__.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/nsxlib/v3/__init__.py rename to vmware_nsx/nsxlib/v3/__init__.py index bb98a89055..17c7f2d6bf 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/v3/__init__.py +++ b/vmware_nsx/nsxlib/v3/__init__.py @@ -18,10 +18,10 @@ from oslo_log import log from neutron.i18n import _LW -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import nsx_constants -from vmware_nsx.neutron.plugins.vmware.common import utils -from vmware_nsx.neutron.plugins.vmware.nsxlib.v3 import client +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import nsx_constants +from vmware_nsx.common import utils +from vmware_nsx.nsxlib.v3 import client LOG = log.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/v3/client.py b/vmware_nsx/nsxlib/v3/client.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/nsxlib/v3/client.py rename to vmware_nsx/nsxlib/v3/client.py index 4d42da04df..e960fcf09b 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/v3/client.py +++ b/vmware_nsx/nsxlib/v3/client.py @@ -20,7 +20,7 @@ import requests from requests import auth from neutron.i18n import _LW -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc +from vmware_nsx.common import exceptions as nsx_exc LOG = log.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/v3/dfw_api.py b/vmware_nsx/nsxlib/v3/dfw_api.py similarity index 96% rename from vmware_nsx/neutron/plugins/vmware/nsxlib/v3/dfw_api.py rename to vmware_nsx/nsxlib/v3/dfw_api.py index e03d448550..e1f3c0ceeb 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/v3/dfw_api.py +++ b/vmware_nsx/nsxlib/v3/dfw_api.py @@ -18,9 +18,9 @@ NSX-V3 Distributed Firewall """ -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import utils -from vmware_nsx.neutron.plugins.vmware.nsxlib.v3 import client as nsclient +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import utils +from vmware_nsx.nsxlib.v3 import client as nsclient # firewall section types diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/v3/router.py b/vmware_nsx/nsxlib/v3/router.py similarity index 97% rename from vmware_nsx/neutron/plugins/vmware/nsxlib/v3/router.py rename to vmware_nsx/nsxlib/v3/router.py index 8529ac364f..ed9307a2be 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/v3/router.py +++ b/vmware_nsx/nsxlib/v3/router.py @@ -23,8 +23,8 @@ from neutron.common import exceptions as n_exc from neutron.i18n import _LW from oslo_log import log -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.nsxlib import v3 as nsxlib +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.nsxlib import v3 as nsxlib LOG = log.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/v3/security.py b/vmware_nsx/nsxlib/v3/security.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/nsxlib/v3/security.py rename to vmware_nsx/nsxlib/v3/security.py index b431f26633..ff0c3bf9e1 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/v3/security.py +++ b/vmware_nsx/nsxlib/v3/security.py @@ -20,8 +20,8 @@ NSX-V3 Plugin security integration module from neutron.db import securitygroups_db -from vmware_nsx.neutron.plugins.vmware.dbexts import nsx_models -from vmware_nsx.neutron.plugins.vmware.nsxlib.v3 import dfw_api as firewall +from vmware_nsx.db import nsx_models +from vmware_nsx.nsxlib.v3 import dfw_api as firewall NSGROUP_CONTAINER = 'NSGroup Container' diff --git a/vmware_nsx/neutron/plugins/vmware/nsxlib/versioning.py b/vmware_nsx/nsxlib/versioning.py similarity index 97% rename from vmware_nsx/neutron/plugins/vmware/nsxlib/versioning.py rename to vmware_nsx/nsxlib/versioning.py index 8594d2c189..a6aada0c76 100644 --- a/vmware_nsx/neutron/plugins/vmware/nsxlib/versioning.py +++ b/vmware_nsx/nsxlib/versioning.py @@ -15,7 +15,7 @@ import inspect -from vmware_nsx.neutron.plugins.vmware.api_client import exception +from vmware_nsx.api_client import exception DEFAULT_VERSION = -1 diff --git a/vmware_nsx/neutron/plugins/vmware/plugin.py b/vmware_nsx/plugin.py similarity index 75% rename from vmware_nsx/neutron/plugins/vmware/plugin.py rename to vmware_nsx/plugin.py index f36e84645c..0c2e28c5b0 100644 --- a/vmware_nsx/neutron/plugins/vmware/plugin.py +++ b/vmware_nsx/plugin.py @@ -15,10 +15,10 @@ # under the License. # -from vmware_nsx.neutron.plugins.vmware.plugins import base -from vmware_nsx.neutron.plugins.vmware.plugins import dvs -from vmware_nsx.neutron.plugins.vmware.plugins import nsx_v -from vmware_nsx.neutron.plugins.vmware.plugins import nsx_v3_plugin +from vmware_nsx.plugins import base +from vmware_nsx.plugins import dvs +from vmware_nsx.plugins import nsx_v +from vmware_nsx.plugins import nsx_v3_plugin NsxPlugin = base.NsxPluginV2 NsxVPlugin = nsx_v.NsxVPluginV2 diff --git a/vmware_nsx/neutron/plugins/vmware/dhcp_meta/__init__.py b/vmware_nsx/plugins/__init__.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/dhcp_meta/__init__.py rename to vmware_nsx/plugins/__init__.py diff --git a/vmware_nsx/neutron/plugins/vmware/plugins/base.py b/vmware_nsx/plugins/base.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/plugins/base.py rename to vmware_nsx/plugins/base.py index 22d7afa6d3..6658192b75 100644 --- a/vmware_nsx/neutron/plugins/vmware/plugins/base.py +++ b/vmware_nsx/plugins/base.py @@ -59,28 +59,28 @@ from neutron.i18n import _LE, _LI, _LW from neutron.plugins.common import constants as plugin_const from neutron.plugins.common import utils -from vmware_nsx.neutron.plugins import vmware -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc -from vmware_nsx.neutron.plugins.vmware.common import config # noqa -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import nsx_utils -from vmware_nsx.neutron.plugins.vmware.common import securitygroups as sg_utils -from vmware_nsx.neutron.plugins.vmware.common import sync -from vmware_nsx.neutron.plugins.vmware.common import utils as c_utils -from vmware_nsx.neutron.plugins.vmware.dbexts import db as nsx_db -from vmware_nsx.neutron.plugins.vmware.dbexts import maclearning as mac_db -from vmware_nsx.neutron.plugins.vmware.dbexts import networkgw_db -from vmware_nsx.neutron.plugins.vmware.dbexts import nsx_models -from vmware_nsx.neutron.plugins.vmware.dbexts import qos_db -from vmware_nsx.neutron.plugins.vmware import dhcpmeta_modes -from vmware_nsx.neutron.plugins.vmware.extensions import maclearning as mac_ext -from vmware_nsx.neutron.plugins.vmware.extensions import networkgw -from vmware_nsx.neutron.plugins.vmware.extensions import qos -from vmware_nsx.neutron.plugins.vmware.nsxlib import l2gateway as l2gwlib -from vmware_nsx.neutron.plugins.vmware.nsxlib import queue as queuelib -from vmware_nsx.neutron.plugins.vmware.nsxlib import router as routerlib -from vmware_nsx.neutron.plugins.vmware.nsxlib import secgroup as secgrouplib -from vmware_nsx.neutron.plugins.vmware.nsxlib import switch as switchlib +import vmware_nsx +from vmware_nsx.api_client import exception as api_exc +from vmware_nsx.common import config # noqa +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import nsx_utils +from vmware_nsx.common import securitygroups as sg_utils +from vmware_nsx.common import sync +from vmware_nsx.common import utils as c_utils +from vmware_nsx.db import db as nsx_db +from vmware_nsx.db import maclearning as mac_db +from vmware_nsx.db import networkgw_db +from vmware_nsx.db import nsx_models +from vmware_nsx.db import qos_db +from vmware_nsx import dhcpmeta_modes +from vmware_nsx.extensions import maclearning as mac_ext +from vmware_nsx.extensions import networkgw +from vmware_nsx.extensions import qos +from vmware_nsx.nsxlib import l2gateway as l2gwlib +from vmware_nsx.nsxlib import queue as queuelib +from vmware_nsx.nsxlib import router as routerlib +from vmware_nsx.nsxlib import secgroup as secgrouplib +from vmware_nsx.nsxlib import switch as switchlib LOG = logging.getLogger(__name__) @@ -165,7 +165,8 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin, 'default': self._nsx_delete_port} } - neutron_extensions.append_api_extensions_path([vmware.NSX_EXT_PATH]) + neutron_extensions.append_api_extensions_path( + [vmware_nsx.NSX_EXT_PATH]) self.nsx_opts = cfg.CONF.NSX self.nsx_sync_opts = cfg.CONF.NSX_SYNC self.cluster = nsx_utils.create_nsx_cluster( diff --git a/vmware_nsx/neutron/plugins/vmware/plugins/dvs.py b/vmware_nsx/plugins/dvs.py similarity index 96% rename from vmware_nsx/neutron/plugins/vmware/plugins/dvs.py rename to vmware_nsx/plugins/dvs.py index cfd58ac8f4..2004006340 100644 --- a/vmware_nsx/neutron/plugins/vmware/plugins/dvs.py +++ b/vmware_nsx/plugins/dvs.py @@ -39,15 +39,15 @@ from neutron.i18n import _LE, _LW from neutron.plugins.common import constants from neutron.plugins.common import utils -from vmware_nsx.neutron.plugins import vmware -from vmware_nsx.neutron.plugins.vmware.common import config # noqa -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import nsx_constants -from vmware_nsx.neutron.plugins.vmware.common import utils as c_utils -from vmware_nsx.neutron.plugins.vmware.dbexts import db as nsx_db -from vmware_nsx.neutron.plugins.vmware import dhcpmeta_modes -from vmware_nsx.neutron.plugins.vmware.dvs import dvs -from vmware_nsx.neutron.plugins.vmware.dvs import dvs_utils +import vmware_nsx +from vmware_nsx.common import config # noqa +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import nsx_constants +from vmware_nsx.common import utils as c_utils +from vmware_nsx.db import db as nsx_db +from vmware_nsx import dhcpmeta_modes +from vmware_nsx.dvs import dvs +from vmware_nsx.dvs import dvs_utils LOG = logging.getLogger(__name__) @@ -80,7 +80,8 @@ class NsxDvsV2(addr_pair_db.AllowedAddressPairsMixin, super(NsxDvsV2, self).__init__() config.validate_config_options() LOG.debug('Driver support: DVS: %s' % dvs_utils.dvs_is_enabled()) - neutron_extensions.append_api_extensions_path([vmware.NSX_EXT_PATH]) + neutron_extensions.append_api_extensions_path( + [vmware_nsx.NSX_EXT_PATH]) self._dvs = dvs.DvsManager() # Common driver code diff --git a/vmware_nsx/neutron/plugins/vmware/plugins/managers.py b/vmware_nsx/plugins/managers.py similarity index 97% rename from vmware_nsx/neutron/plugins/vmware/plugins/managers.py rename to vmware_nsx/plugins/managers.py index a063ca65ca..ee157adc0f 100644 --- a/vmware_nsx/neutron/plugins/vmware/plugins/managers.py +++ b/vmware_nsx/plugins/managers.py @@ -19,7 +19,7 @@ import stevedore from oslo_log import log from neutron.i18n import _LE, _LI -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc +from vmware_nsx.common import exceptions as nsx_exc LOG = log.getLogger(__name__) ROUTER_TYPE_DRIVERS = ["distributed", "exclusive", "shared"] diff --git a/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v.py b/vmware_nsx/plugins/nsx_v.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/plugins/nsx_v.py rename to vmware_nsx/plugins/nsx_v.py index 9543a1630d..843156cc30 100644 --- a/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v.py +++ b/vmware_nsx/plugins/nsx_v.py @@ -50,30 +50,30 @@ from neutron.i18n import _LE, _LI, _LW from neutron.plugins.common import constants as plugin_const from neutron.plugins.common import utils -from vmware_nsx.neutron.plugins import vmware -from vmware_nsx.neutron.plugins.vmware.common import config # noqa -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import locking -from vmware_nsx.neutron.plugins.vmware.common import nsx_constants -from vmware_nsx.neutron.plugins.vmware.common import utils as c_utils -from vmware_nsx.neutron.plugins.vmware.dbexts import ( +import vmware_nsx +from vmware_nsx.common import config # noqa +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import locking +from vmware_nsx.common import nsx_constants +from vmware_nsx.common import utils as c_utils +from vmware_nsx.db import ( routertype as rt_rtr) -from vmware_nsx.neutron.plugins.vmware.dbexts import db as nsx_db -from vmware_nsx.neutron.plugins.vmware.dbexts import nsxv_db -from vmware_nsx.neutron.plugins.vmware.dbexts import vnic_index_db -from vmware_nsx.neutron.plugins.vmware.extensions import ( +from vmware_nsx.db import db as nsx_db +from vmware_nsx.db import nsxv_db +from vmware_nsx.db import vnic_index_db +from vmware_nsx.extensions import ( advancedserviceproviders as as_providers) -from vmware_nsx.neutron.plugins.vmware.extensions import ( +from vmware_nsx.extensions import ( vnicindex as ext_vnic_idx) -from vmware_nsx.neutron.plugins.vmware.plugins import managers -from vmware_nsx.neutron.plugins.vmware.plugins import nsx_v_md_proxy -from vmware_nsx.neutron.plugins.vmware.vshield.common import ( +from vmware_nsx.plugins import managers +from vmware_nsx.plugins import nsx_v_md_proxy +from vmware_nsx.vshield.common import ( constants as vcns_const) -from vmware_nsx.neutron.plugins.vmware.vshield.common import ( +from vmware_nsx.vshield.common import ( exceptions as vsh_exc) -from vmware_nsx.neutron.plugins.vmware.vshield import edge_utils -from vmware_nsx.neutron.plugins.vmware.vshield import securitygroup_utils -from vmware_nsx.neutron.plugins.vmware.vshield import vcns_driver +from vmware_nsx.vshield import edge_utils +from vmware_nsx.vshield import securitygroup_utils +from vmware_nsx.vshield import vcns_driver LOG = logging.getLogger(__name__) PORTGROUP_PREFIX = 'dvportgroup' @@ -114,7 +114,8 @@ class NsxVPluginV2(agents_db.AgentDbMixin, super(NsxVPluginV2, self).__init__() self.metadata_proxy_handler = None config.validate_nsxv_config_options() - neutron_extensions.append_api_extensions_path([vmware.NSX_EXT_PATH]) + neutron_extensions.append_api_extensions_path( + [vmware_nsx.NSX_EXT_PATH]) self.base_binding_dict = { pbin.VNIC_TYPE: pbin.VNIC_NORMAL, diff --git a/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v3_plugin.py b/vmware_nsx/plugins/nsx_v3_plugin.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/plugins/nsx_v3_plugin.py rename to vmware_nsx/plugins/nsx_v3_plugin.py index 0249c7f033..ac5587811a 100644 --- a/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v3_plugin.py +++ b/vmware_nsx/plugins/nsx_v3_plugin.py @@ -56,15 +56,15 @@ from neutron.i18n import _LE, _LI, _LW from neutron.plugins.common import constants as plugin_const from neutron.plugins.common import utils as n_utils -from vmware_nsx.neutron.plugins.vmware.common import config # noqa -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import nsx_constants -from vmware_nsx.neutron.plugins.vmware.common import utils -from vmware_nsx.neutron.plugins.vmware.dbexts import db as nsx_db -from vmware_nsx.neutron.plugins.vmware.nsxlib import v3 as nsxlib -from vmware_nsx.neutron.plugins.vmware.nsxlib.v3 import dfw_api as firewall -from vmware_nsx.neutron.plugins.vmware.nsxlib.v3 import router as routerlib -from vmware_nsx.neutron.plugins.vmware.nsxlib.v3 import security +from vmware_nsx.common import config # noqa +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import nsx_constants +from vmware_nsx.common import utils +from vmware_nsx.db import db as nsx_db +from vmware_nsx.nsxlib import v3 as nsxlib +from vmware_nsx.nsxlib.v3 import dfw_api as firewall +from vmware_nsx.nsxlib.v3 import router as routerlib +from vmware_nsx.nsxlib.v3 import security LOG = log.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/dvs/__init__.py b/vmware_nsx/plugins/nsx_v_drivers/__init__.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/dvs/__init__.py rename to vmware_nsx/plugins/nsx_v_drivers/__init__.py diff --git a/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_drivers/abstract_router_driver.py b/vmware_nsx/plugins/nsx_v_drivers/abstract_router_driver.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_drivers/abstract_router_driver.py rename to vmware_nsx/plugins/nsx_v_drivers/abstract_router_driver.py diff --git a/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_drivers/distributed_router_driver.py b/vmware_nsx/plugins/nsx_v_drivers/distributed_router_driver.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_drivers/distributed_router_driver.py rename to vmware_nsx/plugins/nsx_v_drivers/distributed_router_driver.py index 78383934db..fe1d7c6cd2 100644 --- a/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_drivers/distributed_router_driver.py +++ b/vmware_nsx/plugins/nsx_v_drivers/distributed_router_driver.py @@ -20,13 +20,13 @@ from neutron.common import exceptions as n_exc from neutron.db import l3_db from neutron.i18n import _LE -from vmware_nsx.neutron.plugins.vmware.dbexts import nsxv_db -from vmware_nsx.neutron.plugins.vmware.plugins import nsx_v -from vmware_nsx.neutron.plugins.vmware.plugins.nsx_v_drivers import ( +from vmware_nsx.db import nsxv_db +from vmware_nsx.plugins import nsx_v +from vmware_nsx.plugins.nsx_v_drivers import ( abstract_router_driver as router_driver) -from vmware_nsx.neutron.plugins.vmware.vshield.common import ( +from vmware_nsx.vshield.common import ( constants as vcns_const) -from vmware_nsx.neutron.plugins.vmware.vshield import edge_utils +from vmware_nsx.vshield import edge_utils LOG = logging.getLogger(__name__) METADATA_CIDR = '169.254.169.254/32' diff --git a/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_drivers/exclusive_router_driver.py b/vmware_nsx/plugins/nsx_v_drivers/exclusive_router_driver.py similarity index 95% rename from vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_drivers/exclusive_router_driver.py rename to vmware_nsx/plugins/nsx_v_drivers/exclusive_router_driver.py index c0b9f43067..73cbbecff1 100644 --- a/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_drivers/exclusive_router_driver.py +++ b/vmware_nsx/plugins/nsx_v_drivers/exclusive_router_driver.py @@ -16,13 +16,13 @@ from oslo_log import log as logging from neutron.api.v2 import attributes as attr -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsxv_exc -from vmware_nsx.neutron.plugins.vmware.common import locking -from vmware_nsx.neutron.plugins.vmware.dbexts import nsxv_db -from vmware_nsx.neutron.plugins.vmware.plugins import nsx_v -from vmware_nsx.neutron.plugins.vmware.plugins.nsx_v_drivers import ( +from vmware_nsx.common import exceptions as nsxv_exc +from vmware_nsx.common import locking +from vmware_nsx.db import nsxv_db +from vmware_nsx.plugins import nsx_v +from vmware_nsx.plugins.nsx_v_drivers import ( abstract_router_driver as router_driver) -from vmware_nsx.neutron.plugins.vmware.vshield import edge_utils +from vmware_nsx.vshield import edge_utils LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_drivers/shared_router_driver.py b/vmware_nsx/plugins/nsx_v_drivers/shared_router_driver.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_drivers/shared_router_driver.py rename to vmware_nsx/plugins/nsx_v_drivers/shared_router_driver.py index 6410a11d2e..ed81b156d8 100644 --- a/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_drivers/shared_router_driver.py +++ b/vmware_nsx/plugins/nsx_v_drivers/shared_router_driver.py @@ -19,17 +19,17 @@ from neutron.api.v2 import attributes as attr from neutron.db import l3_db from neutron.db import models_v2 from oslo_log import log as logging -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import locking -from vmware_nsx.neutron.plugins.vmware.dbexts import nsxv_db -from vmware_nsx.neutron.plugins.vmware.dbexts import nsxv_models -from vmware_nsx.neutron.plugins.vmware.plugins import nsx_v -from vmware_nsx.neutron.plugins.vmware.plugins.nsx_v_drivers import ( +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import locking +from vmware_nsx.db import nsxv_db +from vmware_nsx.db import nsxv_models +from vmware_nsx.plugins import nsx_v +from vmware_nsx.plugins.nsx_v_drivers import ( abstract_router_driver as router_driver) -from vmware_nsx.neutron.plugins.vmware.plugins import nsx_v_md_proxy -from vmware_nsx.neutron.plugins.vmware.vshield.common import ( +from vmware_nsx.plugins import nsx_v_md_proxy +from vmware_nsx.vshield.common import ( constants as vcns_const) -from vmware_nsx.neutron.plugins.vmware.vshield import edge_utils +from vmware_nsx.vshield import edge_utils LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_md_proxy.py b/vmware_nsx/plugins/nsx_v_md_proxy.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_md_proxy.py rename to vmware_nsx/plugins/nsx_v_md_proxy.py index ba7990a58b..3cbff830ca 100644 --- a/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_md_proxy.py +++ b/vmware_nsx/plugins/nsx_v_md_proxy.py @@ -25,15 +25,15 @@ from oslo_config import cfg from oslo_log import log as logging from neutron.i18n import _LE -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsxv_exc -from vmware_nsx.neutron.plugins.vmware.common import locking -from vmware_nsx.neutron.plugins.vmware.common import nsxv_constants -from vmware_nsx.neutron.plugins.vmware.dbexts import nsxv_db -from vmware_nsx.neutron.plugins.vmware.vshield import ( +from vmware_nsx.common import exceptions as nsxv_exc +from vmware_nsx.common import locking +from vmware_nsx.common import nsxv_constants +from vmware_nsx.db import nsxv_db +from vmware_nsx.vshield import ( nsxv_loadbalancer as nsxv_lb) -from vmware_nsx.neutron.plugins.vmware.vshield.common import ( +from vmware_nsx.vshield.common import ( constants as vcns_const) -from vmware_nsx.neutron.plugins.vmware.vshield import edge_utils +from vmware_nsx.vshield import edge_utils METADATA_VSE_NAME = 'MdSrv' METADATA_IP_ADDR = '169.254.169.254' diff --git a/vmware_nsx/services/l2gateway/nsx_v3_driver.py b/vmware_nsx/services/l2gateway/nsx_v3_driver.py index ca01349d4c..45cc4a1aa8 100644 --- a/vmware_nsx/services/l2gateway/nsx_v3_driver.py +++ b/vmware_nsx/services/l2gateway/nsx_v3_driver.py @@ -34,11 +34,11 @@ from neutron.i18n import _LE, _LI from neutron import manager from neutron.plugins.common import utils as n_utils -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import nsx_constants -from vmware_nsx.neutron.plugins.vmware.common import utils as nsx_utils -from vmware_nsx.neutron.plugins.vmware.dbexts import db as nsx_db -from vmware_nsx.neutron.plugins.vmware.nsxlib import v3 as nsxlib +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import nsx_constants +from vmware_nsx.common import utils as nsx_utils +from vmware_nsx.db import db as nsx_db +from vmware_nsx.nsxlib import v3 as nsxlib LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/services/l2gateway/plugin.py b/vmware_nsx/services/l2gateway/plugin.py index b6b0eb5ac4..e92d0615d1 100644 --- a/vmware_nsx/services/l2gateway/plugin.py +++ b/vmware_nsx/services/l2gateway/plugin.py @@ -21,7 +21,7 @@ from oslo_config import cfg from oslo_log import log as logging from oslo_utils import importutils -from vmware_nsx.neutron.plugins.vmware.common import config # noqa +from vmware_nsx.common import config # noqa LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/services/qos/plugin.py b/vmware_nsx/services/qos/plugin.py index 3e42d36b49..f86c317a7f 100644 --- a/vmware_nsx/services/qos/plugin.py +++ b/vmware_nsx/services/qos/plugin.py @@ -22,8 +22,8 @@ from neutron.i18n import _LE, _LI from neutron.objects.qos import policy as policy_object from neutron.services.qos import qos_plugin -from vmware_nsx.neutron.plugins.vmware.common import utils -from vmware_nsx.neutron.plugins.vmware.nsxlib import v3 as nsxlib +from vmware_nsx.common import utils +from vmware_nsx.nsxlib import v3 as nsxlib LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/shell/__init__.py b/vmware_nsx/shell/__init__.py similarity index 95% rename from vmware_nsx/neutron/plugins/vmware/shell/__init__.py rename to vmware_nsx/shell/__init__.py index 1dbe1a5ae9..b709fdd500 100644 --- a/vmware_nsx/neutron/plugins/vmware/shell/__init__.py +++ b/vmware_nsx/shell/__init__.py @@ -17,7 +17,7 @@ import sys from neutronclient import shell -from vmware_nsx.neutron.plugins.vmware.shell import commands as cmd +from vmware_nsx.shell import commands as cmd class NsxManage(shell.NeutronShell): diff --git a/vmware_nsx/neutron/plugins/vmware/shell/commands.py b/vmware_nsx/shell/commands.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/shell/commands.py rename to vmware_nsx/shell/commands.py diff --git a/vmware_nsx/tests/unit/vmware/__init__.py b/vmware_nsx/tests/unit/vmware/__init__.py index 7f41696ac9..b483625dad 100644 --- a/vmware_nsx/tests/unit/vmware/__init__.py +++ b/vmware_nsx/tests/unit/vmware/__init__.py @@ -18,15 +18,15 @@ import os from networking_l2gw.db.l2gateway import l2gateway_models # noqa -from vmware_nsx.neutron.plugins.vmware.api_client import client as nsx_client -from vmware_nsx.neutron.plugins.vmware.api_client import eventlet_client -from vmware_nsx.neutron.plugins.vmware import extensions -import vmware_nsx.neutron.plugins.vmware.plugin as neutron_plugin -from vmware_nsx.neutron.plugins.vmware.vshield.common import ( +from vmware_nsx.api_client import client as nsx_client +from vmware_nsx.api_client import eventlet_client +from vmware_nsx import extensions +import vmware_nsx.plugin as neutron_plugin +from vmware_nsx.vshield.common import ( VcnsApiClient as vcnsapi) -from vmware_nsx.neutron.plugins.vmware.vshield import edge_utils -from vmware_nsx.neutron.plugins.vmware.vshield import vcns -import vmware_nsx.neutron.plugins.vmware.vshield.vcns_driver as vcnsdriver +from vmware_nsx.vshield import edge_utils +from vmware_nsx.vshield import vcns +import vmware_nsx.vshield.vcns_driver as vcnsdriver plugin = neutron_plugin.NsxPlugin @@ -54,5 +54,5 @@ def get_fake_conf(filename): def nsx_method(method_name, module_name='nsxlib'): - return '%s.%s.%s' % ('vmware_nsx.neutron.plugins.vmware', module_name, + return '%s.%s.%s' % ('vmware_nsx', module_name, method_name) diff --git a/vmware_nsx/tests/unit/vmware/apiclient/fake.py b/vmware_nsx/tests/unit/vmware/apiclient/fake.py index 4a11a40637..486b53c2ce 100644 --- a/vmware_nsx/tests/unit/vmware/apiclient/fake.py +++ b/vmware_nsx/tests/unit/vmware/apiclient/fake.py @@ -18,7 +18,7 @@ from oslo_utils import uuidutils import six import six.moves.urllib.parse as urlparse -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc +from vmware_nsx.api_client import exception as api_exc LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/tests/unit/vmware/apiclient/test_api_common.py b/vmware_nsx/tests/unit/vmware/apiclient/test_api_common.py index 5fd309f4ca..dfcec4ac4e 100644 --- a/vmware_nsx/tests/unit/vmware/apiclient/test_api_common.py +++ b/vmware_nsx/tests/unit/vmware/apiclient/test_api_common.py @@ -18,7 +18,7 @@ from neutron.tests import base from six.moves import http_client as httplib -from vmware_nsx.neutron.plugins.vmware import api_client +from vmware_nsx import api_client class ApiCommonTest(base.BaseTestCase): diff --git a/vmware_nsx/tests/unit/vmware/apiclient/test_api_eventlet_request.py b/vmware_nsx/tests/unit/vmware/apiclient/test_api_eventlet_request.py index f7a7123c2f..5eeb90adea 100644 --- a/vmware_nsx/tests/unit/vmware/apiclient/test_api_eventlet_request.py +++ b/vmware_nsx/tests/unit/vmware/apiclient/test_api_eventlet_request.py @@ -23,9 +23,9 @@ from oslo_log import log as logging from six.moves import http_client as httplib -from vmware_nsx.neutron.plugins.vmware.api_client import ( +from vmware_nsx.api_client import ( eventlet_client as client) -from vmware_nsx.neutron.plugins.vmware.api_client import ( +from vmware_nsx.api_client import ( eventlet_request as request) from vmware_nsx.tests.unit import vmware diff --git a/vmware_nsx/tests/unit/vmware/db/test_lsn_db.py b/vmware_nsx/tests/unit/vmware/db/test_lsn_db.py index 627a04c965..4bcec062c1 100644 --- a/vmware_nsx/tests/unit/vmware/db/test_lsn_db.py +++ b/vmware_nsx/tests/unit/vmware/db/test_lsn_db.py @@ -17,9 +17,9 @@ from neutron import context from neutron.tests.unit import testlib_api from sqlalchemy import orm -from vmware_nsx.neutron.plugins.vmware.common import exceptions as p_exc -from vmware_nsx.neutron.plugins.vmware.dbexts import lsn_db -from vmware_nsx.neutron.plugins.vmware.dbexts import nsx_models +from vmware_nsx.common import exceptions as p_exc +from vmware_nsx.db import lsn_db +from vmware_nsx.db import nsx_models class LSNTestCase(testlib_api.SqlTestCase): diff --git a/vmware_nsx/tests/unit/vmware/db/test_nsx_db.py b/vmware_nsx/tests/unit/vmware/db/test_nsx_db.py index 6515c5014c..b5102ecbf6 100644 --- a/vmware_nsx/tests/unit/vmware/db/test_nsx_db.py +++ b/vmware_nsx/tests/unit/vmware/db/test_nsx_db.py @@ -18,8 +18,8 @@ from neutron.db import models_v2 from neutron.tests.unit import testlib_api from oslo_db import exception as d_exc -from vmware_nsx.neutron.plugins.vmware.dbexts import db as nsx_db -from vmware_nsx.neutron.plugins.vmware.dbexts import nsx_models +from vmware_nsx.db import db as nsx_db +from vmware_nsx.db import nsx_models class NsxDBTestCase(testlib_api.SqlTestCase): diff --git a/vmware_nsx/tests/unit/vmware/extensions/test_maclearning.py b/vmware_nsx/tests/unit/vmware/extensions/test_maclearning.py index 12ecf0f948..0a9128dd3a 100644 --- a/vmware_nsx/tests/unit/vmware/extensions/test_maclearning.py +++ b/vmware_nsx/tests/unit/vmware/extensions/test_maclearning.py @@ -21,8 +21,8 @@ from neutron.tests.unit.db import test_db_base_plugin_v2 as test_db_plugin from oslo_config import cfg import six -from vmware_nsx.neutron.plugins.vmware.api_client import version -from vmware_nsx.neutron.plugins.vmware.common import sync +from vmware_nsx.api_client import version +from vmware_nsx.common import sync from vmware_nsx.tests.unit import vmware from vmware_nsx.tests.unit.vmware.apiclient import fake from vmware_nsx.tests.unit.vmware import test_utils diff --git a/vmware_nsx/tests/unit/vmware/extensions/test_networkgw.py b/vmware_nsx/tests/unit/vmware/extensions/test_networkgw.py index dc12b1b893..fbefab7319 100644 --- a/vmware_nsx/tests/unit/vmware/extensions/test_networkgw.py +++ b/vmware_nsx/tests/unit/vmware/extensions/test_networkgw.py @@ -31,13 +31,13 @@ from neutron.tests.unit.api import test_extensions from neutron.tests.unit.api.v2 import test_base from neutron.tests.unit.db import test_db_base_plugin_v2 as test_db_plugin -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.dbexts import networkgw_db -from vmware_nsx.neutron.plugins.vmware.dbexts import nsx_models -from vmware_nsx.neutron.plugins.vmware.extensions import networkgw -from vmware_nsx.neutron.plugins.vmware import nsxlib -from vmware_nsx.neutron.plugins.vmware.nsxlib import l2gateway as l2gwlib +from vmware_nsx.api_client import exception as api_exc +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.db import networkgw_db +from vmware_nsx.db import nsx_models +from vmware_nsx.extensions import networkgw +from vmware_nsx import nsxlib +from vmware_nsx.nsxlib import l2gateway as l2gwlib from vmware_nsx.tests.unit import vmware from vmware_nsx.tests.unit.vmware import test_nsx_plugin diff --git a/vmware_nsx/tests/unit/vmware/extensions/test_portsecurity.py b/vmware_nsx/tests/unit/vmware/extensions/test_portsecurity.py index 69ec314e70..cd7fd76314 100644 --- a/vmware_nsx/tests/unit/vmware/extensions/test_portsecurity.py +++ b/vmware_nsx/tests/unit/vmware/extensions/test_portsecurity.py @@ -16,7 +16,7 @@ import mock from neutron.tests.unit.extensions import test_portsecurity as psec -from vmware_nsx.neutron.plugins.vmware.common import sync +from vmware_nsx.common import sync from vmware_nsx.tests.unit import vmware from vmware_nsx.tests.unit.vmware.apiclient import fake from vmware_nsx.tests.unit.vmware import test_utils diff --git a/vmware_nsx/tests/unit/vmware/extensions/test_qosqueues.py b/vmware_nsx/tests/unit/vmware/extensions/test_qosqueues.py index a0d4f1818b..a0d400f26a 100644 --- a/vmware_nsx/tests/unit/vmware/extensions/test_qosqueues.py +++ b/vmware_nsx/tests/unit/vmware/extensions/test_qosqueues.py @@ -21,9 +21,9 @@ import webob.exc from neutron import context from neutron.tests.unit.api import test_extensions -from vmware_nsx.neutron.plugins.vmware.dbexts import qos_db -from vmware_nsx.neutron.plugins.vmware.extensions import qos as ext_qos -from vmware_nsx.neutron.plugins.vmware import nsxlib +from vmware_nsx.db import qos_db +from vmware_nsx.extensions import qos as ext_qos +from vmware_nsx import nsxlib from vmware_nsx.tests.unit import vmware from vmware_nsx.tests.unit.vmware import test_nsx_plugin diff --git a/vmware_nsx/tests/unit/vmware/extensions/test_vnic_index.py b/vmware_nsx/tests/unit/vmware/extensions/test_vnic_index.py index 44bc05f246..5b12ffb917 100644 --- a/vmware_nsx/tests/unit/vmware/extensions/test_vnic_index.py +++ b/vmware_nsx/tests/unit/vmware/extensions/test_vnic_index.py @@ -22,8 +22,8 @@ from neutron import context as neutron_context from neutron.db import db_base_plugin_v2 from neutron import manager from neutron.tests.unit.db import test_db_base_plugin_v2 as test_db_plugin -from vmware_nsx.neutron.plugins.vmware.dbexts import vnic_index_db -from vmware_nsx.neutron.plugins.vmware.extensions import vnicindex as vnicidx +from vmware_nsx.db import vnic_index_db +from vmware_nsx.extensions import vnicindex as vnicidx from vmware_nsx.tests.unit import vmware diff --git a/vmware_nsx/tests/unit/vmware/nsx_v/test_edge_loadbalancer_driver.py b/vmware_nsx/tests/unit/vmware/nsx_v/test_edge_loadbalancer_driver.py index 9c04054c01..201f4b9711 100644 --- a/vmware_nsx/tests/unit/vmware/nsx_v/test_edge_loadbalancer_driver.py +++ b/vmware_nsx/tests/unit/vmware/nsx_v/test_edge_loadbalancer_driver.py @@ -18,7 +18,7 @@ import mock from neutron import context from neutron.tests import base -from vmware_nsx.neutron.plugins.vmware.vshield import vcns_driver +from vmware_nsx.vshield import vcns_driver EDGE_PROVIDER = ('LOADBALANCER:vmwareedge:neutron.services.' 'loadbalancer.drivers.vmware.edge_driver.' diff --git a/vmware_nsx/tests/unit/vmware/nsx_v/test_nsxv_loadbalancer.py b/vmware_nsx/tests/unit/vmware/nsx_v/test_nsxv_loadbalancer.py index a09602f17e..7ca0746c26 100644 --- a/vmware_nsx/tests/unit/vmware/nsx_v/test_nsxv_loadbalancer.py +++ b/vmware_nsx/tests/unit/vmware/nsx_v/test_nsxv_loadbalancer.py @@ -17,8 +17,8 @@ import mock from oslo_serialization import jsonutils from neutron.tests import base -from vmware_nsx.neutron.plugins.vmware.vshield import nsxv_loadbalancer -from vmware_nsx.neutron.plugins.vmware.vshield import vcns +from vmware_nsx.vshield import nsxv_loadbalancer +from vmware_nsx.vshield import vcns class NsxvLoadbalancerTestCase(base.BaseTestCase): diff --git a/vmware_nsx/tests/unit/vmware/nsx_v3_mocks.py b/vmware_nsx/tests/unit/vmware/nsx_v3_mocks.py index 378d3a9661..a1fbc7b88f 100644 --- a/vmware_nsx/tests/unit/vmware/nsx_v3_mocks.py +++ b/vmware_nsx/tests/unit/vmware/nsx_v3_mocks.py @@ -16,8 +16,8 @@ from oslo_utils import uuidutils -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import nsx_constants +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import nsx_constants FAKE_NAME = "fake_name" diff --git a/vmware_nsx/tests/unit/vmware/nsxlib/base.py b/vmware_nsx/tests/unit/vmware/nsxlib/base.py index 48b9958286..2bda19d54f 100644 --- a/vmware_nsx/tests/unit/vmware/nsxlib/base.py +++ b/vmware_nsx/tests/unit/vmware/nsxlib/base.py @@ -18,11 +18,11 @@ import mock from neutron.tests import base from neutron.tests.unit.api.v2 import test_base -from vmware_nsx.neutron.plugins.vmware.api_client import client -from vmware_nsx.neutron.plugins.vmware.api_client import exception -from vmware_nsx.neutron.plugins.vmware.api_client import version -from vmware_nsx.neutron.plugins.vmware.common import config # noqa -from vmware_nsx.neutron.plugins.vmware import nsx_cluster as cluster +from vmware_nsx.api_client import client +from vmware_nsx.api_client import exception +from vmware_nsx.api_client import version +from vmware_nsx.common import config # noqa +from vmware_nsx import nsx_cluster as cluster from vmware_nsx.tests.unit import vmware from vmware_nsx.tests.unit.vmware.apiclient import fake diff --git a/vmware_nsx/tests/unit/vmware/nsxlib/test_l2gateway.py b/vmware_nsx/tests/unit/vmware/nsxlib/test_l2gateway.py index 3df6938e0c..d460c8bb35 100644 --- a/vmware_nsx/tests/unit/vmware/nsxlib/test_l2gateway.py +++ b/vmware_nsx/tests/unit/vmware/nsxlib/test_l2gateway.py @@ -18,12 +18,12 @@ import mock from neutron.tests.unit.api.v2 import test_base from oslo_serialization import jsonutils -from vmware_nsx.neutron.plugins.vmware.api_client import exception -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import utils as nsx_utils -from vmware_nsx.neutron.plugins.vmware import nsxlib -from vmware_nsx.neutron.plugins.vmware.nsxlib import l2gateway as l2gwlib -from vmware_nsx.neutron.plugins.vmware.nsxlib import switch as switchlib +from vmware_nsx.api_client import exception +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import utils as nsx_utils +from vmware_nsx import nsxlib +from vmware_nsx.nsxlib import l2gateway as l2gwlib +from vmware_nsx.nsxlib import switch as switchlib from vmware_nsx.tests.unit.vmware.nsxlib import base _uuid = test_base._uuid diff --git a/vmware_nsx/tests/unit/vmware/nsxlib/test_lsn.py b/vmware_nsx/tests/unit/vmware/nsxlib/test_lsn.py index 1e75271fe5..3f4f17010f 100644 --- a/vmware_nsx/tests/unit/vmware/nsxlib/test_lsn.py +++ b/vmware_nsx/tests/unit/vmware/nsxlib/test_lsn.py @@ -19,10 +19,10 @@ from neutron.tests import base from oslo_serialization import jsonutils import six -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import utils -from vmware_nsx.neutron.plugins.vmware.nsxlib import lsn as lsnlib +from vmware_nsx.api_client import exception as api_exc +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import utils +from vmware_nsx.nsxlib import lsn as lsnlib class LSNTestCase(base.BaseTestCase): @@ -30,7 +30,7 @@ class LSNTestCase(base.BaseTestCase): def setUp(self): super(LSNTestCase, self).setUp() self.mock_request_p = mock.patch( - 'vmware_nsx.neutron.plugins.vmware.nsxlib.do_request') + 'vmware_nsx.nsxlib.do_request') self.mock_request = self.mock_request_p.start() self.cluster = mock.Mock() self.cluster.default_service_cluster_uuid = 'foo' diff --git a/vmware_nsx/tests/unit/vmware/nsxlib/test_queue.py b/vmware_nsx/tests/unit/vmware/nsxlib/test_queue.py index 552484f74e..bee576d599 100644 --- a/vmware_nsx/tests/unit/vmware/nsxlib/test_queue.py +++ b/vmware_nsx/tests/unit/vmware/nsxlib/test_queue.py @@ -17,9 +17,9 @@ import mock from neutron.common import exceptions -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc -from vmware_nsx.neutron.plugins.vmware import nsxlib -from vmware_nsx.neutron.plugins.vmware.nsxlib import queue as queuelib +from vmware_nsx.api_client import exception as api_exc +from vmware_nsx import nsxlib +from vmware_nsx.nsxlib import queue as queuelib from vmware_nsx.tests.unit.vmware.nsxlib import base diff --git a/vmware_nsx/tests/unit/vmware/nsxlib/test_router.py b/vmware_nsx/tests/unit/vmware/nsxlib/test_router.py index b3225de7aa..29b1650258 100644 --- a/vmware_nsx/tests/unit/vmware/nsxlib/test_router.py +++ b/vmware_nsx/tests/unit/vmware/nsxlib/test_router.py @@ -20,13 +20,13 @@ from neutron.tests.unit.api.v2 import test_base from oslo_config import cfg from oslo_utils import uuidutils -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc -from vmware_nsx.neutron.plugins.vmware.api_client import version as ver_module -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import utils -from vmware_nsx.neutron.plugins.vmware import nsxlib -from vmware_nsx.neutron.plugins.vmware.nsxlib import router as routerlib -from vmware_nsx.neutron.plugins.vmware.nsxlib import switch as switchlib +from vmware_nsx.api_client import exception as api_exc +from vmware_nsx.api_client import version as ver_module +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import utils +from vmware_nsx import nsxlib +from vmware_nsx.nsxlib import router as routerlib +from vmware_nsx.nsxlib import switch as switchlib from vmware_nsx.tests.unit.vmware.nsxlib import base _uuid = test_base._uuid diff --git a/vmware_nsx/tests/unit/vmware/nsxlib/test_secgroup.py b/vmware_nsx/tests/unit/vmware/nsxlib/test_secgroup.py index e049e72291..b05bc9e453 100644 --- a/vmware_nsx/tests/unit/vmware/nsxlib/test_secgroup.py +++ b/vmware_nsx/tests/unit/vmware/nsxlib/test_secgroup.py @@ -18,8 +18,8 @@ from neutron.common import constants from neutron.common import exceptions from neutron.tests.unit.api.v2 import test_base -from vmware_nsx.neutron.plugins.vmware import nsxlib -from vmware_nsx.neutron.plugins.vmware.nsxlib import secgroup as secgrouplib +from vmware_nsx import nsxlib +from vmware_nsx.nsxlib import secgroup as secgrouplib from vmware_nsx.tests.unit.vmware.nsxlib import base _uuid = test_base._uuid diff --git a/vmware_nsx/tests/unit/vmware/nsxlib/test_switch.py b/vmware_nsx/tests/unit/vmware/nsxlib/test_switch.py index 7766dceb94..25a3258e7b 100644 --- a/vmware_nsx/tests/unit/vmware/nsxlib/test_switch.py +++ b/vmware_nsx/tests/unit/vmware/nsxlib/test_switch.py @@ -21,8 +21,8 @@ from neutron.common import constants from neutron.common import exceptions from neutron.tests.unit.api.v2 import test_base -from vmware_nsx.neutron.plugins.vmware.common import utils -from vmware_nsx.neutron.plugins.vmware.nsxlib import switch as switchlib +from vmware_nsx.common import utils +from vmware_nsx.nsxlib import switch as switchlib from vmware_nsx.tests.unit.vmware.nsxlib import base _uuid = test_base._uuid diff --git a/vmware_nsx/tests/unit/vmware/nsxlib/test_versioning.py b/vmware_nsx/tests/unit/vmware/nsxlib/test_versioning.py index a0611d1173..4ee80621d3 100644 --- a/vmware_nsx/tests/unit/vmware/nsxlib/test_versioning.py +++ b/vmware_nsx/tests/unit/vmware/nsxlib/test_versioning.py @@ -16,11 +16,11 @@ from neutron.tests import base -from vmware_nsx.neutron.plugins.vmware.api_client import ( +from vmware_nsx.api_client import ( version as version_module) -from vmware_nsx.neutron.plugins.vmware.api_client import exception -from vmware_nsx.neutron.plugins.vmware.nsxlib import router as routerlib -from vmware_nsx.neutron.plugins.vmware.nsxlib import versioning +from vmware_nsx.api_client import exception +from vmware_nsx.nsxlib import router as routerlib +from vmware_nsx.nsxlib import versioning class TestVersioning(base.BaseTestCase): diff --git a/vmware_nsx/tests/unit/vmware/nsxlib/v3/test_port.py b/vmware_nsx/tests/unit/vmware/nsxlib/v3/test_port.py index 7b7b9d43a3..3c519ba7c3 100644 --- a/vmware_nsx/tests/unit/vmware/nsxlib/v3/test_port.py +++ b/vmware_nsx/tests/unit/vmware/nsxlib/v3/test_port.py @@ -18,7 +18,7 @@ import mock from oslo_log import log -from vmware_nsx.neutron.plugins.vmware.nsxlib import v3 as nsxlib +from vmware_nsx.nsxlib import v3 as nsxlib from vmware_nsx.tests.unit.vmware.nsxlib.v3 import nsxlib_testcase from vmware_nsx.tests.unit.vmware import test_constants_v3 @@ -27,7 +27,7 @@ LOG = log.getLogger(__name__) class NsxLibPortTestCase(nsxlib_testcase.NsxLibTestCase): - @mock.patch("vmware_nsx.neutron.plugins.vmware.nsxlib.v3" + @mock.patch("vmware_nsx.nsxlib.v3" ".client.create_resource") def test_create_logical_port(self, mock_create_resource): """ @@ -42,7 +42,7 @@ class NsxLibPortTestCase(nsxlib_testcase.NsxLibTestCase): self.assertEqual(test_constants_v3.FAKE_PORT, result) - @mock.patch("vmware_nsx.neutron.plugins.vmware.nsxlib.v3" + @mock.patch("vmware_nsx.nsxlib.v3" ".client.create_resource") def test_create_logical_port_admin_down(self, mock_create_resource): """ @@ -59,7 +59,7 @@ class NsxLibPortTestCase(nsxlib_testcase.NsxLibTestCase): self.assertEqual(fake_port, result) - @mock.patch("vmware_nsx.neutron.plugins.vmware.nsxlib.v3" + @mock.patch("vmware_nsx.nsxlib.v3" ".client.delete_resource") def test_delete_logical_port(self, mock_delete_resource): """ diff --git a/vmware_nsx/tests/unit/vmware/nsxlib/v3/test_qos_switching_profile.py b/vmware_nsx/tests/unit/vmware/nsxlib/v3/test_qos_switching_profile.py index 301a26e452..76bc68244b 100644 --- a/vmware_nsx/tests/unit/vmware/nsxlib/v3/test_qos_switching_profile.py +++ b/vmware_nsx/tests/unit/vmware/nsxlib/v3/test_qos_switching_profile.py @@ -18,7 +18,7 @@ import mock from oslo_log import log -from vmware_nsx.neutron.plugins.vmware.nsxlib import v3 as nsxlib +from vmware_nsx.nsxlib import v3 as nsxlib from vmware_nsx.tests.unit.vmware.nsxlib.v3 import nsxlib_testcase from vmware_nsx.tests.unit.vmware import test_constants_v3 @@ -27,7 +27,7 @@ LOG = log.getLogger(__name__) class NsxLibQosTestCase(nsxlib_testcase.NsxLibTestCase): - @mock.patch("vmware_nsx.neutron.plugins.vmware.nsxlib.v3" + @mock.patch("vmware_nsx.nsxlib.v3" ".client.create_resource") def test_create_qos_switching_profile_untrusted( self, mock_create_resource): @@ -45,7 +45,7 @@ class NsxLibQosTestCase(nsxlib_testcase.NsxLibTestCase): description=test_constants_v3.FAKE_NAME) self.assertEqual(fake_qos_profile, result) - @mock.patch("vmware_nsx.neutron.plugins.vmware.nsxlib.v3" + @mock.patch("vmware_nsx.nsxlib.v3" ".client.create_resource") def test_create_qos_switching_profile_trusted( self, mock_create_resource): @@ -63,7 +63,7 @@ class NsxLibQosTestCase(nsxlib_testcase.NsxLibTestCase): description=test_constants_v3.FAKE_NAME) self.assertEqual(fake_qos_profile, result) - @mock.patch("vmware_nsx.neutron.plugins.vmware.nsxlib.v3" + @mock.patch("vmware_nsx.nsxlib.v3" ".client.delete_resource") def test_delete_qos_switching_profile(self, mock_delete_resource): """ diff --git a/vmware_nsx/tests/unit/vmware/nsxlib/v3/test_switch.py b/vmware_nsx/tests/unit/vmware/nsxlib/v3/test_switch.py index 4141d1ab8f..a774b321ff 100644 --- a/vmware_nsx/tests/unit/vmware/nsxlib/v3/test_switch.py +++ b/vmware_nsx/tests/unit/vmware/nsxlib/v3/test_switch.py @@ -19,8 +19,8 @@ import mock from oslo_log import log from oslo_utils import uuidutils -from vmware_nsx.neutron.plugins.vmware.common import nsx_constants -from vmware_nsx.neutron.plugins.vmware.nsxlib import v3 as nsxlib +from vmware_nsx.common import nsx_constants +from vmware_nsx.nsxlib import v3 as nsxlib from vmware_nsx.tests.unit.vmware import nsx_v3_mocks from vmware_nsx.tests.unit.vmware.nsxlib.v3 import nsxlib_testcase @@ -29,7 +29,7 @@ LOG = log.getLogger(__name__) class NsxLibSwitchTestCase(nsxlib_testcase.NsxLibTestCase): - @mock.patch("vmware_nsx.neutron.plugins.vmware.nsxlib.v3" + @mock.patch("vmware_nsx.nsxlib.v3" ".client.create_resource") def test_create_logical_switch(self, mock_create_resource): """ @@ -43,7 +43,7 @@ class NsxLibSwitchTestCase(nsxlib_testcase.NsxLibTestCase): []) self.assertEqual(fake_switch, result) - @mock.patch("vmware_nsx.neutron.plugins.vmware.nsxlib.v3" + @mock.patch("vmware_nsx.nsxlib.v3" ".client.create_resource") def test_create_logical_switch_admin_down(self, mock_create_resource): """ @@ -58,7 +58,7 @@ class NsxLibSwitchTestCase(nsxlib_testcase.NsxLibTestCase): [], admin_state=False) self.assertEqual(fake_switch, result) - @mock.patch("vmware_nsx.neutron.plugins.vmware.nsxlib.v3" + @mock.patch("vmware_nsx.nsxlib.v3" ".client.create_resource") def test_create_logical_switch_vlan(self, mock_create_resource): """ @@ -73,7 +73,7 @@ class NsxLibSwitchTestCase(nsxlib_testcase.NsxLibTestCase): []) self.assertEqual(fake_switch, result) - @mock.patch("vmware_nsx.neutron.plugins.vmware.nsxlib.v3" + @mock.patch("vmware_nsx.nsxlib.v3" ".client.delete_resource") def test_delete_logical_switch(self, mock_delete_resource): """ diff --git a/vmware_nsx/tests/unit/vmware/test_agent_scheduler.py b/vmware_nsx/tests/unit/vmware/test_agent_scheduler.py index dc431ec657..15cec1a440 100644 --- a/vmware_nsx/tests/unit/vmware/test_agent_scheduler.py +++ b/vmware_nsx/tests/unit/vmware/test_agent_scheduler.py @@ -19,8 +19,8 @@ from oslo_config import cfg from neutron.common import constants from neutron.tests.unit.db import test_agentschedulers_db # noqa -from vmware_nsx.neutron.plugins.vmware.common import sync -from vmware_nsx.neutron.plugins.vmware.dhcp_meta import rpc +from vmware_nsx.common import sync +from vmware_nsx.dhcp_meta import rpc from vmware_nsx.tests.unit import vmware from vmware_nsx.tests.unit.vmware.apiclient import fake from vmware_nsx.tests.unit.vmware import test_utils diff --git a/vmware_nsx/tests/unit/vmware/test_dhcpmeta.py b/vmware_nsx/tests/unit/vmware/test_dhcpmeta.py index cf0da77717..0291a8f87e 100644 --- a/vmware_nsx/tests/unit/vmware/test_dhcpmeta.py +++ b/vmware_nsx/tests/unit/vmware/test_dhcpmeta.py @@ -22,14 +22,14 @@ from neutron import context from neutron.tests import base from neutron.tests.unit import testlib_api -from vmware_nsx.neutron.plugins.vmware.api_client import exception -from vmware_nsx.neutron.plugins.vmware.common import exceptions as p_exc -from vmware_nsx.neutron.plugins.vmware.dbexts import lsn_db -from vmware_nsx.neutron.plugins.vmware.dhcp_meta import constants -from vmware_nsx.neutron.plugins.vmware.dhcp_meta import lsnmanager as lsn_man -from vmware_nsx.neutron.plugins.vmware.dhcp_meta import migration as mig_man -from vmware_nsx.neutron.plugins.vmware.dhcp_meta import nsx -from vmware_nsx.neutron.plugins.vmware.dhcp_meta import rpc +from vmware_nsx.api_client import exception +from vmware_nsx.common import exceptions as p_exc +from vmware_nsx.db import lsn_db +from vmware_nsx.dhcp_meta import constants +from vmware_nsx.dhcp_meta import lsnmanager as lsn_man +from vmware_nsx.dhcp_meta import migration as mig_man +from vmware_nsx.dhcp_meta import nsx +from vmware_nsx.dhcp_meta import rpc class DhcpMetadataBuilderTestCase(base.BaseTestCase): diff --git a/vmware_nsx/tests/unit/vmware/test_dvs.py b/vmware_nsx/tests/unit/vmware/test_dvs.py index b8f71b589e..8480d01e8a 100644 --- a/vmware_nsx/tests/unit/vmware/test_dvs.py +++ b/vmware_nsx/tests/unit/vmware/test_dvs.py @@ -23,12 +23,12 @@ 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 vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.dbexts import db as nsx_db -from vmware_nsx.neutron.plugins.vmware.dvs import dvs -from vmware_nsx.neutron.plugins.vmware.dvs import dvs_utils +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.db import db as nsx_db +from vmware_nsx.dvs import dvs +from vmware_nsx.dvs import dvs_utils -PLUGIN_NAME = 'vmware_nsx.neutron.plugins.vmware.plugin.NsxDvsPlugin' +PLUGIN_NAME = 'vmware_nsx.plugin.NsxDvsPlugin' class fake_session(object): diff --git a/vmware_nsx/tests/unit/vmware/test_dvs_utils.py b/vmware_nsx/tests/unit/vmware/test_dvs_utils.py index 974c5ab124..6a4dfeb4cc 100644 --- a/vmware_nsx/tests/unit/vmware/test_dvs_utils.py +++ b/vmware_nsx/tests/unit/vmware/test_dvs_utils.py @@ -18,7 +18,7 @@ from oslo_config import cfg from oslo_vmware import api from neutron.tests import base -from vmware_nsx.neutron.plugins.vmware.dvs import dvs_utils +from vmware_nsx.dvs import dvs_utils class DvsUtilsTestCase(base.BaseTestCase): diff --git a/vmware_nsx/tests/unit/vmware/test_nsx_misc.py b/vmware_nsx/tests/unit/vmware/test_nsx_misc.py index 595d3d503f..c23a11bbee 100644 --- a/vmware_nsx/tests/unit/vmware/test_nsx_misc.py +++ b/vmware_nsx/tests/unit/vmware/test_nsx_misc.py @@ -15,8 +15,8 @@ from neutron.tests import base -from vmware_nsx.neutron.plugins.vmware.vshield.common import exceptions -from vmware_nsx.neutron.plugins.vmware.vshield import vcns +from vmware_nsx.vshield.common import exceptions +from vmware_nsx.vshield import vcns def raise_until_attempt(attempt, exception): diff --git a/vmware_nsx/tests/unit/vmware/test_nsx_opts.py b/vmware_nsx/tests/unit/vmware/test_nsx_opts.py index 23c5ef7d70..20d15558e2 100644 --- a/vmware_nsx/tests/unit/vmware/test_nsx_opts.py +++ b/vmware_nsx/tests/unit/vmware/test_nsx_opts.py @@ -22,13 +22,13 @@ from oslo_config import cfg from oslo_utils import uuidutils import six -from vmware_nsx.neutron.plugins.vmware.api_client import client -from vmware_nsx.neutron.plugins.vmware.api_client import version -from vmware_nsx.neutron.plugins.vmware.common import config # noqa -from vmware_nsx.neutron.plugins.vmware.common import exceptions -from vmware_nsx.neutron.plugins.vmware.common import sync -from vmware_nsx.neutron.plugins.vmware import nsx_cluster -from vmware_nsx.neutron.plugins.vmware.nsxlib import lsn as lsnlib +from vmware_nsx.api_client import client +from vmware_nsx.api_client import version +from vmware_nsx.common import config # noqa +from vmware_nsx.common import exceptions +from vmware_nsx.common import sync +from vmware_nsx import nsx_cluster +from vmware_nsx.nsxlib import lsn as lsnlib from vmware_nsx.tests.unit import vmware BASE_CONF_PATH = vmware.get_fake_conf('neutron.conf.test') diff --git a/vmware_nsx/tests/unit/vmware/test_nsx_plugin.py b/vmware_nsx/tests/unit/vmware/test_nsx_plugin.py index 0f3ba9eced..187b9f7402 100644 --- a/vmware_nsx/tests/unit/vmware/test_nsx_plugin.py +++ b/vmware_nsx/tests/unit/vmware/test_nsx_plugin.py @@ -44,13 +44,13 @@ import six from sqlalchemy import exc as sql_exc import webob.exc -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc -from vmware_nsx.neutron.plugins.vmware.api_client import version as ver_module -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import sync -from vmware_nsx.neutron.plugins.vmware.common import utils -from vmware_nsx.neutron.plugins.vmware.dbexts import db as nsx_db -from vmware_nsx.neutron.plugins.vmware import nsxlib +from vmware_nsx.api_client import exception as api_exc +from vmware_nsx.api_client import version as ver_module +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import sync +from vmware_nsx.common import utils +from vmware_nsx.db import db as nsx_db +from vmware_nsx import nsxlib from vmware_nsx.tests.unit import vmware from vmware_nsx.tests.unit.vmware.apiclient import fake from vmware_nsx.tests.unit.vmware import test_utils diff --git a/vmware_nsx/tests/unit/vmware/test_nsx_sync.py b/vmware_nsx/tests/unit/vmware/test_nsx_sync.py index ea0d1f1afc..2d2e9e4680 100644 --- a/vmware_nsx/tests/unit/vmware/test_nsx_sync.py +++ b/vmware_nsx/tests/unit/vmware/test_nsx_sync.py @@ -31,14 +31,14 @@ from neutron.tests import base from neutron.tests.unit.api.v2 import test_base from neutron.tests.unit import testlib_api -from vmware_nsx.neutron.plugins.vmware.api_client import client -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc -from vmware_nsx.neutron.plugins.vmware.api_client import version -from vmware_nsx.neutron.plugins.vmware.common import sync -from vmware_nsx.neutron.plugins.vmware.dbexts import db -from vmware_nsx.neutron.plugins.vmware import nsx_cluster as cluster -from vmware_nsx.neutron.plugins.vmware import nsxlib -from vmware_nsx.neutron.plugins.vmware import plugin +from vmware_nsx.api_client import client +from vmware_nsx.api_client import exception as api_exc +from vmware_nsx.api_client import version +from vmware_nsx.common import sync +from vmware_nsx.db import db +from vmware_nsx import nsx_cluster as cluster +from vmware_nsx import nsxlib +from vmware_nsx import plugin from vmware_nsx.tests.unit import vmware from vmware_nsx.tests.unit.vmware.apiclient import fake diff --git a/vmware_nsx/tests/unit/vmware/test_nsx_utils.py b/vmware_nsx/tests/unit/vmware/test_nsx_utils.py index 4b138e8004..c85fe2b4f6 100644 --- a/vmware_nsx/tests/unit/vmware/test_nsx_utils.py +++ b/vmware_nsx/tests/unit/vmware/test_nsx_utils.py @@ -20,12 +20,12 @@ from neutron.extensions import providernet as pnet from neutron.tests import base from oslo_utils import uuidutils -from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import nsx_utils -from vmware_nsx.neutron.plugins.vmware.common import utils -from vmware_nsx.neutron.plugins.vmware.dbexts import nsx_models -from vmware_nsx.neutron.plugins.vmware import nsxlib +from vmware_nsx.api_client import exception as api_exc +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import nsx_utils +from vmware_nsx.common import utils +from vmware_nsx.db import nsx_models +from vmware_nsx import nsxlib from vmware_nsx.tests.unit import vmware from vmware_nsx.tests.unit.vmware.nsxlib import base as nsx_base @@ -37,32 +37,32 @@ class NsxUtilsTestCase(base.BaseTestCase): # This will allow for avoiding setting up the plugin # for creating db entries mock.patch(vmware.nsx_method('get_nsx_switch_and_port_id', - module_name='dbexts.db'), + module_name='db.db'), return_value=ret_value).start() mock.patch(vmware.nsx_method('add_neutron_nsx_port_mapping', - module_name='dbexts.db')).start() + module_name='db.db')).start() mock.patch(vmware.nsx_method('delete_neutron_nsx_port_mapping', - module_name='dbexts.db')).start() + module_name='db.db')).start() def _mock_network_mapping_db_calls(self, ret_value): # Mock relevant db calls # This will allow for avoiding setting up the plugin # for creating db entries mock.patch(vmware.nsx_method('get_nsx_switch_ids', - module_name='dbexts.db'), + module_name='db.db'), return_value=ret_value).start() mock.patch(vmware.nsx_method('add_neutron_nsx_network_mapping', - module_name='dbexts.db')).start() + module_name='db.db')).start() def _mock_router_mapping_db_calls(self, ret_value): # Mock relevant db calls # This will allow for avoiding setting up the plugin # for creating db entries mock.patch(vmware.nsx_method('get_nsx_router_id', - module_name='dbexts.db'), + module_name='db.db'), return_value=ret_value).start() mock.patch(vmware.nsx_method('add_neutron_nsx_router_mapping', - module_name='dbexts.db')).start() + module_name='db.db')).start() def _verify_get_nsx_switch_and_port_id(self, exp_ls_uuid, exp_lp_uuid): # The nsxlib and db calls are mocked, therefore the cluster @@ -271,10 +271,10 @@ class NsxUtilsTestCase(base.BaseTestCase): def _mock_sec_group_mapping_db_calls(self, ret_value): mock.patch(vmware.nsx_method('get_nsx_security_group_id', - module_name='dbexts.db'), + module_name='db.db'), return_value=ret_value).start() mock.patch(vmware.nsx_method('add_neutron_nsx_security_group_mapping', - module_name='dbexts.db')).start() + module_name='db.db')).start() def _verify_get_nsx_sec_profile_id(self, exp_sec_prof_uuid): # The nsxlib and db calls are mocked, therefore the cluster diff --git a/vmware_nsx/tests/unit/vmware/test_nsx_v3_plugin.py b/vmware_nsx/tests/unit/vmware/test_nsx_v3_plugin.py index 47e5642580..badae2160f 100644 --- a/vmware_nsx/tests/unit/vmware/test_nsx_v3_plugin.py +++ b/vmware_nsx/tests/unit/vmware/test_nsx_v3_plugin.py @@ -33,13 +33,13 @@ import neutron.tests.unit.extensions.test_l3 as test_l3_plugin 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 import version -from vmware_nsx.neutron.plugins.vmware.common import utils -from vmware_nsx.neutron.plugins.vmware.nsxlib import v3 as nsxlib -from vmware_nsx.neutron.plugins.vmware.nsxlib.v3 import dfw_api as firewall +from vmware_nsx.common import utils +from vmware_nsx.nsxlib import v3 as nsxlib +from vmware_nsx.nsxlib.v3 import dfw_api as firewall from vmware_nsx.tests.unit import vmware from vmware_nsx.tests.unit.vmware import nsx_v3_mocks -PLUGIN_NAME = ('vmware_nsx.neutron.plugins.vmware.' +PLUGIN_NAME = ('vmware_nsx.' 'plugins.nsx_v3_plugin.NsxV3Plugin') diff --git a/vmware_nsx/tests/unit/vmware/test_nsx_v_plugin.py b/vmware_nsx/tests/unit/vmware/test_nsx_v_plugin.py index b3e7ddb590..fffea87070 100644 --- a/vmware_nsx/tests/unit/vmware/test_nsx_v_plugin.py +++ b/vmware_nsx/tests/unit/vmware/test_nsx_v_plugin.py @@ -45,21 +45,21 @@ from oslo_utils import uuidutils import six import webob.exc -from vmware_nsx.neutron.plugins.vmware.common import nsx_constants -from vmware_nsx.neutron.plugins.vmware.dbexts import nsxv_db -from vmware_nsx.neutron.plugins.vmware.extensions import ( +from vmware_nsx.common import nsx_constants +from vmware_nsx.db import nsxv_db +from vmware_nsx.extensions import ( routertype as router_type) -from vmware_nsx.neutron.plugins.vmware.extensions import ( +from vmware_nsx.extensions import ( vnicindex as ext_vnic_idx) -from vmware_nsx.neutron.plugins.vmware.vshield.common import ( - constants as vcns_const) -from vmware_nsx.neutron.plugins.vmware.vshield import edge_utils from vmware_nsx.tests.unit import vmware from vmware_nsx.tests.unit.vmware.extensions import test_vnic_index from vmware_nsx.tests.unit.vmware import test_utils from vmware_nsx.tests.unit.vmware.vshield import fake_vcns +from vmware_nsx.vshield.common import ( + constants as vcns_const) +from vmware_nsx.vshield import edge_utils -PLUGIN_NAME = 'vmware_nsx.neutron.plugins.vmware.plugin.NsxVPlugin' +PLUGIN_NAME = 'vmware_nsx.plugin.NsxVPlugin' _uuid = uuidutils.generate_uuid diff --git a/vmware_nsx/tests/unit/vmware/vshield/fake_vcns.py b/vmware_nsx/tests/unit/vmware/vshield/fake_vcns.py index 9e6ebc4216..1f5ff13fe3 100644 --- a/vmware_nsx/tests/unit/vmware/vshield/fake_vcns.py +++ b/vmware_nsx/tests/unit/vmware/vshield/fake_vcns.py @@ -19,7 +19,7 @@ from oslo_utils import uuidutils import six import xml.etree.ElementTree as ET -from vmware_nsx.neutron.plugins.vmware.vshield.common import exceptions +from vmware_nsx.vshield.common import exceptions SECTION_LOCATION_HEADER = '/api/4.0/firewall/globalroot-0/config/%s/%s' diff --git a/vmware_nsx/tests/unit/vmware/vshield/test_edge_utils.py b/vmware_nsx/tests/unit/vmware/vshield/test_edge_utils.py index 6289a5820f..1d656bcf4d 100644 --- a/vmware_nsx/tests/unit/vmware/vshield/test_edge_utils.py +++ b/vmware_nsx/tests/unit/vmware/vshield/test_edge_utils.py @@ -22,12 +22,12 @@ 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 vmware_nsx.neutron.plugins.vmware.common import nsxv_constants -from vmware_nsx.neutron.plugins.vmware.dbexts import nsxv_db -from vmware_nsx.neutron.plugins.vmware.vshield.common import ( - constants as vcns_const) -from vmware_nsx.neutron.plugins.vmware.vshield import edge_utils +from vmware_nsx.common import nsxv_constants +from vmware_nsx.db import nsxv_db from vmware_nsx.tests.unit import vmware +from vmware_nsx.vshield.common import ( + constants as vcns_const) +from vmware_nsx.vshield import edge_utils _uuid = uuidutils.generate_uuid diff --git a/vmware_nsx/tests/unit/vmware/vshield/test_vcns_driver.py b/vmware_nsx/tests/unit/vmware/vshield/test_vcns_driver.py index e3c750dec8..a159b18b4e 100644 --- a/vmware_nsx/tests/unit/vmware/vshield/test_vcns_driver.py +++ b/vmware_nsx/tests/unit/vmware/vshield/test_vcns_driver.py @@ -19,14 +19,14 @@ import mock from neutron.tests import base import six -from vmware_nsx.neutron.plugins.vmware.vshield.common import ( - constants as vcns_const) -from vmware_nsx.neutron.plugins.vmware.vshield.tasks import ( - constants as ts_const) -from vmware_nsx.neutron.plugins.vmware.vshield.tasks import tasks as ts -from vmware_nsx.neutron.plugins.vmware.vshield import vcns_driver from vmware_nsx.tests.unit import vmware from vmware_nsx.tests.unit.vmware.vshield import fake_vcns +from vmware_nsx.vshield.common import ( + constants as vcns_const) +from vmware_nsx.vshield.tasks import ( + constants as ts_const) +from vmware_nsx.vshield.tasks import tasks as ts +from vmware_nsx.vshield import vcns_driver VCNS_CONFIG_FILE = vmware.get_fake_conf("vcns.ini.test") diff --git a/vmware_nsx/neutron/plugins/vmware/extensions/__init__.py b/vmware_nsx/vshield/__init__.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/extensions/__init__.py rename to vmware_nsx/vshield/__init__.py diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/common/VcnsApiClient.py b/vmware_nsx/vshield/common/VcnsApiClient.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/vshield/common/VcnsApiClient.py rename to vmware_nsx/vshield/common/VcnsApiClient.py index b67603428e..cd01049e50 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/common/VcnsApiClient.py +++ b/vmware_nsx/vshield/common/VcnsApiClient.py @@ -18,7 +18,7 @@ import eventlet from oslo_serialization import jsonutils import six -from vmware_nsx.neutron.plugins.vmware.vshield.common import exceptions +from vmware_nsx.vshield.common import exceptions httplib2 = eventlet.import_patched('httplib2') diff --git a/vmware_nsx/neutron/plugins/vmware/plugins/__init__.py b/vmware_nsx/vshield/common/__init__.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/plugins/__init__.py rename to vmware_nsx/vshield/common/__init__.py diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/common/constants.py b/vmware_nsx/vshield/common/constants.py similarity index 97% rename from vmware_nsx/neutron/plugins/vmware/vshield/common/constants.py rename to vmware_nsx/vshield/common/constants.py index d0dfdb83a2..4de79e6e2e 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/common/constants.py +++ b/vmware_nsx/vshield/common/constants.py @@ -15,7 +15,7 @@ from oslo_config import cfg -from vmware_nsx.neutron.plugins.vmware.common import nsxv_constants +from vmware_nsx.common import nsxv_constants EDGE_ID = 'edge_id' diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/common/exceptions.py b/vmware_nsx/vshield/common/exceptions.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/vshield/common/exceptions.py rename to vmware_nsx/vshield/common/exceptions.py diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/edge_appliance_driver.py b/vmware_nsx/vshield/edge_appliance_driver.py similarity index 99% rename from vmware_nsx/neutron/plugins/vmware/vshield/edge_appliance_driver.py rename to vmware_nsx/vshield/edge_appliance_driver.py index 2887c0ef3d..48bd1b4ee1 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/edge_appliance_driver.py +++ b/vmware_nsx/vshield/edge_appliance_driver.py @@ -22,13 +22,13 @@ from oslo_serialization import jsonutils from oslo_utils import excutils from neutron.i18n import _LE, _LI, _LW -from vmware_nsx.neutron.plugins.vmware.common import nsxv_constants -from vmware_nsx.neutron.plugins.vmware.common import utils -from vmware_nsx.neutron.plugins.vmware.vshield.common import constants -from vmware_nsx.neutron.plugins.vmware.vshield.common import exceptions -from vmware_nsx.neutron.plugins.vmware.vshield.tasks import ( +from vmware_nsx.common import nsxv_constants +from vmware_nsx.common import utils +from vmware_nsx.vshield.common import constants +from vmware_nsx.vshield.common import exceptions +from vmware_nsx.vshield.tasks import ( constants as task_constants) -from vmware_nsx.neutron.plugins.vmware.vshield.tasks import tasks +from vmware_nsx.vshield.tasks import tasks LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/edge_firewall_driver.py b/vmware_nsx/vshield/edge_firewall_driver.py similarity index 98% rename from vmware_nsx/neutron/plugins/vmware/vshield/edge_firewall_driver.py rename to vmware_nsx/vshield/edge_firewall_driver.py index 85f69e9e26..72518fcdc6 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/edge_firewall_driver.py +++ b/vmware_nsx/vshield/edge_firewall_driver.py @@ -17,12 +17,12 @@ from oslo_log import log as logging from oslo_utils import excutils from neutron.i18n import _, _LE -from vmware_nsx.neutron.plugins.vmware.dbexts import nsxv_db -from vmware_nsx.neutron.plugins.vmware.vshield.common import ( +from vmware_nsx.db import nsxv_db +from vmware_nsx.vshield.common import ( exceptions as vcns_exc) -from vmware_nsx.neutron.plugins.vmware.vshield.tasks import ( +from vmware_nsx.vshield.tasks import ( constants as task_const) -from vmware_nsx.neutron.plugins.vmware.vshield.tasks import tasks +from vmware_nsx.vshield.tasks import tasks LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/edge_ipsecvpn_driver.py b/vmware_nsx/vshield/edge_ipsecvpn_driver.py similarity index 99% rename from vmware_nsx/neutron/plugins/vmware/vshield/edge_ipsecvpn_driver.py rename to vmware_nsx/vshield/edge_ipsecvpn_driver.py index 79a12558db..61cd5c0121 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/edge_ipsecvpn_driver.py +++ b/vmware_nsx/vshield/edge_ipsecvpn_driver.py @@ -16,7 +16,7 @@ from oslo_log import log as logging from oslo_utils import excutils from neutron.i18n import _LE, _LW -from vmware_nsx.neutron.plugins.vmware.vshield.common import ( +from vmware_nsx.vshield.common import ( exceptions as vcns_exc) LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/edge_loadbalancer_driver.py b/vmware_nsx/vshield/edge_loadbalancer_driver.py similarity index 99% rename from vmware_nsx/neutron/plugins/vmware/vshield/edge_loadbalancer_driver.py rename to vmware_nsx/vshield/edge_loadbalancer_driver.py index b2dfae48c5..e6d8114173 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/edge_loadbalancer_driver.py +++ b/vmware_nsx/vshield/edge_loadbalancer_driver.py @@ -23,11 +23,11 @@ from neutron.common import exceptions as n_exc from neutron.i18n import _LE from neutron import manager from neutron.plugins.common import constants -from vmware_nsx.neutron.plugins.vmware.common import locking -from vmware_nsx.neutron.plugins.vmware.dbexts import nsxv_db -from vmware_nsx.neutron.plugins.vmware.vshield.common import ( +from vmware_nsx.common import locking +from vmware_nsx.db import nsxv_db +from vmware_nsx.vshield.common import ( exceptions as nsxv_exc) -from vmware_nsx.neutron.plugins.vmware.vshield import vcns as nsxv_api +from vmware_nsx.vshield import vcns as nsxv_api LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/edge_utils.py b/vmware_nsx/vshield/edge_utils.py similarity index 99% rename from vmware_nsx/neutron/plugins/vmware/vshield/edge_utils.py rename to vmware_nsx/vshield/edge_utils.py index 15f9aecf32..3a56d2dc52 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/edge_utils.py +++ b/vmware_nsx/vshield/edge_utils.py @@ -32,17 +32,17 @@ from neutron.extensions import l3 from neutron.i18n import _LE, _LW from neutron.plugins.common import constants as plugin_const -from vmware_nsx.neutron.plugins.vmware.common import exceptions as nsx_exc -from vmware_nsx.neutron.plugins.vmware.common import locking -from vmware_nsx.neutron.plugins.vmware.common import nsxv_constants -from vmware_nsx.neutron.plugins.vmware.dbexts import db as nsx_db -from vmware_nsx.neutron.plugins.vmware.dbexts import nsxv_db -from vmware_nsx.neutron.plugins.vmware.vshield.common import ( +from vmware_nsx.common import exceptions as nsx_exc +from vmware_nsx.common import locking +from vmware_nsx.common import nsxv_constants +from vmware_nsx.db import db as nsx_db +from vmware_nsx.db import nsxv_db +from vmware_nsx.vshield.common import ( constants as vcns_const) -from vmware_nsx.neutron.plugins.vmware.vshield.tasks import ( +from vmware_nsx.vshield.tasks import ( constants as task_const) -from vmware_nsx.neutron.plugins.vmware.vshield.tasks import tasks -from vmware_nsx.neutron.plugins.vmware.vshield import vcns +from vmware_nsx.vshield.tasks import tasks +from vmware_nsx.vshield import vcns WORKER_POOL_SIZE = 8 RP_FILTER_PROPERTY_OFF_TEMPLATE = 'sysctl.net.ipv4.conf.%s.rp_filter=%s' diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/nsxv_edge_cfg_obj.py b/vmware_nsx/vshield/nsxv_edge_cfg_obj.py similarity index 96% rename from vmware_nsx/neutron/plugins/vmware/vshield/nsxv_edge_cfg_obj.py rename to vmware_nsx/vshield/nsxv_edge_cfg_obj.py index aad90b3edc..7b4e1d8ed0 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/nsxv_edge_cfg_obj.py +++ b/vmware_nsx/vshield/nsxv_edge_cfg_obj.py @@ -18,7 +18,7 @@ import abc from oslo_serialization import jsonutils import six -from vmware_nsx.neutron.plugins.vmware.vshield import vcns +from vmware_nsx.vshield import vcns @six.add_metaclass(abc.ABCMeta) diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/nsxv_loadbalancer.py b/vmware_nsx/vshield/nsxv_loadbalancer.py similarity index 99% rename from vmware_nsx/neutron/plugins/vmware/vshield/nsxv_loadbalancer.py rename to vmware_nsx/vshield/nsxv_loadbalancer.py index 822bfb809c..c4ec9720e3 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/nsxv_loadbalancer.py +++ b/vmware_nsx/vshield/nsxv_loadbalancer.py @@ -16,7 +16,7 @@ from oslo_log import log as logging -from vmware_nsx.neutron.plugins.vmware.vshield import nsxv_edge_cfg_obj +from vmware_nsx.vshield import nsxv_edge_cfg_obj LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/securitygroup_utils.py b/vmware_nsx/vshield/securitygroup_utils.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/vshield/securitygroup_utils.py rename to vmware_nsx/vshield/securitygroup_utils.py diff --git a/vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_drivers/__init__.py b/vmware_nsx/vshield/tasks/__init__.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/plugins/nsx_v_drivers/__init__.py rename to vmware_nsx/vshield/tasks/__init__.py diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/tasks/constants.py b/vmware_nsx/vshield/tasks/constants.py similarity index 100% rename from vmware_nsx/neutron/plugins/vmware/vshield/tasks/constants.py rename to vmware_nsx/vshield/tasks/constants.py diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/tasks/tasks.py b/vmware_nsx/vshield/tasks/tasks.py similarity index 99% rename from vmware_nsx/neutron/plugins/vmware/vshield/tasks/tasks.py rename to vmware_nsx/vshield/tasks/tasks.py index 1989ea0236..86974c075a 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/tasks/tasks.py +++ b/vmware_nsx/vshield/tasks/tasks.py @@ -24,7 +24,7 @@ from oslo_service import loopingcall import six from neutron.i18n import _LE, _LI -from vmware_nsx.neutron.plugins.vmware.vshield.tasks import constants +from vmware_nsx.vshield.tasks import constants DEFAULT_INTERVAL = 1000 diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py b/vmware_nsx/vshield/vcns.py similarity index 99% rename from vmware_nsx/neutron/plugins/vmware/vshield/vcns.py rename to vmware_nsx/vshield/vcns.py index b24bb012a7..cbef80ae3f 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/vcns.py +++ b/vmware_nsx/vshield/vcns.py @@ -20,8 +20,8 @@ from oslo_serialization import jsonutils import retrying import xml.etree.ElementTree as et -from vmware_nsx.neutron.plugins.vmware.vshield.common import exceptions -from vmware_nsx.neutron.plugins.vmware.vshield.common import VcnsApiClient +from vmware_nsx.vshield.common import exceptions +from vmware_nsx.vshield.common import VcnsApiClient LOG = logging.getLogger(__name__) diff --git a/vmware_nsx/neutron/plugins/vmware/vshield/vcns_driver.py b/vmware_nsx/vshield/vcns_driver.py similarity index 84% rename from vmware_nsx/neutron/plugins/vmware/vshield/vcns_driver.py rename to vmware_nsx/vshield/vcns_driver.py index 62c497ba07..15521ebadf 100644 --- a/vmware_nsx/neutron/plugins/vmware/vshield/vcns_driver.py +++ b/vmware_nsx/vshield/vcns_driver.py @@ -19,12 +19,12 @@ import os from oslo_config import cfg from oslo_log import log as logging -from vmware_nsx.neutron.plugins.vmware.common import config # noqa -from vmware_nsx.neutron.plugins.vmware.vshield import edge_appliance_driver -from vmware_nsx.neutron.plugins.vmware.vshield import edge_firewall_driver -from vmware_nsx.neutron.plugins.vmware.vshield import edge_loadbalancer_driver -from vmware_nsx.neutron.plugins.vmware.vshield.tasks import tasks -from vmware_nsx.neutron.plugins.vmware.vshield import vcns +from vmware_nsx.common import config # noqa +from vmware_nsx.vshield import edge_appliance_driver +from vmware_nsx.vshield import edge_firewall_driver +from vmware_nsx.vshield import edge_loadbalancer_driver +from vmware_nsx.vshield.tasks import tasks +from vmware_nsx.vshield import vcns LOG = logging.getLogger(__name__)