glance.db.sqlalchemy.migrate_repo.versions package

Submodules

glance.db.sqlalchemy.migrate_repo.versions.001_add_images_table module

glance.db.sqlalchemy.migrate_repo.versions.001_add_images_table.define_images_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.001_add_images_table.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.002_add_image_properties_table module

glance.db.sqlalchemy.migrate_repo.versions.002_add_image_properties_table.define_image_properties_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.002_add_image_properties_table.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.003_add_disk_format module

glance.db.sqlalchemy.migrate_repo.versions.003_add_disk_format.get_images_table(meta)[source]

Returns the Table object for the images table that corresponds to the images table definition of this version.

glance.db.sqlalchemy.migrate_repo.versions.003_add_disk_format.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.004_add_checksum module

glance.db.sqlalchemy.migrate_repo.versions.004_add_checksum.get_image_properties_table(meta)[source]

No changes to the image properties table from 002...

glance.db.sqlalchemy.migrate_repo.versions.004_add_checksum.get_images_table(meta)[source]

Returns the Table object for the images table that corresponds to the images table definition of this version.

glance.db.sqlalchemy.migrate_repo.versions.004_add_checksum.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.005_size_big_integer module

glance.db.sqlalchemy.migrate_repo.versions.005_size_big_integer.get_images_table(meta)[source]

Returns the Table object for the images table that corresponds to the images table definition of this version.

glance.db.sqlalchemy.migrate_repo.versions.005_size_big_integer.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.006_key_to_name module

glance.db.sqlalchemy.migrate_repo.versions.006_key_to_name.get_images_table(meta)[source]

No changes to the image properties table from 002...

glance.db.sqlalchemy.migrate_repo.versions.006_key_to_name.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.007_add_owner module

glance.db.sqlalchemy.migrate_repo.versions.007_add_owner.get_images_table(meta)[source]

Returns the Table object for the images table that corresponds to the images table definition of this version.

glance.db.sqlalchemy.migrate_repo.versions.007_add_owner.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.008_add_image_members_table module

glance.db.sqlalchemy.migrate_repo.versions.008_add_image_members_table.get_image_members_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.008_add_image_members_table.get_images_table(meta)[source]

No changes to the images table from 007...

glance.db.sqlalchemy.migrate_repo.versions.008_add_image_members_table.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.009_add_mindisk_and_minram module

glance.db.sqlalchemy.migrate_repo.versions.009_add_mindisk_and_minram.get_images_table(meta)[source]

Returns the Table object for the images table that corresponds to the images table definition of this version.

glance.db.sqlalchemy.migrate_repo.versions.009_add_mindisk_and_minram.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.010_default_update_at module

glance.db.sqlalchemy.migrate_repo.versions.010_default_update_at.get_images_table(meta)[source]

No changes to the images table from 008...

glance.db.sqlalchemy.migrate_repo.versions.010_default_update_at.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.011_make_mindisk_and_minram_notnull module

glance.db.sqlalchemy.migrate_repo.versions.011_make_mindisk_and_minram_notnull.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.012_id_to_uuid module

While SQLAlchemy/sqlalchemy-migrate should abstract this correctly, there are known issues with these libraries so SQLite and non-SQLite migrations must be done separately.

glance.db.sqlalchemy.migrate_repo.versions.012_id_to_uuid.upgrade(migrate_engine)[source]

Call the correct dialect-specific upgrade.

glance.db.sqlalchemy.migrate_repo.versions.013_add_protected module

glance.db.sqlalchemy.migrate_repo.versions.013_add_protected.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.014_add_image_tags_table module

glance.db.sqlalchemy.migrate_repo.versions.014_add_image_tags_table.define_image_tags_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.014_add_image_tags_table.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.015_quote_swift_credentials module

glance.db.sqlalchemy.migrate_repo.versions.015_quote_swift_credentials.legacy_parse_uri(uri, to_quote)[source]

Parse URLs. This method fixes an issue where credentials specified in the URL are interpreted differently in Python 2.6.1+ than prior versions of Python. It also deals with the peculiarity that new-style Swift URIs have where a username can contain a ‘:’, like so:

