]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix NSX migration path
authorSalvatore Orlando <salv.orlando@gmail.com>
Wed, 26 Feb 2014 11:06:38 +0000 (03:06 -0800)
committerThomas Goirand <thomas@goirand.fr>
Thu, 13 Mar 2014 07:20:33 +0000 (15:20 +0800)
The migration path for the NSX plugin was not working correctly,
as two migrations (extra route and network gateways) were
skipped.
Therefore installations were partially relying on automatic
schema generation.

This patch fixes the migration path, as well as an attribute
whose name in the migration and the DB model differed.

Closes-Bug: 1285095

Change-Id: I9e4db294e618d1419d86e07cfb5505dcc01b54ca

neutron/db/migration/alembic_migrations/versions/1c33fa3cd1a1_extra_route_config.py
neutron/db/migration/alembic_migrations/versions/363468ac592c_nvp_network_gw.py

index 2d91fc6a83e771d6910dd726c1aa1856206da0e7..07dd4a945812ebfd061d5b02855a3f12da675d17 100644 (file)
@@ -32,9 +32,13 @@ down_revision = '45680af419f9'
 migration_for_plugins = [
     'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2',
     'neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2',
+    'neutron.plugins.metaplugin.meta_neutron_plugin.MetaPluginV2',
     'neutron.plugins.nec.nec_plugin.NECPluginV2',
+    'neutron.plugins.nicira.NeutronPlugin.NvpPluginV2',
+    'neutron.plugins.nicira.NeutronServicePlugin.NvpAdvancedPlugin',
     'neutron.plugins.ryu.ryu_neutron_plugin.RyuNeutronPluginV2',
-    'neutron.plugins.metaplugin.meta_neutron_plugin.MetaPluginV2'
+    'neutron.plugins.vmware.plugin.NsxPlugin',
+    'neutron.plugins.vmware.plugin.NsxServicePlugin'
 ]
 
 from alembic import op
index 64bdce413445905d3d7781202201c4e0fe809e75..e2727e60ec84038f187771b269483e27de34eeb7 100644 (file)
@@ -30,7 +30,10 @@ down_revision = '1c33fa3cd1a1'
 # Change to ['*'] if this migration applies to all plugins
 
 migration_for_plugins = [
-    'neutron.plugins.nicira.NeutronPluginV2.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
@@ -48,7 +51,7 @@ def upgrade(active_plugins=None, options=None):
                     sa.Column('name', sa.String(length=255), nullable=True),
                     sa.Column('tenant_id', sa.String(length=36),
                               nullable=True),
-                    sa.Column('shared', sa.Boolean(), nullable=True),
+                    sa.Column('default', sa.Boolean(), nullable=True),
                     sa.PrimaryKeyConstraint('id'))
     op.create_table('networkgatewaydevices',
                     sa.Column('id', sa.String(length=36), nullable=False),