]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Rename DB models and related resources for VMware NSX plugin
authorarmando-migliaccio <armamig@gmail.com>
Wed, 12 Feb 2014 01:35:30 +0000 (17:35 -0800)
committerThomas Goirand <thomas@goirand.fr>
Thu, 13 Mar 2014 07:20:32 +0000 (15:20 +0800)
This patch also introduces a DB migration to update the
affected tables, and the enum type for those DB engines that
require it.

Additions made to existing migrations are needed to ensure
that green deployments using the new plugin name will apply
the migrations correctly.

Partial-implements blueprint nicira-plugin-renaming

Change-Id: Ie0fdb51dfa399c44b749fa8345f334a2c8c29151

37 files changed:
neutron/db/migration/alembic_migrations/versions/1149d7de0cfa_port_security.py
neutron/db/migration/alembic_migrations/versions/128e042a2b68_ext_gw_mode.py
neutron/db/migration/alembic_migrations/versions/1341ed32cc1e_nvp_netbinding_update.py
neutron/db/migration/alembic_migrations/versions/1421183d533f_nsx_dhcp_metadata.py
neutron/db/migration/alembic_migrations/versions/176a85fc7d79_add_portbindings_db.py
neutron/db/migration/alembic_migrations/versions/1d76643bcec4_nvp_netbinding.py
neutron/db/migration/alembic_migrations/versions/1efb85914233_allowedaddresspairs.py
neutron/db/migration/alembic_migrations/versions/1fcfc149aca4_agents_unique_by_type_and_host.py
neutron/db/migration/alembic_migrations/versions/2c4af419145b_l3_support.py
neutron/db/migration/alembic_migrations/versions/38335592a0dc_nvp_portmap.py
neutron/db/migration/alembic_migrations/versions/3c6e57a23db4_add_multiprovider.py
neutron/db/migration/alembic_migrations/versions/3cb5d900c5de_security_groups.py
neutron/db/migration/alembic_migrations/versions/3cbf70257c28_nvp_mac_learning.py
neutron/db/migration/alembic_migrations/versions/3d2585038b95_vmware_nsx.py [new file with mode: 0644]
neutron/db/migration/alembic_migrations/versions/3d3cb89d84ee_nsx_switch_mappings.py
neutron/db/migration/alembic_migrations/versions/40dffbf4b549_nvp_dist_router.py
neutron/db/migration/alembic_migrations/versions/45680af419f9_nvp_qos.py
neutron/db/migration/alembic_migrations/versions/4692d074d587_agent_scheduler.py
neutron/db/migration/alembic_migrations/versions/4a666eb208c2_service_router.py
neutron/db/migration/alembic_migrations/versions/4ca36cfc898c_nsx_router_mappings.py
neutron/db/migration/alembic_migrations/versions/50e86cb2637a_nsx_mappings.py
neutron/db/migration/alembic_migrations/versions/511471cc46b_agent_ext_model_supp.py
neutron/plugins/nicira/NeutronPlugin.py
neutron/plugins/nicira/common/nsx_utils.py
neutron/plugins/nicira/dbexts/db.py [moved from neutron/plugins/nicira/dbexts/nicira_db.py with 79% similarity]
neutron/plugins/nicira/dbexts/distributedrouter.py
neutron/plugins/nicira/dbexts/maclearning.py
neutron/plugins/nicira/dbexts/models.py [moved from neutron/plugins/nicira/dbexts/nicira_models.py with 91% similarity]
neutron/plugins/nicira/dbexts/networkgw_db.py
neutron/plugins/nicira/dbexts/nsxrouter.py
neutron/plugins/nicira/dbexts/qos_db.py
neutron/plugins/nicira/dbexts/servicerouter.py
neutron/plugins/nicira/dbexts/vcns_db.py
neutron/plugins/nicira/dbexts/vcns_models.py
neutron/tests/unit/vmware/db/test_nsx_db.py
neutron/tests/unit/vmware/test_nsx_plugin.py
neutron/tests/unit/vmware/test_nsx_utils.py

index 29f798f6e43f0a61cf1d85d7c49306bf7388c17c..1b035eb08cfc7cd150d3317149b05e2e290e75e4 100644 (file)
@@ -30,7 +30,10 @@ down_revision = '1b693c095aa3'
 # Change to ['*'] if this migration applies to all plugins
 
 migration_for_plugins = [
-    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2'
+    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin'
 ]
 
 from alembic import op
index 448010496687d71a115b6e7efb0761d266e18bff..9fc53cca928fbbfd5eaaeb0465903cc34f490329 100644 (file)
@@ -36,8 +36,11 @@ migration_for_plugins = [
     'neutron.plugins.ml2.plugin.Ml2Plugin',
     'neutron.plugins.nec.nec_plugin.NECPluginV2',
     'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
     'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2',
-    'neutron.plugins.ryu.ryu_neutron_plugin.RyuNeutronPluginV2'
+    'neutron.plugins.ryu.ryu_neutron_plugin.RyuNeutronPluginV2',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin'
 ]
 
 from alembic import op
