Browse code

renamed deprecated glanceclient parameter

According to the sources the parameter --public in python-glanceclient
should be removed after only using the new parameter --is-public in
Devstack.

Change-Id: I25fbb23f4823b3766db647dd50a5b538aad3e55a

Christian Berendt authored on 2013/07/31 01:22:32
Showing 2 changed files
... ...
@@ -1288,9 +1288,9 @@ function upload_image() {
1288 1288
 
1289 1289
     if [ "$CONTAINER_FORMAT" = "bare" ]; then
1290 1290
         if [ "$UNPACK" = "zcat" ]; then
1291
-            glance --os-auth-token $token --os-image-url http://$GLANCE_HOSTPORT image-create --name "$IMAGE_NAME" --public --container-format=$CONTAINER_FORMAT --disk-format $DISK_FORMAT < <(zcat --force "${IMAGE}")
1291
+            glance --os-auth-token $token --os-image-url http://$GLANCE_HOSTPORT image-create --name "$IMAGE_NAME" --is-public True --container-format=$CONTAINER_FORMAT --disk-format $DISK_FORMAT < <(zcat --force "${IMAGE}")
1292 1292
         else
1293
-            glance --os-auth-token $token --os-image-url http://$GLANCE_HOSTPORT image-create --name "$IMAGE_NAME" --public --container-format=$CONTAINER_FORMAT --disk-format $DISK_FORMAT < "${IMAGE}"
1293
+            glance --os-auth-token $token --os-image-url http://$GLANCE_HOSTPORT image-create --name "$IMAGE_NAME" --is-public True --container-format=$CONTAINER_FORMAT --disk-format $DISK_FORMAT < "${IMAGE}"
1294 1294
         fi
1295 1295
     else
1296 1296
         # Use glance client to add the kernel the root filesystem.
... ...
@@ -1298,12 +1298,12 @@ function upload_image() {
1298 1298
         # kernel for use when uploading the root filesystem.
1299 1299
         KERNEL_ID=""; RAMDISK_ID="";
1300 1300
         if [ -n "$KERNEL" ]; then
1301
-            KERNEL_ID=$(glance --os-auth-token $token --os-image-url http://$GLANCE_HOSTPORT image-create --name "$IMAGE_NAME-kernel" --public --container-format aki --disk-format aki < "$KERNEL" | grep ' id ' | get_field 2)
1301
+            KERNEL_ID=$(glance --os-auth-token $token --os-image-url http://$GLANCE_HOSTPORT image-create --name "$IMAGE_NAME-kernel" --is-public True --container-format aki --disk-format aki < "$KERNEL" | grep ' id ' | get_field 2)
1302 1302
         fi
1303 1303
         if [ -n "$RAMDISK" ]; then
1304
-            RAMDISK_ID=$(glance --os-auth-token $token --os-image-url http://$GLANCE_HOSTPORT image-create --name "$IMAGE_NAME-ramdisk" --public --container-format ari --disk-format ari < "$RAMDISK" | grep ' id ' | get_field 2)
1304
+            RAMDISK_ID=$(glance --os-auth-token $token --os-image-url http://$GLANCE_HOSTPORT image-create --name "$IMAGE_NAME-ramdisk" --is-public True --container-format ari --disk-format ari < "$RAMDISK" | grep ' id ' | get_field 2)
1305 1305
         fi
1306
-        glance --os-auth-token $token --os-image-url http://$GLANCE_HOSTPORT image-create --name "${IMAGE_NAME%.img}" --public --container-format ami --disk-format ami ${KERNEL_ID:+--property kernel_id=$KERNEL_ID} ${RAMDISK_ID:+--property ramdisk_id=$RAMDISK_ID} < "${IMAGE}"
1306
+        glance --os-auth-token $token --os-image-url http://$GLANCE_HOSTPORT image-create --name "${IMAGE_NAME%.img}" --is-public True --container-format ami --disk-format ami ${KERNEL_ID:+--property kernel_id=$KERNEL_ID} ${RAMDISK_ID:+--property ramdisk_id=$RAMDISK_ID} < "${IMAGE}"
1307 1307
     fi
1308 1308
 }
1309 1309
 
... ...
@@ -239,14 +239,14 @@ function upload_baremetal_deploy() {
239 239
          --os-image-url http://$GLANCE_HOSTPORT \
240 240
          image-create \
241 241
          --name $BM_DEPLOY_KERNEL \
242
-         --public --disk-format=aki \
242
+         --is-public True --disk-format=aki \
243 243
          < $TOP_DIR/files/$BM_DEPLOY_KERNEL  | grep ' id ' | get_field 2)
244 244
     BM_DEPLOY_RAMDISK_ID=$(glance \
245 245
          --os-auth-token $token \
246 246
          --os-image-url http://$GLANCE_HOSTPORT \
247 247
          image-create \
248 248
          --name $BM_DEPLOY_RAMDISK \
249
-         --public --disk-format=ari \
249
+         --is-public True --disk-format=ari \
250 250
          < $TOP_DIR/files/$BM_DEPLOY_RAMDISK  | grep ' id ' | get_field 2)
251 251
 }
252 252
 
... ...
@@ -294,14 +294,14 @@ function extract_and_upload_k_and_r_from_image() {
294 294
          --os-image-url http://$GLANCE_HOSTPORT \
295 295
          image-create \
296 296
          --name $image_name-kernel \
297
-         --public --disk-format=aki \
297
+         --is-public True --disk-format=aki \
298 298
          < $TOP_DIR/files/$OUT_KERNEL | grep ' id ' | get_field 2)
299 299
     RAMDISK_ID=$(glance \
300 300
          --os-auth-token $token \
301 301
          --os-image-url http://$GLANCE_HOSTPORT \
302 302
          image-create \
303 303
          --name $image_name-initrd \
304
-         --public --disk-format=ari \
304
+         --is-public True --disk-format=ari \
305 305
          < $TOP_DIR/files/$OUT_RAMDISK | grep ' id ' | get_field 2)
306 306
 }
307 307
 
... ...
@@ -371,14 +371,14 @@ function upload_baremetal_image() {
371 371
             --os-auth-token $token \
372 372
             --os-image-url http://$GLANCE_HOSTPORT \
373 373
             image-create \
374
-            --name "$IMAGE_NAME-kernel" --public \
374
+            --name "$IMAGE_NAME-kernel" --is-public True \
375 375
             --container-format aki \
376 376
             --disk-format aki < "$KERNEL" | grep ' id ' | get_field 2)
377 377
         RAMDISK_ID=$(glance \
378 378
             --os-auth-token $token \
379 379
             --os-image-url http://$GLANCE_HOSTPORT \
380 380
             image-create \
381
-            --name "$IMAGE_NAME-ramdisk" --public \
381
+            --name "$IMAGE_NAME-ramdisk" --is-public True \
382 382
             --container-format ari \
383 383
             --disk-format ari < "$RAMDISK" | grep ' id ' | get_field 2)
384 384
     else
... ...
@@ -390,7 +390,7 @@ function upload_baremetal_image() {
390 390
        --os-auth-token $token \
391 391
        --os-image-url http://$GLANCE_HOSTPORT \
392 392
        image-create \
393
-       --name "${IMAGE_NAME%.img}" --public \
393
+       --name "${IMAGE_NAME%.img}" --is-public True \
394 394
        --container-format $CONTAINER_FORMAT \
395 395
        --disk-format $DISK_FORMAT \
396 396
        ${KERNEL_ID:+--property kernel_id=$KERNEL_ID} \