"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/common/sql/contract_repo/versions/047_contract_expand_update_pk_for_unified_limit.py" between
keystone-16.0.1.tar.gz and keystone-17.0.0.tar.gz

About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Ussuri" series (latest release).

047_contract_expand_update_pk_for_unified_limit.py  (keystone-16.0.1):047_contract_expand_update_pk_for_unified_limit.py  (keystone-17.0.0)
skipping to change at line 28 skipping to change at line 28
meta.bind = migrate_engine meta.bind = migrate_engine
# For Mysql and PostgreSQL, drop the FK in limit table, drop the unique # For Mysql and PostgreSQL, drop the FK in limit table, drop the unique
# constraint in registered limit and limit tables. # constraint in registered limit and limit tables.
# #
# For SQLite, drop the old tables, then rename the new tables. # For SQLite, drop the old tables, then rename the new tables.
limit_table = sql.Table('limit', meta, autoload=True) limit_table = sql.Table('limit', meta, autoload=True)
registered_limit_table = sql.Table('registered_limit', meta, autoload=True) registered_limit_table = sql.Table('registered_limit', meta, autoload=True)
if migrate_engine.name != 'sqlite': if migrate_engine.name != 'sqlite':
project_table = sql.Table('project', meta, autoload=True) project_table = sql.Table('project', meta, autoload=True)
inspector = sql.engine.reflection.Inspector.from_engine(migrate_engine) inspector = sql.inspect(migrate_engine)
for fk in inspector.get_foreign_keys('limit'): for fk in inspector.get_foreign_keys('limit'):
fkey = migrate.ForeignKeyConstraint( fkey = migrate.ForeignKeyConstraint(
[limit_table.c.project_id], [limit_table.c.project_id],
[project_table.c.id], [project_table.c.id],
name=fk['name']) name=fk['name'])
fkey.drop() fkey.drop()
for uc in inspector.get_unique_constraints('limit'): for uc in inspector.get_unique_constraints('limit'):
if set(uc['column_names']) == set(['project_id', 'service_id', if set(uc['column_names']) == set(['project_id', 'service_id',
'region_id', 'resource_name']): 'region_id', 'resource_name']):
uc = migrate.UniqueConstraint(limit_table.c.project_id, uc = migrate.UniqueConstraint(limit_table.c.project_id,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)