index 9bff77298318d0ec3d270349b7cc98b00050fc23..43e1dd328a7ce7247925742581d99d59dde37d9e 100644 (file)
@@ -30,7 +30,10 @@ down_revision = '4692d074d587'
 # Change to ['*'] if this migration applies to all plugins
 
 migration_for_plugins = [
-    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2'
+    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin'
 ]
 
 from alembic import op
index 2cfbf750577b7d31d62f25302f5e087b61f7247d..69e5414a8f3b42aa6cbd76f1aa4b05459eeb16fe 100644 (file)
@@ -28,7 +28,9 @@ down_revision = '8f682276ee4'
 
 migration_for_plugins = [
     'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
-    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin'
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin'
 ]
 
 from alembic import op
index e7c48c81e734d797f520febfb525564783d852d1..82e40a1cee3a1a8e1548579453ff1742e9badbcc 100644 (file)
@@ -30,10 +30,13 @@ down_revision = 'f489cf14a79c'
 # Change to ['*'] if this migration applies to all plugins
 
 migration_for_plugins = [
-    'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2',
-    'neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2',
     'neutron.plugins.bigswitch.plugin.NeutronRestProxyV2',
+    'neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2',
+    'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2',
     'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin'
 ]
 
 from alembic import op
index 47784d31d4cbf165e2c8adf7792edc3db294f4c0..114d575fed42d9032cecfd2aff79318afc212380 100644 (file)
@@ -30,7 +30,10 @@ down_revision = '3cb5d900c5de'
 # Change to ['*'] if this migration applies to all plugins
 
 migration_for_plugins = [
-    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2'
+    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin'
 ]
 
 from alembic import op
index c01e60df56d84ad394a6f6023e5f5acd0e91d3e9..7719346185aa8e07d029497f7631bd65ef317751 100644 (file)
@@ -30,10 +30,13 @@ down_revision = '51b4de912379'
 # Change to ['*'] if this migration applies to all plugins
 
 migration_for_plugins = [
+    'neutron.plugins.cisco.network_plugin.PluginV2',
     'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
+    'neutron.plugins.ml2.plugin.Ml2Plugin',
     'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2',
-    'neutron.plugins.cisco.network_plugin.PluginV2',
-    'neutron.plugins.ml2.plugin.Ml2Plugin'
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin',
 ]
 
 from alembic import op
index 6337d2a8cbf554f4bed6693e34f58bd60d607d57..b563f9c893a3906ec0b01277dafe8a9df5d64ab4 100644 (file)
@@ -28,11 +28,14 @@ revision = '1fcfc149aca4'
 down_revision = 'e197124d4b9'
 
 migration_for_plugins = [
+    'neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2',
     'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2',
     'neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2',
-    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
     'neutron.plugins.nec.nec_plugin.NECPluginV2',
-    'neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2',
+    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin',
     'neutron.services.loadbalancer.plugin.LoadBalancerPlugin',
 ]
 
index f142fc38f93c5ae0698e41af8f4e731c38946b82..4499c4aeed06d99f45b1b5945fb5d87efdae00f7 100644 (file)
@@ -33,7 +33,10 @@ migration_for_plugins = [
     'neutron.plugins.bigswitch.plugin.NeutronRestProxyV2',
     'neutron.plugins.hyperv.hyperv_neutron_plugin.HyperVNeutronPlugin',
     'neutron.plugins.midonet.plugin.MidonetPluginV2',
-    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2'
+    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin',
 ]
 
 from neutron.db import migration
index a514d36c39d197f54e10a77ccf0f929ff6c18dee..a5304ec22a8c877f2eec241224d93da2055dbdf6 100644 (file)
@@ -30,7 +30,10 @@ down_revision = '49332180ca96'
 # Change to ['*'] if this migration applies to all plugins
 
 migration_for_plugins = [
-    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2'
+    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin'
 ]
 
 from alembic import op
index 5ccf7ee0d8664e9be0e196300db849c4433f4975..70f66ac61259b380146272c1f682dace610bbaae 100644 (file)
@@ -30,7 +30,10 @@ down_revision = '86cf4d88bd3'
 # Change to ['*'] if this migration applies to all plugins
 
 migration_for_plugins = [
-    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2'
+    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin'
 ]
 
 from alembic import op
index ee07e3bd2cc7ccb341df1dabbcb04983420e699a..5959efd3d020680099eb0524a1067556e93a93cc 100644 (file)
@@ -32,9 +32,12 @@ down_revision = '48b6f43f7471'
 migration_for_plugins = [
     'neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2',
     'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
     'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2',
     'neutron.plugins.nec.nec_plugin.NECPluginV2',
     'neutron.plugins.ryu.ryu_neutron_plugin.RyuNeutronPluginV2',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin',
 ]
 
 from alembic import op
