Browse code

Remove standalone requirement for glance import

As of the referenced patch in glance, we can do import in wsgi mode.
Also remove the enforcement that import methods are disabled.

Change-Id: I8da4b4ad6105bb64c4045ca80db9742591d01564
Depends-On: https://review.opendev.org/#/c/742065

Dan Smith authored on 2020/07/22 11:41:48
Showing 2 changed files
... ...
@@ -114,11 +114,7 @@ function _upload_image {
114 114
     properties=$(_image_properties_to_arg $*)
115 115
 
116 116
     if [[ "$GLANCE_USE_IMPORT_WORKFLOW" == "True" ]]; then
117
-        if [[ "$GLANCE_STANDALONE" == "True" ]]; then
118
-            useimport="--import"
119
-        else
120
-            echo "*** Unable to use glance import workflow because glance is not standalone! ***"
121
-        fi
117
+        useimport="--import"
122 118
     fi
123 119
 
124 120
     openstack --os-cloud=devstack-admin --os-region-name="$REGION_NAME" image create "$image_name" --public --container-format "$container" --disk-format "$disk" $useimport $properties < "${image}"
... ...
@@ -193,11 +193,6 @@ function configure_glance {
193 193
         iniset $GLANCE_API_CONF cors allowed_origin "http://$SERVICE_HOST"
194 194
     fi
195 195
 
196
-    if [[ "$GLANCE_STANDALONE" == "False" ]]; then
197
-        # NOTE(danms): Do not advertise import methods if we are running in WSGI mode
198
-        iniset $GLANCE_API_CONF DEFAULT enabled_import_methods []
199
-    fi
200
-
201 196
     # No multiple stores for swift yet
202 197
     # Store the images in swift if enabled.
203 198
     if is_service_enabled s-proxy; then