As part of the process of deprecating Glance's V1, the glance team would
like to start testing V2-only environments. Therefore, this change
provides a way to force other services to use V2.
Change-Id: I87e77d07964eac01e9a796817cbc88bd6e59c721
| ... | ... |
@@ -342,6 +342,10 @@ function configure_cinder {
|
| 342 | 342 |
iniset $CINDER_CONF DEFAULT glance_ca_certificates_file $SSL_BUNDLE_FILE |
| 343 | 343 |
fi |
| 344 | 344 |
|
| 345 |
+ if [ "$GLANCE_V1_ENABLED" != "True" ]; then |
|
| 346 |
+ iniset $CINDER_CONF DEFAULT glance_api_version 2 |
|
| 347 |
+ fi |
|
| 348 |
+ |
|
| 345 | 349 |
# Register SSL certificates if provided |
| 346 | 350 |
if is_ssl_enabled_service cinder; then |
| 347 | 351 |
ensure_certificates CINDER |
| ... | ... |
@@ -57,6 +57,7 @@ GLANCE_SCHEMA_JSON=$GLANCE_CONF_DIR/schema-image.json |
| 57 | 57 |
GLANCE_SWIFT_STORE_CONF=$GLANCE_CONF_DIR/glance-swift-store.conf |
| 58 | 58 |
GLANCE_GLARE_CONF=$GLANCE_CONF_DIR/glance-glare.conf |
| 59 | 59 |
GLANCE_GLARE_PASTE_INI=$GLANCE_CONF_DIR/glance-glare-paste.ini |
| 60 |
+GLANCE_V1_ENABLED=${GLANCE_V1_ENABLED:-True}
|
|
| 60 | 61 |
|
| 61 | 62 |
if is_ssl_enabled_service "glance" || is_service_enabled tls-proxy; then |
| 62 | 63 |
GLANCE_SERVICE_PROTOCOL="https" |
| ... | ... |
@@ -134,6 +135,12 @@ function configure_glance {
|
| 134 | 134 |
iniset $GLANCE_API_CONF DEFAULT disk_formats "ami,ari,aki,vhd,vmdk,raw,qcow2,vdi,iso,ploop" |
| 135 | 135 |
fi |
| 136 | 136 |
|
| 137 |
+ # NOTE(flaper87): To uncomment as soon as all services consuming Glance are |
|
| 138 |
+ # able to consume V2 entirely. |
|
| 139 |
+ if [ "$GLANCE_V1_ENABLED" != "True" ]; then |
|
| 140 |
+ iniset $GLANCE_API_CONF DEFAULT enable_v1_api False |
|
| 141 |
+ fi |
|
| 142 |
+ |
|
| 137 | 143 |
# Store specific configs |
| 138 | 144 |
iniset $GLANCE_API_CONF glance_store filesystem_store_datadir $GLANCE_IMAGE_DIR/ |
| 139 | 145 |
if is_service_enabled g-glare; then |
| ... | ... |
@@ -292,6 +292,9 @@ function configure_tempest {
|
| 292 | 292 |
|
| 293 | 293 |
# Image Features |
| 294 | 294 |
iniset $TEMPEST_CONFIG image-feature-enabled deactivate_image True |
| 295 |
+ if [ "$GLANCE_V1_ENABLED" != "True" ]; then |
|
| 296 |
+ iniset $TEMPEST_CONFIG image-feature-enabled api_v1 False |
|
| 297 |
+ fi |
|
| 295 | 298 |
|
| 296 | 299 |
# Compute |
| 297 | 300 |
iniset $TEMPEST_CONFIG compute ssh_user ${DEFAULT_INSTANCE_USER:-cirros} # DEPRECATED
|