|
...
|
...
|
@@ -2200,19 +2200,19 @@ if is_service_enabled g-reg; then
|
|
2200
|
2200
|
esac
|
|
2201
|
2201
|
|
|
2202
|
2202
|
if [ "$CONTAINER_FORMAT" = "bare" ]; then
|
|
2203
|
|
- 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}")
|
|
|
2203
|
+ 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}")
|
|
2204
|
2204
|
else
|
|
2205
|
2205
|
# Use glance client to add the kernel the root filesystem.
|
|
2206
|
2206
|
# We parse the results of the first upload to get the glance ID of the
|
|
2207
|
2207
|
# kernel for use when uploading the root filesystem.
|
|
2208
|
2208
|
KERNEL_ID=""; RAMDISK_ID="";
|
|
2209
|
2209
|
if [ -n "$KERNEL" ]; then
|
|
2210
|
|
- 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)
|
|
|
2210
|
+ 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)
|
|
2211
|
2211
|
fi
|
|
2212
|
2212
|
if [ -n "$RAMDISK" ]; then
|
|
2213
|
|
- 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)
|
|
|
2213
|
+ 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)
|
|
2214
|
2214
|
fi
|
|
2215
|
|
- 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}"
|
|
|
2215
|
+ 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}"
|
|
2216
|
2216
|
fi
|
|
2217
|
2217
|
done
|
|
2218
|
2218
|
fi
|