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.002_add_image_properties_table module¶
glance.db.sqlalchemy.migrate_repo.versions.003_add_disk_format module¶
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.005_size_big_integer module¶
glance.db.sqlalchemy.migrate_repo.versions.006_key_to_name module¶
glance.db.sqlalchemy.migrate_repo.versions.007_add_owner module¶
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.009_add_mindisk_and_minram module¶
glance.db.sqlalchemy.migrate_repo.versions.010_default_update_at module¶
glance.db.sqlalchemy.migrate_repo.versions.011_make_mindisk_and_minram_notnull module¶
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.013_add_protected module¶
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/objIf 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.016_add_status_image_member module¶
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/objIf 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.018_add_image_locations_table module¶
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.020_drop_images_table_location module¶
glance.db.sqlalchemy.migrate_repo.versions.021_set_engine_mysql_innodb module¶
glance.db.sqlalchemy.migrate_repo.versions.022_image_member_index module¶
glance.db.sqlalchemy.migrate_repo.versions.023_placeholder module¶
glance.db.sqlalchemy.migrate_repo.versions.024_placeholder module¶
glance.db.sqlalchemy.migrate_repo.versions.025_placeholder module¶
glance.db.sqlalchemy.migrate_repo.versions.026_add_location_storage_information module¶
glance.db.sqlalchemy.migrate_repo.versions.027_checksum_index module¶
glance.db.sqlalchemy.migrate_repo.versions.028_owner_index module¶
glance.db.sqlalchemy.migrate_repo.versions.029_location_meta_data_pickle_to_string module¶
glance.db.sqlalchemy.migrate_repo.versions.030_add_tasks_table module¶
glance.db.sqlalchemy.migrate_repo.versions.031_remove_duplicated_locations module¶
glance.db.sqlalchemy.migrate_repo.versions.032_add_task_info_table module¶
glance.db.sqlalchemy.migrate_repo.versions.033_add_location_status module¶
glance.db.sqlalchemy.migrate_repo.versions.034_add_virtual_size module¶
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.036_rename_metadef_schema_columns module¶
glance.db.sqlalchemy.migrate_repo.versions.037_add_changes_to_satisfy_models module¶
glance.db.sqlalchemy.migrate_repo.versions.039_add_changes_to_satisfy_models_metadef module¶
glance.db.sqlalchemy.migrate_repo.versions.040_add_changes_to_satisfy_metadefs_tags module¶
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]¶