From 85cd73ec687c84c2745ce4f22578a0d2efa7fddf Mon Sep 17 00:00:00 2001 From: armando-migliaccio Date: Tue, 18 Feb 2014 11:43:23 -0800 Subject: [PATCH] Finish off rebranding of the Nicira NVP plugin Old names are kept for backward compatibility. Last references to the old NVP plugins are going to be dropped in Juno. Completes blueprint nicira-plugin-renaming Change-Id: Ia1aa4f658891e7ce9469748432c338353195edfd --- .../versions/1149d7de0cfa_port_security.py | 2 +- neutron/plugins/__init__.py | 28 -- neutron/plugins/nicira/README | 41 -- neutron/plugins/nicira/__init__.py | 24 + .../plugins/nicira/vshield/common/__init__.py | 16 - .../plugins/nicira/vshield/tasks/__init__.py | 16 - neutron/plugins/vmware/__init__.py | 3 + .../{nicira => vmware}/api_client/__init__.py | 0 .../{nicira => vmware}/api_client/base.py | 2 +- .../{nicira => vmware}/api_client/client.py | 10 +- .../api_client/eventlet_client.py | 4 +- .../api_client/eventlet_request.py | 2 +- .../api_client/exception.py | 0 .../{nicira => vmware}/api_client/request.py | 2 +- .../{nicira => vmware}/api_client/version.py | 0 .../{nicira => vmware}/check_nsx_config.py | 6 +- .../{nicira => vmware}/common/__init__.py | 0 .../{nicira => vmware}/common/config.py | 0 .../{nicira => vmware}/common/exceptions.py | 0 .../{nicira => vmware}/common/nsx_utils.py | 12 +- .../common/securitygroups.py | 2 +- .../plugins/{nicira => vmware}/common/sync.py | 12 +- .../{nicira => vmware}/common/utils.py | 0 .../{nicira => vmware}/dbexts/__init__.py | 0 .../plugins/{nicira => vmware}/dbexts/db.py | 4 +- .../dbexts/distributedrouter.py | 4 +- .../{nicira => vmware}/dbexts/lsn_db.py | 2 +- .../{nicira => vmware}/dbexts/maclearning.py | 2 +- .../{nicira => vmware}/dbexts/models.py | 2 +- .../{nicira => vmware}/dbexts/networkgw_db.py | 2 +- .../{nicira => vmware}/dbexts/nsxrouter.py | 2 +- .../{nicira => vmware}/dbexts/qos_db.py | 4 +- .../dbexts/servicerouter.py | 4 +- .../{nicira => vmware}/dbexts/vcns_db.py | 6 +- .../{nicira => vmware}/dbexts/vcns_models.py | 0 .../{nicira => vmware}/dhcp_meta/__init__.py | 0 .../{nicira => vmware}/dhcp_meta/combined.py | 4 +- .../{nicira => vmware}/dhcp_meta/constants.py | 0 .../dhcp_meta/lsnmanager.py | 12 +- .../{nicira => vmware}/dhcp_meta/migration.py | 6 +- .../{nicira => vmware}/dhcp_meta/nsx.py | 8 +- .../{nicira => vmware}/dhcp_meta/rpc.py | 8 +- .../{nicira => vmware}/dhcpmeta_modes.py | 18 +- .../{nicira => vmware}/extensions/__init__.py | 0 .../extensions/distributedrouter.py | 0 .../{nicira => vmware}/extensions/lsn.py | 0 .../extensions/maclearning.py | 0 .../extensions/networkgw.py | 0 .../extensions/nvp_networkgw.py | 2 +- .../{nicira => vmware}/extensions/nvp_qos.py | 2 +- .../{nicira => vmware}/extensions/qos.py | 0 .../extensions/servicerouter.py | 0 .../plugins/{nicira => vmware}/nsx_cluster.py | 2 +- .../{nicira => vmware}/nsxlib/__init__.py | 0 .../{nicira => vmware}/nsxlib/l2gateway.py | 10 +- .../plugins/{nicira => vmware}/nsxlib/lsn.py | 10 +- .../{nicira => vmware}/nsxlib/queue.py | 12 +- .../{nicira => vmware}/nsxlib/router.py | 18 +- .../{nicira => vmware}/nsxlib/secgroup.py | 10 +- .../{nicira => vmware}/nsxlib/switch.py | 12 +- .../{nicira => vmware}/nsxlib/versioning.py | 4 +- neutron/plugins/{nicira => vmware}/nvplib.py | 8 +- neutron/plugins/vmware/plugin.py | 8 +- neutron/plugins/vmware/plugins/__init__.py | 0 .../plugins/base.py} | 444 +++++++++--------- .../plugins/service.py} | 185 ++++---- .../{nicira => vmware}/shell/__init__.py | 2 +- .../{nicira => vmware}/shell/commands.py | 0 .../{nicira => vmware}/vshield/__init__.py | 0 .../vshield/common/VcnsApiClient.py | 6 +- .../plugins/vmware/vshield/common/__init__.py | 0 .../vshield/common/constants.py | 2 - .../vshield/common/exceptions.py | 2 - .../vshield/edge_appliance_driver.py | 14 +- .../vshield/edge_firewall_driver.py | 4 +- .../vshield/edge_loadbalancer_driver.py | 6 +- .../plugins/vmware/vshield/tasks/__init__.py | 0 .../vshield/tasks/constants.py | 2 - .../{nicira => vmware}/vshield/tasks/tasks.py | 6 +- .../{nicira => vmware}/vshield/vcns.py | 2 +- .../{nicira => vmware}/vshield/vcns_driver.py | 12 +- neutron/tests/unit/test_l3_plugin.py | 2 +- neutron/tests/unit/vmware/__init__.py | 16 +- neutron/tests/unit/vmware/apiclient/fake.py | 2 +- .../unit/vmware/apiclient/test_api_common.py | 2 +- .../apiclient/test_api_eventlet_request.py | 4 +- neutron/tests/unit/vmware/db/test_lsn_db.py | 4 +- neutron/tests/unit/vmware/db/test_nsx_db.py | 4 +- .../vmware/extensions/test_maclearning.py | 4 +- .../unit/vmware/extensions/test_networkgw.py | 8 +- .../vmware/extensions/test_portsecurity.py | 2 +- .../unit/vmware/extensions/test_qosqueues.py | 6 +- neutron/tests/unit/vmware/nsxlib/base.py | 10 +- .../unit/vmware/nsxlib/test_l2gateway.py | 6 +- neutron/tests/unit/vmware/nsxlib/test_lsn.py | 8 +- .../tests/unit/vmware/nsxlib/test_queue.py | 4 +- .../tests/unit/vmware/nsxlib/test_router.py | 12 +- .../tests/unit/vmware/nsxlib/test_secgroup.py | 4 +- .../tests/unit/vmware/nsxlib/test_switch.py | 4 +- .../unit/vmware/nsxlib/test_versioning.py | 8 +- .../tests/unit/vmware/test_agent_scheduler.py | 4 +- neutron/tests/unit/vmware/test_dhcpmeta.py | 16 +- neutron/tests/unit/vmware/test_nsx_opts.py | 14 +- neutron/tests/unit/vmware/test_nsx_plugin.py | 20 +- neutron/tests/unit/vmware/test_nsx_sync.py | 12 +- neutron/tests/unit/vmware/test_nsx_utils.py | 10 +- neutron/tests/unit/vmware/vshield/__init__.py | 14 - .../tests/unit/vmware/vshield/fake_vcns.py | 4 +- .../unit/vmware/vshield/test_edge_router.py | 4 +- .../vmware/vshield/test_firewall_driver.py | 4 +- .../vshield/test_loadbalancer_driver.py | 6 +- .../unit/vmware/vshield/test_vcns_driver.py | 12 +- setup.cfg | 8 +- 113 files changed, 596 insertions(+), 697 deletions(-) delete mode 100644 neutron/plugins/nicira/README delete mode 100644 neutron/plugins/nicira/vshield/common/__init__.py delete mode 100644 neutron/plugins/nicira/vshield/tasks/__init__.py rename neutron/plugins/{nicira => vmware}/api_client/__init__.py (100%) rename neutron/plugins/{nicira => vmware}/api_client/base.py (99%) rename neutron/plugins/{nicira => vmware}/api_client/client.py (95%) rename neutron/plugins/{nicira => vmware}/api_client/eventlet_client.py (98%) rename neutron/plugins/{nicira => vmware}/api_client/eventlet_request.py (99%) rename neutron/plugins/{nicira => vmware}/api_client/exception.py (100%) rename neutron/plugins/{nicira => vmware}/api_client/request.py (99%) rename neutron/plugins/{nicira => vmware}/api_client/version.py (100%) rename neutron/plugins/{nicira => vmware}/check_nsx_config.py (97%) rename neutron/plugins/{nicira => vmware}/common/__init__.py (100%) rename neutron/plugins/{nicira => vmware}/common/config.py (100%) rename neutron/plugins/{nicira => vmware}/common/exceptions.py (100%) rename neutron/plugins/{nicira => vmware}/common/nsx_utils.py (96%) rename neutron/plugins/{nicira => vmware}/common/securitygroups.py (99%) rename neutron/plugins/{nicira => vmware}/common/sync.py (98%) rename neutron/plugins/{nicira => vmware}/common/utils.py (100%) rename neutron/plugins/{nicira => vmware}/dbexts/__init__.py (100%) rename neutron/plugins/{nicira => vmware}/dbexts/db.py (98%) rename neutron/plugins/{nicira => vmware}/dbexts/distributedrouter.py (88%) rename neutron/plugins/{nicira => vmware}/dbexts/lsn_db.py (98%) rename neutron/plugins/{nicira => vmware}/dbexts/maclearning.py (97%) rename neutron/plugins/{nicira => vmware}/dbexts/models.py (98%) rename neutron/plugins/{nicira => vmware}/dbexts/networkgw_db.py (99%) rename neutron/plugins/{nicira => vmware}/dbexts/nsxrouter.py (98%) rename neutron/plugins/{nicira => vmware}/dbexts/qos_db.py (99%) rename neutron/plugins/{nicira => vmware}/dbexts/servicerouter.py (88%) rename neutron/plugins/{nicira => vmware}/dbexts/vcns_db.py (97%) rename neutron/plugins/{nicira => vmware}/dbexts/vcns_models.py (100%) rename neutron/plugins/{nicira => vmware}/dhcp_meta/__init__.py (100%) rename neutron/plugins/{nicira => vmware}/dhcp_meta/combined.py (97%) rename neutron/plugins/{nicira => vmware}/dhcp_meta/constants.py (100%) rename neutron/plugins/{nicira => vmware}/dhcp_meta/lsnmanager.py (98%) rename neutron/plugins/{nicira => vmware}/dhcp_meta/migration.py (97%) rename neutron/plugins/{nicira => vmware}/dhcp_meta/nsx.py (98%) rename neutron/plugins/{nicira => vmware}/dhcp_meta/rpc.py (97%) rename neutron/plugins/{nicira => vmware}/dhcpmeta_modes.py (92%) rename neutron/plugins/{nicira => vmware}/extensions/__init__.py (100%) rename neutron/plugins/{nicira => vmware}/extensions/distributedrouter.py (100%) rename neutron/plugins/{nicira => vmware}/extensions/lsn.py (100%) rename neutron/plugins/{nicira => vmware}/extensions/maclearning.py (100%) rename neutron/plugins/{nicira => vmware}/extensions/networkgw.py (100%) rename neutron/plugins/{nicira => vmware}/extensions/nvp_networkgw.py (95%) rename neutron/plugins/{nicira => vmware}/extensions/nvp_qos.py (95%) rename neutron/plugins/{nicira => vmware}/extensions/qos.py (100%) rename neutron/plugins/{nicira => vmware}/extensions/servicerouter.py (100%) rename neutron/plugins/{nicira => vmware}/nsx_cluster.py (98%) rename neutron/plugins/{nicira => vmware}/nsxlib/__init__.py (100%) rename neutron/plugins/{nicira => vmware}/nsxlib/l2gateway.py (93%) rename neutron/plugins/{nicira => vmware}/nsxlib/lsn.py (97%) rename neutron/plugins/{nicira => vmware}/nsxlib/queue.py (87%) rename neutron/plugins/{nicira => vmware}/nsxlib/router.py (98%) rename neutron/plugins/{nicira => vmware}/nsxlib/secgroup.py (94%) rename neutron/plugins/{nicira => vmware}/nsxlib/switch.py (97%) rename neutron/plugins/{nicira => vmware}/nsxlib/versioning.py (96%) rename neutron/plugins/{nicira => vmware}/nvplib.py (95%) create mode 100644 neutron/plugins/vmware/plugins/__init__.py rename neutron/plugins/{nicira/NeutronPlugin.py => vmware/plugins/base.py} (89%) rename neutron/plugins/{nicira/NeutronServicePlugin.py => vmware/plugins/service.py} (92%) rename neutron/plugins/{nicira => vmware}/shell/__init__.py (95%) rename neutron/plugins/{nicira => vmware}/shell/commands.py (100%) rename neutron/plugins/{nicira => vmware}/vshield/__init__.py (100%) rename neutron/plugins/{nicira => vmware}/vshield/common/VcnsApiClient.py (95%) create mode 100644 neutron/plugins/vmware/vshield/common/__init__.py rename neutron/plugins/{nicira => vmware}/vshield/common/constants.py (96%) rename neutron/plugins/{nicira => vmware}/vshield/common/exceptions.py (97%) rename neutron/plugins/{nicira => vmware}/vshield/edge_appliance_driver.py (98%) rename neutron/plugins/{nicira => vmware}/vshield/edge_firewall_driver.py (99%) rename neutron/plugins/{nicira => vmware}/vshield/edge_loadbalancer_driver.py (98%) create mode 100644 neutron/plugins/vmware/vshield/tasks/__init__.py rename neutron/plugins/{nicira => vmware}/vshield/tasks/constants.py (96%) mode change 100755 => 100644 rename neutron/plugins/{nicira => vmware}/vshield/tasks/tasks.py (98%) mode change 100755 => 100644 rename neutron/plugins/{nicira => vmware}/vshield/vcns.py (99%) rename neutron/plugins/{nicira => vmware}/vshield/vcns_driver.py (82%) diff --git a/neutron/db/migration/alembic_migrations/versions/1149d7de0cfa_port_security.py b/neutron/db/migration/alembic_migrations/versions/1149d7de0cfa_port_security.py index 1b035eb08c..8929fc920c 100644 --- a/neutron/db/migration/alembic_migrations/versions/1149d7de0cfa_port_security.py +++ b/neutron/db/migration/alembic_migrations/versions/1149d7de0cfa_port_security.py @@ -67,7 +67,7 @@ def upgrade(active_plugins=None, options=None): # Copy network and port ids over to network|port(securitybindings) table # and set port_security_enabled to false as ip address pairs were not - # configured in NVP originally. + # configured in NVP/NSX originally. op.execute("INSERT INTO networksecuritybindings SELECT id as " "network_id, False as port_security_enabled from networks") op.execute("INSERT INTO portsecuritybindings SELECT id as port_id, " diff --git a/neutron/plugins/__init__.py b/neutron/plugins/__init__.py index a9badd30d7..e69de29bb2 100644 --- a/neutron/plugins/__init__.py +++ b/neutron/plugins/__init__.py @@ -1,28 +0,0 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2012 OpenStack Foundation. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -import sys - -# catch an import error if nicira is not the configured plugin -try: - from neutron.plugins import nicira - - # Provide a mapping for the nicira_nvp_plugin package to ensure - # backwards compatibility for configuration. - sys.modules['neutron.plugins.nicira.nicira_nvp_plugin'] = nicira -except ImportError: - pass diff --git a/neutron/plugins/nicira/README b/neutron/plugins/nicira/README deleted file mode 100644 index 13310b91cd..0000000000 --- a/neutron/plugins/nicira/README +++ /dev/null @@ -1,41 +0,0 @@ -nvp-plugin ------------------------------------------------------------------------------ - -Overview and pre-requisites - - This is a Neutron plugin that can talk to a set of NVP controllers and - implements the core Neutron v2 api. In order to use it you must have - Nicira NVP running and configured. You must also have Neutron installed - and configured. - -NVP Plugin configuration - - 1) Database configuration - The NVP plugin leverages the Neutron database. The following connection - parameters should be specified: - - connection: Database connection string - - max_retries: Maximum number of connection attempts (default 10) - - retry_interval: Gap between connection attempts (default 2 seconds) - 2) NVP (general) - - max_lp_per_bridged_ls: Maximum number of ports of a logical switch on a - bridged transport zone (default 5000) - - concurrent_connections: Number of connects to each controller node - (default 10) - - nvp_gen_timout: Number of seconds a generation id should be valid for - (default -1 meaning do not time out) - 3) NVP cluster - By default the Neutron NVP plugin can talk to multiple controllers in a - single cluster. - The following parameters can be configured: - - default_tz_uuid: This is uuid of the default NVP Transport zone that - will be used for creating tunneled isolated "Neutron" networks. It - needs to be created in NVP before starting Neutron with the nvp plugin. - - nvp_controllers: describes the list of controllers - More details can be found in etc/neutron/plugins/nicira/nvp.ini - -Neutron Configuration - - Modify your Neutron configuration for using the NVP Plugin: - - core_plugin = neutron.plugins.nicira.NeutronPlugin.NvpPluginV2 - diff --git a/neutron/plugins/nicira/__init__.py b/neutron/plugins/nicira/__init__.py index e69de29bb2..7b94a1840e 100644 --- a/neutron/plugins/nicira/__init__.py +++ b/neutron/plugins/nicira/__init__.py @@ -0,0 +1,24 @@ +# Copyright 2013 VMware, Inc. +# +# All Rights Reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +import sys + +from neutron.plugins.vmware.plugins import base +from neutron.plugins.vmware.plugins import service + +# Kept for backward compatibility +sys.modules['neutron.plugins.nicira.NeutronPlugin'] = base +sys.modules['neutron.plugins.nicira.NeutronServicePlugin'] = service diff --git a/neutron/plugins/nicira/vshield/common/__init__.py b/neutron/plugins/nicira/vshield/common/__init__.py deleted file mode 100644 index 6818a0c8fa..0000000000 --- a/neutron/plugins/nicira/vshield/common/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2013 VMware, Inc -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. diff --git a/neutron/plugins/nicira/vshield/tasks/__init__.py b/neutron/plugins/nicira/vshield/tasks/__init__.py deleted file mode 100644 index c020e3bcda..0000000000 --- a/neutron/plugins/nicira/vshield/tasks/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2013 VMware, Inc. -# All Rights Reserved -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. diff --git a/neutron/plugins/vmware/__init__.py b/neutron/plugins/vmware/__init__.py index e69de29bb2..a628188884 100644 --- a/neutron/plugins/vmware/__init__.py +++ b/neutron/plugins/vmware/__init__.py @@ -0,0 +1,3 @@ +import os + +NSX_EXT_PATH = os.path.join(os.path.dirname(__file__), 'extensions') diff --git a/neutron/plugins/nicira/api_client/__init__.py b/neutron/plugins/vmware/api_client/__init__.py similarity index 100% rename from neutron/plugins/nicira/api_client/__init__.py rename to neutron/plugins/vmware/api_client/__init__.py diff --git a/neutron/plugins/nicira/api_client/base.py b/neutron/plugins/vmware/api_client/base.py similarity index 99% rename from neutron/plugins/nicira/api_client/base.py rename to neutron/plugins/vmware/api_client/base.py index d819ae3d5a..37ece941b2 100644 --- a/neutron/plugins/nicira/api_client/base.py +++ b/neutron/plugins/vmware/api_client/base.py @@ -20,7 +20,7 @@ import six import time from neutron.openstack.common import log as logging -from neutron.plugins.nicira.api_client import ctrl_conn_to_str +from neutron.plugins.vmware.api_client import ctrl_conn_to_str LOG = logging.getLogger(__name__) diff --git a/neutron/plugins/nicira/api_client/client.py b/neutron/plugins/vmware/api_client/client.py similarity index 95% rename from neutron/plugins/nicira/api_client/client.py rename to neutron/plugins/vmware/api_client/client.py index fdbb440c53..a6981a8533 100644 --- a/neutron/plugins/nicira/api_client/client.py +++ b/neutron/plugins/vmware/api_client/client.py @@ -18,11 +18,11 @@ import httplib from neutron.openstack.common import log as logging -from neutron.plugins.nicira.api_client import base -from neutron.plugins.nicira.api_client import eventlet_client -from neutron.plugins.nicira.api_client import eventlet_request -from neutron.plugins.nicira.api_client import exception -from neutron.plugins.nicira.api_client import version +from neutron.plugins.vmware.api_client import base +from neutron.plugins.vmware.api_client import eventlet_client +from neutron.plugins.vmware.api_client import eventlet_request +from neutron.plugins.vmware.api_client import exception +from neutron.plugins.vmware.api_client import version LOG = logging.getLogger(__name__) diff --git a/neutron/plugins/nicira/api_client/eventlet_client.py b/neutron/plugins/vmware/api_client/eventlet_client.py similarity index 98% rename from neutron/plugins/nicira/api_client/eventlet_client.py rename to neutron/plugins/vmware/api_client/eventlet_client.py index de97853e4c..8d641ce2e8 100644 --- a/neutron/plugins/nicira/api_client/eventlet_client.py +++ b/neutron/plugins/vmware/api_client/eventlet_client.py @@ -19,8 +19,8 @@ import eventlet import time from neutron.openstack.common import log as logging -from neutron.plugins.nicira.api_client import base -from neutron.plugins.nicira.api_client import eventlet_request +from neutron.plugins.vmware.api_client import base +from neutron.plugins.vmware.api_client import eventlet_request eventlet.monkey_patch() LOG = logging.getLogger(__name__) diff --git a/neutron/plugins/nicira/api_client/eventlet_request.py b/neutron/plugins/vmware/api_client/eventlet_request.py similarity index 99% rename from neutron/plugins/nicira/api_client/eventlet_request.py rename to neutron/plugins/vmware/api_client/eventlet_request.py index 56fdb99ebe..307e4e3e75 100644 --- a/neutron/plugins/nicira/api_client/eventlet_request.py +++ b/neutron/plugins/vmware/api_client/eventlet_request.py @@ -20,7 +20,7 @@ import json import urllib from neutron.openstack.common import log as logging -from neutron.plugins.nicira.api_client import request +from neutron.plugins.vmware.api_client import request LOG = logging.getLogger(__name__) USER_AGENT = "Neutron eventlet client/2.0" diff --git a/neutron/plugins/nicira/api_client/exception.py b/neutron/plugins/vmware/api_client/exception.py similarity index 100% rename from neutron/plugins/nicira/api_client/exception.py rename to neutron/plugins/vmware/api_client/exception.py diff --git a/neutron/plugins/nicira/api_client/request.py b/neutron/plugins/vmware/api_client/request.py similarity index 99% rename from neutron/plugins/nicira/api_client/request.py rename to neutron/plugins/vmware/api_client/request.py index 68878c58e4..f46371f482 100644 --- a/neutron/plugins/nicira/api_client/request.py +++ b/neutron/plugins/vmware/api_client/request.py @@ -27,7 +27,7 @@ import six.moves.urllib.parse as urlparse from neutron.openstack.common import excutils from neutron.openstack.common import log as logging -from neutron.plugins.nicira.api_client import ctrl_conn_to_str +from neutron.plugins.vmware.api_client import ctrl_conn_to_str LOG = logging.getLogger(__name__) diff --git a/neutron/plugins/nicira/api_client/version.py b/neutron/plugins/vmware/api_client/version.py similarity index 100% rename from neutron/plugins/nicira/api_client/version.py rename to neutron/plugins/vmware/api_client/version.py diff --git a/neutron/plugins/nicira/check_nsx_config.py b/neutron/plugins/vmware/check_nsx_config.py similarity index 97% rename from neutron/plugins/nicira/check_nsx_config.py rename to neutron/plugins/vmware/check_nsx_config.py index ce5e3a906c..7b2fbd3438 100644 --- a/neutron/plugins/nicira/check_nsx_config.py +++ b/neutron/plugins/vmware/check_nsx_config.py @@ -22,9 +22,9 @@ import sys from oslo.config import cfg from neutron.common import config -from neutron.plugins.nicira.common import config as nsx_config # noqa -from neutron.plugins.nicira.common import nsx_utils -from neutron.plugins.nicira import nvplib +from neutron.plugins.vmware.common import config as nsx_config # noqa +from neutron.plugins.vmware.common import nsx_utils +from neutron.plugins.vmware import nvplib config.setup_logging(cfg.CONF) diff --git a/neutron/plugins/nicira/common/__init__.py b/neutron/plugins/vmware/common/__init__.py similarity index 100% rename from neutron/plugins/nicira/common/__init__.py rename to neutron/plugins/vmware/common/__init__.py diff --git a/neutron/plugins/nicira/common/config.py b/neutron/plugins/vmware/common/config.py similarity index 100% rename from neutron/plugins/nicira/common/config.py rename to neutron/plugins/vmware/common/config.py diff --git a/neutron/plugins/nicira/common/exceptions.py b/neutron/plugins/vmware/common/exceptions.py similarity index 100% rename from neutron/plugins/nicira/common/exceptions.py rename to neutron/plugins/vmware/common/exceptions.py diff --git a/neutron/plugins/nicira/common/nsx_utils.py b/neutron/plugins/vmware/common/nsx_utils.py similarity index 96% rename from neutron/plugins/nicira/common/nsx_utils.py rename to neutron/plugins/vmware/common/nsx_utils.py index 8dcfec5462..55d8b74752 100644 --- a/neutron/plugins/nicira/common/nsx_utils.py +++ b/neutron/plugins/vmware/common/nsx_utils.py @@ -16,12 +16,12 @@ # under the License. from neutron.openstack.common import log -from neutron.plugins.nicira.api_client import client -from neutron.plugins.nicira.dbexts import db as nsx_db -from neutron.plugins.nicira import nsx_cluster -from neutron.plugins.nicira.nsxlib import router as routerlib -from neutron.plugins.nicira.nsxlib import secgroup as secgrouplib -from neutron.plugins.nicira.nsxlib import switch as switchlib +from neutron.plugins.vmware.api_client import client +from neutron.plugins.vmware.dbexts import db as nsx_db +from neutron.plugins.vmware import nsx_cluster +from neutron.plugins.vmware.nsxlib import router as routerlib +from neutron.plugins.vmware.nsxlib import secgroup as secgrouplib +from neutron.plugins.vmware.nsxlib import switch as switchlib LOG = log.getLogger(__name__) diff --git a/neutron/plugins/nicira/common/securitygroups.py b/neutron/plugins/vmware/common/securitygroups.py similarity index 99% rename from neutron/plugins/nicira/common/securitygroups.py rename to neutron/plugins/vmware/common/securitygroups.py index d0b71c0374..f00634f79d 100644 --- a/neutron/plugins/nicira/common/securitygroups.py +++ b/neutron/plugins/vmware/common/securitygroups.py @@ -14,7 +14,7 @@ # under the License. from neutron.openstack.common import log -from neutron.plugins.nicira.common import nsx_utils +from neutron.plugins.vmware.common import nsx_utils LOG = log.getLogger(__name__) # Protocol number look up for supported protocols diff --git a/neutron/plugins/nicira/common/sync.py b/neutron/plugins/vmware/common/sync.py similarity index 98% rename from neutron/plugins/nicira/common/sync.py rename to neutron/plugins/vmware/common/sync.py index bda6ee2ee9..c4ac707e00 100644 --- a/neutron/plugins/nicira/common/sync.py +++ b/neutron/plugins/vmware/common/sync.py @@ -25,12 +25,12 @@ from neutron.openstack.common import jsonutils from neutron.openstack.common import log from neutron.openstack.common import loopingcall from neutron.openstack.common import timeutils -from neutron.plugins.nicira.api_client import exception as api_exc -from neutron.plugins.nicira.common import exceptions as nsx_exc -from neutron.plugins.nicira.common import nsx_utils -from neutron.plugins.nicira.nsxlib import router as routerlib -from neutron.plugins.nicira.nsxlib import switch as switchlib -from neutron.plugins.nicira import nvplib +from neutron.plugins.vmware.api_client import exception as api_exc +from neutron.plugins.vmware.common import exceptions as nsx_exc +from neutron.plugins.vmware.common import nsx_utils +from neutron.plugins.vmware.nsxlib import router as routerlib +from neutron.plugins.vmware.nsxlib import switch as switchlib +from neutron.plugins.vmware import nvplib # Maximum page size for a single request # NOTE(salv-orlando): This might become a version-dependent map should the diff --git a/neutron/plugins/nicira/common/utils.py b/neutron/plugins/vmware/common/utils.py similarity index 100% rename from neutron/plugins/nicira/common/utils.py rename to neutron/plugins/vmware/common/utils.py diff --git a/neutron/plugins/nicira/dbexts/__init__.py b/neutron/plugins/vmware/dbexts/__init__.py similarity index 100% rename from neutron/plugins/nicira/dbexts/__init__.py rename to neutron/plugins/vmware/dbexts/__init__.py diff --git a/neutron/plugins/nicira/dbexts/db.py b/neutron/plugins/vmware/dbexts/db.py similarity index 98% rename from neutron/plugins/nicira/dbexts/db.py rename to neutron/plugins/vmware/dbexts/db.py index 2af2724849..831d41b2fc 100644 --- a/neutron/plugins/nicira/dbexts/db.py +++ b/neutron/plugins/vmware/dbexts/db.py @@ -19,8 +19,8 @@ from sqlalchemy.orm import exc import neutron.db.api as db from neutron.openstack.common.db import exception as db_exc from neutron.openstack.common import log as logging -from neutron.plugins.nicira.dbexts import models -from neutron.plugins.nicira.dbexts import networkgw_db +from neutron.plugins.vmware.dbexts import models +from neutron.plugins.vmware.dbexts import networkgw_db LOG = logging.getLogger(__name__) diff --git a/neutron/plugins/nicira/dbexts/distributedrouter.py b/neutron/plugins/vmware/dbexts/distributedrouter.py similarity index 88% rename from neutron/plugins/nicira/dbexts/distributedrouter.py rename to neutron/plugins/vmware/dbexts/distributedrouter.py index 279ae64f60..5c6accbd39 100644 --- a/neutron/plugins/nicira/dbexts/distributedrouter.py +++ b/neutron/plugins/vmware/dbexts/distributedrouter.py @@ -14,8 +14,8 @@ # under the License. # -from neutron.plugins.nicira.dbexts import nsxrouter -from neutron.plugins.nicira.extensions import distributedrouter as dist_rtr +from neutron.plugins.vmware.dbexts import nsxrouter +from neutron.plugins.vmware.extensions import distributedrouter as dist_rtr class DistributedRouter_mixin(nsxrouter.NsxRouterMixin): diff --git a/neutron/plugins/nicira/dbexts/lsn_db.py b/neutron/plugins/vmware/dbexts/lsn_db.py similarity index 98% rename from neutron/plugins/nicira/dbexts/lsn_db.py rename to neutron/plugins/vmware/dbexts/lsn_db.py index 6cd6b7ca3d..30a3bda805 100644 --- a/neutron/plugins/nicira/dbexts/lsn_db.py +++ b/neutron/plugins/vmware/dbexts/lsn_db.py @@ -23,7 +23,7 @@ from sqlalchemy import String from neutron.db import models_v2 from neutron.openstack.common.db import exception as d_exc from neutron.openstack.common import log as logging -from neutron.plugins.nicira.common import exceptions as p_exc +from neutron.plugins.vmware.common import exceptions as p_exc LOG = logging.getLogger(__name__) diff --git a/neutron/plugins/nicira/dbexts/maclearning.py b/neutron/plugins/vmware/dbexts/maclearning.py similarity index 97% rename from neutron/plugins/nicira/dbexts/maclearning.py rename to neutron/plugins/vmware/dbexts/maclearning.py index 340ccf46ce..6a5f73acdf 100644 --- a/neutron/plugins/nicira/dbexts/maclearning.py +++ b/neutron/plugins/vmware/dbexts/maclearning.py @@ -22,7 +22,7 @@ from neutron.db import db_base_plugin_v2 from neutron.db import model_base from neutron.db import models_v2 from neutron.openstack.common import log as logging -from neutron.plugins.nicira.extensions import maclearning as mac +from neutron.plugins.vmware.extensions import maclearning as mac LOG = logging.getLogger(__name__) diff --git a/neutron/plugins/nicira/dbexts/models.py b/neutron/plugins/vmware/dbexts/models.py similarity index 98% rename from neutron/plugins/nicira/dbexts/models.py rename to neutron/plugins/vmware/dbexts/models.py index 4c294de68b..4bf12270bd 100644 --- a/neutron/plugins/nicira/dbexts/models.py +++ b/neutron/plugins/vmware/dbexts/models.py @@ -84,7 +84,7 @@ class NeutronNsxSecurityGroupMapping(model_base.BASEV2): class NeutronNsxPortMapping(model_base.BASEV2): - """Represents the mapping between neutron and nvp port uuids.""" + """Represents the mapping between neutron and nsx port uuids.""" __tablename__ = 'neutron_nsx_port_mappings' neutron_id = Column(String(36), diff --git a/neutron/plugins/nicira/dbexts/networkgw_db.py b/neutron/plugins/vmware/dbexts/networkgw_db.py similarity index 99% rename from neutron/plugins/nicira/dbexts/networkgw_db.py rename to neutron/plugins/vmware/dbexts/networkgw_db.py index 128b86bbed..ed4b0e87c9 100644 --- a/neutron/plugins/nicira/dbexts/networkgw_db.py +++ b/neutron/plugins/vmware/dbexts/networkgw_db.py @@ -26,7 +26,7 @@ from neutron.db import model_base from neutron.db import models_v2 from neutron.openstack.common import log as logging from neutron.openstack.common import uuidutils -from neutron.plugins.nicira.extensions import networkgw +from neutron.plugins.vmware.extensions import networkgw LOG = logging.getLogger(__name__) diff --git a/neutron/plugins/nicira/dbexts/nsxrouter.py b/neutron/plugins/vmware/dbexts/nsxrouter.py similarity index 98% rename from neutron/plugins/nicira/dbexts/nsxrouter.py rename to neutron/plugins/vmware/dbexts/nsxrouter.py index 5b53c5b6a2..48aa612669 100644 --- a/neutron/plugins/nicira/dbexts/nsxrouter.py +++ b/neutron/plugins/vmware/dbexts/nsxrouter.py @@ -16,7 +16,7 @@ from neutron.db import db_base_plugin_v2 from neutron.extensions import l3 from neutron.openstack.common import log as logging -from neutron.plugins.nicira.dbexts import models +from neutron.plugins.vmware.dbexts import models LOG = logging.getLogger(__name__) diff --git a/neutron/plugins/nicira/dbexts/qos_db.py b/neutron/plugins/vmware/dbexts/qos_db.py similarity index 99% rename from neutron/plugins/nicira/dbexts/qos_db.py rename to neutron/plugins/vmware/dbexts/qos_db.py index 7168921714..4f9ff316e5 100644 --- a/neutron/plugins/nicira/dbexts/qos_db.py +++ b/neutron/plugins/vmware/dbexts/qos_db.py @@ -23,7 +23,7 @@ from neutron.db import model_base from neutron.db import models_v2 from neutron.openstack.common import log from neutron.openstack.common import uuidutils -from neutron.plugins.nicira.extensions import qos +from neutron.plugins.vmware.extensions import qos LOG = log.getLogger(__name__) @@ -71,7 +71,7 @@ class NetworkQueueMapping(model_base.BASEV2): cascade='delete', lazy='joined')) -class NVPQoSDbMixin(qos.QueuePluginBase): +class QoSDbMixin(qos.QueuePluginBase): """Mixin class to add queues.""" def create_qos_queue(self, context, qos_queue): diff --git a/neutron/plugins/nicira/dbexts/servicerouter.py b/neutron/plugins/vmware/dbexts/servicerouter.py similarity index 88% rename from neutron/plugins/nicira/dbexts/servicerouter.py rename to neutron/plugins/vmware/dbexts/servicerouter.py index 8ca2968f66..bc34cd4c3e 100644 --- a/neutron/plugins/nicira/dbexts/servicerouter.py +++ b/neutron/plugins/vmware/dbexts/servicerouter.py @@ -13,8 +13,8 @@ # under the License. # -from neutron.plugins.nicira.dbexts import distributedrouter as dist_rtr -from neutron.plugins.nicira.extensions import servicerouter +from neutron.plugins.vmware.dbexts import distributedrouter as dist_rtr +from neutron.plugins.vmware.extensions import servicerouter class ServiceRouter_mixin(dist_rtr.DistributedRouter_mixin): diff --git a/neutron/plugins/nicira/dbexts/vcns_db.py b/neutron/plugins/vmware/dbexts/vcns_db.py similarity index 97% rename from neutron/plugins/nicira/dbexts/vcns_db.py rename to neutron/plugins/vmware/dbexts/vcns_db.py index 069e925f0f..bfb14aa29d 100644 --- a/neutron/plugins/nicira/dbexts/vcns_db.py +++ b/neutron/plugins/vmware/dbexts/vcns_db.py @@ -17,9 +17,9 @@ from sqlalchemy.orm import exc from neutron.openstack.common import log as logging -from neutron.plugins.nicira.common import exceptions as nsx_exc -from neutron.plugins.nicira.dbexts import vcns_models -from neutron.plugins.nicira.vshield.common import ( +from neutron.plugins.vmware.common import exceptions as nsx_exc +from neutron.plugins.vmware.dbexts import vcns_models +from neutron.plugins.vmware.vshield.common import ( exceptions as vcns_exc) LOG = logging.getLogger(__name__) diff --git a/neutron/plugins/nicira/dbexts/vcns_models.py b/neutron/plugins/vmware/dbexts/vcns_models.py similarity index 100% rename from neutron/plugins/nicira/dbexts/vcns_models.py rename to neutron/plugins/vmware/dbexts/vcns_models.py diff --git a/neutron/plugins/nicira/dhcp_meta/__init__.py b/neutron/plugins/vmware/dhcp_meta/__init__.py similarity index 100% rename from neutron/plugins/nicira/dhcp_meta/__init__.py rename to neutron/plugins/vmware/dhcp_meta/__init__.py diff --git a/neutron/plugins/nicira/dhcp_meta/combined.py b/neutron/plugins/vmware/dhcp_meta/combined.py similarity index 97% rename from neutron/plugins/nicira/dhcp_meta/combined.py rename to neutron/plugins/vmware/dhcp_meta/combined.py index 3e59a202b6..36ba563e81 100644 --- a/neutron/plugins/nicira/dhcp_meta/combined.py +++ b/neutron/plugins/vmware/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 neutron.plugins.nicira.dhcp_meta import nsx as nsx_svc -from neutron.plugins.nicira.dhcp_meta import rpc as nsx_rpc +from neutron.plugins.vmware.dhcp_meta import nsx as nsx_svc +from neutron.plugins.vmware.dhcp_meta import rpc as nsx_rpc class DhcpAgentNotifyAPI(dhcp_rpc_agent_api.DhcpAgentNotifyAPI): diff --git a/neutron/plugins/nicira/dhcp_meta/constants.py b/neutron/plugins/vmware/dhcp_meta/constants.py similarity index 100% rename from neutron/plugins/nicira/dhcp_meta/constants.py rename to neutron/plugins/vmware/dhcp_meta/constants.py diff --git a/neutron/plugins/nicira/dhcp_meta/lsnmanager.py b/neutron/plugins/vmware/dhcp_meta/lsnmanager.py similarity index 98% rename from neutron/plugins/nicira/dhcp_meta/lsnmanager.py rename to neutron/plugins/vmware/dhcp_meta/lsnmanager.py index 71f3cc5966..a9214d7959 100644 --- a/neutron/plugins/nicira/dhcp_meta/lsnmanager.py +++ b/neutron/plugins/vmware/dhcp_meta/lsnmanager.py @@ -20,12 +20,12 @@ from oslo.config import cfg from neutron.common import exceptions as n_exc from neutron.openstack.common.db import exception as db_exc from neutron.openstack.common import log as logging -from neutron.plugins.nicira.api_client import exception as api_exc -from neutron.plugins.nicira.common import exceptions as p_exc -from neutron.plugins.nicira.dbexts import lsn_db -from neutron.plugins.nicira.dhcp_meta import constants as const -from neutron.plugins.nicira.nsxlib import lsn as lsn_api -from neutron.plugins.nicira.nsxlib import switch as switch_api +from neutron.plugins.vmware.api_client import exception as api_exc +from neutron.plugins.vmware.common import exceptions as p_exc +from neutron.plugins.vmware.dbexts import lsn_db +from neutron.plugins.vmware.dhcp_meta import constants as const +from neutron.plugins.vmware.nsxlib import lsn as lsn_api +from neutron.plugins.vmware.nsxlib import switch as switch_api LOG = logging.getLogger(__name__) diff --git a/neutron/plugins/nicira/dhcp_meta/migration.py b/neutron/plugins/vmware/dhcp_meta/migration.py similarity index 97% rename from neutron/plugins/nicira/dhcp_meta/migration.py rename to neutron/plugins/vmware/dhcp_meta/migration.py index 17f0b09906..cda14c5743 100644 --- a/neutron/plugins/nicira/dhcp_meta/migration.py +++ b/neutron/plugins/vmware/dhcp_meta/migration.py @@ -19,9 +19,9 @@ from neutron.common import constants as const from neutron.common import exceptions as n_exc from neutron.extensions import external_net from neutron.openstack.common import log as logging -from neutron.plugins.nicira.common import exceptions as p_exc -from neutron.plugins.nicira.dhcp_meta import nsx -from neutron.plugins.nicira.dhcp_meta import rpc +from neutron.plugins.vmware.common import exceptions as p_exc +from neutron.plugins.vmware.dhcp_meta import nsx +from neutron.plugins.vmware.dhcp_meta import rpc LOG = logging.getLogger(__name__) diff --git a/neutron/plugins/nicira/dhcp_meta/nsx.py b/neutron/plugins/vmware/dhcp_meta/nsx.py similarity index 98% rename from neutron/plugins/nicira/dhcp_meta/nsx.py rename to neutron/plugins/vmware/dhcp_meta/nsx.py index 75bb7bf116..8e5c0e5008 100644 --- a/neutron/plugins/nicira/dhcp_meta/nsx.py +++ b/neutron/plugins/vmware/dhcp_meta/nsx.py @@ -24,9 +24,9 @@ from neutron.db import db_base_plugin_v2 from neutron.db import l3_db from neutron.extensions import external_net from neutron.openstack.common import log as logging -from neutron.plugins.nicira.common import exceptions as p_exc -from neutron.plugins.nicira.dhcp_meta import constants as d_const -from neutron.plugins.nicira.nsxlib import lsn as lsn_api +from neutron.plugins.vmware.common import exceptions as p_exc +from neutron.plugins.vmware.dhcp_meta import constants as d_const +from neutron.plugins.vmware.nsxlib import lsn as lsn_api LOG = logging.getLogger(__name__) @@ -95,7 +95,7 @@ class DhcpAgentNotifyAPI(object): network_id = port['network_id'] subnet_id = port["fixed_ips"][0]['subnet_id'] filters = {'network_id': [network_id]} - # Because NVP does not support updating a single host entry we + # Because NSX does not support updating a single host entry we # got to build the whole list from scratch and update in bulk ports = self.plugin.get_ports(context, filters) if not ports: diff --git a/neutron/plugins/nicira/dhcp_meta/rpc.py b/neutron/plugins/vmware/dhcp_meta/rpc.py similarity index 97% rename from neutron/plugins/nicira/dhcp_meta/rpc.py rename to neutron/plugins/vmware/dhcp_meta/rpc.py index 218a28317a..3b8ef0fec7 100644 --- a/neutron/plugins/nicira/dhcp_meta/rpc.py +++ b/neutron/plugins/vmware/dhcp_meta/rpc.py @@ -31,9 +31,9 @@ from neutron.db import dhcp_rpc_base from neutron.db import l3_db from neutron.db import models_v2 from neutron.openstack.common import log as logging -from neutron.plugins.nicira.api_client import exception as api_exc -from neutron.plugins.nicira.common import config -from neutron.plugins.nicira.common import exceptions as nsx_exc +from neutron.plugins.vmware.api_client import exception as api_exc +from neutron.plugins.vmware.common import config +from neutron.plugins.vmware.common import exceptions as nsx_exc LOG = logging.getLogger(__name__) @@ -43,7 +43,7 @@ METADATA_GATEWAY_IP = '169.254.169.253' METADATA_DHCP_ROUTE = '169.254.169.254/32' -class NVPRpcCallbacks(dhcp_rpc_base.DhcpRpcCallbackMixin): +class NSXRpcCallbacks(dhcp_rpc_base.DhcpRpcCallbackMixin): RPC_API_VERSION = '1.1' diff --git a/neutron/plugins/nicira/dhcpmeta_modes.py b/neutron/plugins/vmware/dhcpmeta_modes.py similarity index 92% rename from neutron/plugins/nicira/dhcpmeta_modes.py rename to neutron/plugins/vmware/dhcpmeta_modes.py index 1d5a331929..d8236ec1b3 100644 --- a/neutron/plugins/nicira/dhcpmeta_modes.py +++ b/neutron/plugins/vmware/dhcpmeta_modes.py @@ -23,14 +23,14 @@ from neutron.common import topics from neutron.openstack.common import importutils from neutron.openstack.common import log as logging from neutron.openstack.common import rpc -from neutron.plugins.nicira.common import config -from neutron.plugins.nicira.common import exceptions as nsx_exc -from neutron.plugins.nicira.dhcp_meta import combined -from neutron.plugins.nicira.dhcp_meta import lsnmanager -from neutron.plugins.nicira.dhcp_meta import migration -from neutron.plugins.nicira.dhcp_meta import nsx as nsx_svc -from neutron.plugins.nicira.dhcp_meta import rpc as nsx_rpc -from neutron.plugins.nicira.extensions import lsn +from neutron.plugins.vmware.common import config +from neutron.plugins.vmware.common import exceptions as nsx_exc +from neutron.plugins.vmware.dhcp_meta import combined +from neutron.plugins.vmware.dhcp_meta import lsnmanager +from neutron.plugins.vmware.dhcp_meta import migration +from neutron.plugins.vmware.dhcp_meta import nsx as nsx_svc +from neutron.plugins.vmware.dhcp_meta import rpc as nsx_rpc +from neutron.plugins.vmware.extensions import lsn LOG = logging.getLogger(__name__) @@ -70,7 +70,7 @@ class DhcpMetadataAccess(object): def _setup_rpc_dhcp_metadata(self, notifier=None): self.topic = topics.PLUGIN self.conn = rpc.create_connection(new=True) - self.dispatcher = nsx_rpc.NVPRpcCallbacks().create_rpc_dispatcher() + self.dispatcher = nsx_rpc.NSXRpcCallbacks().create_rpc_dispatcher() self.conn.create_consumer(self.topic, self.dispatcher, fanout=False) self.agent_notifiers[const.AGENT_TYPE_DHCP] = ( notifier or dhcp_rpc_agent_api.DhcpAgentNotifyAPI()) diff --git a/neutron/plugins/nicira/extensions/__init__.py b/neutron/plugins/vmware/extensions/__init__.py similarity index 100% rename from neutron/plugins/nicira/extensions/__init__.py rename to neutron/plugins/vmware/extensions/__init__.py diff --git a/neutron/plugins/nicira/extensions/distributedrouter.py b/neutron/plugins/vmware/extensions/distributedrouter.py similarity index 100% rename from neutron/plugins/nicira/extensions/distributedrouter.py rename to neutron/plugins/vmware/extensions/distributedrouter.py diff --git a/neutron/plugins/nicira/extensions/lsn.py b/neutron/plugins/vmware/extensions/lsn.py similarity index 100% rename from neutron/plugins/nicira/extensions/lsn.py rename to neutron/plugins/vmware/extensions/lsn.py diff --git a/neutron/plugins/nicira/extensions/maclearning.py b/neutron/plugins/vmware/extensions/maclearning.py similarity index 100% rename from neutron/plugins/nicira/extensions/maclearning.py rename to neutron/plugins/vmware/extensions/maclearning.py diff --git a/neutron/plugins/nicira/extensions/networkgw.py b/neutron/plugins/vmware/extensions/networkgw.py similarity index 100% rename from neutron/plugins/nicira/extensions/networkgw.py rename to neutron/plugins/vmware/extensions/networkgw.py diff --git a/neutron/plugins/nicira/extensions/nvp_networkgw.py b/neutron/plugins/vmware/extensions/nvp_networkgw.py similarity index 95% rename from neutron/plugins/nicira/extensions/nvp_networkgw.py rename to neutron/plugins/vmware/extensions/nvp_networkgw.py index 283809b9d7..53299ea281 100644 --- a/neutron/plugins/nicira/extensions/nvp_networkgw.py +++ b/neutron/plugins/vmware/extensions/nvp_networkgw.py @@ -18,7 +18,7 @@ # TODO(armando-migliaccio): This is deprecated in Icehouse, and # to be removed in Juno. -from neutron.plugins.nicira.extensions import networkgw +from neutron.plugins.vmware.extensions import networkgw class Nvp_networkgw(networkgw.Networkgw): diff --git a/neutron/plugins/nicira/extensions/nvp_qos.py b/neutron/plugins/vmware/extensions/nvp_qos.py similarity index 95% rename from neutron/plugins/nicira/extensions/nvp_qos.py rename to neutron/plugins/vmware/extensions/nvp_qos.py index 1a16d32804..c46e684434 100644 --- a/neutron/plugins/nicira/extensions/nvp_qos.py +++ b/neutron/plugins/vmware/extensions/nvp_qos.py @@ -16,7 +16,7 @@ # TODO(armando-migliaccio): This is deprecated in Icehouse, and # to be removed in Juno. -from neutron.plugins.nicira.extensions import qos +from neutron.plugins.vmware.extensions import qos class Nvp_qos(qos.Qos): diff --git a/neutron/plugins/nicira/extensions/qos.py b/neutron/plugins/vmware/extensions/qos.py similarity index 100% rename from neutron/plugins/nicira/extensions/qos.py rename to neutron/plugins/vmware/extensions/qos.py diff --git a/neutron/plugins/nicira/extensions/servicerouter.py b/neutron/plugins/vmware/extensions/servicerouter.py similarity index 100% rename from neutron/plugins/nicira/extensions/servicerouter.py rename to neutron/plugins/vmware/extensions/servicerouter.py diff --git a/neutron/plugins/nicira/nsx_cluster.py b/neutron/plugins/vmware/nsx_cluster.py similarity index 98% rename from neutron/plugins/nicira/nsx_cluster.py rename to neutron/plugins/vmware/nsx_cluster.py index 7dc9f85897..1c564385de 100644 --- a/neutron/plugins/nicira/nsx_cluster.py +++ b/neutron/plugins/vmware/nsx_cluster.py @@ -16,7 +16,7 @@ from oslo.config import cfg from neutron.openstack.common import log as logging -from neutron.plugins.nicira.common import exceptions +from neutron.plugins.vmware.common import exceptions LOG = logging.getLogger(__name__) DEFAULT_PORT = 443 diff --git a/neutron/plugins/nicira/nsxlib/__init__.py b/neutron/plugins/vmware/nsxlib/__init__.py similarity index 100% rename from neutron/plugins/nicira/nsxlib/__init__.py rename to neutron/plugins/vmware/nsxlib/__init__.py diff --git a/neutron/plugins/nicira/nsxlib/l2gateway.py b/neutron/plugins/vmware/nsxlib/l2gateway.py similarity index 93% rename from neutron/plugins/nicira/nsxlib/l2gateway.py rename to neutron/plugins/vmware/nsxlib/l2gateway.py index 9ab0bb5382..c48353ccf5 100644 --- a/neutron/plugins/nicira/nsxlib/l2gateway.py +++ b/neutron/plugins/vmware/nsxlib/l2gateway.py @@ -17,11 +17,11 @@ import json from neutron.openstack.common import log -from neutron.plugins.nicira.common import utils -from neutron.plugins.nicira.nsxlib import switch -from neutron.plugins.nicira.nvplib import _build_uri_path -from neutron.plugins.nicira.nvplib import do_request -from neutron.plugins.nicira.nvplib import get_all_query_pages +from neutron.plugins.vmware.common import utils +from neutron.plugins.vmware.nsxlib import switch +from neutron.plugins.vmware.nvplib import _build_uri_path +from neutron.plugins.vmware.nvplib import do_request +from neutron.plugins.vmware.nvplib import get_all_query_pages HTTP_GET = "GET" HTTP_POST = "POST" diff --git a/neutron/plugins/nicira/nsxlib/lsn.py b/neutron/plugins/vmware/nsxlib/lsn.py similarity index 97% rename from neutron/plugins/nicira/nsxlib/lsn.py rename to neutron/plugins/vmware/nsxlib/lsn.py index f66e9e508a..bec5567fd4 100644 --- a/neutron/plugins/nicira/nsxlib/lsn.py +++ b/neutron/plugins/vmware/nsxlib/lsn.py @@ -19,11 +19,11 @@ import json from neutron.common import exceptions as exception from neutron.openstack.common import log -from neutron.plugins.nicira.api_client import exception as api_exc -from neutron.plugins.nicira.common import exceptions as nsx_exc -from neutron.plugins.nicira.common import utils -from neutron.plugins.nicira.nvplib import _build_uri_path -from neutron.plugins.nicira.nvplib import do_request +from neutron.plugins.vmware.api_client import exception as api_exc +from neutron.plugins.vmware.common import exceptions as nsx_exc +from neutron.plugins.vmware.common import utils +from neutron.plugins.vmware.nvplib import _build_uri_path +from neutron.plugins.vmware.nvplib import do_request HTTP_GET = "GET" HTTP_POST = "POST" diff --git a/neutron/plugins/nicira/nsxlib/queue.py b/neutron/plugins/vmware/nsxlib/queue.py similarity index 87% rename from neutron/plugins/nicira/nsxlib/queue.py rename to neutron/plugins/vmware/nsxlib/queue.py index a2d71c717f..8e92124b85 100644 --- a/neutron/plugins/nicira/nsxlib/queue.py +++ b/neutron/plugins/vmware/nsxlib/queue.py @@ -18,10 +18,10 @@ from neutron.common import exceptions as exception from neutron.openstack.common import excutils from neutron.openstack.common import jsonutils from neutron.openstack.common import log -from neutron.plugins.nicira.api_client import exception as api_exc -from neutron.plugins.nicira.common import utils -from neutron.plugins.nicira.nvplib import _build_uri_path -from neutron.plugins.nicira.nvplib import do_request +from neutron.plugins.vmware.api_client import exception as api_exc +from neutron.plugins.vmware.common import utils +from neutron.plugins.vmware.nvplib import _build_uri_path +from neutron.plugins.vmware.nvplib import do_request HTTP_POST = "POST" HTTP_DELETE = "DELETE" @@ -40,8 +40,8 @@ def create_lqueue(cluster, queue_data): 'dscp': 'dscp' } queue_obj = dict( - (nvp_name, queue_data.get(api_name)) - for api_name, nvp_name in params.iteritems() + (nsx_name, queue_data.get(api_name)) + for api_name, nsx_name in params.iteritems() if attr.is_attr_set(queue_data.get(api_name)) ) if 'display_name' in queue_obj: diff --git a/neutron/plugins/nicira/nsxlib/router.py b/neutron/plugins/vmware/nsxlib/router.py similarity index 98% rename from neutron/plugins/nicira/nsxlib/router.py rename to neutron/plugins/vmware/nsxlib/router.py index db4c067a1b..63bae2d311 100644 --- a/neutron/plugins/nicira/nsxlib/router.py +++ b/neutron/plugins/vmware/nsxlib/router.py @@ -17,15 +17,15 @@ from neutron.common import exceptions as exception from neutron.openstack.common import excutils from neutron.openstack.common import jsonutils from neutron.openstack.common import log -from neutron.plugins.nicira.api_client import exception as api_exc -from neutron.plugins.nicira.common import exceptions as nsx_exc -from neutron.plugins.nicira.common import utils -from neutron.plugins.nicira.nsxlib.switch import get_port -from neutron.plugins.nicira.nsxlib.versioning import DEFAULT_VERSION -from neutron.plugins.nicira.nsxlib.versioning import versioned -from neutron.plugins.nicira.nvplib import _build_uri_path -from neutron.plugins.nicira.nvplib import do_request -from neutron.plugins.nicira.nvplib import get_all_query_pages +from neutron.plugins.vmware.api_client import exception as api_exc +from neutron.plugins.vmware.common import exceptions as nsx_exc +from neutron.plugins.vmware.common import utils +from neutron.plugins.vmware.nsxlib.switch import get_port +from neutron.plugins.vmware.nsxlib.versioning import DEFAULT_VERSION +from neutron.plugins.vmware.nsxlib.versioning import versioned +from neutron.plugins.vmware.nvplib import _build_uri_path +from neutron.plugins.vmware.nvplib import do_request +from neutron.plugins.vmware.nvplib import get_all_query_pages HTTP_GET = "GET" HTTP_POST = "POST" diff --git a/neutron/plugins/nicira/nsxlib/secgroup.py b/neutron/plugins/vmware/nsxlib/secgroup.py similarity index 94% rename from neutron/plugins/nicira/nsxlib/secgroup.py rename to neutron/plugins/vmware/nsxlib/secgroup.py index 15bb8a8b63..ef34458c36 100644 --- a/neutron/plugins/nicira/nsxlib/secgroup.py +++ b/neutron/plugins/vmware/nsxlib/secgroup.py @@ -18,11 +18,11 @@ import json from neutron.common import constants from neutron.common import exceptions from neutron.openstack.common import log -from neutron.plugins.nicira.common import utils -from neutron.plugins.nicira.nvplib import _build_uri_path -from neutron.plugins.nicira.nvplib import do_request -from neutron.plugins.nicira.nvplib import format_exception -from neutron.plugins.nicira.nvplib import get_all_query_pages +from neutron.plugins.vmware.common import utils +from neutron.plugins.vmware.nvplib import _build_uri_path +from neutron.plugins.vmware.nvplib import do_request +from neutron.plugins.vmware.nvplib import format_exception +from neutron.plugins.vmware.nvplib import get_all_query_pages HTTP_GET = "GET" HTTP_POST = "POST" diff --git a/neutron/plugins/nicira/nsxlib/switch.py b/neutron/plugins/vmware/nsxlib/switch.py similarity index 97% rename from neutron/plugins/nicira/nsxlib/switch.py rename to neutron/plugins/vmware/nsxlib/switch.py index 058e0d8cdf..391635adcc 100644 --- a/neutron/plugins/nicira/nsxlib/switch.py +++ b/neutron/plugins/vmware/nsxlib/switch.py @@ -19,12 +19,12 @@ import json from neutron.common import constants from neutron.common import exceptions as exception from neutron.openstack.common import log -from neutron.plugins.nicira.api_client import exception as api_exc -from neutron.plugins.nicira.common import exceptions as nsx_exc -from neutron.plugins.nicira.common import utils -from neutron.plugins.nicira.nvplib import _build_uri_path -from neutron.plugins.nicira.nvplib import do_request -from neutron.plugins.nicira.nvplib import get_all_query_pages +from neutron.plugins.vmware.api_client import exception as api_exc +from neutron.plugins.vmware.common import exceptions as nsx_exc +from neutron.plugins.vmware.common import utils +from neutron.plugins.vmware.nvplib import _build_uri_path +from neutron.plugins.vmware.nvplib import do_request +from neutron.plugins.vmware.nvplib import get_all_query_pages HTTP_GET = "GET" HTTP_POST = "POST" diff --git a/neutron/plugins/nicira/nsxlib/versioning.py b/neutron/plugins/vmware/nsxlib/versioning.py similarity index 96% rename from neutron/plugins/nicira/nsxlib/versioning.py rename to neutron/plugins/vmware/nsxlib/versioning.py index 055226b37e..0845a7d4c3 100644 --- a/neutron/plugins/nicira/nsxlib/versioning.py +++ b/neutron/plugins/vmware/nsxlib/versioning.py @@ -15,7 +15,7 @@ import inspect -from neutron.plugins.nicira.api_client import exception +from neutron.plugins.vmware.api_client import exception DEFAULT_VERSION = -1 @@ -28,7 +28,7 @@ def versioned(func_table): def dispatch_versioned_function(cluster, *args, **kwargs): # Call the wrapper function, in case we need to # run validation checks regarding versions. It - # should return the NVP version + # should return the NSX version v = (wrapped_func(cluster, *args, **kwargs) or cluster.api_client.get_version()) func = get_function_by_version(func_table, func_name, v) diff --git a/neutron/plugins/nicira/nvplib.py b/neutron/plugins/vmware/nvplib.py similarity index 95% rename from neutron/plugins/nicira/nvplib.py rename to neutron/plugins/vmware/nvplib.py index 5d72a886be..e851dd6d91 100644 --- a/neutron/plugins/nicira/nvplib.py +++ b/neutron/plugins/vmware/nvplib.py @@ -18,8 +18,8 @@ import json from neutron.common import exceptions as exception from neutron.openstack.common import log -from neutron.plugins.nicira.api_client import exception as api_exc -from neutron.plugins.nicira.common import exceptions as nsx_exc +from neutron.plugins.vmware.api_client import exception as api_exc +from neutron.plugins.vmware.common import exceptions as nsx_exc LOG = log.getLogger(__name__) @@ -28,7 +28,7 @@ HTTP_GET = "GET" HTTP_POST = "POST" HTTP_DELETE = "DELETE" HTTP_PUT = "PUT" -# Prefix to be used for all NVP API calls +# Prefix to be used for all NSX API calls URI_PREFIX = "/ws.v1" LSWITCH_RESOURCE = "lswitch" @@ -81,7 +81,7 @@ def get_single_query_page(path, cluster, page_cursor=None, if page_cursor: params.append("_page_cursor=%s" % page_cursor) params.append("_page_length=%s" % page_length) - # NOTE(salv-orlando): On the NVP backend the 'Quantum' tag is still + # NOTE(salv-orlando): On the NSX backend the 'Quantum' tag is still # used for marking Neutron entities in order to preserve compatibility if neutron_only: params.append("tag_scope=quantum") diff --git a/neutron/plugins/vmware/plugin.py b/neutron/plugins/vmware/plugin.py index 19c99c93c4..f5ea3dba18 100644 --- a/neutron/plugins/vmware/plugin.py +++ b/neutron/plugins/vmware/plugin.py @@ -15,8 +15,8 @@ # under the License. # -from neutron.plugins.nicira import NeutronPlugin -from neutron.plugins.nicira import NeutronServicePlugin +from neutron.plugins.vmware.plugins import base +from neutron.plugins.vmware.plugins import service -NsxPlugin = NeutronPlugin.NvpPluginV2 -NsxServicePlugin = NeutronServicePlugin.NvpAdvancedPlugin +NsxPlugin = base.NsxPluginV2 +NsxServicePlugin = service.NsxAdvancedPlugin diff --git a/neutron/plugins/vmware/plugins/__init__.py b/neutron/plugins/vmware/plugins/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/neutron/plugins/nicira/NeutronPlugin.py b/neutron/plugins/vmware/plugins/base.py similarity index 89% rename from neutron/plugins/nicira/NeutronPlugin.py rename to neutron/plugins/vmware/plugins/base.py index 40303c3321..096faf1c40 100644 --- a/neutron/plugins/nicira/NeutronPlugin.py +++ b/neutron/plugins/vmware/plugins/base.py @@ -14,7 +14,6 @@ # under the License. import logging -import os import uuid from oslo.config import cfg @@ -54,39 +53,39 @@ from neutron.openstack.common.db import exception as db_exc from neutron.openstack.common import excutils from neutron.openstack.common import lockutils from neutron.plugins.common import constants as plugin_const -from neutron.plugins.nicira.api_client import exception as api_exc -from neutron.plugins.nicira.common import config # noqa -from neutron.plugins.nicira.common import exceptions as nsx_exc -from neutron.plugins.nicira.common import nsx_utils -from neutron.plugins.nicira.common import securitygroups as sg_utils -from neutron.plugins.nicira.common import sync -from neutron.plugins.nicira.dbexts import db as nsx_db -from neutron.plugins.nicira.dbexts import distributedrouter as dist_rtr -from neutron.plugins.nicira.dbexts import maclearning as mac_db -from neutron.plugins.nicira.dbexts import networkgw_db -from neutron.plugins.nicira.dbexts import qos_db -from neutron.plugins.nicira import dhcpmeta_modes -from neutron.plugins.nicira.extensions import maclearning as mac_ext -from neutron.plugins.nicira.extensions import networkgw -from neutron.plugins.nicira.extensions import qos -from neutron.plugins.nicira.nsxlib import l2gateway as l2gwlib -from neutron.plugins.nicira.nsxlib import queue as queuelib -from neutron.plugins.nicira.nsxlib import router as routerlib -from neutron.plugins.nicira.nsxlib import secgroup as secgrouplib -from neutron.plugins.nicira.nsxlib import switch as switchlib +from neutron.plugins import vmware +from neutron.plugins.vmware.api_client import exception as api_exc +from neutron.plugins.vmware.common import config # noqa +from neutron.plugins.vmware.common import exceptions as nsx_exc +from neutron.plugins.vmware.common import nsx_utils +from neutron.plugins.vmware.common import securitygroups as sg_utils +from neutron.plugins.vmware.common import sync +from neutron.plugins.vmware.dbexts import db as nsx_db +from neutron.plugins.vmware.dbexts import distributedrouter as dist_rtr +from neutron.plugins.vmware.dbexts import maclearning as mac_db +from neutron.plugins.vmware.dbexts import networkgw_db +from neutron.plugins.vmware.dbexts import qos_db +from neutron.plugins.vmware import dhcpmeta_modes +from neutron.plugins.vmware.extensions import maclearning as mac_ext +from neutron.plugins.vmware.extensions import networkgw +from neutron.plugins.vmware.extensions import qos +from neutron.plugins.vmware.nsxlib import l2gateway as l2gwlib +from neutron.plugins.vmware.nsxlib import queue as queuelib +from neutron.plugins.vmware.nsxlib import router as routerlib +from neutron.plugins.vmware.nsxlib import secgroup as secgrouplib +from neutron.plugins.vmware.nsxlib import switch as switchlib LOG = logging.getLogger("NeutronPlugin") -NVP_NOSNAT_RULES_ORDER = 10 -NVP_FLOATINGIP_NAT_RULES_ORDER = 224 -NVP_EXTGW_NAT_RULES_ORDER = 255 -NVP_EXT_PATH = os.path.join(os.path.dirname(__file__), 'extensions') -NVP_DEFAULT_NEXTHOP = '1.1.1.1' +NSX_NOSNAT_RULES_ORDER = 10 +NSX_FLOATINGIP_NAT_RULES_ORDER = 224 +NSX_EXTGW_NAT_RULES_ORDER = 255 +NSX_DEFAULT_NEXTHOP = '1.1.1.1' -# Provider network extension - allowed network types for the NVP Plugin +# Provider network extension - allowed network types for the NSX Plugin class NetworkTypes: - """Allowed provider network types for the NVP Plugin.""" + """Allowed provider network types for the NSX Plugin.""" L3_EXT = 'l3_ext' STT = 'stt' GRE = 'gre' @@ -95,7 +94,7 @@ class NetworkTypes: BRIDGE = 'bridge' -class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, +class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin, agentschedulers_db.DhcpAgentSchedulerDbMixin, db_base_plugin_v2.NeutronDbPluginV2, dhcpmeta_modes.DhcpMetadataAccess, @@ -107,13 +106,8 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, networkgw_db.NetworkGatewayMixin, portbindings_db.PortBindingMixin, portsecurity_db.PortSecurityDbMixin, - qos_db.NVPQoSDbMixin, + qos_db.QoSDbMixin, securitygroups_db.SecurityGroupDbMixin): - """L2 Virtual network plugin. - - NvpPluginV2 is a Neutron plugin that provides L2 Virtual Network - functionality using NVP. - """ supported_extension_aliases = ["allowed-address-pairs", "binding", @@ -141,37 +135,37 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, super(NvpPluginV2, self).__init__() # TODO(salv-orlando): Replace These dicts with # collections.defaultdict for better handling of default values - # Routines for managing logical ports in NVP + # Routines for managing logical ports in NSX self.port_special_owners = [l3_db.DEVICE_OWNER_ROUTER_GW, l3_db.DEVICE_OWNER_ROUTER_INTF] self._port_drivers = { 'create': {l3_db.DEVICE_OWNER_ROUTER_GW: - self._nvp_create_ext_gw_port, + self._nsx_create_ext_gw_port, l3_db.DEVICE_OWNER_FLOATINGIP: - self._nvp_create_fip_port, + self._nsx_create_fip_port, l3_db.DEVICE_OWNER_ROUTER_INTF: - self._nvp_create_router_port, + self._nsx_create_router_port, networkgw_db.DEVICE_OWNER_NET_GW_INTF: - self._nvp_create_l2_gw_port, - 'default': self._nvp_create_port}, + self._nsx_create_l2_gw_port, + 'default': self._nsx_create_port}, 'delete': {l3_db.DEVICE_OWNER_ROUTER_GW: - self._nvp_delete_ext_gw_port, + self._nsx_delete_ext_gw_port, l3_db.DEVICE_OWNER_ROUTER_INTF: - self._nvp_delete_router_port, + self._nsx_delete_router_port, l3_db.DEVICE_OWNER_FLOATINGIP: - self._nvp_delete_fip_port, + self._nsx_delete_fip_port, networkgw_db.DEVICE_OWNER_NET_GW_INTF: - self._nvp_delete_port, - 'default': self._nvp_delete_port} + self._nsx_delete_port, + 'default': self._nsx_delete_port} } - neutron_extensions.append_api_extensions_path([NVP_EXT_PATH]) - self.nvp_opts = cfg.CONF.NSX - self.nvp_sync_opts = cfg.CONF.NSX_SYNC + neutron_extensions.append_api_extensions_path([vmware.NSX_EXT_PATH]) + self.nsx_opts = cfg.CONF.NSX + self.nsx_sync_opts = cfg.CONF.NSX_SYNC self.cluster = nsx_utils.create_nsx_cluster( cfg.CONF, - self.nvp_opts.concurrent_connections, - self.nvp_opts.nsx_gen_timeout) + self.nsx_opts.concurrent_connections, + self.nsx_opts.nsx_gen_timeout) self.base_binding_dict = { pbin.VIF_TYPE: pbin.VIF_TYPE_OVS, @@ -188,10 +182,10 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, # Create a synchronizer instance for backend sync self._synchronizer = sync.NvpSynchronizer( self, self.cluster, - self.nvp_sync_opts.state_sync_interval, - self.nvp_sync_opts.min_sync_req_delay, - self.nvp_sync_opts.min_chunk_size, - self.nvp_sync_opts.max_random_sync_delay) + self.nsx_sync_opts.state_sync_interval, + self.nsx_sync_opts.min_sync_req_delay, + self.nsx_sync_opts.min_chunk_size, + self.nsx_sync_opts.max_random_sync_delay) def _ensure_default_network_gateway(self): if self._is_default_net_gw_in_sync: @@ -207,13 +201,13 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, def_network_gw = self._get_network_gateway(ctx, def_l2_gw_uuid) except networkgw_db.GatewayNotFound: - # Create in DB only - don't go on NVP + # Create in DB only - don't go to backend def_gw_data = {'id': def_l2_gw_uuid, 'name': 'default L2 gateway service', 'devices': []} gw_res_name = networkgw.RESOURCE_NAME.replace('-', '_') def_network_gw = super( - NvpPluginV2, self).create_network_gateway( + NsxPluginV2, self).create_network_gateway( ctx, {gw_res_name: def_gw_data}) # In any case set is as default self._set_default_network_gateway(ctx, def_network_gw['id']) @@ -256,7 +250,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, port_data.get('id', 'fake'), port_data.get('name', 'fake'), port_data.get('admin_state_up', True), ip_addresses, port_data.get('mac_address')) - LOG.debug(_("Created NVP router port:%s"), lrouter_port['uuid']) + LOG.debug(_("Created NSX router port:%s"), lrouter_port['uuid']) except api_exc.NsxApiException: LOG.exception(_("Unable to create port on NSX logical router %s"), nsx_router_id) @@ -272,12 +266,12 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, return lrouter_port def _update_router_gw_info(self, context, router_id, info): - # NOTE(salvatore-orlando): We need to worry about rollback of NVP + # NOTE(salvatore-orlando): We need to worry about rollback of NSX # configuration in case of failures in the process # Ref. LP bug 1102301 router = self._get_router(context, router_id) # Check whether SNAT rule update should be triggered - # NVP also supports multiple external networks so there is also + # NSX also supports multiple external networks so there is also # the possibility that NAT rules should be replaced current_ext_net_id = router.gw_port_id and router.gw_port.network_id new_ext_net_id = info and info.get('network_id') @@ -294,7 +288,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, add_snat_rules = (enable_snat and (new_ext_net_id != current_ext_net_id or not router.enable_snat)) - router = super(NvpPluginV2, self)._update_router_gw_info( + router = super(NsxPluginV2, self)._update_router_gw_info( context, router_id, info, router=router) # Add/Remove SNAT rules as needed # Create an elevated context for dealing with metadata access @@ -322,7 +316,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, self.cluster, nsx_router_id, ip_addresses[0].split('/')[0], ip_addresses[0].split('/')[0], - order=NVP_EXTGW_NAT_RULES_ORDER - cidr_prefix, + order=NSX_EXTGW_NAT_RULES_ORDER - cidr_prefix, match_criteria={'source_ip_addresses': cidr}) def _update_router_port_attachment(self, cluster, context, @@ -339,13 +333,13 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, attachment, attachment_type, attachment_vlan) - LOG.debug(_("Attached %(att)s to NVP router port %(port)s"), + LOG.debug(_("Attached %(att)s to NSX router port %(port)s"), {'att': attachment, 'port': nsx_router_port_id}) except api_exc.NsxApiException: - # Must remove NVP logical port + # Must remove NSX logical port routerlib.delete_router_lport(cluster, nsx_router_id, nsx_router_port_id) - LOG.exception(_("Unable to plug attachment in NVP logical " + LOG.exception(_("Unable to plug attachment in NSX logical " "router port %(r_port_id)s, associated with " "Neutron %(q_port_id)s"), {'r_port_id': nsx_router_port_id, @@ -380,16 +374,16 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, ip.subnet_id).cidr) return cidrs - def _nvp_find_lswitch_for_port(self, context, port_data): + def _nsx_find_lswitch_for_port(self, context, port_data): network = self._get_network(context, port_data['network_id']) network_bindings = nsx_db.get_network_bindings( context.session, port_data['network_id']) - max_ports = self.nvp_opts.max_lp_per_overlay_ls + max_ports = self.nsx_opts.max_lp_per_overlay_ls allow_extra_lswitches = False for network_binding in network_bindings: if network_binding.binding_type in (NetworkTypes.FLAT, NetworkTypes.VLAN): - max_ports = self.nvp_opts.max_lp_per_bridged_ls + max_ports = self.nsx_opts.max_lp_per_bridged_ls allow_extra_lswitches = True break try: @@ -402,7 +396,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, LOG.exception(err_desc) raise nsx_exc.NsxPluginException(err_msg=err_desc) - def _nvp_create_port_helper(self, session, ls_uuid, port_data, + def _nsx_create_port_helper(self, session, ls_uuid, port_data, do_port_security=True): # Convert Neutron security groups identifiers into NSX security # profiles identifiers @@ -428,28 +422,28 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, def _handle_create_port_exception(self, context, port_id, ls_uuid, lp_uuid): with excutils.save_and_reraise_exception(): - # rollback nvp logical port only if it was successfully - # created on NVP. Should this command fail the original + # rollback nsx logical port only if it was successfully + # created on NSX. Should this command fail the original # exception will be raised. if lp_uuid: # Remove orphaned port from NSX switchlib.delete_port(self.cluster, ls_uuid, lp_uuid) - # rollback the neutron-nvp port mapping + # rollback the neutron-nsx port mapping nsx_db.delete_neutron_nsx_port_mapping(context.session, port_id) msg = (_("An exception occurred while creating the " - "quantum port %s on the NVP plaform") % port_id) + "quantum port %s on the NSX plaform") % port_id) LOG.exception(msg) - def _nvp_create_port(self, context, port_data): - """Driver for creating a logical switch port on NVP platform.""" - # FIXME(salvatore-orlando): On the NVP platform we do not really have + def _nsx_create_port(self, context, port_data): + """Driver for creating a logical switch port on NSX platform.""" + # FIXME(salvatore-orlando): On the NSX platform we do not really have # external networks. So if as user tries and create a "regular" VIF # port on an external network we are unable to actually create. # However, in order to not break unit tests, we need to still create # the DB object and return success if self._network_is_external(context, port_data['network_id']): - LOG.error(_("NVP plugin does not support regular VIF ports on " + LOG.error(_("NSX plugin does not support regular VIF ports on " "external networks. Port %s will be down."), port_data['network_id']) # No need to actually update the DB state - the default is down @@ -457,9 +451,9 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, lport = None selected_lswitch = None try: - selected_lswitch = self._nvp_find_lswitch_for_port(context, + selected_lswitch = self._nsx_find_lswitch_for_port(context, port_data) - lport = self._nvp_create_port_helper(context.session, + lport = self._nsx_create_port_helper(context.session, selected_lswitch['uuid'], port_data, True) @@ -470,7 +464,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, switchlib.plug_vif_interface( self.cluster, selected_lswitch['uuid'], lport['uuid'], "VifAttachment", port_data['id']) - LOG.debug(_("_nvp_create_port completed for port %(name)s " + LOG.debug(_("_nsx_create_port completed for port %(name)s " "on network %(network_id)s. The new port id is " "%(id)s."), port_data) except (api_exc.NsxApiException, q_exc.NeutronException): @@ -495,41 +489,41 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, except q_exc.NotFound: LOG.debug(_("NSX Port %s already gone"), lport['uuid']) - def _nvp_delete_port(self, context, port_data): - # FIXME(salvatore-orlando): On the NVP platform we do not really have + def _nsx_delete_port(self, context, port_data): + # FIXME(salvatore-orlando): On the NSX platform we do not really have # external networks. So deleting regular ports from external networks # does not make sense. However we cannot raise as this would break # unit tests. if self._network_is_external(context, port_data['network_id']): - LOG.error(_("NVP plugin does not support regular VIF ports on " + LOG.error(_("NSX plugin does not support regular VIF ports on " "external networks. Port %s will be down."), port_data['network_id']) return nsx_switch_id, nsx_port_id = nsx_utils.get_nsx_switch_and_port_id( context.session, self.cluster, port_data['id']) if not nsx_port_id: - LOG.debug(_("Port '%s' was already deleted on NVP platform"), id) + LOG.debug(_("Port '%s' was already deleted on NSX platform"), id) return # TODO(bgh): if this is a bridged network and the lswitch we just got # back will have zero ports after the delete we should garbage collect # the lswitch. try: switchlib.delete_port(self.cluster, nsx_switch_id, nsx_port_id) - LOG.debug(_("_nvp_delete_port completed for port %(port_id)s " + LOG.debug(_("_nsx_delete_port completed for port %(port_id)s " "on network %(net_id)s"), {'port_id': port_data['id'], 'net_id': port_data['network_id']}) except q_exc.NotFound: - LOG.warning(_("Port %s not found in NVP"), port_data['id']) + LOG.warning(_("Port %s not found in NSX"), port_data['id']) - def _nvp_delete_router_port(self, context, port_data): + def _nsx_delete_router_port(self, context, port_data): # Delete logical router port nsx_router_id = nsx_utils.get_nsx_router_id( context.session, self.cluster, port_data['device_id']) nsx_switch_id, nsx_port_id = nsx_utils.get_nsx_switch_and_port_id( context.session, self.cluster, port_data['id']) if not nsx_port_id: - LOG.warn(_("Neutron port %(port_id)s not found on NVP backend. " + LOG.warn(_("Neutron port %(port_id)s not found on NSX backend. " "Terminating delete operation. A dangling router port " "might have been left on router %(router_id)s"), {'port_id': port_data['id'], @@ -549,9 +543,9 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, nsx_port_id) # Delete logical switch port - self._nvp_delete_port(context, port_data) + self._nsx_delete_port(context, port_data) - def _nvp_create_router_port(self, context, port_data): + def _nsx_create_router_port(self, context, port_data): """Driver for creating a switch port to be connected to a router.""" # No router ports on external networks! if self._network_is_external(context, port_data['network_id']): @@ -562,10 +556,10 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, ls_port = None selected_lswitch = None try: - selected_lswitch = self._nvp_find_lswitch_for_port( + selected_lswitch = self._nsx_find_lswitch_for_port( context, port_data) # Do not apply port security here! - ls_port = self._nvp_create_port_helper( + ls_port = self._nsx_create_port_helper( context.session, selected_lswitch['uuid'], port_data, False) # Assuming subnet being attached is on first fixed ip @@ -581,7 +575,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, nsx_db.add_neutron_nsx_port_mapping( context.session, port_data['id'], selected_lswitch['uuid'], ls_port['uuid']) - LOG.debug(_("_nvp_create_router_port completed for port " + LOG.debug(_("_nsx_create_router_port completed for port " "%(name)s on network %(network_id)s. The new " "port id is %(id)s."), port_data) @@ -609,18 +603,18 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, % nsx_router_id)) return lr_port - @lockutils.synchronized('nicira', 'neutron-') - def _nvp_create_ext_gw_port(self, context, port_data): - """Driver for creating an external gateway port on NVP platform.""" - # TODO(salvatore-orlando): Handle NVP resource + @lockutils.synchronized('vmware', 'neutron-') + def _nsx_create_ext_gw_port(self, context, port_data): + """Driver for creating an external gateway port on NSX platform.""" + # TODO(salvatore-orlando): Handle NSX resource # rollback when something goes not quite as expected lr_port = self._find_router_gw_port(context, port_data) ip_addresses = self._build_ip_address_list(context, port_data['fixed_ips']) - # This operation actually always updates a NVP logical port + # This operation actually always updates a NSX logical port # instead of creating one. This is because the gateway port - # is created at the same time as the NVP logical router, otherwise - # the fabric status of the NVP router will be down. + # is created at the same time as the NSX logical router, otherwise + # the fabric status of the NSX router will be down. # admin_status should always be up for the gateway port # regardless of what the user specifies in neutron nsx_router_id = nsx_utils.get_nsx_router_id( @@ -645,20 +639,20 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, physical_network, ext_network[pnet.SEGMENTATION_ID]) - LOG.debug(_("_nvp_create_ext_gw_port completed on external network " + LOG.debug(_("_nsx_create_ext_gw_port completed on external network " "%(ext_net_id)s, attached to router:%(router_id)s. " - "NVP port id is %(nvp_port_id)s"), + "NSX port id is %(nsx_port_id)s"), {'ext_net_id': port_data['network_id'], 'router_id': nsx_router_id, - 'nvp_port_id': lr_port['uuid']}) + 'nsx_port_id': lr_port['uuid']}) - @lockutils.synchronized('nicira', 'neutron-') - def _nvp_delete_ext_gw_port(self, context, port_data): + @lockutils.synchronized('vmware', 'neutron-') + def _nsx_delete_ext_gw_port(self, context, port_data): lr_port = self._find_router_gw_port(context, port_data) - # TODO(salvatore-orlando): Handle NVP resource + # TODO(salvatore-orlando): Handle NSX resource # rollback when something goes not quite as expected try: - # Delete is actually never a real delete, otherwise the NVP + # Delete is actually never a real delete, otherwise the NSX # logical router will stop working router_id = port_data['device_id'] nsx_router_id = nsx_utils.get_nsx_router_id( @@ -681,34 +675,34 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, except api_exc.ResourceNotFound: raise nsx_exc.NsxPluginException( err_msg=_("Logical router resource %s not found " - "on NVP platform") % router_id) + "on NSX platform") % router_id) except api_exc.NsxApiException: raise nsx_exc.NsxPluginException( err_msg=_("Unable to update logical router" - " on NVP Platform")) - LOG.debug(_("_nvp_delete_ext_gw_port completed on external network " + "on NSX Platform")) + LOG.debug(_("_nsx_delete_ext_gw_port completed on external network " "%(ext_net_id)s, attached to NSX router:%(router_id)s"), {'ext_net_id': port_data['network_id'], 'router_id': nsx_router_id}) - def _nvp_create_l2_gw_port(self, context, port_data): + def _nsx_create_l2_gw_port(self, context, port_data): """Create a switch port, and attach it to a L2 gateway attachment.""" - # FIXME(salvatore-orlando): On the NVP platform we do not really have + # FIXME(salvatore-orlando): On the NSX platform we do not really have # external networks. So if as user tries and create a "regular" VIF # port on an external network we are unable to actually create. # However, in order to not break unit tests, we need to still create # the DB object and return success if self._network_is_external(context, port_data['network_id']): - LOG.error(_("NVP plugin does not support regular VIF ports on " + LOG.error(_("NSX plugin does not support regular VIF ports on " "external networks. Port %s will be down."), port_data['network_id']) # No need to actually update the DB state - the default is down return port_data lport = None try: - selected_lswitch = self._nvp_find_lswitch_for_port( + selected_lswitch = self._nsx_find_lswitch_for_port( context, port_data) - lport = self._nvp_create_port_helper( + lport = self._nsx_create_port_helper( context.session, selected_lswitch['uuid'], port_data, @@ -728,24 +722,24 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, switchlib.delete_port(self.cluster, selected_lswitch['uuid'], lport['uuid']) - LOG.debug(_("_nvp_create_l2_gw_port completed for port %(name)s " + LOG.debug(_("_nsx_create_l2_gw_port completed for port %(name)s " "on network %(network_id)s. The new port id " "is %(id)s."), port_data) - def _nvp_create_fip_port(self, context, port_data): - # As we do not create ports for floating IPs in NVP, + def _nsx_create_fip_port(self, context, port_data): + # As we do not create ports for floating IPs in NSX, # this is a no-op driver pass - def _nvp_delete_fip_port(self, context, port_data): - # As we do not create ports for floating IPs in NVP, + def _nsx_delete_fip_port(self, context, port_data): + # As we do not create ports for floating IPs in NSX, # this is a no-op driver pass def _extend_fault_map(self): """Extends the Neutron Fault Map. - Exceptions specific to the NVP Plugin are mapped to standard + Exceptions specific to the NSX Plugin are mapped to standard HTTP Exceptions. """ base.FAULT_MAP.update({nsx_exc.InvalidNovaZone: @@ -819,7 +813,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, if not multiprovider: multiprovider = nsx_db.is_multiprovider_network(context.session, network['id']) - # With NVP plugin 'normal' overlay networks will have no binding + # With NSX plugin 'normal' overlay networks will have no binding # TODO(salvatore-orlando) make sure users can specify a distinct # phy_uuid as 'provider network' for STT net type if bindings: @@ -869,7 +863,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, main_ls['display_name'], network['tenant_id'], tags=tags) - transport_zone_config = self._convert_to_nvp_transport_zones( + transport_zone_config = self._convert_to_nsx_transport_zones( cluster, network, bindings=network_bindings) selected_lswitch = switchlib.create_lswitch( cluster, network.id, network.tenant_id, @@ -885,17 +879,17 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, "logical network %s"), network.id) raise nsx_exc.NoMorePortsException(network=network.id) - def _convert_to_nvp_transport_zones(self, cluster, network=None, + def _convert_to_nsx_transport_zones(self, cluster, network=None, bindings=None): - nvp_transport_zones_config = [] + nsx_transport_zones_config = [] - # Convert fields from provider request to nvp format + # Convert fields from provider request to nsx format if (network and not attr.is_attr_set( network.get(mpnet.SEGMENTS))): return [{"zone_uuid": cluster.default_tz_uuid, "transport_type": cfg.CONF.NSX.default_transport_type}] - # Convert fields from db to nvp format + # Convert fields from db to nsx format if bindings: transport_entry = {} for binding in bindings: @@ -910,8 +904,8 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, else: transport_entry['transport_type'] = binding.binding_type transport_entry['zone_uuid'] = binding.phy_uuid - nvp_transport_zones_config.append(transport_entry) - return nvp_transport_zones_config + nsx_transport_zones_config.append(transport_entry) + return nsx_transport_zones_config for transport_zone in network.get(mpnet.SEGMENTS): for value in [pnet.NETWORK_TYPE, pnet.PHYSICAL_NETWORK, @@ -933,8 +927,8 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, transport_entry['zone_uuid'] = ( transport_zone[pnet.PHYSICAL_NETWORK] or cluster.default_tz_uuid) - nvp_transport_zones_config.append(transport_entry) - return nvp_transport_zones_config + nsx_transport_zones_config.append(transport_entry) + return nsx_transport_zones_config def _convert_to_transport_zones_dict(self, network): """Converts the provider request body to multiprovider. @@ -965,16 +959,16 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, # Process the provider network extension provider_type = self._convert_to_transport_zones_dict(net_data) self._validate_provider_create(context, net_data) - # Replace ATTR_NOT_SPECIFIED with None before sending to NVP + # Replace ATTR_NOT_SPECIFIED with None before sending to NSX for key, value in network['network'].iteritems(): if value is attr.ATTR_NOT_SPECIFIED: net_data[key] = None - # FIXME(arosen) implement admin_state_up = False in NVP + # FIXME(arosen) implement admin_state_up = False in NSX if net_data['admin_state_up'] is False: LOG.warning(_("Network with admin_state_up=False are not yet " "supported by this plugin. Ignoring setting for " "network %s"), net_data.get('name', '')) - transport_zone_config = self._convert_to_nvp_transport_zones( + transport_zone_config = self._convert_to_nsx_transport_zones( self.cluster, net_data) external = net_data.get(ext_net_extn.EXTERNAL) # NOTE(salv-orlando): Pre-generating uuid for Neutron @@ -990,7 +984,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, shared=net_data.get(attr.SHARED)) with context.session.begin(subtransactions=True): - new_net = super(NvpPluginV2, self).create_network(context, + new_net = super(NsxPluginV2, self).create_network(context, network) # Process port security extension self._process_network_port_security_create( @@ -1031,7 +1025,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, def delete_network(self, context, id): external = self._network_is_external(context, id) - # Before deleting ports, ensure the peer of a NVP logical + # Before deleting ports, ensure the peer of a NSX logical # port with a patch attachment is removed too port_filter = {'network_id': [id], 'device_owner': ['network:router_interface']} @@ -1044,7 +1038,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, if not external: lswitch_ids = nsx_utils.get_nsx_switch_ids( context.session, self.cluster, id) - super(NvpPluginV2, self).delete_network(context, id) + super(NsxPluginV2, self).delete_network(context, id) # clean up network owned ports for port in router_iface_ports: try: @@ -1056,7 +1050,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, nsx_switch_id, nsx_port_id) else: - LOG.warning(_("A nvp lport identifier was not found for " + LOG.warning(_("A nsx lport identifier was not found for " "neutron port '%s'. Unable to remove " "the peer router port for this switch port"), port['id']) @@ -1071,23 +1065,23 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, "port '%s' has already been deleted."), nsx_port_id) - # Do not go to NVP for external networks + # Do not go to NSX for external networks if not external: try: switchlib.delete_networks(self.cluster, id, lswitch_ids) LOG.debug(_("delete_network completed for tenant: %s"), context.tenant_id) except q_exc.NotFound: - LOG.warning(_("Did not found lswitch %s in NVP"), id) + LOG.warning(_("Did not found lswitch %s in NSX"), id) self.handle_network_dhcp_access(context, id, action='delete_network') def get_network(self, context, id, fields=None): with context.session.begin(subtransactions=True): # goto to the plugin DB and fetch the network network = self._get_network(context, id) - if (self.nvp_sync_opts.always_read_status or + if (self.nsx_sync_opts.always_read_status or fields and 'status' in fields): - # External networks are not backed by nvp lswitches + # External networks are not backed by nsx lswitches if not network.external: # Perform explicit state synchronization self._synchronizer.synchronize_network(context, network) @@ -1100,7 +1094,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, def get_networks(self, context, filters=None, fields=None): filters = filters or {} with context.session.begin(subtransactions=True): - networks = super(NvpPluginV2, self).get_networks(context, filters) + networks = super(NsxPluginV2, self).get_networks(context, filters) for net in networks: self._extend_network_dict_provider(context, net) return [self._fields(network, fields) for network in networks] @@ -1111,7 +1105,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, raise NotImplementedError(_("admin_state_up=False networks " "are not supported.")) with context.session.begin(subtransactions=True): - net = super(NvpPluginV2, self).update_network(context, id, network) + net = super(NsxPluginV2, self).update_network(context, id, network) if psec.PORTSECURITY in network['network']: self._process_network_port_security_update( context, network['network'], net) @@ -1134,7 +1128,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, port_data['status'] = constants.PORT_STATUS_DOWN with context.session.begin(subtransactions=True): # First we allocate port in neutron database - neutron_db = super(NvpPluginV2, self).create_port(context, port) + neutron_db = super(NsxPluginV2, self).create_port(context, port) neutron_port_id = neutron_db['id'] # Update fields obtained from neutron db (eg: MAC address) port["port"].update(neutron_db) @@ -1176,13 +1170,13 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, elif mac_ext.MAC_LEARNING in port_data: port_data.pop(mac_ext.MAC_LEARNING) - LOG.debug(_("create_port completed on NVP for tenant " + LOG.debug(_("create_port completed on NSX for tenant " "%(tenant_id)s: (%(id)s)"), port_data) self._process_portbindings_create_and_update(context, port['port'], port_data) - # DB Operation is complete, perform NVP operation + # DB Operation is complete, perform NSX operation try: port_data = port['port'].copy() port_create_func = self._port_drivers['create'].get( @@ -1191,7 +1185,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, port_create_func(context, port_data) except q_exc.NotFound: LOG.warning(_("Logical switch for network %s was not " - "found in NVP."), port_data['network_id']) + "found in NSX."), port_data['network_id']) # Put port in error on quantum DB with context.session.begin(subtransactions=True): port = self._get_port(context, neutron_port_id) @@ -1202,7 +1196,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, # Port must be removed from Quantum DB with excutils.save_and_reraise_exception(): LOG.error(_("Unable to create port or set port " - "attachment in NVP.")) + "attachment in NSX.")) with context.session.begin(subtransactions=True): self._delete_port(context, neutron_port_id) @@ -1219,7 +1213,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, has_addr_pairs = self._check_update_has_allowed_address_pairs(port) with context.session.begin(subtransactions=True): - ret_port = super(NvpPluginV2, self).update_port( + ret_port = super(NsxPluginV2, self).update_port( context, id, port) # Save current mac learning state to check whether it's # being updated or not @@ -1264,7 +1258,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, # that port does not have any security groups already on it. filters = {'port_id': [id]} security_groups = ( - super(NvpPluginV2, self)._get_port_security_group_bindings( + super(NsxPluginV2, self)._get_port_security_group_bindings( context, filters) ) if security_groups and not delete_security_groups: @@ -1312,7 +1306,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, ret_port.get(mac_ext.MAC_LEARNING), ret_port.get(addr_pair.ADDRESS_PAIRS)) - # Update the port status from nvp. If we fail here hide it + # Update the port status from nsx. If we fail here hide it # since the port was successfully updated but we were not # able to retrieve the status. ret_port['status'] = switchlib.get_port_status( @@ -1324,7 +1318,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, LOG.exception(_("Unable to update port id: %s."), nsx_port_id) - # If nvp_port_id is not in database or in nvp put in error state. + # If nsx_port_id is not in database or in nsx put in error state. else: ret_port['status'] = constants.PORT_STATUS_ERROR @@ -1365,7 +1359,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, # metadata_dhcp_host_route self.handle_port_metadata_access( context, neutron_db_port, is_delete=True) - super(NvpPluginV2, self).delete_port(context, id) + super(NsxPluginV2, self).delete_port(context, id) # Delete qos queue if possible if queue: self.delete_qos_queue(context, queue[0]['queue_id'], False) @@ -1374,7 +1368,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, def get_port(self, context, id, fields=None): with context.session.begin(subtransactions=True): - if (self.nvp_sync_opts.always_read_status or + if (self.nsx_sync_opts.always_read_status or fields and 'status' in fields): # Perform explicit state synchronization db_port = self._get_port(context, id) @@ -1382,10 +1376,10 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, context, db_port) return self._make_port_dict(db_port, fields) else: - return super(NvpPluginV2, self).get_port(context, id, fields) + return super(NsxPluginV2, self).get_port(context, id, fields) def get_router(self, context, id, fields=None): - if (self.nvp_sync_opts.always_read_status or + if (self.nsx_sync_opts.always_read_status or fields and 'status' in fields): db_router = self._get_router(context, id) # Perform explicit state synchronization @@ -1393,7 +1387,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, context, db_router) return self._make_router_dict(db_router, fields) else: - return super(NvpPluginV2, self).get_router(context, id, fields) + return super(NsxPluginV2, self).get_router(context, id, fields) def _create_lrouter(self, context, router, nexthop): tenant_id = self._get_tenant_id_for_create(context, router) @@ -1404,13 +1398,13 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, tenant_id, router['name'], nexthop, distributed=attr.is_attr_set(distributed) and distributed) except nsx_exc.InvalidVersion: - msg = _("Cannot create a distributed router with the NVP " + msg = _("Cannot create a distributed router with the NSX " "platform currently in execution. Please, try " "without specifying the 'distributed' attribute.") LOG.exception(msg) raise q_exc.BadRequest(resource='router', msg=msg) except api_exc.NsxApiException: - err_msg = _("Unable to create logical router on NVP Platform") + err_msg = _("Unable to create logical router on NSX Platform") LOG.exception(err_msg) raise nsx_exc.NsxPluginException(err_msg=err_msg) @@ -1427,7 +1421,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, {'router_uuid': lrouter['uuid'], 'def_l3_gw_svc': self.cluster.default_l3_gw_service_uuid}) - # Try and remove logical router from NVP + # Try and remove logical router from NSX routerlib.delete_lrouter(self.cluster, lrouter['uuid']) # Return user a 500 with an apter message raise nsx_exc.NsxPluginException( @@ -1438,14 +1432,14 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, def create_router(self, context, router): # NOTE(salvatore-orlando): We completely override this method in - # order to be able to use the NVP ID as Neutron ID + # order to be able to use the NSX ID as Neutron ID # TODO(salvatore-orlando): Propose upstream patch for allowing # 3rd parties to specify IDs as we do with l2 plugin r = router['router'] has_gw_info = False tenant_id = self._get_tenant_id_for_create(context, r) - # default value to set - nvp wants it (even if we don't have it) - nexthop = NVP_DEFAULT_NEXTHOP + # default value to set - nsx wants it (even if we don't have it) + nexthop = NSX_DEFAULT_NEXTHOP # if external gateway info are set, then configure nexthop to # default external gateway if 'external_gateway_info' in r and r.get('external_gateway_info'): @@ -1454,7 +1448,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, del r['external_gateway_info'] # The following DB read will be performed again when updating # gateway info. This is not great, but still better than - # creating NVP router here and updating it later + # creating NSX router here and updating it later network_id = (gw_info.get('network_id', None) if gw_info else None) if network_id: @@ -1472,7 +1466,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, neutron_router_id = str(uuid.uuid4()) r['id'] = neutron_router_id lrouter = self._create_lrouter(context, r, nexthop) - # Update 'distributed' with value returned from NVP + # Update 'distributed' with value returned from NSX # This will be useful for setting the value if the API request # did not specify any value for the 'distributed' attribute # Platforms older than 3.x do not support the attribute @@ -1498,7 +1492,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, if has_gw_info: # NOTE(salv-orlando): This operation has been moved out of the - # database transaction since it performs several NVP queries, + # database transaction since it performs several NSX queries, # ithis ncreasing the risk of deadlocks between eventlet and # sqlalchemy operations. # Set external gateway and remove router in case of failure @@ -1539,7 +1533,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, gw_info = r['external_gateway_info'] # The following DB read will be performed again when updating # gateway info. This is not great, but still better than - # creating NVP router here and updating it later + # creating NSX router here and updating it later network_id = (gw_info.get('network_id', None) if gw_info else None) if network_id: @@ -1562,7 +1556,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, context, router_id, r.get('name'), nexthop, routes=r.get('routes')) # NOTE(salv-orlando): The exception handling below is not correct, but - # unfortunately nvplib raises a neutron notfound exception when an + # unfortunately nsxlib raises a neutron notfound exception when an # object is not found in the underlying backend except q_exc.NotFound: # Put the router in ERROR status @@ -1571,24 +1565,24 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, router_db['status'] = constants.NET_STATUS_ERROR raise nsx_exc.NsxPluginException( err_msg=_("Logical router %s not found " - "on NVP Platform") % router_id) + "on NSX Platform") % router_id) except api_exc.NsxApiException: raise nsx_exc.NsxPluginException( - err_msg=_("Unable to update logical router on NVP Platform")) + err_msg=_("Unable to update logical router on NSX Platform")) except nsx_exc.InvalidVersion: - msg = _("Request cannot contain 'routes' with the NVP " + msg = _("Request cannot contain 'routes' with the NSX " "platform currently in execution. Please, try " "without specifying the static routes.") LOG.exception(msg) raise q_exc.BadRequest(resource='router', msg=msg) try: - return super(NvpPluginV2, self).update_router(context, + return super(NsxPluginV2, self).update_router(context, router_id, router) except (extraroute.InvalidRoutes, extraroute.RouterInterfaceInUseByRoute, extraroute.RoutesExhausted): with excutils.save_and_reraise_exception(): - # revert changes made to NVP + # revert changes made to NSX self._update_lrouter_routes( context, router_id, previous_routes) @@ -1608,7 +1602,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, # NOTE(salv-orlando): These checks will be repeated anyway when # calling the superclass. This is wasteful, but is the simplest # way of ensuring a consistent removal of the router both in - # the neutron Database and in the NVP backend. + # the neutron Database and in the NSX backend. # TODO(salv-orlando): split pre-delete checks and actual # deletion in superclass. @@ -1634,11 +1628,11 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, except q_exc.NotFound: # This is not a fatal error, but needs to be logged LOG.warning(_("Logical router '%s' not found " - "on NVP Platform"), router_id) + "on NSX Platform"), router_id) except api_exc.NsxApiException: raise nsx_exc.NsxPluginException( err_msg=(_("Unable to delete logical router '%s' " - "on NVP Platform") % nsx_router_id)) + "on NSX Platform") % nsx_router_id)) # Remove the NSX mapping first in order to ensure a mapping to # a non-existent NSX router is not left in the DB in case of # failure while removing the router from the neutron DB @@ -1652,7 +1646,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, "%(d_exc)s"), {'router_id': router_id, 'd_exc': str(d_exc)}) # Perform the actual delete on the Neutron DB - super(NvpPluginV2, self).delete_router(context, router_id) + super(NsxPluginV2, self).delete_router(context, router_id) def _add_subnet_snat_rule(self, context, router, subnet): gw_port = router.gw_port @@ -1666,7 +1660,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, context.session, self.cluster, router['id']) routerlib.create_lrouter_snat_rule( self.cluster, nsx_router_id, snat_ip, snat_ip, - order=NVP_EXTGW_NAT_RULES_ORDER - cidr_prefix, + order=NSX_EXTGW_NAT_RULES_ORDER - cidr_prefix, match_criteria={'source_ip_addresses': subnet['cidr']}) def _delete_subnet_snat_rule(self, context, router, subnet): @@ -1681,9 +1675,9 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, def add_router_interface(self, context, router_id, interface_info): # When adding interface by port_id we need to create the - # peer port on the nvp logical router in this routine + # peer port on the nsx logical router in this routine port_id = interface_info.get('port_id') - router_iface_info = super(NvpPluginV2, self).add_router_interface( + router_iface_info = super(NsxPluginV2, self).add_router_interface( context, router_id, interface_info) # router_iface_info will always have a subnet_id attribute subnet_id = router_iface_info['subnet_id'] @@ -1707,10 +1701,10 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, self._add_subnet_snat_rule(context, router, subnet) routerlib.create_lrouter_nosnat_rule( self.cluster, nsx_router_id, - order=NVP_NOSNAT_RULES_ORDER, + order=NSX_NOSNAT_RULES_ORDER, match_criteria={'destination_ip_addresses': subnet['cidr']}) - # Ensure the NVP logical router has a connection to a 'metadata access' + # Ensure the NSX logical router has a connection to a 'metadata access' # network (with a proxy listening on its DHCP port), by creating it # if needed. self.handle_router_metadata_access( @@ -1752,7 +1746,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, subnet_id=subnet_id) # Finally remove the data from the Neutron DB # This will also destroy the port on the logical switch - info = super(NvpPluginV2, self).remove_router_interface( + info = super(NsxPluginV2, self).remove_router_interface( context, router_id, interface_info) # Ensure the connection to the 'metadata access network' @@ -1779,11 +1773,11 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, except api_exc.ResourceNotFound: raise nsx_exc.NsxPluginException( err_msg=(_("Logical router resource %s not found " - "on NVP platform") % router_id)) + "on NSX platform") % router_id)) except api_exc.NsxApiException: raise nsx_exc.NsxPluginException( err_msg=(_("Unable to update logical router" - "on NVP Platform"))) + "on NSX Platform"))) return info def _retrieve_and_delete_nat_rules(self, context, floating_ip_address, @@ -1814,13 +1808,13 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, except api_exc.NsxApiException: LOG.exception(_("An error occurred while removing NAT rules " - "on the NVP platform for floating ip:%s"), + "on the NSX platform for floating ip:%s"), floating_ip_address) raise except nsx_exc.NatRuleMismatch: # Do not surface to the user LOG.warning(_("An incorrect number of matching NAT rules " - "was found on the NVP platform")) + "was found on the NSX platform")) def _remove_floatingip_address(self, context, fip_db): # Remove floating IP address from logical router port @@ -1886,7 +1880,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, context, floating_ip, internal_ip, nsx_router_id) # Fetch logical port of router's external gateway # Fetch logical port of router's external gateway - nvp_floating_ips = self._build_ip_address_list( + nsx_floating_ips = self._build_ip_address_list( context.elevated(), external_port['fixed_ips']) floating_ip = floatingip_db['floating_ip_address'] # Retrieve and delete existing NAT rules, if any @@ -1905,7 +1899,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, context, floating_ip, old_internal_ip, nsx_old_router_id) routerlib.update_lrouter_port_ips( self.cluster, nsx_old_router_id, nsx_gw_port_id, - ips_to_add=[], ips_to_remove=nvp_floating_ips) + ips_to_add=[], ips_to_remove=nsx_floating_ips) if router_id: nsx_gw_port_id = routerlib.find_router_gw_port( @@ -1916,7 +1910,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, # Setup DNAT rules for the floating IP routerlib.create_lrouter_dnat_rule( self.cluster, nsx_router_id, internal_ip, - order=NVP_FLOATINGIP_NAT_RULES_ORDER, + order=NSX_FLOATINGIP_NAT_RULES_ORDER, match_criteria={'destination_ip_addresses': floating_ip}) # Setup SNAT rules for the floating IP @@ -1934,7 +1928,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, subnet_ids=subnet_ids)[0] routerlib.create_lrouter_snat_rule( self.cluster, nsx_router_id, floating_ip, floating_ip, - order=NVP_NOSNAT_RULES_ORDER - 1, + order=NSX_NOSNAT_RULES_ORDER - 1, match_criteria={'source_ip_addresses': internal_subnet_cidr, 'destination_ip_addresses': @@ -1943,16 +1937,16 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, # using floating is the floating ip itself. routerlib.create_lrouter_snat_rule( self.cluster, nsx_router_id, floating_ip, floating_ip, - order=NVP_FLOATINGIP_NAT_RULES_ORDER, + order=NSX_FLOATINGIP_NAT_RULES_ORDER, match_criteria={'source_ip_addresses': internal_ip}) # Add Floating IP address to router_port routerlib.update_lrouter_port_ips( self.cluster, nsx_router_id, nsx_gw_port_id, - ips_to_add=nvp_floating_ips, ips_to_remove=[]) + ips_to_add=nsx_floating_ips, ips_to_remove=[]) except api_exc.NsxApiException: LOG.exception(_("An error occurred while creating NAT " - "rules on the NVP platform for floating " + "rules on the NSX platform for floating " "ip:%(floating_ip)s mapped to " "internal ip:%(internal_ip)s"), {'floating_ip': floating_ip, @@ -1977,7 +1971,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, min_num_rules_expected=1) # Remove floating IP address from logical router port self._remove_floatingip_address(context, fip_db) - return super(NvpPluginV2, self).delete_floatingip(context, id) + return super(NsxPluginV2, self).delete_floatingip(context, id) def disassociate_floatingips(self, context, port_id): try: @@ -1995,19 +1989,19 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, LOG.debug(_("The port '%s' is not associated with floating IPs"), port_id) except q_exc.NotFound: - LOG.warning(_("Nat rules not found in nvp for port: %s"), id) + LOG.warning(_("Nat rules not found in nsx for port: %s"), id) - super(NvpPluginV2, self).disassociate_floatingips(context, port_id) + super(NsxPluginV2, self).disassociate_floatingips(context, port_id) def create_network_gateway(self, context, network_gateway): """Create a layer-2 network gateway. - Create the gateway service on NVP platform and corresponding data + Create the gateway service on NSX platform and corresponding data structures in Neutron datase. """ # Ensure the default gateway in the config file is in sync with the db self._ensure_default_network_gateway() - # Need to re-do authZ checks here in order to avoid creation on NVP + # Need to re-do authZ checks here in order to avoid creation on NSX gw_data = network_gateway[networkgw.RESOURCE_NAME.replace('-', '_')] tenant_id = self._get_tenant_id_for_create(context, gw_data) devices = gw_data['devices'] @@ -2026,39 +2020,39 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, LOG.exception(err_msg) raise nsx_exc.NsxPluginException(err_msg=err_msg) gw_data['id'] = nsx_uuid - return super(NvpPluginV2, self).create_network_gateway(context, + return super(NsxPluginV2, self).create_network_gateway(context, network_gateway) def delete_network_gateway(self, context, gateway_id): """Remove a layer-2 network gateway. - Remove the gateway service from NVP platform and corresponding data + Remove the gateway service from NSX platform and corresponding data structures in Neutron datase. """ # Ensure the default gateway in the config file is in sync with the db self._ensure_default_network_gateway() with context.session.begin(subtransactions=True): try: - super(NvpPluginV2, self).delete_network_gateway( + super(NsxPluginV2, self).delete_network_gateway( context, gateway_id) l2gwlib.delete_l2_gw_service(self.cluster, gateway_id) except api_exc.ResourceNotFound: # Do not cause a 500 to be returned to the user if - # the corresponding NVP resource does not exist + # the corresponding NSX resource does not exist LOG.exception(_("Unable to remove gateway service from " - "NVP plaform - the resource was not found")) + "NSX plaform - the resource was not found")) def get_network_gateway(self, context, id, fields=None): # Ensure the default gateway in the config file is in sync with the db self._ensure_default_network_gateway() - return super(NvpPluginV2, self).get_network_gateway(context, + return super(NsxPluginV2, self).get_network_gateway(context, id, fields) def get_network_gateways(self, context, filters=None, fields=None): # Ensure the default gateway in the config file is in sync with the db self._ensure_default_network_gateway() # Ensure the tenant_id attribute is populated on returned gateways - net_gateways = super(NvpPluginV2, + net_gateways = super(NsxPluginV2, self).get_network_gateways(context, filters, fields) @@ -2075,9 +2069,9 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, except api_exc.NsxApiException: # Consider backend failures as non-fatal, but still warn # because this might indicate something dodgy is going on - LOG.warn(_("Unable to update name on NVP backend " + LOG.warn(_("Unable to update name on NSX backend " "for network gateway: %s"), id) - return super(NvpPluginV2, self).update_network_gateway( + return super(NsxPluginV2, self).update_network_gateway( context, id, network_gateway) def connect_network(self, context, network_gateway_id, @@ -2085,7 +2079,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, # Ensure the default gateway in the config file is in sync with the db self._ensure_default_network_gateway() try: - return super(NvpPluginV2, self).connect_network( + return super(NsxPluginV2, self).connect_network( context, network_gateway_id, network_mapping_info) except api_exc.Conflict: raise nsx_exc.L2GatewayAlreadyInUse(gateway=network_gateway_id) @@ -2094,7 +2088,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, network_mapping_info): # Ensure the default gateway in the config file is in sync with the db self._ensure_default_network_gateway() - return super(NvpPluginV2, self).disconnect_network( + return super(NsxPluginV2, self).disconnect_network( context, network_gateway_id, network_mapping_info) def create_security_group(self, context, security_group, default_sg=False): @@ -2114,7 +2108,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, self.cluster, neutron_id, tenant_id, s) with context.session.begin(subtransactions=True): s['id'] = neutron_id - sec_group = super(NvpPluginV2, self).create_security_group( + sec_group = super(NsxPluginV2, self).create_security_group( context, security_group, default_sg) context.session.flush() # Add mapping between neutron and nsx identifiers @@ -2128,7 +2122,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, :param security_group_id: security group rule to remove. """ with context.session.begin(subtransactions=True): - security_group = super(NvpPluginV2, self).get_security_group( + security_group = super(NsxPluginV2, self).get_security_group( context, security_group_id) if not security_group: raise ext_sg.SecurityGroupNotFound(id=security_group_id) @@ -2137,7 +2131,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, raise ext_sg.SecurityGroupCannotRemoveDefault() filters = {'security_group_id': [security_group['id']]} - if super(NvpPluginV2, self)._get_port_security_group_bindings( + if super(NsxPluginV2, self)._get_port_security_group_bindings( context, filters): raise ext_sg.SecurityGroupInUse(id=security_group['id']) nsx_sec_profile_id = nsx_utils.get_nsx_security_group_id( @@ -2166,7 +2160,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, raise nsx_exc.NsxPluginException( _("Unable to remove security group %s from backend"), security_group['id']) - return super(NvpPluginV2, self).delete_security_group( + return super(NsxPluginV2, self).delete_security_group( context, security_group_id) def _validate_security_group_rules(self, context, rules): @@ -2181,7 +2175,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, "protocol: %s") % r['protocol']) raise q_exc.BadRequest(resource='security_group_rule', msg=msg) - return super(NvpPluginV2, self)._validate_security_group_rules(context, + return super(NsxPluginV2, self)._validate_security_group_rules(context, rules) def create_security_group_rule(self, context, security_group_rule): @@ -2198,13 +2192,13 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, tenant_id = self._get_tenant_id_for_create(context, s) # TODO(arosen) is there anyway we could avoid having the update of - # the security group rules in nvp outside of this transaction? + # the security group rules in nsx outside of this transaction? with context.session.begin(subtransactions=True): self._ensure_default_security_group(context, tenant_id) security_group_id = self._validate_security_group_rules( context, security_group_rule) # Check to make sure security group exists - security_group = super(NvpPluginV2, self).get_security_group( + security_group = super(NsxPluginV2, self).get_security_group( context, security_group_id) if not security_group: @@ -2223,7 +2217,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, nsx_sec_profile_id, combined_rules) return super( - NvpPluginV2, self).create_security_group_rule_bulk_native( + NsxPluginV2, self).create_security_group_rule_bulk_native( context, security_group_rule) def delete_security_group_rule(self, context, sgrid): @@ -2233,7 +2227,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, with context.session.begin(subtransactions=True): # determine security profile id security_group_rule = ( - super(NvpPluginV2, self).get_security_group_rule( + super(NsxPluginV2, self).get_security_group_rule( context, sgrid)) if not security_group_rule: raise ext_sg.SecurityGroupRuleNotFound(id=sgrid) @@ -2250,14 +2244,14 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, context.session, self.cluster, sgid) secgrouplib.update_security_group_rules( self.cluster, nsx_sec_profile_id, current_rules_nsx) - return super(NvpPluginV2, self).delete_security_group_rule(context, + return super(NsxPluginV2, self).delete_security_group_rule(context, sgrid) def create_qos_queue(self, context, qos_queue, check_policy=True): q = qos_queue.get('qos_queue') self._validate_qos_queue(context, q) q['id'] = queuelib.create_lqueue(self.cluster, q) - return super(NvpPluginV2, self).create_qos_queue(context, qos_queue) + return super(NsxPluginV2, self).create_qos_queue(context, qos_queue) def delete_qos_queue(self, context, queue_id, raise_in_use=True): filters = {'queue_id': [queue_id]} @@ -2268,4 +2262,8 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin, else: return queuelib.delete_lqueue(self.cluster, queue_id) - return super(NvpPluginV2, self).delete_qos_queue(context, queue_id) + return super(NsxPluginV2, self).delete_qos_queue(context, queue_id) + + +# for backward compatibility +NvpPluginV2 = NsxPluginV2 diff --git a/neutron/plugins/nicira/NeutronServicePlugin.py b/neutron/plugins/vmware/plugins/service.py similarity index 92% rename from neutron/plugins/nicira/NeutronServicePlugin.py rename to neutron/plugins/vmware/plugins/service.py index af54a24420..00b92a707e 100644 --- a/neutron/plugins/nicira/NeutronServicePlugin.py +++ b/neutron/plugins/vmware/plugins/service.py @@ -30,24 +30,23 @@ from neutron.extensions import routedserviceinsertion as rsi from neutron.openstack.common import excutils from neutron.openstack.common import log as logging from neutron.plugins.common import constants as service_constants -from neutron.plugins.nicira.api_client import exception as api_exc -from neutron.plugins.nicira.common import config # noqa -from neutron.plugins.nicira.common import exceptions as nsx_exc -from neutron.plugins.nicira.common import utils -from neutron.plugins.nicira.dbexts import servicerouter as sr_db -from neutron.plugins.nicira.dbexts import vcns_db -from neutron.plugins.nicira.dbexts import vcns_models -from neutron.plugins.nicira.extensions import servicerouter as sr -from neutron.plugins.nicira import NeutronPlugin -from neutron.plugins.nicira.nsxlib import router as routerlib -from neutron.plugins.nicira.nsxlib import switch as switchlib -from neutron.plugins.nicira.vshield.common import ( - constants as vcns_const) -from neutron.plugins.nicira.vshield.common.constants import RouterStatus -from neutron.plugins.nicira.vshield.common import exceptions -from neutron.plugins.nicira.vshield.tasks.constants import TaskState -from neutron.plugins.nicira.vshield.tasks.constants import TaskStatus -from neutron.plugins.nicira.vshield import vcns_driver +from neutron.plugins.vmware.api_client import exception as api_exc +from neutron.plugins.vmware.common import config # noqa +from neutron.plugins.vmware.common import exceptions as nsx_exc +from neutron.plugins.vmware.common import utils +from neutron.plugins.vmware.dbexts import servicerouter as sr_db +from neutron.plugins.vmware.dbexts import vcns_db +from neutron.plugins.vmware.dbexts import vcns_models +from neutron.plugins.vmware.extensions import servicerouter as sr +from neutron.plugins.vmware.nsxlib import router as routerlib +from neutron.plugins.vmware.nsxlib import switch as switchlib +from neutron.plugins.vmware.plugins import base +from neutron.plugins.vmware.vshield.common import constants as vcns_const +from neutron.plugins.vmware.vshield.common.constants import RouterStatus +from neutron.plugins.vmware.vshield.common import exceptions +from neutron.plugins.vmware.vshield.tasks.constants import TaskState +from neutron.plugins.vmware.vshield.tasks.constants import TaskStatus +from neutron.plugins.vmware.vshield import vcns_driver from sqlalchemy.orm import exc as sa_exc LOG = logging.getLogger(__name__) @@ -76,15 +75,15 @@ ROUTER_STATUS_LEVEL = { } -class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, - NeutronPlugin.NvpPluginV2, +class NsxAdvancedPlugin(sr_db.ServiceRouter_mixin, + base.NsxPluginV2, rsi_db.RoutedServiceInsertionDbMixin, firewall_db.Firewall_db_mixin, loadbalancer_db.LoadBalancerPluginDb ): supported_extension_aliases = ( - NeutronPlugin.NvpPluginV2.supported_extension_aliases + [ + base.NsxPluginV2.supported_extension_aliases + [ "service-router", "routed-service-insertion", "fwaas", @@ -92,7 +91,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, ]) def __init__(self): - super(NvpAdvancedPlugin, self).__init__() + super(NsxAdvancedPlugin, self).__init__() self._super_create_ext_gw_port = ( self._port_drivers['create'][l3_db.DEVICE_OWNER_ROUTER_GW]) @@ -116,7 +115,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, self._set_create_lswitch_proxy() def _set_create_lswitch_proxy(self): - NeutronPlugin.switchlib.create_lswitch = self._proxy_create_lswitch + base.switchlib.create_lswitch = self._proxy_create_lswitch def _proxy_create_lswitch(self, *args, **kwargs): name, tz_config, tags = ( @@ -309,7 +308,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, def _update_router_gw_info(self, context, router_id, info): if not self._is_advanced_service_router(context, router_id): - super(NvpAdvancedPlugin, self)._update_router_gw_info( + super(NsxAdvancedPlugin, self)._update_router_gw_info( context, router_id, info) return @@ -320,7 +319,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, orgaddr, orgmask, orgnexthop = self._get_external_attachment_info( context, router) - super(NeutronPlugin.NvpPluginV2, self)._update_router_gw_info( + super(base.NsxPluginV2, self)._update_router_gw_info( context, router_id, info, router=router) new_ext_net_id = router.gw_port_id and router.gw_port.network_id @@ -361,20 +360,20 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, def _add_subnet_snat_rule(self, context, router, subnet): # NOP for service router if not self._is_advanced_service_router(router=router): - super(NvpAdvancedPlugin, self)._add_subnet_snat_rule( + super(NsxAdvancedPlugin, self)._add_subnet_snat_rule( context, router, subnet) def _delete_subnet_snat_rule(self, context, router, subnet): # NOP for service router if not self._is_advanced_service_router(router=router): - super(NvpAdvancedPlugin, self)._delete_subnet_snat_rule( + super(NsxAdvancedPlugin, self)._delete_subnet_snat_rule( context, router, subnet) def _remove_floatingip_address(self, context, fip_db): # NOP for service router router_id = fip_db.router_id if not self._is_advanced_service_router(context, router_id): - super(NvpAdvancedPlugin, self)._remove_floatingip_address( + super(NsxAdvancedPlugin, self)._remove_floatingip_address( context, fip_db) def _create_advanced_service_router(self, context, neutron_router_id, @@ -433,7 +432,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, neutron_port_id, pname, admin_status_enabled, [vcns_const.INTEGRATION_LR_IPADDRESS]) except api_exc.NsxApiException: - msg = (_("Unable to create port on NVP logical router %s") % name) + msg = (_("Unable to create port on NSX logical router %s") % name) LOG.exception(msg) switchlib.delete_port( self.cluster, lswitch['uuid'], ls_port['uuid']) @@ -451,7 +450,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, raise e def _create_lrouter(self, context, router, nexthop): - lrouter = super(NvpAdvancedPlugin, self)._create_lrouter( + lrouter = super(NsxAdvancedPlugin, self)._create_lrouter( context, router, vcns_const.INTEGRATION_EDGE_IPADDRESS) router_type = self._find_router_type(router) @@ -498,7 +497,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, def _delete_lrouter(self, context, router_id, nsx_router_id): binding = vcns_db.get_vcns_router_binding(context.session, router_id) if not binding: - super(NvpAdvancedPlugin, self)._delete_lrouter( + super(NsxAdvancedPlugin, self)._delete_lrouter( context, router_id, nsx_router_id) else: vcns_db.update_vcns_router_binding( @@ -512,7 +511,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, try: self.vcns_driver.delete_lswitch(lswitch_id) except exceptions.ResourceNotFound: - LOG.warning(_("Did not found lswitch %s in NVP"), lswitch_id) + LOG.warning(_("Did not found lswitch %s in NSX"), lswitch_id) # delete edge jobdata = { @@ -528,10 +527,10 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, def _update_lrouter(self, context, router_id, name, nexthop, routes=None): if not self._is_advanced_service_router(context, router_id): - return super(NvpAdvancedPlugin, self)._update_lrouter( + return super(NsxAdvancedPlugin, self)._update_lrouter( context, router_id, name, nexthop, routes=routes) - previous_routes = super(NvpAdvancedPlugin, self)._update_lrouter( + previous_routes = super(NsxAdvancedPlugin, self)._update_lrouter( context, router_id, name, vcns_const.INTEGRATION_EDGE_IPADDRESS, routes=routes) @@ -551,7 +550,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, min_num_rules_expected=0): # NOP for advanced service router if not self._is_advanced_service_router(context, router_id): - super(NvpAdvancedPlugin, self)._retrieve_and_delete_nat_rules( + super(NsxAdvancedPlugin, self)._retrieve_and_delete_nat_rules( context, floating_ip_address, internal_ip, router_id, min_num_rules_expected=min_num_rules_expected) @@ -560,24 +559,24 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, router_id = self._get_fip_assoc_data(context, fip, floatingip_db)[2] if (router_id and not self._is_advanced_service_router(context, router_id)): - super(NvpAdvancedPlugin, self)._update_fip_assoc( + super(NsxAdvancedPlugin, self)._update_fip_assoc( context, fip, floatingip_db, external_port) else: - super(NeutronPlugin.NvpPluginV2, self)._update_fip_assoc( + super(base.NsxPluginV2, self)._update_fip_assoc( context, fip, floatingip_db, external_port) - def _get_nvp_lrouter_status(self, id): + def _get_nsx_lrouter_status(self, id): try: lrouter = routerlib.get_lrouter(self.cluster, id) lr_status = lrouter["_relations"]["LogicalRouterStatus"] if lr_status["fabric_status"]: - nvp_status = RouterStatus.ROUTER_STATUS_ACTIVE + nsx_status = RouterStatus.ROUTER_STATUS_ACTIVE else: - nvp_status = RouterStatus.ROUTER_STATUS_DOWN + nsx_status = RouterStatus.ROUTER_STATUS_DOWN except q_exc.NotFound: - nvp_status = RouterStatus.ROUTER_STATUS_ERROR + nsx_status = RouterStatus.ROUTER_STATUS_ERROR - return nvp_status + return nsx_status def _get_vse_status(self, context, id): binding = vcns_db.get_vcns_router_binding(context.session, id) @@ -590,25 +589,25 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, else: return edge_db_status_level - def _get_all_nvp_lrouters_statuses(self, tenant_id, fields): - # get nvp lrouters status - nvp_lrouters = routerlib.get_lrouters(self.cluster, + def _get_all_nsx_lrouters_statuses(self, tenant_id, fields): + # get nsx lrouters status + nsx_lrouters = routerlib.get_lrouters(self.cluster, tenant_id, fields) - nvp_status = {} - for nvp_lrouter in nvp_lrouters: - if (nvp_lrouter["_relations"]["LogicalRouterStatus"] + nsx_status = {} + for nsx_lrouter in nsx_lrouters: + if (nsx_lrouter["_relations"]["LogicalRouterStatus"] ["fabric_status"]): - nvp_status[nvp_lrouter['uuid']] = ( + nsx_status[nsx_lrouter['uuid']] = ( RouterStatus.ROUTER_STATUS_ACTIVE ) else: - nvp_status[nvp_lrouter['uuid']] = ( + nsx_status[nsx_lrouter['uuid']] = ( RouterStatus.ROUTER_STATUS_DOWN ) - return nvp_status + return nsx_status def _get_all_vse_statuses(self, context): bindings = self._model_query( @@ -645,10 +644,10 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, def get_router(self, context, id, fields=None): if fields and 'status' not in fields: - return super(NvpAdvancedPlugin, self).get_router( + return super(NsxAdvancedPlugin, self).get_router( context, id, fields=fields) - router = super(NvpAdvancedPlugin, self).get_router(context, id) + router = super(NsxAdvancedPlugin, self).get_router(context, id) router_type = self._find_router_type(router) if router_type == ROUTER_TYPE_ADVANCED: @@ -659,7 +658,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, return self._fields(router, fields) def get_routers(self, context, filters=None, fields=None, **kwargs): - routers = super(NvpAdvancedPlugin, self).get_routers( + routers = super(NsxAdvancedPlugin, self).get_routers( context, filters=filters, **kwargs) if fields and 'status' not in fields: @@ -687,7 +686,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, return [self._fields(router, fields) for router in routers] def add_router_interface(self, context, router_id, interface_info): - info = super(NvpAdvancedPlugin, self).add_router_interface( + info = super(NsxAdvancedPlugin, self).add_router_interface( context, router_id, interface_info) if self._is_advanced_service_router(context, router_id): router = self._get_router(context, router_id) @@ -699,7 +698,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, return info def remove_router_interface(self, context, router_id, interface_info): - info = super(NvpAdvancedPlugin, self).remove_router_interface( + info = super(NsxAdvancedPlugin, self).remove_router_interface( context, router_id, interface_info) if self._is_advanced_service_router(context, router_id): router = self._get_router(context, router_id) @@ -711,7 +710,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, return info def create_floatingip(self, context, floatingip): - fip = super(NvpAdvancedPlugin, self).create_floatingip( + fip = super(NsxAdvancedPlugin, self).create_floatingip( context, floatingip) router_id = fip.get('router_id') if router_id and self._is_advanced_service_router(context, router_id): @@ -723,7 +722,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, return fip def update_floatingip(self, context, id, floatingip): - fip = super(NvpAdvancedPlugin, self).update_floatingip( + fip = super(NsxAdvancedPlugin, self).update_floatingip( context, id, floatingip) router_id = fip.get('router_id') if router_id and self._is_advanced_service_router(context, router_id): @@ -739,7 +738,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, router_id = None if fip_db.fixed_port_id: router_id = fip_db.router_id - super(NvpAdvancedPlugin, self).delete_floatingip(context, id) + super(NsxAdvancedPlugin, self).delete_floatingip(context, id) if router_id and self._is_advanced_service_router(context, router_id): router = self._get_router(context, router_id) # TODO(fank): do rollback on error, or have a dedicated thread @@ -754,7 +753,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, router_id = fip_db.router_id except sa_exc.NoResultFound: router_id = None - super(NvpAdvancedPlugin, self).disassociate_floatingips(context, + super(NsxAdvancedPlugin, self).disassociate_floatingips(context, port_id) if router_id and self._is_advanced_service_router(context, router_id): router = self._get_router(context, router_id) @@ -885,7 +884,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, raise nsx_exc.ServiceOverQuota( overs='firewall', err_msg=msg) - fw = super(NvpAdvancedPlugin, self).create_firewall(context, firewall) + fw = super(NsxAdvancedPlugin, self).create_firewall(context, firewall) #Add router service insertion binding with firewall object res = { 'id': fw['id'], @@ -910,7 +909,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, context, self.get_firewall(context, id)['firewall_policy_id']) firewall['firewall']['status'] = service_constants.PENDING_UPDATE - fw = super(NvpAdvancedPlugin, self).update_firewall( + fw = super(NsxAdvancedPlugin, self).update_firewall( context, id, firewall) fw[rsi.ROUTER_ID] = service_router_binding['router_id'] rule_list_new = self._make_firewall_rule_list_by_policy_id( @@ -934,7 +933,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, service_router_binding = self._get_resource_router_id_binding( context, firewall_db.Firewall, resource_id=id) self._vcns_delete_firewall(context, service_router_binding.router_id) - super(NvpAdvancedPlugin, self).delete_firewall(context, id) + super(NsxAdvancedPlugin, self).delete_firewall(context, id) self._delete_resource_router_id_binding( context, id, firewall_db.Firewall) @@ -967,7 +966,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, LOG.debug(_("update_firewall_rule() called")) self._ensure_update_or_delete_firewall_rule(context, id) fwr_pre = self.get_firewall_rule(context, id) - fwr = super(NvpAdvancedPlugin, self).update_firewall_rule( + fwr = super(NsxAdvancedPlugin, self).update_firewall_rule( context, id, firewall_rule) if fwr_pre == fwr: return fwr @@ -994,7 +993,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, self._ensure_firewall_policy_update_allowed(context, id) firewall_rules_pre = self._make_firewall_rule_list_by_policy_id( context, id) - fwp = super(NvpAdvancedPlugin, self).update_firewall_policy( + fwp = super(NsxAdvancedPlugin, self).update_firewall_policy( context, id, firewall_policy) firewall_rules = self._make_firewall_rule_list_by_policy_id( context, id) @@ -1019,9 +1018,9 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, def insert_rule(self, context, id, rule_info): LOG.debug(_("insert_rule() called")) self._ensure_firewall_policy_update_allowed(context, id) - fwp = super(NvpAdvancedPlugin, self).insert_rule( + fwp = super(NsxAdvancedPlugin, self).insert_rule( context, id, rule_info) - fwr = super(NvpAdvancedPlugin, self).get_firewall_rule( + fwr = super(NsxAdvancedPlugin, self).get_firewall_rule( context, rule_info['firewall_rule_id']) # check if this policy is associated with firewall @@ -1048,9 +1047,9 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, def remove_rule(self, context, id, rule_info): LOG.debug(_("remove_rule() called")) self._ensure_firewall_policy_update_allowed(context, id) - fwp = super(NvpAdvancedPlugin, self).remove_rule( + fwp = super(NsxAdvancedPlugin, self).remove_rule( context, id, rule_info) - fwr = super(NvpAdvancedPlugin, self).get_firewall_rule( + fwr = super(NsxAdvancedPlugin, self).get_firewall_rule( context, rule_info['firewall_rule_id']) # check if this policy is associated with firewall @@ -1157,7 +1156,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, context, monitor_ide, edge_id) #Create the pool on the edge members = [ - super(NvpAdvancedPlugin, self).get_member( + super(NsxAdvancedPlugin, self).get_member( context, member_id) for member_id in pool.get('members') ] @@ -1177,7 +1176,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, members = kwargs.get('members') if not members: members = [ - super(NvpAdvancedPlugin, self).get_member( + super(NsxAdvancedPlugin, self).get_member( context, member_id) for member_id in pool.get('members') ] @@ -1205,7 +1204,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, "network") % network_id) raise nsx_exc.NsxPluginException(err_msg=msg) - v = super(NvpAdvancedPlugin, self).create_vip(context, vip) + v = super(NsxAdvancedPlugin, self).create_vip(context, vip) #Get edge_id for the resource router_binding = vcns_db.get_vcns_router_binding( context.session, @@ -1228,7 +1227,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, LOG.exception(_("Failed to create vip!")) self._delete_resource_router_id_binding( context, v['id'], loadbalancer_db.Vip) - super(NvpAdvancedPlugin, self).delete_vip(context, v['id']) + super(NsxAdvancedPlugin, self).delete_vip(context, v['id']) self._resource_set_status(context, loadbalancer_db.Vip, v['id'], service_constants.ACTIVE, v) v[rsi.ROUTER_ID] = router_id @@ -1239,7 +1238,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, edge_id = self._get_edge_id_by_vip_id(context, id) old_vip = self.get_vip(context, id) vip['vip']['status'] = service_constants.PENDING_UPDATE - v = super(NvpAdvancedPlugin, self).update_vip(context, id, vip) + v = super(NsxAdvancedPlugin, self).update_vip(context, id, vip) v[rsi.ROUTER_ID] = self._get_resource_router_id_binding( context, loadbalancer_db.Vip, resource_id=id)['router_id'] if old_vip['pool_id'] != v['pool_id']: @@ -1297,7 +1296,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, router = self._get_router(context, router_binding.router_id) self._delete_resource_router_id_binding( context, id, loadbalancer_db.Vip) - super(NvpAdvancedPlugin, self).delete_vip(context, id) + super(NsxAdvancedPlugin, self).delete_vip(context, id) self._update_interface(context, router, sync=True) def get_vip(self, context, id, fields=None): @@ -1326,7 +1325,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, def update_pool(self, context, id, pool): pool['pool']['status'] = service_constants.PENDING_UPDATE - p = super(NvpAdvancedPlugin, self).update_pool(context, id, pool) + p = super(NsxAdvancedPlugin, self).update_pool(context, id, pool) #Check whether the pool is already associated with the vip if not p.get('vip_id'): self._resource_set_status(context, loadbalancer_db.Pool, @@ -1344,7 +1343,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, return p def create_member(self, context, member): - m = super(NvpAdvancedPlugin, self).create_member(context, member) + m = super(NsxAdvancedPlugin, self).create_member(context, member) pool_id = m.get('pool_id') pool = self.get_pool(context, pool_id) if not pool.get('vip_id'): @@ -1359,7 +1358,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, except Exception: with excutils.save_and_reraise_exception(): LOG.exception(_("Failed to update pool with the member")) - super(NvpAdvancedPlugin, self).delete_member(context, m['id']) + super(NsxAdvancedPlugin, self).delete_member(context, m['id']) self._resource_set_status(context, loadbalancer_db.Pool, pool_id, service_constants.ACTIVE) @@ -1370,7 +1369,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, def update_member(self, context, id, member): member['member']['status'] = service_constants.PENDING_UPDATE old_member = self.get_member(context, id) - m = super(NvpAdvancedPlugin, self).update_member( + m = super(NsxAdvancedPlugin, self).update_member( context, id, member) if m['pool_id'] != old_member['pool_id']: @@ -1386,7 +1385,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, with excutils.save_and_reraise_exception(): LOG.exception(_("Failed to update old pool " "with the member")) - super(NvpAdvancedPlugin, self).delete_member( + super(NsxAdvancedPlugin, self).delete_member( context, m['id']) self._resource_set_status( context, loadbalancer_db.Pool, @@ -1406,7 +1405,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, except Exception: with excutils.save_and_reraise_exception(): LOG.exception(_("Failed to update pool with the member")) - super(NvpAdvancedPlugin, self).delete_member( + super(NsxAdvancedPlugin, self).delete_member( context, m['id']) self._resource_set_status(context, loadbalancer_db.Pool, @@ -1417,7 +1416,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, def delete_member(self, context, id): m = self.get_member(context, id) - super(NvpAdvancedPlugin, self).delete_member(context, id) + super(NsxAdvancedPlugin, self).delete_member(context, id) pool_id = m['pool_id'] pool = self.get_pool(context, pool_id) if not pool.get('vip_id'): @@ -1433,9 +1432,9 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, pool_id, service_constants.ACTIVE) def update_health_monitor(self, context, id, health_monitor): - old_hm = super(NvpAdvancedPlugin, self).get_health_monitor( + old_hm = super(NsxAdvancedPlugin, self).get_health_monitor( context, id) - hm = super(NvpAdvancedPlugin, self).update_health_monitor( + hm = super(NsxAdvancedPlugin, self).update_health_monitor( context, id, health_monitor) for hm_pool in hm.get('pools'): pool_id = hm_pool['pool_id'] @@ -1459,7 +1458,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, ).filter_by(monitor_id=id) for assoc in qry: pool_id = assoc['pool_id'] - super(NvpAdvancedPlugin, + super(NsxAdvancedPlugin, self).delete_pool_health_monitor(context, id, pool_id) @@ -1486,12 +1485,12 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, with excutils.save_and_reraise_exception(): LOG.exception(_("Failed to delete monitor " "with id: %s!"), id) - super(NvpAdvancedPlugin, + super(NsxAdvancedPlugin, self).delete_health_monitor(context, id) self._delete_resource_router_id_binding( context, id, loadbalancer_db.HealthMonitor) - super(NvpAdvancedPlugin, self).delete_health_monitor(context, id) + super(NsxAdvancedPlugin, self).delete_health_monitor(context, id) self._delete_resource_router_id_binding( context, id, loadbalancer_db.HealthMonitor) @@ -1507,14 +1506,14 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, raise nsx_exc.NsxPluginException(err_msg=msg) #Check whether the pool is already associated with the vip if not pool.get('vip_id'): - res = super(NvpAdvancedPlugin, + res = super(NsxAdvancedPlugin, self).create_pool_health_monitor(context, health_monitor, pool_id) return res #Get the edge_id edge_id = self._get_edge_id_by_vip_id(context, pool['vip_id']) - res = super(NvpAdvancedPlugin, + res = super(NsxAdvancedPlugin, self).create_pool_health_monitor(context, health_monitor, pool_id) @@ -1534,7 +1533,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, self._resource_set_status( context, loadbalancer_db.Pool, pool_id, service_constants.ERROR) - super(NvpAdvancedPlugin, self).delete_pool_health_monitor( + super(NsxAdvancedPlugin, self).delete_pool_health_monitor( context, monitor_id, pool_id) self._resource_set_status( context, loadbalancer_db.Pool, @@ -1546,7 +1545,7 @@ class NvpAdvancedPlugin(sr_db.ServiceRouter_mixin, return res def delete_pool_health_monitor(self, context, id, pool_id): - super(NvpAdvancedPlugin, self).delete_pool_health_monitor( + super(NsxAdvancedPlugin, self).delete_pool_health_monitor( context, id, pool_id) pool = self.get_pool(context, pool_id) #Check whether the pool is already associated with the vip @@ -1680,3 +1679,7 @@ def _process_base_create_lswitch_args(*args, **kwargs): if kwargs.get("tags"): tags.extend(kwargs["tags"]) return switch_name, tz_config, tags + + +# For backward compatibility +NvpAdvancedPlugin = NsxAdvancedPlugin diff --git a/neutron/plugins/nicira/shell/__init__.py b/neutron/plugins/vmware/shell/__init__.py similarity index 95% rename from neutron/plugins/nicira/shell/__init__.py rename to neutron/plugins/vmware/shell/__init__.py index be3c07985d..e0b15b8d2f 100644 --- a/neutron/plugins/nicira/shell/__init__.py +++ b/neutron/plugins/vmware/shell/__init__.py @@ -16,7 +16,7 @@ import sys -from neutron.plugins.nicira.shell import commands as cmd +from neutron.plugins.vmware.shell import commands as cmd from neutronclient import shell diff --git a/neutron/plugins/nicira/shell/commands.py b/neutron/plugins/vmware/shell/commands.py similarity index 100% rename from neutron/plugins/nicira/shell/commands.py rename to neutron/plugins/vmware/shell/commands.py diff --git a/neutron/plugins/nicira/vshield/__init__.py b/neutron/plugins/vmware/vshield/__init__.py similarity index 100% rename from neutron/plugins/nicira/vshield/__init__.py rename to neutron/plugins/vmware/vshield/__init__.py diff --git a/neutron/plugins/nicira/vshield/common/VcnsApiClient.py b/neutron/plugins/vmware/vshield/common/VcnsApiClient.py similarity index 95% rename from neutron/plugins/nicira/vshield/common/VcnsApiClient.py rename to neutron/plugins/vmware/vshield/common/VcnsApiClient.py index 55fc7a2778..7127b6780b 100644 --- a/neutron/plugins/nicira/vshield/common/VcnsApiClient.py +++ b/neutron/plugins/vmware/vshield/common/VcnsApiClient.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 -# # Copyright 2013 VMware, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); you may @@ -13,15 +11,13 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. -# -# @author: linb, VMware import base64 import eventlet from neutron.openstack.common import jsonutils -from neutron.plugins.nicira.vshield.common import exceptions +from neutron.plugins.vmware.vshield.common import exceptions httplib2 = eventlet.import_patched('httplib2') diff --git a/neutron/plugins/vmware/vshield/common/__init__.py b/neutron/plugins/vmware/vshield/common/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/neutron/plugins/nicira/vshield/common/constants.py b/neutron/plugins/vmware/vshield/common/constants.py similarity index 96% rename from neutron/plugins/nicira/vshield/common/constants.py rename to neutron/plugins/vmware/vshield/common/constants.py index 6edbd354f9..8d8ace05f1 100644 --- a/neutron/plugins/nicira/vshield/common/constants.py +++ b/neutron/plugins/vmware/vshield/common/constants.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright 2013 OpenStack Foundation. # All Rights Reserved. # diff --git a/neutron/plugins/nicira/vshield/common/exceptions.py b/neutron/plugins/vmware/vshield/common/exceptions.py similarity index 97% rename from neutron/plugins/nicira/vshield/common/exceptions.py rename to neutron/plugins/vmware/vshield/common/exceptions.py index 71f7cc5eff..4764db0340 100644 --- a/neutron/plugins/nicira/vshield/common/exceptions.py +++ b/neutron/plugins/vmware/vshield/common/exceptions.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 -# # Copyright 2013 VMware, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/neutron/plugins/nicira/vshield/edge_appliance_driver.py b/neutron/plugins/vmware/vshield/edge_appliance_driver.py similarity index 98% rename from neutron/plugins/nicira/vshield/edge_appliance_driver.py rename to neutron/plugins/vmware/vshield/edge_appliance_driver.py index 6ea6c4bde3..72872a73a5 100644 --- a/neutron/plugins/nicira/vshield/edge_appliance_driver.py +++ b/neutron/plugins/vmware/vshield/edge_appliance_driver.py @@ -20,14 +20,14 @@ from neutron.openstack.common import excutils from neutron.openstack.common import jsonutils from neutron.openstack.common import log as logging -from neutron.plugins.nicira.common import utils -from neutron.plugins.nicira.vshield.common import ( +from neutron.plugins.vmware.common import utils +from neutron.plugins.vmware.vshield.common import ( constants as vcns_const) -from neutron.plugins.nicira.vshield.common.constants import RouterStatus -from neutron.plugins.nicira.vshield.common import exceptions -from neutron.plugins.nicira.vshield.tasks.constants import TaskState -from neutron.plugins.nicira.vshield.tasks.constants import TaskStatus -from neutron.plugins.nicira.vshield.tasks import tasks +from neutron.plugins.vmware.vshield.common.constants import RouterStatus +from neutron.plugins.vmware.vshield.common import exceptions +from neutron.plugins.vmware.vshield.tasks.constants import TaskState +from neutron.plugins.vmware.vshield.tasks.constants import TaskStatus +from neutron.plugins.vmware.vshield.tasks import tasks LOG = logging.getLogger(__name__) diff --git a/neutron/plugins/nicira/vshield/edge_firewall_driver.py b/neutron/plugins/vmware/vshield/edge_firewall_driver.py similarity index 99% rename from neutron/plugins/nicira/vshield/edge_firewall_driver.py rename to neutron/plugins/vmware/vshield/edge_firewall_driver.py index 7b903c6e25..6b030c5231 100644 --- a/neutron/plugins/nicira/vshield/edge_firewall_driver.py +++ b/neutron/plugins/vmware/vshield/edge_firewall_driver.py @@ -20,8 +20,8 @@ from neutron.db import db_base_plugin_v2 from neutron.openstack.common import excutils from neutron.openstack.common import log as logging from neutron.plugins.common import constants -from neutron.plugins.nicira.dbexts import vcns_db -from neutron.plugins.nicira.vshield.common import ( +from neutron.plugins.vmware.dbexts import vcns_db +from neutron.plugins.vmware.vshield.common import ( exceptions as vcns_exc) LOG = logging.getLogger(__name__) diff --git a/neutron/plugins/nicira/vshield/edge_loadbalancer_driver.py b/neutron/plugins/vmware/vshield/edge_loadbalancer_driver.py similarity index 98% rename from neutron/plugins/nicira/vshield/edge_loadbalancer_driver.py rename to neutron/plugins/vmware/vshield/edge_loadbalancer_driver.py index 0fef33d472..fb5fa248a8 100644 --- a/neutron/plugins/nicira/vshield/edge_loadbalancer_driver.py +++ b/neutron/plugins/vmware/vshield/edge_loadbalancer_driver.py @@ -18,10 +18,10 @@ from neutron.openstack.common import excutils from neutron.openstack.common import log as logging -from neutron.plugins.nicira.dbexts import vcns_db -from neutron.plugins.nicira.vshield.common import ( +from neutron.plugins.vmware.dbexts import vcns_db +from neutron.plugins.vmware.vshield.common import ( constants as vcns_const) -from neutron.plugins.nicira.vshield.common import ( +from neutron.plugins.vmware.vshield.common import ( exceptions as vcns_exc) from neutron.services.loadbalancer import constants as lb_constants diff --git a/neutron/plugins/vmware/vshield/tasks/__init__.py b/neutron/plugins/vmware/vshield/tasks/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/neutron/plugins/nicira/vshield/tasks/constants.py b/neutron/plugins/vmware/vshield/tasks/constants.py old mode 100755 new mode 100644 similarity index 96% rename from neutron/plugins/nicira/vshield/tasks/constants.py rename to neutron/plugins/vmware/vshield/tasks/constants.py index c48debb191..f5322e0b9c --- a/neutron/plugins/nicira/vshield/tasks/constants.py +++ b/neutron/plugins/vmware/vshield/tasks/constants.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright 2013 VMware, Inc. # All Rights Reserved # diff --git a/neutron/plugins/nicira/vshield/tasks/tasks.py b/neutron/plugins/vmware/vshield/tasks/tasks.py old mode 100755 new mode 100644 similarity index 98% rename from neutron/plugins/nicira/vshield/tasks/tasks.py rename to neutron/plugins/vmware/vshield/tasks/tasks.py index 4a901f3106..f4a70d5a30 --- a/neutron/plugins/nicira/vshield/tasks/tasks.py +++ b/neutron/plugins/vmware/vshield/tasks/tasks.py @@ -1,5 +1,3 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - # Copyright 2013 VMware, Inc. # All Rights Reserved # @@ -24,8 +22,8 @@ from eventlet import greenthread from neutron.common import exceptions from neutron.openstack.common import log as logging from neutron.openstack.common import loopingcall -from neutron.plugins.nicira.vshield.tasks.constants import TaskState -from neutron.plugins.nicira.vshield.tasks.constants import TaskStatus +from neutron.plugins.vmware.vshield.tasks.constants import TaskState +from neutron.plugins.vmware.vshield.tasks.constants import TaskStatus DEFAULT_INTERVAL = 1000 diff --git a/neutron/plugins/nicira/vshield/vcns.py b/neutron/plugins/vmware/vshield/vcns.py similarity index 99% rename from neutron/plugins/nicira/vshield/vcns.py rename to neutron/plugins/vmware/vshield/vcns.py index 803b979880..3eac7cfe32 100644 --- a/neutron/plugins/nicira/vshield/vcns.py +++ b/neutron/plugins/vmware/vshield/vcns.py @@ -18,7 +18,7 @@ from neutron.openstack.common import jsonutils from neutron.openstack.common import log as logging -from neutron.plugins.nicira.vshield.common import VcnsApiClient +from neutron.plugins.vmware.vshield.common import VcnsApiClient LOG = logging.getLogger(__name__) diff --git a/neutron/plugins/nicira/vshield/vcns_driver.py b/neutron/plugins/vmware/vshield/vcns_driver.py similarity index 82% rename from neutron/plugins/nicira/vshield/vcns_driver.py rename to neutron/plugins/vmware/vshield/vcns_driver.py index c2c5c14992..8c428e8695 100644 --- a/neutron/plugins/nicira/vshield/vcns_driver.py +++ b/neutron/plugins/vmware/vshield/vcns_driver.py @@ -19,12 +19,12 @@ from oslo.config import cfg from neutron.openstack.common import log as logging -from neutron.plugins.nicira.common import config as nicira_cfg # noqa -from neutron.plugins.nicira.vshield import edge_appliance_driver -from neutron.plugins.nicira.vshield import edge_firewall_driver -from neutron.plugins.nicira.vshield import edge_loadbalancer_driver -from neutron.plugins.nicira.vshield.tasks import tasks -from neutron.plugins.nicira.vshield import vcns +from neutron.plugins.vmware.common import config # noqa +from neutron.plugins.vmware.vshield import edge_appliance_driver +from neutron.plugins.vmware.vshield import edge_firewall_driver +from neutron.plugins.vmware.vshield import edge_loadbalancer_driver +from neutron.plugins.vmware.vshield.tasks import tasks +from neutron.plugins.vmware.vshield import vcns LOG = logging.getLogger(__name__) diff --git a/neutron/tests/unit/test_l3_plugin.py b/neutron/tests/unit/test_l3_plugin.py index f3669009fc..5f48efa1a7 100644 --- a/neutron/tests/unit/test_l3_plugin.py +++ b/neutron/tests/unit/test_l3_plugin.py @@ -649,7 +649,7 @@ class L3NatTestCaseBase(L3NatTestCaseMixin): self.assertIn('tenant_id', payload) stid = s['subnet']['tenant_id'] # tolerate subnet tenant deliberately to '' in the - # nicira metadata access case + # nsx metadata access case self.assertIn(payload['tenant_id'], [stid, '']) def test_router_add_interface_subnet_with_bad_tenant_returns_404(self): diff --git a/neutron/tests/unit/vmware/__init__.py b/neutron/tests/unit/vmware/__init__.py index 2c8b3fd9a5..31a212256d 100644 --- a/neutron/tests/unit/vmware/__init__.py +++ b/neutron/tests/unit/vmware/__init__.py @@ -16,14 +16,14 @@ import os -from neutron.plugins.nicira.api_client import client as nsx_client -from neutron.plugins.nicira.api_client import eventlet_client -from neutron.plugins.nicira import extensions -from neutron.plugins.nicira import nvplib -from neutron.plugins.nicira.vshield.common import VcnsApiClient as vcnsapi -from neutron.plugins.nicira.vshield import vcns -import neutron.plugins.nicira.vshield.vcns_driver as vcnsdriver +from neutron.plugins.vmware.api_client import client as nsx_client +from neutron.plugins.vmware.api_client import eventlet_client +from neutron.plugins.vmware import extensions +from neutron.plugins.vmware import nvplib import neutron.plugins.vmware.plugin as neutron_plugin +from neutron.plugins.vmware.vshield.common import VcnsApiClient as vcnsapi +from neutron.plugins.vmware.vshield import vcns +import neutron.plugins.vmware.vshield.vcns_driver as vcnsdriver plugin = neutron_plugin.NsxPlugin @@ -52,4 +52,4 @@ def get_fake_conf(filename): def nsx_method(method_name, module_name='nvplib'): - return '%s.%s.%s' % ('neutron.plugins.nicira', module_name, method_name) + return '%s.%s.%s' % ('neutron.plugins.vmware', module_name, method_name) diff --git a/neutron/tests/unit/vmware/apiclient/fake.py b/neutron/tests/unit/vmware/apiclient/fake.py index 9ceb72993b..2ca35ea407 100644 --- a/neutron/tests/unit/vmware/apiclient/fake.py +++ b/neutron/tests/unit/vmware/apiclient/fake.py @@ -18,7 +18,7 @@ import six.moves.urllib.parse as urlparse from neutron.openstack.common import log as logging from neutron.openstack.common import uuidutils -from neutron.plugins.nicira.api_client import exception as api_exc +from neutron.plugins.vmware.api_client import exception as api_exc LOG = logging.getLogger(__name__) diff --git a/neutron/tests/unit/vmware/apiclient/test_api_common.py b/neutron/tests/unit/vmware/apiclient/test_api_common.py index 0d03d120ad..c3e418be84 100644 --- a/neutron/tests/unit/vmware/apiclient/test_api_common.py +++ b/neutron/tests/unit/vmware/apiclient/test_api_common.py @@ -16,7 +16,7 @@ import httplib -from neutron.plugins.nicira.api_client import ctrl_conn_to_str +from neutron.plugins.vmware.api_client import ctrl_conn_to_str from neutron.tests import base diff --git a/neutron/tests/unit/vmware/apiclient/test_api_eventlet_request.py b/neutron/tests/unit/vmware/apiclient/test_api_eventlet_request.py index 833b140d97..c70043116d 100644 --- a/neutron/tests/unit/vmware/apiclient/test_api_eventlet_request.py +++ b/neutron/tests/unit/vmware/apiclient/test_api_eventlet_request.py @@ -22,8 +22,8 @@ from eventlet.green import urllib2 from mock import Mock from mock import patch -from neutron.plugins.nicira.api_client import eventlet_client as client -from neutron.plugins.nicira.api_client import eventlet_request as request +from neutron.plugins.vmware.api_client import eventlet_client as client +from neutron.plugins.vmware.api_client import eventlet_request as request from neutron.tests import base from neutron.tests.unit.vmware import CLIENT_NAME diff --git a/neutron/tests/unit/vmware/db/test_lsn_db.py b/neutron/tests/unit/vmware/db/test_lsn_db.py index f84cb7b07e..34641de530 100644 --- a/neutron/tests/unit/vmware/db/test_lsn_db.py +++ b/neutron/tests/unit/vmware/db/test_lsn_db.py @@ -17,8 +17,8 @@ from sqlalchemy import orm from neutron import context from neutron.db import api as db -from neutron.plugins.nicira.common import exceptions as p_exc -from neutron.plugins.nicira.dbexts import lsn_db +from neutron.plugins.vmware.common import exceptions as p_exc +from neutron.plugins.vmware.dbexts import lsn_db from neutron.tests import base diff --git a/neutron/tests/unit/vmware/db/test_nsx_db.py b/neutron/tests/unit/vmware/db/test_nsx_db.py index e6882f61f2..722e22a769 100644 --- a/neutron/tests/unit/vmware/db/test_nsx_db.py +++ b/neutron/tests/unit/vmware/db/test_nsx_db.py @@ -17,8 +17,8 @@ from neutron import context from neutron.db import api as db from neutron.db import models_v2 from neutron.openstack.common.db import exception as d_exc -from neutron.plugins.nicira.dbexts import db as nsx_db -from neutron.plugins.nicira.dbexts import models +from neutron.plugins.vmware.dbexts import db as nsx_db +from neutron.plugins.vmware.dbexts import models from neutron.tests import base diff --git a/neutron/tests/unit/vmware/extensions/test_maclearning.py b/neutron/tests/unit/vmware/extensions/test_maclearning.py index 06a86f7894..cb17bf9bd8 100644 --- a/neutron/tests/unit/vmware/extensions/test_maclearning.py +++ b/neutron/tests/unit/vmware/extensions/test_maclearning.py @@ -22,8 +22,8 @@ from neutron.api.v2 import attributes from neutron.common.test_lib import test_config from neutron import context from neutron.extensions import agent -from neutron.plugins.nicira.api_client.version import Version -from neutron.plugins.nicira.common import sync +from neutron.plugins.vmware.api_client.version import Version +from neutron.plugins.vmware.common import sync from neutron.tests.unit import test_db_plugin from neutron.tests.unit.vmware.apiclient import fake from neutron.tests.unit.vmware import get_fake_conf diff --git a/neutron/tests/unit/vmware/extensions/test_networkgw.py b/neutron/tests/unit/vmware/extensions/test_networkgw.py index 76e143b2af..25c542f57a 100644 --- a/neutron/tests/unit/vmware/extensions/test_networkgw.py +++ b/neutron/tests/unit/vmware/extensions/test_networkgw.py @@ -28,10 +28,10 @@ from neutron.db import api as db_api from neutron.db import db_base_plugin_v2 from neutron import manager from neutron.openstack.common import uuidutils -from neutron.plugins.nicira.api_client import exception as api_exc -from neutron.plugins.nicira.dbexts import networkgw_db -from neutron.plugins.nicira.extensions import networkgw -from neutron.plugins.nicira import nsxlib +from neutron.plugins.vmware.api_client import exception as api_exc +from neutron.plugins.vmware.dbexts import networkgw_db +from neutron.plugins.vmware.extensions import networkgw +from neutron.plugins.vmware import nsxlib from neutron import quota from neutron.tests import base from neutron.tests.unit import test_api_v2 diff --git a/neutron/tests/unit/vmware/extensions/test_portsecurity.py b/neutron/tests/unit/vmware/extensions/test_portsecurity.py index a79e72d9b3..6d451a2396 100644 --- a/neutron/tests/unit/vmware/extensions/test_portsecurity.py +++ b/neutron/tests/unit/vmware/extensions/test_portsecurity.py @@ -16,7 +16,7 @@ import mock from neutron.common import test_lib -from neutron.plugins.nicira.common import sync +from neutron.plugins.vmware.common import sync from neutron.tests.unit import test_extension_portsecurity as psec from neutron.tests.unit.vmware.apiclient import fake from neutron.tests.unit.vmware import get_fake_conf diff --git a/neutron/tests/unit/vmware/extensions/test_qosqueues.py b/neutron/tests/unit/vmware/extensions/test_qosqueues.py index 8c56b4f1c3..754f55b8d0 100644 --- a/neutron/tests/unit/vmware/extensions/test_qosqueues.py +++ b/neutron/tests/unit/vmware/extensions/test_qosqueues.py @@ -20,9 +20,9 @@ from oslo.config import cfg import webob.exc from neutron import context -from neutron.plugins.nicira.dbexts import qos_db -from neutron.plugins.nicira.extensions import qos as ext_qos -from neutron.plugins.nicira import nsxlib +from neutron.plugins.vmware.dbexts import qos_db +from neutron.plugins.vmware.extensions import qos as ext_qos +from neutron.plugins.vmware import nsxlib from neutron.tests.unit import test_extensions from neutron.tests.unit.vmware import NSXEXT_PATH from neutron.tests.unit.vmware.test_nsx_plugin import NsxPluginV2TestCase diff --git a/neutron/tests/unit/vmware/nsxlib/base.py b/neutron/tests/unit/vmware/nsxlib/base.py index b88e014b60..2d4fedcb50 100644 --- a/neutron/tests/unit/vmware/nsxlib/base.py +++ b/neutron/tests/unit/vmware/nsxlib/base.py @@ -16,11 +16,11 @@ import mock -from neutron.plugins.nicira.api_client import client -from neutron.plugins.nicira.api_client import exception -from neutron.plugins.nicira.api_client import version -from neutron.plugins.nicira.common import config # noqa -from neutron.plugins.nicira import nsx_cluster as cluster +from neutron.plugins.vmware.api_client import client +from neutron.plugins.vmware.api_client import exception +from neutron.plugins.vmware.api_client import version +from neutron.plugins.vmware.common import config # noqa +from neutron.plugins.vmware import nsx_cluster as cluster from neutron.tests import base from neutron.tests.unit import test_api_v2 from neutron.tests.unit.vmware.apiclient import fake diff --git a/neutron/tests/unit/vmware/nsxlib/test_l2gateway.py b/neutron/tests/unit/vmware/nsxlib/test_l2gateway.py index 80d2593d21..4d2ac853e6 100644 --- a/neutron/tests/unit/vmware/nsxlib/test_l2gateway.py +++ b/neutron/tests/unit/vmware/nsxlib/test_l2gateway.py @@ -14,9 +14,9 @@ # limitations under the License. # -from neutron.plugins.nicira.api_client import exception -from neutron.plugins.nicira.nsxlib import l2gateway as l2gwlib -from neutron.plugins.nicira.nsxlib import switch as switchlib +from neutron.plugins.vmware.api_client import exception +from neutron.plugins.vmware.nsxlib import l2gateway as l2gwlib +from neutron.plugins.vmware.nsxlib import switch as switchlib from neutron.tests.unit import test_api_v2 from neutron.tests.unit.vmware.nsxlib import base diff --git a/neutron/tests/unit/vmware/nsxlib/test_lsn.py b/neutron/tests/unit/vmware/nsxlib/test_lsn.py index aa8783daac..953754928f 100644 --- a/neutron/tests/unit/vmware/nsxlib/test_lsn.py +++ b/neutron/tests/unit/vmware/nsxlib/test_lsn.py @@ -17,10 +17,10 @@ import json import mock from neutron.common import exceptions -from neutron.plugins.nicira.api_client import exception as api_exc -from neutron.plugins.nicira.common import exceptions as nsx_exc -from neutron.plugins.nicira.common import utils -from neutron.plugins.nicira.nsxlib import lsn as lsnlib +from neutron.plugins.vmware.api_client import exception as api_exc +from neutron.plugins.vmware.common import exceptions as nsx_exc +from neutron.plugins.vmware.common import utils +from neutron.plugins.vmware.nsxlib import lsn as lsnlib from neutron.tests import base diff --git a/neutron/tests/unit/vmware/nsxlib/test_queue.py b/neutron/tests/unit/vmware/nsxlib/test_queue.py index 651c2c98e9..56750fc8b4 100644 --- a/neutron/tests/unit/vmware/nsxlib/test_queue.py +++ b/neutron/tests/unit/vmware/nsxlib/test_queue.py @@ -17,8 +17,8 @@ import mock from neutron.common import exceptions -from neutron.plugins.nicira.api_client import exception as api_exc -from neutron.plugins.nicira.nsxlib import queue as queuelib +from neutron.plugins.vmware.api_client import exception as api_exc +from neutron.plugins.vmware.nsxlib import queue as queuelib from neutron.tests.unit.vmware.nsxlib import base diff --git a/neutron/tests/unit/vmware/nsxlib/test_router.py b/neutron/tests/unit/vmware/nsxlib/test_router.py index a5f5463171..4f62ab4880 100644 --- a/neutron/tests/unit/vmware/nsxlib/test_router.py +++ b/neutron/tests/unit/vmware/nsxlib/test_router.py @@ -18,12 +18,12 @@ import mock from neutron.common import exceptions from neutron.openstack.common import uuidutils -from neutron.plugins.nicira.api_client import exception as api_exc -from neutron.plugins.nicira.api_client.version import Version -from neutron.plugins.nicira.common import exceptions as nsx_exc -from neutron.plugins.nicira.common import utils -from neutron.plugins.nicira.nsxlib import router as routerlib -from neutron.plugins.nicira.nsxlib import switch as switchlib +from neutron.plugins.vmware.api_client import exception as api_exc +from neutron.plugins.vmware.api_client.version import Version +from neutron.plugins.vmware.common import exceptions as nsx_exc +from neutron.plugins.vmware.common import utils +from neutron.plugins.vmware.nsxlib import router as routerlib +from neutron.plugins.vmware.nsxlib import switch as switchlib from neutron.tests.unit import test_api_v2 from neutron.tests.unit.vmware.nsxlib import base diff --git a/neutron/tests/unit/vmware/nsxlib/test_secgroup.py b/neutron/tests/unit/vmware/nsxlib/test_secgroup.py index 0db7e032c2..66e9a2e3dc 100644 --- a/neutron/tests/unit/vmware/nsxlib/test_secgroup.py +++ b/neutron/tests/unit/vmware/nsxlib/test_secgroup.py @@ -15,8 +15,8 @@ # from neutron.common import exceptions -from neutron.plugins.nicira.nsxlib import secgroup as secgrouplib -from neutron.plugins.nicira import nvplib as nsx_utils +from neutron.plugins.vmware.nsxlib import secgroup as secgrouplib +from neutron.plugins.vmware import nvplib as nsx_utils from neutron.tests.unit import test_api_v2 from neutron.tests.unit.vmware.nsxlib import base diff --git a/neutron/tests/unit/vmware/nsxlib/test_switch.py b/neutron/tests/unit/vmware/nsxlib/test_switch.py index 5e1a5aa3b2..9735df448f 100644 --- a/neutron/tests/unit/vmware/nsxlib/test_switch.py +++ b/neutron/tests/unit/vmware/nsxlib/test_switch.py @@ -19,8 +19,8 @@ import mock from neutron.common import constants from neutron.common import exceptions -from neutron.plugins.nicira.common import utils -from neutron.plugins.nicira.nsxlib import switch as switchlib +from neutron.plugins.vmware.common import utils +from neutron.plugins.vmware.nsxlib import switch as switchlib from neutron.tests.unit import test_api_v2 from neutron.tests.unit.vmware.nsxlib import base diff --git a/neutron/tests/unit/vmware/nsxlib/test_versioning.py b/neutron/tests/unit/vmware/nsxlib/test_versioning.py index 0e7e3a8dcb..8a006a5f21 100644 --- a/neutron/tests/unit/vmware/nsxlib/test_versioning.py +++ b/neutron/tests/unit/vmware/nsxlib/test_versioning.py @@ -14,10 +14,10 @@ # limitations under the License. # -from neutron.plugins.nicira.api_client import exception -from neutron.plugins.nicira.api_client.version import Version -from neutron.plugins.nicira.nsxlib import router as routerlib -from neutron.plugins.nicira.nsxlib import versioning +from neutron.plugins.vmware.api_client import exception +from neutron.plugins.vmware.api_client.version import Version +from neutron.plugins.vmware.nsxlib import router as routerlib +from neutron.plugins.vmware.nsxlib import versioning from neutron.tests import base diff --git a/neutron/tests/unit/vmware/test_agent_scheduler.py b/neutron/tests/unit/vmware/test_agent_scheduler.py index d4bf97d250..9033ab522c 100644 --- a/neutron/tests/unit/vmware/test_agent_scheduler.py +++ b/neutron/tests/unit/vmware/test_agent_scheduler.py @@ -18,8 +18,8 @@ from oslo.config import cfg from neutron.common import constants from neutron.common.test_lib import test_config -from neutron.plugins.nicira.common import sync -from neutron.plugins.nicira.dhcp_meta import rpc +from neutron.plugins.vmware.common import sync +from neutron.plugins.vmware.dhcp_meta import rpc from neutron.tests.unit.openvswitch import test_agent_scheduler as test_base from neutron.tests.unit.vmware.apiclient import fake from neutron.tests.unit.vmware import get_fake_conf diff --git a/neutron/tests/unit/vmware/test_dhcpmeta.py b/neutron/tests/unit/vmware/test_dhcpmeta.py index c55fc3c039..160aee6eea 100644 --- a/neutron/tests/unit/vmware/test_dhcpmeta.py +++ b/neutron/tests/unit/vmware/test_dhcpmeta.py @@ -20,14 +20,14 @@ from oslo.config import cfg from neutron.common import exceptions as n_exc from neutron import context from neutron.db import api as db -from neutron.plugins.nicira.api_client.exception import NsxApiException -from neutron.plugins.nicira.common import exceptions as p_exc -from neutron.plugins.nicira.dbexts import lsn_db -from neutron.plugins.nicira.dhcp_meta import constants -from neutron.plugins.nicira.dhcp_meta import lsnmanager as lsn_man -from neutron.plugins.nicira.dhcp_meta import migration as mig_man -from neutron.plugins.nicira.dhcp_meta import nsx -from neutron.plugins.nicira.dhcp_meta import rpc +from neutron.plugins.vmware.api_client.exception import NsxApiException +from neutron.plugins.vmware.common import exceptions as p_exc +from neutron.plugins.vmware.dbexts import lsn_db +from neutron.plugins.vmware.dhcp_meta import constants +from neutron.plugins.vmware.dhcp_meta import lsnmanager as lsn_man +from neutron.plugins.vmware.dhcp_meta import migration as mig_man +from neutron.plugins.vmware.dhcp_meta import nsx +from neutron.plugins.vmware.dhcp_meta import rpc from neutron.tests import base diff --git a/neutron/tests/unit/vmware/test_nsx_opts.py b/neutron/tests/unit/vmware/test_nsx_opts.py index a5f124e683..69d88ca3bb 100644 --- a/neutron/tests/unit/vmware/test_nsx_opts.py +++ b/neutron/tests/unit/vmware/test_nsx_opts.py @@ -21,13 +21,13 @@ from oslo.config import cfg from neutron.common import config as q_config from neutron.manager import NeutronManager from neutron.openstack.common import uuidutils -from neutron.plugins.nicira.api_client import client -from neutron.plugins.nicira.api_client import version -from neutron.plugins.nicira.common import config # noqa -from neutron.plugins.nicira.common import exceptions -from neutron.plugins.nicira.common import sync -from neutron.plugins.nicira import nsx_cluster -from neutron.plugins.nicira.nsxlib import lsn as lsnlib +from neutron.plugins.vmware.api_client import client +from neutron.plugins.vmware.api_client import version +from neutron.plugins.vmware.common import config # noqa +from neutron.plugins.vmware.common import exceptions +from neutron.plugins.vmware.common import sync +from neutron.plugins.vmware import nsx_cluster +from neutron.plugins.vmware.nsxlib import lsn as lsnlib from neutron.tests import base from neutron.tests.unit.vmware import get_fake_conf from neutron.tests.unit.vmware import PLUGIN_NAME diff --git a/neutron/tests/unit/vmware/test_nsx_plugin.py b/neutron/tests/unit/vmware/test_nsx_plugin.py index ea0d13c5b9..e53eaac1b2 100644 --- a/neutron/tests/unit/vmware/test_nsx_plugin.py +++ b/neutron/tests/unit/vmware/test_nsx_plugin.py @@ -37,14 +37,14 @@ from neutron.manager import NeutronManager from neutron.openstack.common.db import exception as db_exc from neutron.openstack.common import log from neutron.openstack.common import uuidutils -from neutron.plugins.nicira.api_client import exception as api_exc -from neutron.plugins.nicira.api_client.version import Version -from neutron.plugins.nicira.common import exceptions as nsx_exc -from neutron.plugins.nicira.common import sync -from neutron.plugins.nicira.dbexts import db as nsx_db -from neutron.plugins.nicira.extensions import distributedrouter as dist_router -from neutron.plugins.nicira import NeutronPlugin -from neutron.plugins.nicira import nsxlib +from neutron.plugins.vmware.api_client import exception as api_exc +from neutron.plugins.vmware.api_client.version import Version +from neutron.plugins.vmware.common import exceptions as nsx_exc +from neutron.plugins.vmware.common import sync +from neutron.plugins.vmware.dbexts import db as nsx_db +from neutron.plugins.vmware.extensions import distributedrouter as dist_router +from neutron.plugins.vmware import nsxlib +from neutron.plugins.vmware.plugins.base import NetworkTypes from neutron.tests.unit import _test_extension_portbindings as test_bindings import neutron.tests.unit.test_db_plugin as test_plugin import neutron.tests.unit.test_extension_ext_gw_mode as test_ext_gw_mode @@ -462,7 +462,7 @@ class TestL3NatTestCase(L3NatTest, def _create_l3_ext_network(self, vlan_id=None): name = 'l3_ext_net' - net_type = NeutronPlugin.NetworkTypes.L3_EXT + net_type = NetworkTypes.L3_EXT providernet_args = {pnet.NETWORK_TYPE: net_type, pnet.PHYSICAL_NETWORK: 'l3_gw_uuid'} if vlan_id: @@ -476,7 +476,7 @@ class TestL3NatTestCase(L3NatTest, def _test_create_l3_ext_network(self, vlan_id=None): name = 'l3_ext_net' - net_type = NeutronPlugin.NetworkTypes.L3_EXT + net_type = NetworkTypes.L3_EXT expected = [('subnets', []), ('name', name), ('admin_state_up', True), ('status', 'ACTIVE'), ('shared', False), (external_net.EXTERNAL, True), diff --git a/neutron/tests/unit/vmware/test_nsx_sync.py b/neutron/tests/unit/vmware/test_nsx_sync.py index 7dac024dc8..12a36a535b 100644 --- a/neutron/tests/unit/vmware/test_nsx_sync.py +++ b/neutron/tests/unit/vmware/test_nsx_sync.py @@ -26,12 +26,12 @@ from neutron.common import constants from neutron import context from neutron.openstack.common import jsonutils as json from neutron.openstack.common import log -from neutron.plugins.nicira.api_client import client -from neutron.plugins.nicira.api_client import exception as api_exc -from neutron.plugins.nicira.api_client import version -from neutron.plugins.nicira.common import sync -from neutron.plugins.nicira import nsx_cluster as cluster -from neutron.plugins.nicira import nvplib as nsx_utils +from neutron.plugins.vmware.api_client import client +from neutron.plugins.vmware.api_client import exception as api_exc +from neutron.plugins.vmware.api_client import version +from neutron.plugins.vmware.common import sync +from neutron.plugins.vmware import nsx_cluster as cluster +from neutron.plugins.vmware import nvplib as nsx_utils from neutron.plugins.vmware import plugin from neutron.tests import base from neutron.tests.unit import test_api_v2 diff --git a/neutron/tests/unit/vmware/test_nsx_utils.py b/neutron/tests/unit/vmware/test_nsx_utils.py index 8f603f20e5..001af0e4ac 100644 --- a/neutron/tests/unit/vmware/test_nsx_utils.py +++ b/neutron/tests/unit/vmware/test_nsx_utils.py @@ -17,11 +17,11 @@ import mock from neutron.db import api as db_api from neutron.openstack.common import uuidutils -from neutron.plugins.nicira.api_client import exception as api_exc -from neutron.plugins.nicira.common import exceptions as nsx_exc -from neutron.plugins.nicira.common import nsx_utils -from neutron.plugins.nicira.common import utils -from neutron.plugins.nicira import nvplib +from neutron.plugins.vmware.api_client import exception as api_exc +from neutron.plugins.vmware.common import exceptions as nsx_exc +from neutron.plugins.vmware.common import nsx_utils +from neutron.plugins.vmware.common import utils +from neutron.plugins.vmware import nvplib from neutron.tests import base from neutron.tests.unit.vmware import nsx_method from neutron.tests.unit.vmware.nsxlib import base as nsx_base diff --git a/neutron/tests/unit/vmware/vshield/__init__.py b/neutron/tests/unit/vmware/vshield/__init__.py index a6a8955d8b..e69de29bb2 100644 --- a/neutron/tests/unit/vmware/vshield/__init__.py +++ b/neutron/tests/unit/vmware/vshield/__init__.py @@ -1,14 +0,0 @@ -# Copyright 2013 OpenStack Foundation. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. diff --git a/neutron/tests/unit/vmware/vshield/fake_vcns.py b/neutron/tests/unit/vmware/vshield/fake_vcns.py index 052cf96c74..37d26c7acb 100644 --- a/neutron/tests/unit/vmware/vshield/fake_vcns.py +++ b/neutron/tests/unit/vmware/vshield/fake_vcns.py @@ -11,14 +11,12 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. -# -# @author: linb, VMware import copy import json from neutron.openstack.common import uuidutils -from neutron.plugins.nicira.vshield.common import exceptions +from neutron.plugins.vmware.vshield.common import exceptions class FakeVcns(object): diff --git a/neutron/tests/unit/vmware/vshield/test_edge_router.py b/neutron/tests/unit/vmware/vshield/test_edge_router.py index 64c31b8e6a..c0c01446e4 100644 --- a/neutron/tests/unit/vmware/vshield/test_edge_router.py +++ b/neutron/tests/unit/vmware/vshield/test_edge_router.py @@ -24,8 +24,8 @@ from neutron import context from neutron.extensions import l3 from neutron.manager import NeutronManager from neutron.openstack.common import uuidutils -from neutron.plugins.nicira.common import utils -from neutron.plugins.nicira import NeutronServicePlugin as nsp +from neutron.plugins.vmware.common import utils +from neutron.plugins.vmware.plugins import service as nsp from neutron.tests import base from neutron.tests.unit import test_l3_plugin from neutron.tests.unit.vmware import NSXEXT_PATH diff --git a/neutron/tests/unit/vmware/vshield/test_firewall_driver.py b/neutron/tests/unit/vmware/vshield/test_firewall_driver.py index edc4162699..6956be6fcd 100644 --- a/neutron/tests/unit/vmware/vshield/test_firewall_driver.py +++ b/neutron/tests/unit/vmware/vshield/test_firewall_driver.py @@ -21,8 +21,8 @@ from neutron.common import config as n_config from neutron import context from neutron.db.firewall import firewall_db from neutron.openstack.common import uuidutils -from neutron.plugins.nicira.vshield.common import exceptions as vcns_exc -from neutron.plugins.nicira.vshield import vcns_driver +from neutron.plugins.vmware.vshield.common import exceptions as vcns_exc +from neutron.plugins.vmware.vshield import vcns_driver from neutron.tests.unit.db.firewall import test_db_firewall from neutron.tests.unit.vmware import get_fake_conf from neutron.tests.unit.vmware import VCNS_NAME diff --git a/neutron/tests/unit/vmware/vshield/test_loadbalancer_driver.py b/neutron/tests/unit/vmware/vshield/test_loadbalancer_driver.py index 2cfb7ca182..6b922e340e 100644 --- a/neutron/tests/unit/vmware/vshield/test_loadbalancer_driver.py +++ b/neutron/tests/unit/vmware/vshield/test_loadbalancer_driver.py @@ -19,9 +19,9 @@ import mock from neutron.common import config as n_config from neutron import context from neutron.openstack.common import uuidutils -from neutron.plugins.nicira.dbexts import vcns_db -from neutron.plugins.nicira.vshield.common import exceptions as vcns_exc -from neutron.plugins.nicira.vshield import vcns_driver +from neutron.plugins.vmware.dbexts import vcns_db +from neutron.plugins.vmware.vshield.common import exceptions as vcns_exc +from neutron.plugins.vmware.vshield import vcns_driver from neutron.tests.unit.db.loadbalancer import test_db_loadbalancer from neutron.tests.unit.vmware import get_fake_conf from neutron.tests.unit.vmware import VCNS_NAME diff --git a/neutron/tests/unit/vmware/vshield/test_vcns_driver.py b/neutron/tests/unit/vmware/vshield/test_vcns_driver.py index 3d8ed1b85a..e49cd2d6cc 100644 --- a/neutron/tests/unit/vmware/vshield/test_vcns_driver.py +++ b/neutron/tests/unit/vmware/vshield/test_vcns_driver.py @@ -17,12 +17,12 @@ from eventlet import greenthread import mock from neutron.common import config as n_config -from neutron.plugins.nicira.vshield.common import constants as vcns_const -from neutron.plugins.nicira.vshield.common.constants import RouterStatus -from neutron.plugins.nicira.vshield.tasks.constants import TaskState -from neutron.plugins.nicira.vshield.tasks.constants import TaskStatus -from neutron.plugins.nicira.vshield.tasks import tasks as ts -from neutron.plugins.nicira.vshield import vcns_driver +from neutron.plugins.vmware.vshield.common import constants as vcns_const +from neutron.plugins.vmware.vshield.common.constants import RouterStatus +from neutron.plugins.vmware.vshield.tasks.constants import TaskState +from neutron.plugins.vmware.vshield.tasks.constants import TaskStatus +from neutron.plugins.vmware.vshield.tasks import tasks as ts +from neutron.plugins.vmware.vshield import vcns_driver from neutron.tests import base from neutron.tests.unit.vmware import get_fake_conf from neutron.tests.unit.vmware import VCNS_NAME diff --git a/setup.cfg b/setup.cfg index 56b98aeaff..1193b70536 100644 --- a/setup.cfg +++ b/setup.cfg @@ -80,8 +80,8 @@ setup-hooks = [entry_points] console_scripts = - neutron-check-nsx-config = neutron.plugins.nicira.check_nsx_config:main - neutron-check-nvp-config = neutron.plugins.nicira.check_nsx_config:main + neutron-check-nsx-config = neutron.plugins.vmware.check_nsx_config:main + neutron-check-nvp-config = neutron.plugins.vmware.check_nsx_config:main neutron-db-manage = neutron.db.migration.cli:main neutron-debug = neutron.debug.shell:main neutron-dhcp-agent = neutron.agent.dhcp_agent:main @@ -95,7 +95,7 @@ console_scripts = neutron-nec-agent = neutron.plugins.nec.agent.nec_neutron_agent:main neutron-netns-cleanup = neutron.agent.netns_cleanup_util:main neutron-ns-metadata-proxy = neutron.agent.metadata.namespace_proxy:main - neutron-nsx-manage = neutron.plugins.nicira.shell:main + neutron-nsx-manage = neutron.plugins.vmware.shell:main neutron-openvswitch-agent = neutron.plugins.openvswitch.agent.ovs_neutron_agent:main neutron-ovs-cleanup = neutron.agent.ovs_cleanup_util:main neutron-restproxy-agent = neutron.plugins.bigswitch.agent.restproxy_agent:main @@ -103,7 +103,7 @@ console_scripts = neutron-server = neutron.server:main neutron-rootwrap = oslo.rootwrap.cmd:main neutron-usage-audit = neutron.cmd.usage_audit:main - quantum-check-nvp-config = neutron.plugins.nicira.check_nsx_config:main + quantum-check-nvp-config = neutron.plugins.vmware.check_nsx_config:main quantum-db-manage = neutron.db.migration.cli:main neutron-vpn-agent = neutron.services.vpn.agent:main quantum-debug = neutron.debug.shell:main