Add Apache 2.0 license header to the alembic_migrations/script.py.mako
This patch can generate the new alembic_migrations/versions files that include Apache 2.0 license header. All alembic version files are python syntax, should be checked by flake8. Change-Id: I7f00312dcad78e6ef80b260ccc31d0a193071c11
This commit is contained in:
parent
76413b24a6
commit
b483bba7fb
@ -1,3 +1,18 @@
|
||||
# Copyright ${create_date.year} 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.
|
||||
#
|
||||
|
||||
"""${message}
|
||||
|
||||
Revision ID: ${up_revision}
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Remove transport keys column from project quotas table
|
||||
|
||||
Revision ID: 10220ccbe7fa
|
||||
@ -11,7 +24,6 @@ revision = '10220ccbe7fa'
|
||||
down_revision = '3c3b04040bfe'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade():
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Add project column to consumer table
|
||||
|
||||
Revision ID: 156cd9933643
|
||||
@ -18,8 +31,8 @@ def upgrade():
|
||||
op.add_column(
|
||||
'container_consumer_metadata',
|
||||
sa.Column('project_id',
|
||||
sa.String(length=36),
|
||||
nullable=True))
|
||||
sa.String(length=36),
|
||||
nullable=True))
|
||||
op.create_index(
|
||||
op.f('ix_container_consumer_metadata_project_id'),
|
||||
'container_consumer_metadata',
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""fill project_id to secrets where missing
|
||||
|
||||
Revision ID: 161f8aceb687
|
||||
@ -44,7 +57,7 @@ def upgrade():
|
||||
op.execute(secrets.update().
|
||||
values({'project_id': project_secret.c.project_id}).
|
||||
where(secrets.c.id == project_secret.c.secret_id).
|
||||
where(secrets.c.project_id == None)
|
||||
where(secrets.c.project_id == None) # noqa
|
||||
)
|
||||
|
||||
# Need to drop foreign key constraint before mysql will allow changes
|
||||
@ -58,5 +71,3 @@ def upgrade():
|
||||
# Create foreign key constraint again
|
||||
_create_constraint(ctx, 'secrets_project_fk', 'secrets', 'projects',
|
||||
['project_id'], ['id'])
|
||||
|
||||
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""create test table
|
||||
|
||||
Revision ID: 1a0c2cdafb38
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""New secret and container ACL tables
|
||||
|
||||
Revision ID: 1a7cf79559e3
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Add project id to Secrets
|
||||
|
||||
Revision ID: 1bc885808c76
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""remove ProjectSecret table
|
||||
|
||||
Revision ID: 1bece815014f
|
||||
@ -11,8 +24,6 @@ revision = '1bece815014f'
|
||||
down_revision = '161f8aceb687'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
|
||||
def upgrade():
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Fixing composite primary keys and adding indexes to foreign key
|
||||
|
||||
Revision ID: 1c0f328bfce0
|
||||
@ -21,36 +34,64 @@ def _drop_constraint(ctx, name, table):
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.create_index(op.f('ix_certificate_authority_metadata_ca_id'), 'certificate_authority_metadata', ['ca_id'], unique=False)
|
||||
op.create_index(op.f('ix_certificate_authority_metadata_key'), 'certificate_authority_metadata', ['key'], unique=False)
|
||||
op.create_index(op.f('ix_container_consumer_metadata_container_id'), 'container_consumer_metadata', ['container_id'], unique=False)
|
||||
op.create_index(op.f('ix_container_secret_container_id'), 'container_secret', ['container_id'], unique=False)
|
||||
op.create_index(op.f('ix_container_secret_secret_id'), 'container_secret', ['secret_id'], unique=False)
|
||||
op.create_index(op.f('ix_containers_project_id'), 'containers', ['project_id'], unique=False)
|
||||
op.create_index(op.f('ix_encrypted_data_kek_id'), 'encrypted_data', ['kek_id'], unique=False)
|
||||
op.create_index(op.f('ix_encrypted_data_secret_id'), 'encrypted_data', ['secret_id'], unique=False)
|
||||
op.create_index(op.f('ix_kek_data_project_id'), 'kek_data', ['project_id'], unique=False)
|
||||
op.create_index(op.f('ix_order_barbican_metadata_order_id'), 'order_barbican_metadata', ['order_id'], unique=False)
|
||||
op.create_index(op.f('ix_order_plugin_metadata_order_id'), 'order_plugin_metadata', ['order_id'], unique=False)
|
||||
op.create_index(op.f('ix_order_retry_tasks_order_id'), 'order_retry_tasks', ['order_id'], unique=False)
|
||||
op.create_index(op.f('ix_orders_container_id'), 'orders', ['container_id'], unique=False)
|
||||
op.create_index(op.f('ix_orders_project_id'), 'orders', ['project_id'], unique=False)
|
||||
op.create_index(op.f('ix_orders_secret_id'), 'orders', ['secret_id'], unique=False)
|
||||
op.create_index(op.f('ix_certificate_authority_metadata_ca_id'),
|
||||
'certificate_authority_metadata', ['ca_id'], unique=False)
|
||||
op.create_index(op.f('ix_certificate_authority_metadata_key'),
|
||||
'certificate_authority_metadata', ['key'], unique=False)
|
||||
op.create_index(op.f('ix_container_consumer_metadata_container_id'),
|
||||
'container_consumer_metadata', ['container_id'],
|
||||
unique=False)
|
||||
op.create_index(op.f('ix_container_secret_container_id'),
|
||||
'container_secret', ['container_id'], unique=False)
|
||||
op.create_index(op.f('ix_container_secret_secret_id'),
|
||||
'container_secret', ['secret_id'], unique=False)
|
||||
op.create_index(op.f('ix_containers_project_id'),
|
||||
'containers', ['project_id'], unique=False)
|
||||
op.create_index(op.f('ix_encrypted_data_kek_id'),
|
||||
'encrypted_data', ['kek_id'], unique=False)
|
||||
op.create_index(op.f('ix_encrypted_data_secret_id'),
|
||||
'encrypted_data', ['secret_id'], unique=False)
|
||||
op.create_index(op.f('ix_kek_data_project_id'),
|
||||
'kek_data', ['project_id'], unique=False)
|
||||
op.create_index(op.f('ix_order_barbican_metadata_order_id'),
|
||||
'order_barbican_metadata', ['order_id'], unique=False)
|
||||
op.create_index(op.f('ix_order_plugin_metadata_order_id'),
|
||||
'order_plugin_metadata', ['order_id'], unique=False)
|
||||
op.create_index(op.f('ix_order_retry_tasks_order_id'),
|
||||
'order_retry_tasks', ['order_id'], unique=False)
|
||||
op.create_index(op.f('ix_orders_container_id'),
|
||||
'orders', ['container_id'], unique=False)
|
||||
op.create_index(op.f('ix_orders_project_id'),
|
||||
'orders', ['project_id'], unique=False)
|
||||
op.create_index(op.f('ix_orders_secret_id'),
|
||||
'orders', ['secret_id'], unique=False)
|
||||
|
||||
ctx = op.get_context()
|
||||
_drop_constraint(ctx, 'preferred_certificate_authorities_ibfk_1', 'preferred_certificate_authorities')
|
||||
_drop_constraint(ctx, 'preferred_certificate_authorities_ibfk_1',
|
||||
'preferred_certificate_authorities')
|
||||
|
||||
op.alter_column('preferred_certificate_authorities', 'ca_id',
|
||||
existing_type=sa.VARCHAR(length=36),
|
||||
nullable=False)
|
||||
existing_type=sa.VARCHAR(length=36),
|
||||
nullable=False)
|
||||
|
||||
op.create_foreign_key('preferred_certificate_authorities_fk', 'preferred_certificate_authorities',
|
||||
op.create_foreign_key('preferred_certificate_authorities_fk',
|
||||
'preferred_certificate_authorities',
|
||||
'certificate_authorities', ['ca_id'], ['id'])
|
||||
|
||||
op.create_index(op.f('ix_preferred_certificate_authorities_ca_id'), 'preferred_certificate_authorities', ['ca_id'], unique=False)
|
||||
op.create_index(op.f('ix_preferred_certificate_authorities_project_id'), 'preferred_certificate_authorities', ['project_id'], unique=True)
|
||||
op.create_index(op.f('ix_project_certificate_authorities_ca_id'), 'project_certificate_authorities', ['ca_id'], unique=False)
|
||||
op.create_index(op.f('ix_project_certificate_authorities_project_id'), 'project_certificate_authorities', ['project_id'], unique=False)
|
||||
op.create_index(op.f('ix_project_secret_project_id'), 'project_secret', ['project_id'], unique=False)
|
||||
op.create_index(op.f('ix_project_secret_secret_id'), 'project_secret', ['secret_id'], unique=False)
|
||||
op.create_index(op.f('ix_secret_store_metadata_secret_id'), 'secret_store_metadata', ['secret_id'], unique=False)
|
||||
op.create_index(op.f('ix_preferred_certificate_authorities_ca_id'),
|
||||
'preferred_certificate_authorities', ['ca_id'],
|
||||
unique=False)
|
||||
op.create_index(op.f('ix_preferred_certificate_authorities_project_id'),
|
||||
'preferred_certificate_authorities', ['project_id'],
|
||||
unique=True)
|
||||
op.create_index(op.f('ix_project_certificate_authorities_ca_id'),
|
||||
'project_certificate_authorities', ['ca_id'], unique=False)
|
||||
op.create_index(op.f('ix_project_certificate_authorities_project_id'),
|
||||
'project_certificate_authorities', ['project_id'],
|
||||
unique=False)
|
||||
op.create_index(op.f('ix_project_secret_project_id'),
|
||||
'project_secret', ['project_id'], unique=False)
|
||||
op.create_index(op.f('ix_project_secret_secret_id'),
|
||||
'project_secret', ['secret_id'], unique=False)
|
||||
op.create_index(op.f('ix_secret_store_metadata_secret_id'),
|
||||
'secret_store_metadata', ['secret_id'], unique=False)
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""add new columns type meta containerId
|
||||
|
||||
Revision ID: 1e86c18af2dd
|
||||
@ -15,8 +28,10 @@ import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade():
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('orders', sa.Column('container_id', sa.String(length=36), nullable=True))
|
||||
op.add_column('orders',
|
||||
sa.Column('container_id', sa.String(length=36),
|
||||
nullable=True))
|
||||
op.add_column('orders', sa.Column('meta', sa.Text, nullable=True))
|
||||
op.add_column('orders', sa.Column('type', sa.String(length=255), nullable=True))
|
||||
### end Alembic commands ###
|
||||
op.add_column('orders',
|
||||
sa.Column('type', sa.String(length=255),
|
||||
nullable=True))
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""removing redundant fields from order
|
||||
|
||||
Revision ID: 254495565185
|
||||
@ -11,7 +24,6 @@ revision = '254495565185'
|
||||
down_revision = '2843d6469f25'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade():
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Change keystone_id for external_id in Project model
|
||||
|
||||
Revision ID: 256da65e0c5f
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""add sub status info for orders
|
||||
|
||||
Revision ID: 2843d6469f25
|
||||
@ -15,5 +28,9 @@ import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column('orders', sa.Column('sub_status', sa.String(length=36), nullable=True))
|
||||
op.add_column('orders', sa.Column('sub_status_message', sa.String(length=255), nullable=True))
|
||||
op.add_column('orders',
|
||||
sa.Column('sub_status', sa.String(length=36),
|
||||
nullable=True))
|
||||
op.add_column('orders',
|
||||
sa.Column('sub_status_message', sa.String(length=255),
|
||||
nullable=True))
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""dsa in container type modelbase_to
|
||||
|
||||
Revision ID: 2ab3f5371bde
|
||||
@ -15,12 +28,18 @@ import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column('container_secret', sa.Column('created_at', sa.DateTime(), nullable=False))
|
||||
op.add_column('container_secret', sa.Column('deleted', sa.Boolean(), nullable=False))
|
||||
op.add_column('container_secret', sa.Column('deleted_at', sa.DateTime(), nullable=True))
|
||||
op.add_column('container_secret', sa.Column('id', sa.String(length=36), nullable=False))
|
||||
op.add_column('container_secret', sa.Column('status', sa.String(length=20), nullable=False))
|
||||
op.add_column('container_secret', sa.Column('updated_at', sa.DateTime(), nullable=False))
|
||||
op.add_column('container_secret',
|
||||
sa.Column('created_at', sa.DateTime(), nullable=False))
|
||||
op.add_column('container_secret',
|
||||
sa.Column('deleted', sa.Boolean(), nullable=False))
|
||||
op.add_column('container_secret',
|
||||
sa.Column('deleted_at', sa.DateTime(), nullable=True))
|
||||
op.add_column('container_secret',
|
||||
sa.Column('id', sa.String(length=36), nullable=False))
|
||||
op.add_column('container_secret',
|
||||
sa.Column('status', sa.String(length=20), nullable=False))
|
||||
op.add_column('container_secret',
|
||||
sa.Column('updated_at', sa.DateTime(), nullable=False))
|
||||
|
||||
op.create_primary_key('pk_container_secret', 'container_secret', ['id'])
|
||||
op.create_unique_constraint(
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Added CA related tables
|
||||
|
||||
Revision ID: 2d21598e7e70
|
||||
@ -48,7 +61,8 @@ def upgrade():
|
||||
sa.Column('status', sa.String(length=20), nullable=False),
|
||||
sa.Column('project_id', sa.String(length=36), nullable=False),
|
||||
sa.Column('ca_id', sa.String(length=36), nullable=False),
|
||||
sa.ForeignKeyConstraint(['ca_id'], ['certificate_authorities.id'],),
|
||||
sa.ForeignKeyConstraint(['ca_id'],
|
||||
['certificate_authorities.id'],),
|
||||
sa.ForeignKeyConstraint(['project_id'], ['projects.id'],),
|
||||
sa.PrimaryKeyConstraint('id', 'project_id', 'ca_id'),
|
||||
sa.UniqueConstraint('project_id',
|
||||
@ -71,7 +85,8 @@ def upgrade():
|
||||
sa.Column('key', sa.String(length=255), nullable=False),
|
||||
sa.Column('value', sa.String(length=255), nullable=False),
|
||||
sa.Column('ca_id', sa.String(length=36), nullable=False),
|
||||
sa.ForeignKeyConstraint(['ca_id'], ['certificate_authorities.id'],),
|
||||
sa.ForeignKeyConstraint(['ca_id'],
|
||||
['certificate_authorities.id'],),
|
||||
sa.PrimaryKeyConstraint('id', 'key', 'ca_id'),
|
||||
sa.UniqueConstraint('ca_id',
|
||||
'key',
|
||||
@ -93,7 +108,8 @@ def upgrade():
|
||||
sa.Column('status', sa.String(length=20), nullable=False),
|
||||
sa.Column('project_id', sa.String(length=36), nullable=False),
|
||||
sa.Column('ca_id', sa.String(length=36), nullable=True),
|
||||
sa.ForeignKeyConstraint(['ca_id'], ['certificate_authorities.id'],),
|
||||
sa.ForeignKeyConstraint(['ca_id'],
|
||||
['certificate_authorities.id'],),
|
||||
sa.ForeignKeyConstraint(['project_id'], ['projects.id'],),
|
||||
sa.PrimaryKeyConstraint('id', 'project_id'),
|
||||
sa.UniqueConstraint('project_id')
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Remove size limits on meta table values
|
||||
|
||||
Revision ID: 3041b53b95d7
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Update order_retry_tasks table
|
||||
|
||||
Revision ID: 30dba269cc64
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Add missing constraints
|
||||
|
||||
Revision ID: 39a96e67e990
|
||||
@ -16,8 +29,8 @@ import sqlalchemy as sa
|
||||
|
||||
def upgrade():
|
||||
# Add missing projects table keystone_id uniqueness constraint.
|
||||
op.create_unique_constraint(
|
||||
'uc_projects_external_ids', 'projects', ['external_id'])
|
||||
op.create_unique_constraint('uc_projects_external_ids',
|
||||
'projects', ['external_id'])
|
||||
|
||||
# Add missing default for secret_acls' project_access.
|
||||
op.alter_column('secret_acls', 'project_access',
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Model for multiple backend support
|
||||
|
||||
Revision ID: 39cf2e645cba
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""add owning project and creator to CAs
|
||||
|
||||
Revision ID: 3c3b04040bfe
|
||||
@ -15,13 +28,11 @@ import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade():
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('certificate_authorities',
|
||||
sa.Column('creator_id', sa.String(length=255),
|
||||
nullable=True))
|
||||
nullable=True))
|
||||
op.add_column('certificate_authorities',
|
||||
sa.Column('project_id', sa.String(length=36),
|
||||
nullable=True))
|
||||
nullable=True))
|
||||
op.create_foreign_key('cas_project_fk', 'certificate_authorities',
|
||||
'projects', ['project_id'], ['id'])
|
||||
### end Alembic commands ###
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Add OrderBarbicanMetadata table
|
||||
|
||||
Revision ID: 3d36a26b88af
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Add orders plugin metadata table and relationships
|
||||
|
||||
Revision ID: 4070806f6972
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""added secret type column to secrets table
|
||||
|
||||
Revision ID: 443d6f4a69ac
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Add project quotas table
|
||||
|
||||
Revision ID: 46b98cde536
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Made plugin names in kek datum non nullable
|
||||
|
||||
Revision ID: 47b69e523451
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Add cas column to project quotas table
|
||||
|
||||
Revision ID: 4ecde3a3a72a
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""rename ACL creator_only to project_access
|
||||
|
||||
Revision ID: 6a4457517a3
|
||||
@ -16,9 +29,6 @@ import sqlalchemy as sa
|
||||
|
||||
def upgrade():
|
||||
|
||||
ctx = op.get_context()
|
||||
con = op.get_bind()
|
||||
|
||||
op.alter_column('secret_acls', 'creator_only', existing_type=sa.BOOLEAN(),
|
||||
new_column_name='project_access')
|
||||
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Change tenants to projects
|
||||
|
||||
Revision ID: 795737bb3c3
|
||||
@ -30,6 +43,7 @@ def _change_fk_to_project(ctx, con, table, fk_old, fk_new):
|
||||
op.create_foreign_key(fk_new, table,
|
||||
'projects', ['project_id'], ['id'])
|
||||
|
||||
|
||||
def upgrade():
|
||||
# project_secret table
|
||||
ctx = op.get_context()
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""Add OrderRetryTask
|
||||
|
||||
Revision ID: aa2cf96a1d5
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""add-cert-to-container-type
|
||||
|
||||
Revision ID: cd4106a1a0
|
||||
|
@ -1,3 +1,16 @@
|
||||
#
|
||||
# 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.
|
||||
|
||||
"""change_url_length
|
||||
|
||||
Revision ID: d2780d5aa510
|
||||
|
2
tox.ini
2
tox.ini
@ -76,7 +76,7 @@ passenv = KMIP_PLUGIN_ENABLED
|
||||
|
||||
[flake8]
|
||||
exclude = .git,.idea,.tox,bin,dist,debian,rpmbuild,tools,*.egg-info,*.eggs,contrib,
|
||||
functionaltests,*alembic_migrations/versions,*docs/target,*.egg
|
||||
functionaltests,*docs/target,*.egg
|
||||
|
||||
[testenv:bandit]
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
|
Loading…
x
Reference in New Issue
Block a user