index 2dc9f65cd9fb80f210e9a37ad3c8a97001de8886..b62ebcab26050707360a6a7e514006ade3e969f8 100644 (file)
@@ -30,7 +30,10 @@ down_revision = '5ac71e65402c'
 # Change to ['*'] if this migration applies to all plugins
 
 migration_for_plugins = [
-    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2'
+    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin'
 ]
 
 from alembic import op
diff --git a/neutron/db/migration/alembic_migrations/versions/3d2585038b95_vmware_nsx.py b/neutron/db/migration/alembic_migrations/versions/3d2585038b95_vmware_nsx.py
new file mode 100644 (file)
index 0000000..c51f02a
--- /dev/null
@@ -0,0 +1,65 @@
+# Copyright 2014 OpenStack Foundation
+#
+#    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.
+#
+
+"""VMware NSX rebranding
+
+Revision ID: 3d2585038b95
+Revises: 157a5d299379
+Create Date: 2014-02-11 18:18:34.319031
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '3d2585038b95'
+down_revision = '157a5d299379'
+
+# Change to ['*'] if this migration applies to all plugins
+
+migration_for_plugins = [
+    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin'
+]
+
+from alembic import op
+
+from neutron.db import migration
+
+
+def upgrade(active_plugins=None, options=None):
+    if not migration.should_run(active_plugins, migration_for_plugins):
+        return
+
+    op.rename_table('nvp_network_bindings', 'tz_network_bindings')
+    op.rename_table('nvp_multi_provider_networks', 'multi_provider_networks')
+
+    engine = op.get_bind().engine
+    if engine.name == 'postgresql':
+        op.execute("ALTER TYPE nvp_network_bindings_binding_type "
+                   "RENAME TO tz_network_bindings_binding_type;")
+
+
+def downgrade(active_plugins=None, options=None):
+    if not migration.should_run(active_plugins, migration_for_plugins):
+        return
+
+    engine = op.get_bind().engine
+    if engine.name == 'postgresql':
+        op.execute("ALTER TYPE tz_network_bindings_binding_type "
+                   "RENAME TO nvp_network_bindings_binding_type;")
+
+    op.rename_table('multi_provider_networks', 'nvp_multi_provider_networks')
+    op.rename_table('tz_network_bindings', 'nvp_network_bindings')
index 246076fe5b1a009ad29500ce25a53b4a65976dec..2b4da489147b7eb6f0a78fd2eeb9879ad6c9c52e 100644 (file)
@@ -27,7 +27,9 @@ down_revision = '1421183d533f'
 
 migration_for_plugins = [
     'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
-    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin'
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin'
 ]
 
 from alembic import op
index 523d9aba3ea9063ea32536c87f6e70e7ff6e95f8..2bb3e83ef1d66396566fe0c945c53264e989adee 100644 (file)
@@ -30,7 +30,10 @@ down_revision = '63afba73813'
 # Change to ['*'] if this migration applies to all plugins
 
 migration_for_plugins = [
-    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2'
+    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin'
 ]
 
 from alembic import op
index 9a2381aad3ce7878807898df67247429ae31f966..bf59288abdd82eaa2587d3591d4f8ec29837e81d 100644 (file)
@@ -30,7 +30,10 @@ down_revision = '54c2c487e913'
 # Change to ['*'] if this migration applies to all plugins
 
 migration_for_plugins = [
-    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2'
+    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin'
 ]
 
 from alembic import op
index d89879cfd7f5121bee16fe39720fb89797623df5..86d14f7907d1dd0438cc6175b10e59ebde6979ea 100644 (file)
@@ -30,11 +30,14 @@ down_revision = '3b54bf9e29f7'
 # Change to ['*'] if this migration applies to all plugins
 
 migration_for_plugins = [
-    'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2',
+    'neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2',
     'neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2',
+    'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2',
     'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
     'neutron.plugins.nec.nec_plugin.NECPluginV2',
-    'neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin',
 ]
 
 from alembic import op
index 911182b45aa41152405bcc82e1507bfafd39ff37..1d22a9e42f1e2cf34fa5e1f6f4fcace8864b4b29 100644 (file)
@@ -33,7 +33,9 @@ down_revision = '38fc1f6789f8'
 
 migration_for_plugins = [
     'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
-    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin'
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin'
 ]
 
 from alembic import op
index f259161a5ac20dab5632178acdac1259298b13a3..89715a2fa598fd5313b71443ab7373756677d319 100644 (file)
@@ -28,6 +28,8 @@ down_revision = '3d3cb89d84ee'
 migration_for_plugins = [
     'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
     'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin'
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin'
 ]
 
 from alembic import op
index 7ecc460700cd7ea11dfc98baaccc6d0b8a900696..e571f378ac74defe8877123bd27adc04996e4381 100644 (file)
@@ -31,7 +31,9 @@ down_revision = '1fcfc149aca4'
 
 migration_for_plugins = [
     'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
-    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin'
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin'
 ]
 
 from alembic import op
index c372b413e57503af59a75cf0f377d46ee56aa107..ec21abda50f4626898962f3a5461c6bd4bac9534 100644 (file)
@@ -30,12 +30,15 @@ down_revision = '363468ac592c'
 # Change to ['*'] if this migration applies to all plugins
 
 migration_for_plugins = [
-    'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2',
+    'neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2',
     'neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2',
-    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2',
     'neutron.plugins.nec.nec_plugin.NECPluginV2',
-    'neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2',
-    'neutron.services.loadbalancer.plugin.LoadBalancerPlugin',
+    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin',
+    'neutron.services.loadbalancer.plugin.LoadBalancerPlugin'
 ]
 
 from alembic import op
index f047624919837aa820c3de8aac75d86ef87f4910..b706b5db56d84cde42bebbd562b1fc61bba1fb37 100644 (file)
@@ -66,10 +66,10 @@ from neutron.plugins.nicira.common import exceptions as nvp_exc
 from neutron.plugins.nicira.common import nsx_utils
 from neutron.plugins.nicira.common import securitygroups as nvp_sec
 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 nicira_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
@@ -390,7 +390,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin,
 
     def _nvp_find_lswitch_for_port(self, context, port_data):
         network = self._get_network(context, port_data['network_id'])
-        network_bindings = nicira_db.get_network_bindings(
+        network_bindings = nsx_db.get_network_bindings(
             context.session, port_data['network_id'])
         max_ports = self.nvp_opts.max_lp_per_overlay_ls
         allow_extra_lswitches = False
@@ -434,8 +434,8 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin,
                 # Remove orphaned port from NSX
                 switchlib.delete_port(self.cluster, ls_uuid, lp_uuid)
             # rollback the neutron-nvp port mapping
-            nicira_db.delete_neutron_nsx_port_mapping(context.session,
-                                                      port_id)
+            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)
             LOG.exception(msg)
@@ -462,7 +462,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin,
                                                  selected_lswitch['uuid'],
                                                  port_data,
                                                  True)
-            nicira_db.add_neutron_nsx_port_mapping(
+            nsx_db.add_neutron_nsx_port_mapping(
                 context.session, port_data['id'],
                 selected_lswitch['uuid'], lport['uuid'])
             if port_data['device_owner'] not in self.port_special_owners:
@@ -577,7 +577,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin,
                 self.cluster, context, nsx_router_id, port_data,
                 "PatchAttachment", ls_port['uuid'],
                 subnet_ids=[subnet_id])
-            nicira_db.add_neutron_nsx_port_mapping(
+            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 "
@@ -712,7 +712,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin,
                 selected_lswitch['uuid'],
                 port_data,
                 True)
-            nicira_db.add_neutron_nsx_port_mapping(
+            nsx_db.add_neutron_nsx_port_mapping(
                 context.session, port_data['id'],
                 selected_lswitch['uuid'], lport['uuid'])
             l2gwlib.plug_l2_gw_service(
@@ -786,7 +786,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin,
                                 'max_id': constants.MAX_VLAN_TAG})
                 else:
                     # Verify segment is not already allocated
-                    bindings = nicira_db.get_network_bindings_by_vlanid(
+                    bindings = nsx_db.get_network_bindings_by_vlanid(
                         context.session, segmentation_id)
                     if bindings:
                         raise q_exc.VlanIdInUse(
@@ -813,11 +813,11 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin,
     def _extend_network_dict_provider(self, context, network,
                                       multiprovider=None, bindings=None):
         if not bindings:
-            bindings = nicira_db.get_network_bindings(context.session,
-                                                      network['id'])
+            bindings = nsx_db.get_network_bindings(context.session,
+                                                   network['id'])
         if not multiprovider:
-            multiprovider = nicira_db.is_multiprovider_network(context.session,
-                                                               network['id'])
+            multiprovider = nsx_db.is_multiprovider_network(context.session,
+                                                            network['id'])
         # With NVP 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
@@ -876,7 +876,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin,
                 transport_zone_config)
             # add a mapping between the neutron network and the newly
             # created logical switch
-            nicira_db.add_neutron_nsx_network_mapping(
+            nsx_db.add_neutron_nsx_network_mapping(
                 context.session, network.id, selected_lswitch['uuid'])
             return selected_lswitch
         else:
@@ -1006,21 +1006,21 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin,
             # Add mapping between neutron network and NSX switch
             if (not attr.is_attr_set(external) or
                 attr.is_attr_set(external) and not external):
-                nicira_db.add_neutron_nsx_network_mapping(
+                nsx_db.add_neutron_nsx_network_mapping(
                     context.session, new_net['id'],
                     lswitch['uuid'])
             if (net_data.get(mpnet.SEGMENTS) and
                 isinstance(provider_type, bool)):
                 net_bindings = []
                 for tz in net_data[mpnet.SEGMENTS]:
-                    net_bindings.append(nicira_db.add_network_binding(
+                    net_bindings.append(nsx_db.add_network_binding(
                         context.session, new_net['id'],
                         tz.get(pnet.NETWORK_TYPE),
                         tz.get(pnet.PHYSICAL_NETWORK),
                         tz.get(pnet.SEGMENTATION_ID, 0)))
                 if provider_type:
-                    nicira_db.set_multiprovider_network(context.session,
-                                                        new_net['id'])
+                    nsx_db.set_multiprovider_network(context.session,
+                                                     new_net['id'])
                 self._extend_network_dict_provider(context, new_net,
                                                    provider_type,
                                                    net_bindings)
@@ -1490,7 +1490,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin,
                 # Ensure neutron router is moved into the transaction's buffer
                 context.session.flush()
                 # Add mapping between neutron and nsx identifiers
-                nicira_db.add_neutron_nsx_router_mapping(
+                nsx_db.add_neutron_nsx_router_mapping(
                     context.session, router_db['id'], lrouter['uuid'])
 
         if has_gw_info:
@@ -1640,7 +1640,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin,
         # a non-existent NSX router is not left in the DB in case of
         # failure while removing the router from the neutron DB
         try:
-            nicira_db.delete_neutron_nsx_router_mapping(
+            nsx_db.delete_neutron_nsx_router_mapping(
                 context.session, router_id)
         except db_exc.DBError as d_exc:
             # Do not make this error fatal
index 50dcadf4f2f17f7dedd0dcaac1078c83afad99bf..0e42cd9f34cd4c302910a8bfcc83ece6ded21dec 100644 (file)
@@ -16,7 +16,7 @@
 #    under the License.
 
 from neutron.openstack.common import log
-from neutron.plugins.nicira.dbexts import nicira_db
+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 switch as switchlib
@@ -50,7 +50,7 @@ def get_nsx_switch_ids(session, cluster, neutron_network_id):
     First lookup for mappings in Neutron database. If no mapping is
     found, query the NSX backend and add the mappings.
     """