swift://account:user:pass@authurl.com/container/obj

If to_quoted is True, the uri is assumed to have credentials that have not been quoted, and the resulting uri will contain quoted credentials.

If to_quoted is False, the uri is assumed to have credentials that have been quoted, and the resulting uri will contain credentials that have not been quoted.

glance.db.sqlalchemy.migrate_repo.versions.015_quote_swift_credentials.migrate_location_credentials(migrate_engine, to_quoted)[source]

Migrate location credentials for swift uri’s between the quoted and unquoted forms.

Parameters:
  • migrate_engine – The configured db engine
  • to_quoted – If True, migrate location credentials from unquoted to quoted form. If False, do the reverse.
glance.db.sqlalchemy.migrate_repo.versions.015_quote_swift_credentials.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.016_add_status_image_member module

glance.db.sqlalchemy.migrate_repo.versions.016_add_status_image_member.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.017_quote_encrypted_swift_credentials module

This migration handles migrating encrypted image location values from the unquoted form to the quoted form.

If ‘metadata_encryption_key’ is specified in the config then this migration performs the following steps for every entry in the images table: 1. Decrypt the location value with the metadata_encryption_key 2. Changes the value to its quoted form 3. Encrypts the new value with the metadata_encryption_key 4. Inserts the new value back into the row

Fixes bug #1081043

glance.db.sqlalchemy.migrate_repo.versions.017_quote_encrypted_swift_credentials.decrypt_location(uri)[source]
glance.db.sqlalchemy.migrate_repo.versions.017_quote_encrypted_swift_credentials.encrypt_location(uri)[source]
glance.db.sqlalchemy.migrate_repo.versions.017_quote_encrypted_swift_credentials.fix_uri_credentials(uri, to_quoted)[source]

Fix the given uri’s embedded credentials by round-tripping with StoreLocation.

If to_quoted is True, the uri is assumed to have credentials that have not been quoted, and the resulting uri will contain quoted credentials.

If to_quoted is False, the uri is assumed to have credentials that have been quoted, and the resulting uri will contain credentials that have not been quoted.

glance.db.sqlalchemy.migrate_repo.versions.017_quote_encrypted_swift_credentials.legacy_parse_uri(uri, to_quote)[source]

Parse URLs. This method fixes an issue where credentials specified in the URL are interpreted differently in Python 2.6.1+ than prior versions of Python. It also deals with the peculiarity that new-style Swift URIs have where a username can contain a ‘:’, like so:

swift://account:user:pass@authurl.com/container/obj

If to_quoted is True, the uri is assumed to have credentials that have not been quoted, and the resulting uri will contain quoted credentials.

If to_quoted is False, the uri is assumed to have credentials that have been quoted, and the resulting uri will contain credentials that have not been quoted.

glance.db.sqlalchemy.migrate_repo.versions.017_quote_encrypted_swift_credentials.migrate_location_credentials(migrate_engine, to_quoted)[source]

Migrate location credentials for encrypted swift uri’s between the quoted and unquoted forms.

Parameters:
  • migrate_engine – The configured db engine
  • to_quoted – If True, migrate location credentials from unquoted to quoted form. If False, do the reverse.
glance.db.sqlalchemy.migrate_repo.versions.017_quote_encrypted_swift_credentials.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.018_add_image_locations_table module

glance.db.sqlalchemy.migrate_repo.versions.018_add_image_locations_table.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.019_migrate_image_locations module

glance.db.sqlalchemy.migrate_repo.versions.019_migrate_image_locations.get_image_locations_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.019_migrate_image_locations.get_images_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.019_migrate_image_locations.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.020_drop_images_table_location module

glance.db.sqlalchemy.migrate_repo.versions.020_drop_images_table_location.get_images_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.020_drop_images_table_location.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.021_set_engine_mysql_innodb module

glance.db.sqlalchemy.migrate_repo.versions.021_set_engine_mysql_innodb.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.022_image_member_index module

