diff --git a/setup.cfg b/setup.cfg index 59761e406a..5b2f8f48c6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,6 +24,8 @@ packages = [entry_points] console_scripts = neutron-check-nsx-config = vmware_nsx.neutron.plugins.vmware.check_nsx_config:main +neutron.db.alembic_migrations = + vmware-nsx = vmware_nsx.neutron.db.migration:alembic_migrations neutron.service_plugins = vmware_nsx_l2gw = vmware_nsx.neutron.services.l2gateway.plugin:NsxL2GatewayPlugin vmware_nsx.neutron.nsxv.router_type_drivers = diff --git a/vmware_nsx/neutron/db/migration/alembic_migrations/script.py.mako b/vmware_nsx/neutron/db/migration/alembic_migrations/script.py.mako new file mode 100644 index 0000000000..63d2ca6e47 --- /dev/null +++ b/vmware_nsx/neutron/db/migration/alembic_migrations/script.py.mako @@ -0,0 +1,36 @@ +# Copyright ${create_date.year} VMware, Inc. +# +# 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. + +"""${message} + +Revision ID: ${up_revision} +Revises: ${down_revision} +Create Date: ${create_date} + +""" + +# revision identifiers, used by Alembic. +revision = ${repr(up_revision)} +down_revision = ${repr(down_revision)} +% if branch_labels: +branch_labels = ${repr(branch_labels)} +%endif + +from alembic import op +import sqlalchemy as sa +${imports if imports else ""} + + +def upgrade(): + ${upgrades if upgrades else "pass"} diff --git a/vmware_nsx/neutron/db/migration/alembic_migrations/versions/HEADS b/vmware_nsx/neutron/db/migration/alembic_migrations/versions/HEADS new file mode 100644 index 0000000000..731eec7e70 --- /dev/null +++ b/vmware_nsx/neutron/db/migration/alembic_migrations/versions/HEADS @@ -0,0 +1,3 @@ +393bf843b96 +53a3254aa95e +kilo diff --git a/vmware_nsx/neutron/db/migration/alembic_migrations/versions/liberty/contract/393bf843b96_initial_liberty_no_op_contract_script.py b/vmware_nsx/neutron/db/migration/alembic_migrations/versions/liberty/contract/393bf843b96_initial_liberty_no_op_contract_script.py new file mode 100644 index 0000000000..4d0709dbb2 --- /dev/null +++ b/vmware_nsx/neutron/db/migration/alembic_migrations/versions/liberty/contract/393bf843b96_initial_liberty_no_op_contract_script.py @@ -0,0 +1,32 @@ +# Copyright 2015 VMware, Inc. +# +# 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. +# + +"""Initial Liberty no-op contract script. + +Revision ID: 393bf843b96 +Revises: None +Create Date: 2015-08-13 07:26:21.891165 + +""" + +# revision identifiers, used by Alembic. +revision = '393bf843b96' +down_revision = None +branch_labels = ('liberty_contract',) +depends_on = ('kilo',) + + +def upgrade(): + pass diff --git a/vmware_nsx/neutron/db/migration/alembic_migrations/versions/liberty/expand/53a3254aa95e_initial_liberty_no_op_expand_script.py b/vmware_nsx/neutron/db/migration/alembic_migrations/versions/liberty/expand/53a3254aa95e_initial_liberty_no_op_expand_script.py new file mode 100644 index 0000000000..8a942e6ba1 --- /dev/null +++ b/vmware_nsx/neutron/db/migration/alembic_migrations/versions/liberty/expand/53a3254aa95e_initial_liberty_no_op_expand_script.py @@ -0,0 +1,32 @@ +# Copyright 2015 VMware, Inc. +# +# 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. +# + +"""Initial Liberty no-op expand script. + +Revision ID: 53a3254aa95e +Revises: None +Create Date: 2015-08-13 06:34:29.842396 + +""" + +# revision identifiers, used by Alembic. +revision = '53a3254aa95e' +down_revision = None +branch_labels = ('liberty_expand',) +depends_on = ('kilo',) + + +def upgrade(): + pass