From f36d03f70bfaab09568ca871e00c4bb2e42577d8 Mon Sep 17 00:00:00 2001 From: Ann Kamyshnikova Date: Thu, 20 Aug 2015 11:27:39 +0300 Subject: [PATCH] Split DRIVER_TABLES in external.py Split DRIVER_TABLES into separate lists for each driver. This is needed for easier implementation of ModelMigrationSyncTest in driver/plugin repositoties that were split out from Neutron. Related-bug: #1470678 Change-Id: Id4558f2230f42377be1dd4f319a2c97122d1fa9d --- doc/source/devref/contribute.rst | 4 ++-- .../migration/alembic_migrations/external.py | 20 +++++++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/doc/source/devref/contribute.rst b/doc/source/devref/contribute.rst index d83de01b0..609c764fa 100644 --- a/doc/source/devref/contribute.rst +++ b/doc/source/devref/contribute.rst @@ -439,7 +439,7 @@ should take these steps to move the models for the tables out of tree. third-party repo as is done in the neutron repo, i.e. ``networking_foo/db/migration/alembic_migrations/versions/*.py`` #. Remove the models from the neutron repo. -#. Add the names of the removed tables to ``DRIVER_TABLES`` in +#. Add the names of the removed tables to ``REPO_FOO_TABLES`` in ``neutron/db/migration/alembic_migrations/external.py`` (this is used for testing, see below). @@ -461,7 +461,7 @@ Liberty Steps +++++++++++++ The model_sync test will be updated to ignore the models that have been moved -out of tree. A ``DRIVER_TABLES`` list will be maintained in +out of tree. ``REPO_FOO_TABLES`` lists will be maintained in ``neutron/db/migration/alembic_migrations/external.py``. diff --git a/neutron/db/migration/alembic_migrations/external.py b/neutron/db/migration/alembic_migrations/external.py index 5d9f0beed..ce28c27a9 100644 --- a/neutron/db/migration/alembic_migrations/external.py +++ b/neutron/db/migration/alembic_migrations/external.py @@ -24,12 +24,15 @@ LBAAS_TABLES = ['vips', 'sessionpersistences', 'pools', 'healthmonitors', FWAAS_TABLES = ['firewall_rules', 'firewalls', 'firewall_policies'] -DRIVER_TABLES = [ - # Arista ML2 driver Models moved to openstack/networking-arista +# Arista ML2 driver Models moved to openstack/networking-arista +REPO_ARISTA_TABLES = [ 'arista_provisioned_nets', 'arista_provisioned_vms', 'arista_provisioned_tenants', - # Models moved to openstack/networking-cisco +] + +# Models moved to openstack/networking-cisco +REPO_CISCO_TABLES = [ 'cisco_ml2_apic_contracts', 'cisco_ml2_apic_names', 'cisco_ml2_apic_host_links', @@ -45,7 +48,10 @@ DRIVER_TABLES = [ 'ml2_nexus_vxlan_allocations', 'ml2_nexus_vxlan_mcast_groups', 'ml2_ucsm_port_profiles', - # VMware-NSX models moved to openstack/vmware-nsx +] + +# VMware-NSX models moved to openstack/vmware-nsx +REPO_VMWARE_TABLES = [ 'tz_network_bindings', 'neutron_nsx_network_mappings', 'neutron_nsx_security_group_mappings', @@ -77,7 +83,9 @@ DRIVER_TABLES = [ 'nsxv_spoofguard_policy_network_mappings', 'nsxv_vdr_dhcp_bindings', 'vcns_router_bindings', - # Add your tables with moved models here^. Please end with a comma. ] -TABLES = (FWAAS_TABLES + LBAAS_TABLES + VPNAAS_TABLES + DRIVER_TABLES) +TABLES = (FWAAS_TABLES + LBAAS_TABLES + VPNAAS_TABLES + + REPO_ARISTA_TABLES + + REPO_CISCO_TABLES + + REPO_VMWARE_TABLES) -- 2.45.2