-    nsx_switch_ids = nicira_db.get_nsx_switch_ids(
+    nsx_switch_ids = nsx_db.get_nsx_switch_ids(
         session, neutron_network_id)
     if not nsx_switch_ids:
         # Find logical switches from backend.
@@ -67,7 +67,7 @@ def get_nsx_switch_ids(session, cluster, neutron_network_id):
                 nsx_switch_id = nsx_switch['uuid']
                 nsx_switch_ids.append(nsx_switch_id)
                 # Create DB mapping
-                nicira_db.add_neutron_nsx_network_mapping(
+                nsx_db.add_neutron_nsx_network_mapping(
                     session,
                     neutron_network_id,
                     nsx_switch_id)
@@ -91,7 +91,7 @@ def get_nsx_switch_and_port_id(session, cluster, neutron_port_id):
     the backend logical switch identifier is equal to the neutron
     network identifier.
     """
-    nsx_switch_id, nsx_port_id = nicira_db.get_nsx_switch_and_port_id(
+    nsx_switch_id, nsx_port_id = nsx_db.get_nsx_switch_and_port_id(
         session, neutron_port_id)
     if not nsx_switch_id:
         # Find logical switch for port from backend
@@ -114,12 +114,12 @@ def get_nsx_switch_and_port_id(session, cluster, neutron_port_id):
                          ['LogicalSwitchConfig']['uuid'])
         if nsx_port_id:
             # Mapping already exists. Delete before recreating
-            nicira_db.delete_neutron_nsx_port_mapping(
+            nsx_db.delete_neutron_nsx_port_mapping(
                 session, neutron_port_id)
         else:
             nsx_port_id = nsx_port['uuid']
         # (re)Create DB mapping
-        nicira_db.add_neutron_nsx_port_mapping(
+        nsx_db.add_neutron_nsx_port_mapping(
             session, neutron_port_id,
             nsx_switch_id, nsx_port_id)
     return nsx_switch_id, nsx_port_id
@@ -150,7 +150,7 @@ def get_nsx_router_id(session, cluster, neutron_router_id):
     First, look up the Neutron database. If not found, execute
     a query on NSX platform as the mapping might be missing.
     """
-    nsx_router_id = nicira_db.get_nsx_router_id(
+    nsx_router_id = nsx_db.get_nsx_router_id(
         session, neutron_router_id)
     if not nsx_router_id:
         # Find logical router from backend.
@@ -171,7 +171,7 @@ def get_nsx_router_id(session, cluster, neutron_router_id):
         nsx_router_id = nsx_router['uuid']
         with session.begin(subtransactions=True):
             # Create DB mapping
-            nicira_db.add_neutron_nsx_router_mapping(
+            nsx_db.add_neutron_nsx_router_mapping(
                 session,
                 neutron_router_id,
                 nsx_router_id)
similarity index 79%
rename from neutron/plugins/nicira/dbexts/nicira_db.py
rename to neutron/plugins/nicira/dbexts/db.py
index a998cc5f6ceb5e38c22850d549db349ef79f0926..b02b0bb65505a59a974b8874a7f2ef4c6475ecf4 100644 (file)
@@ -1,6 +1,5 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2012 Nicira, Inc.
+# Copyright 2012 VMware, Inc.
+#
 # All Rights Reserved.
 #
 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
 from sqlalchemy.orm import exc
 
 import neutron.db.api as db
-from neutron.openstack.common.db import exception as d_exc
+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.nicira.dbexts import nicira_models
 
 LOG = logging.getLogger(__name__)
 
 
 def get_network_bindings(session, network_id):
     session = session or db.get_session()
-    return (session.query(nicira_models.NvpNetworkBinding).
+    return (session.query(models.TzNetworkBinding).
             filter_by(network_id=network_id).
             all())
 
 
 def get_network_bindings_by_vlanid(session, vlan_id):
     session = session or db.get_session()
-    return (session.query(nicira_models.NvpNetworkBinding).
+    return (session.query(models.TzNetworkBinding).
             filter_by(vlan_id=vlan_id).
             all())
 
 
 def add_network_binding(session, network_id, binding_type, phy_uuid, vlan_id):
     with session.begin(subtransactions=True):
-        binding = nicira_models.NvpNetworkBinding(network_id, binding_type,
-                                                  phy_uuid, vlan_id)
+        binding = models.TzNetworkBinding(network_id, binding_type,
+                                          phy_uuid, vlan_id)
         session.add(binding)
     return binding
 
 
 def add_neutron_nsx_network_mapping(session, neutron_id, nsx_switch_id):
     with session.begin(subtransactions=True):
-        mapping = nicira_models.NeutronNsxNetworkMapping(
+        mapping = models.NeutronNsxNetworkMapping(
             neutron_id=neutron_id, nsx_id=nsx_switch_id)
         session.add(mapping)
         return mapping
@@ -60,11 +59,11 @@ def add_neutron_nsx_port_mapping(session, neutron_id,
                                  nsx_switch_id, nsx_port_id):
     session.begin(subtransactions=True)
     try:
-        mapping = nicira_models.NeutronNsxPortMapping(
+        mapping = models.NeutronNsxPortMapping(
             neutron_id, nsx_switch_id, nsx_port_id)
         session.add(mapping)
         session.commit()
-    except d_exc.DBDuplicateEntry:
+    except db_exc.DBDuplicateEntry:
         session.rollback()
         # do not complain if the same exact mapping is being added, otherwise
         # re-raise because even though it is possible for the same neutron
@@ -75,7 +74,7 @@ def add_neutron_nsx_port_mapping(session, neutron_id,
             LOG.debug(_("Port mapping for %s already available"), neutron_id)
         else:
             raise
-    except d_exc.DBError:
+    except db_exc.DBError:
         # rollback for any other db error
         session.rollback()
         raise
@@ -84,7 +83,7 @@ def add_neutron_nsx_port_mapping(session, neutron_id,
 
 def add_neutron_nsx_router_mapping(session, neutron_id, nsx_router_id):
     with session.begin(subtransactions=True):
-        mapping = nicira_models.NeutronNsxRouterMapping(
+        mapping = models.NeutronNsxRouterMapping(
             neutron_id=neutron_id, nsx_id=nsx_router_id)
         session.add(mapping)
         return mapping
@@ -94,13 +93,13 @@ def get_nsx_switch_ids(session, neutron_id):
     # This function returns a list of NSX switch identifiers because of
     # the possibility of chained logical switches
     return [mapping['nsx_id'] for mapping in
-            session.query(nicira_models.NeutronNsxNetworkMapping).filter_by(
+            session.query(models.NeutronNsxNetworkMapping).filter_by(
                 neutron_id=neutron_id)]
 
 
 def get_nsx_switch_and_port_id(session, neutron_id):
     try:
-        mapping = (session.query(nicira_models.NeutronNsxPortMapping).
+        mapping = (session.query(models.NeutronNsxPortMapping).
                    filter_by(neutron_id=neutron_id).
                    one())
         return mapping['nsx_switch_id'], mapping['nsx_port_id']
@@ -112,7 +111,7 @@ def get_nsx_switch_and_port_id(session, neutron_id):
 
 def get_nsx_router_id(session, neutron_id):
     try:
-        mapping = (session.query(nicira_models.NeutronNsxRouterMapping).
+        mapping = (session.query(models.NeutronNsxRouterMapping).
                    filter_by(neutron_id=neutron_id).one())
         return mapping['nsx_id']
     except exc.NoResultFound:
@@ -126,12 +125,12 @@ def _delete_by_neutron_id(session, model, neutron_id):
 
 def delete_neutron_nsx_port_mapping(session, neutron_id):
     return _delete_by_neutron_id(
-        session, nicira_models.NeutronNsxPortMapping, neutron_id)
+        session, models.NeutronNsxPortMapping, neutron_id)
 
 
 def delete_neutron_nsx_router_mapping(session, neutron_id):
     return _delete_by_neutron_id(
-        session, nicira_models.NeutronNsxRouterMapping, neutron_id)
+        session, models.NeutronNsxRouterMapping, neutron_id)
 
 
 def unset_default_network_gateways(session):
@@ -149,7 +148,7 @@ def set_default_network_gateway(session, gw_id):
 
 def set_multiprovider_network(session, network_id):
     with session.begin(subtransactions=True):
-        multiprovider_network = nicira_models.MultiProviderNetworks(
+        multiprovider_network = models.MultiProviderNetworks(
             network_id)
         session.add(multiprovider_network)
         return multiprovider_network
@@ -158,5 +157,5 @@ def set_multiprovider_network(session, network_id):
 def is_multiprovider_network(session, network_id):
     with session.begin(subtransactions=True):
         return bool(
-            session.query(nicira_models.MultiProviderNetworks).filter_by(
+            session.query(models.MultiProviderNetworks).filter_by(
                 network_id=network_id).first())
index c1d3bfbc4aada0be14b3e4a4b73305d976c84099..279ae64f601616853d60b1838cb0411f692b46a4 100644 (file)
@@ -1,6 +1,5 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2013 Nicira Networks, Inc.  All rights reserved.
+# 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
@@ -14,8 +13,6 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 #
-# @author: Salvatore Orlando, Nicira, Inc
-#
 
 from neutron.plugins.nicira.dbexts import nsxrouter
 from neutron.plugins.nicira.extensions import distributedrouter as dist_rtr
index ab824b18eab8267e9eded1dea85160dec491e0e3..340ccf46cea66a22549d169807519fef05afdb1f 100644 (file)
@@ -1,5 +1,3 @@
-# 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
similarity index 91%
rename from neutron/plugins/nicira/dbexts/nicira_models.py
rename to neutron/plugins/nicira/dbexts/models.py
index 9d9a0cb32448bde22975b6e274c10b7a31d6deab..b9ec6823b291d0be519880c8bca95b4460901265 100644 (file)
@@ -1,6 +1,5 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2012 Nicira, Inc.
+# Copyright 2013 VMware, Inc.
+#
 # All Rights Reserved.
 #
 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
@@ -23,13 +22,13 @@ from neutron.db import l3_db
 from neutron.db.models_v2 import model_base
 
 
-class NvpNetworkBinding(model_base.BASEV2):
+class TzNetworkBinding(model_base.BASEV2):
     """Represents a binding of a virtual network with a transport zone.
 
     This model class associates a Neutron network with a transport zone;
     optionally a vlan ID might be used if the binding type is 'bridge'
     """
-    __tablename__ = 'nvp_network_bindings'
+    __tablename__ = 'tz_network_bindings'
 
     # TODO(arosen) - it might be worth while refactoring the how this data
     # is stored later so every column does not need to be a primary key.
@@ -38,7 +37,7 @@ class NvpNetworkBinding(model_base.BASEV2):
                         primary_key=True)
     # 'flat', 'vlan', stt' or 'gre'
     binding_type = Column(Enum('flat', 'vlan', 'stt', 'gre', 'l3_ext',
-                               name='nvp_network_bindings_binding_type'),
+                               name='tz_network_bindings_binding_type'),
                           nullable=False, primary_key=True)
     phy_uuid = Column(String(36), primary_key=True, nullable=True)
     vlan_id = Column(Integer, primary_key=True, nullable=True,
@@ -96,9 +95,9 @@ class NeutronNsxRouterMapping(model_base.BASEV2):
 
 
 class MultiProviderNetworks(model_base.BASEV2):
-    """Networks that were provision through multiprovider extension."""
+    """Networks provisioned through multiprovider extension."""
 
-    __tablename__ = 'nvp_multi_provider_networks'
+    __tablename__ = 'multi_provider_networks'
     network_id = Column(String(36),
                         ForeignKey('networks.id', ondelete="CASCADE"),
                         primary_key=True)
@@ -108,7 +107,7 @@ class MultiProviderNetworks(model_base.BASEV2):
 
 
 class NSXRouterExtAttributes(model_base.BASEV2):
-    """Router attributes managed by Nicira plugin extensions."""
+    """Router attributes managed by NSX plugin extensions."""
     router_id = Column(String(36),
                        ForeignKey('routers.id', ondelete="CASCADE"),
                        primary_key=True)
index 39b60d17e668710f7663bbbb73e1f215f5a47ac9..128b86bbed82b8d747356e607e52b5365dfec04d 100644 (file)
@@ -1,6 +1,4 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
-# Copyright 2013 Nicira Networks, Inc.  All rights reserved.
+# 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
@@ -14,8 +12,6 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 #
-# @author: Salvatore Orlando, VMware
-#
 
 import sqlalchemy as sa
 
index de00ec98501f4f7c2b25538ad845c8413330bc63..5b53c5b6a28f2017b87af740bb791e75b7c4e59c 100644 (file)
@@ -1,6 +1,4 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2013 Nicira Networks, Inc.  All rights reserved.
+# 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
 #    License for the specific language governing permissions and limitations
 #    under the License.
 #
-# @author: Salvatore Orlando, Nicira, Inc
-#
 
 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 nicira_models
+from neutron.plugins.nicira.dbexts import models
 
 LOG = logging.getLogger(__name__)
 
@@ -48,7 +44,7 @@ class NsxRouterMixin(object):
                 name = attr['name']
                 default = attr['default']
                 kwargs[name] = router_req.get(name, default)
-            nsx_attributes = nicira_models.NSXRouterExtAttributes(
+            nsx_attributes = models.NSXRouterExtAttributes(
                 router_id=router_db['id'], **kwargs)
             context.session.add(nsx_attributes)
             router_db['nsx_attributes'] = nsx_attributes
index b400319418d69e4e6e4b1acdc03e562b061516a7..71689217142169881c6e3773c914b04352267f4a 100644 (file)
@@ -1,5 +1,3 @@
-# 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
index 9cba2536223026453e296514d40ee06d735b5427..8ca2968f66dea95f1a795b03a8f89b7953bc31e1 100644 (file)
@@ -1,5 +1,3 @@
-# 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
index 17904eeb86fe35d844a4e847633ece85a2ebc939..e34d2efc627a92562cd71783e51d387a27bb5d0a 100644 (file)
@@ -1,6 +1,5 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2013 Nicira, Inc.
+# Copyright 2013 VMware, Inc.
+#
 # All Rights Reserved.
 #
 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
index c63ff221ac91f6c88aa8de2e2205c08916407085..847161358880398f42a79878ad440e8f72b4c126 100644 (file)
@@ -1,6 +1,5 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2013 Nicira, Inc.
+# Copyright 2013 VMware, Inc.
+#
 # All Rights Reserved.
 #
 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
index 5176f1ed0bb70ca43cff3d7748069c6930c49c6a..61ba452d6e5dca7e5b13d573a5e1107eb6c665ac 100644 (file)
@@ -19,8 +19,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 nicira_db as nsx_db
-from neutron.plugins.nicira.dbexts import nicira_models as models
+from neutron.plugins.nicira.dbexts import db as nsx_db
+from neutron.plugins.nicira.dbexts import models
 from neutron.tests import base
 
 
index a676c5937daa4dace4eb220faa7d5b08cea2e330..c5882bc85e8a8b79f34b7d324be54d1202f820ce 100644 (file)
@@ -41,7 +41,7 @@ from neutron.openstack.common import log
 from neutron.openstack.common import uuidutils
 from neutron.plugins.nicira.common import exceptions as nsx_exc
 from neutron.plugins.nicira.common import sync
-from neutron.plugins.nicira.dbexts import nicira_db as nsx_db
+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
index 1b8f74c164120c0467db3eca49a5939c1709f96c..3c199aca3749862f1e3e8e61abd160ae12e6aa54 100644 (file)
@@ -40,32 +40,32 @@ class NsxUtilsTestCase(base.BaseTestCase):
         # This will allow for avoiding setting up the plugin
         # for creating db entries
         mock.patch(nsx_method('get_nsx_switch_and_port_id',
-                              module_name='dbexts.nicira_db'),
+                              module_name='dbexts.db'),
                    return_value=ret_value).start()
         mock.patch(nsx_method('add_neutron_nsx_port_mapping',
-                              module_name='dbexts.nicira_db')).start()
+                              module_name='dbexts.db')).start()
         mock.patch(nsx_method('delete_neutron_nsx_port_mapping',
-                              module_name='dbexts.nicira_db')).start()
+                              module_name='dbexts.db')).start()
 
     def _mock_network_mapping_db_calls(self, ret_value):
         # Mock relevant db calls
         # This will allow for avoiding setting up the plugin
         # for creating db entries
         mock.patch(nsx_method('get_nsx_switch_ids',
-                              module_name='dbexts.nicira_db'),
+                              module_name='dbexts.db'),
                    return_value=ret_value).start()
         mock.patch(nsx_method('add_neutron_nsx_network_mapping',
-                              module_name='dbexts.nicira_db')).start()
+                              module_name='dbexts.db')).start()
 
     def _mock_router_mapping_db_calls(self, ret_value):
         # Mock relevant db calls
         # This will allow for avoiding setting up the plugin
         # for creating db entries
         mock.patch(nsx_method('get_nsx_router_id',
-                              module_name='dbexts.nicira_db'),
+                              module_name='dbexts.db'),
                    return_value=ret_value).start()
         mock.patch(nsx_method('add_neutron_nsx_router_mapping',
-                              module_name='dbexts.nicira_db')).start()
+                              module_name='dbexts.db')).start()
 
     def _verify_get_nsx_switch_and_port_id(self, exp_ls_uuid, exp_lp_uuid):
         # The nvplib and db calls are  mocked, therefore the cluster