glance.db.sqlalchemy.migrate_repo.versions.022_image_member_index.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.023_placeholder module

glance.db.sqlalchemy.migrate_repo.versions.023_placeholder.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.024_placeholder module

glance.db.sqlalchemy.migrate_repo.versions.024_placeholder.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.025_placeholder module

glance.db.sqlalchemy.migrate_repo.versions.025_placeholder.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.026_add_location_storage_information module

glance.db.sqlalchemy.migrate_repo.versions.026_add_location_storage_information.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.027_checksum_index module

glance.db.sqlalchemy.migrate_repo.versions.027_checksum_index.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.028_owner_index module

glance.db.sqlalchemy.migrate_repo.versions.028_owner_index.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.029_location_meta_data_pickle_to_string module

glance.db.sqlalchemy.migrate_repo.versions.029_location_meta_data_pickle_to_string.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.030_add_tasks_table module

glance.db.sqlalchemy.migrate_repo.versions.030_add_tasks_table.define_tasks_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.030_add_tasks_table.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.031_remove_duplicated_locations module

glance.db.sqlalchemy.migrate_repo.versions.031_remove_duplicated_locations.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.032_add_task_info_table module

glance.db.sqlalchemy.migrate_repo.versions.032_add_task_info_table.define_task_info_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.032_add_task_info_table.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.033_add_location_status module

glance.db.sqlalchemy.migrate_repo.versions.033_add_location_status.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.034_add_virtual_size module

glance.db.sqlalchemy.migrate_repo.versions.034_add_virtual_size.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.035_add_metadef_tables module

glance.db.sqlalchemy.migrate_repo.versions.035_add_metadef_tables.define_metadef_namespace_resource_types_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.035_add_metadef_tables.define_metadef_namespaces_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.035_add_metadef_tables.define_metadef_objects_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.035_add_metadef_tables.define_metadef_properties_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.035_add_metadef_tables.define_metadef_resource_types_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.035_add_metadef_tables.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.036_rename_metadef_schema_columns module

glance.db.sqlalchemy.migrate_repo.versions.036_rename_metadef_schema_columns.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.037_add_changes_to_satisfy_models module

glance.db.sqlalchemy.migrate_repo.versions.037_add_changes_to_satisfy_models.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.038_add_metadef_tags_table module

glance.db.sqlalchemy.migrate_repo.versions.038_add_metadef_tags_table.define_metadef_tags_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.038_add_metadef_tags_table.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.039_add_changes_to_satisfy_models_metadef module

glance.db.sqlalchemy.migrate_repo.versions.039_add_changes_to_satisfy_models_metadef.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.040_add_changes_to_satisfy_metadefs_tags module

glance.db.sqlalchemy.migrate_repo.versions.040_add_changes_to_satisfy_metadefs_tags.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.041_add_artifact_tables module

glance.db.sqlalchemy.migrate_repo.versions.041_add_artifact_tables.define_artifact_blob_locations_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.041_add_artifact_tables.define_artifact_blobs_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.041_add_artifact_tables.define_artifact_dependencies_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.041_add_artifact_tables.define_artifact_properties_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.041_add_artifact_tables.define_artifact_tags_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.041_add_artifact_tables.define_artifacts_table(meta)[source]
glance.db.sqlalchemy.migrate_repo.versions.041_add_artifact_tables.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.042_add_changes_to_reinstall_unique_metadef_constraints module

glance.db.sqlalchemy.migrate_repo.versions.042_add_changes_to_reinstall_unique_metadef_constraints.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.043_add_image_created_updated_idx module

glance.db.sqlalchemy.migrate_repo.versions.043_add_image_created_updated_idx.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.044_update_metadef_os_nova_server module

glance.db.sqlalchemy.migrate_repo.versions.044_update_metadef_os_nova_server.upgrade(migrate_engine)[source]

glance.db.sqlalchemy.migrate_repo.versions.045_add_visibility module

glance.db.sqlalchemy.migrate_repo.versions.045_add_visibility.upgrade(migrate_engine)[source]

Module contents