Skip to content

Commit 38417fc

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Migrate from using glance image-list to openstackclient"
2 parents 03082af + 5c206c2 commit 38417fc

8 files changed

Lines changed: 12 additions & 10 deletions

File tree

exercises/boot_from_volume.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ nova list
7171
# ------
7272

7373
# List the images available
74-
glance image-list
74+
openstack image list
7575

7676
# Grab the id of the image to launch
77-
IMAGE=$(glance image-list | egrep " $DEFAULT_IMAGE_NAME " | get_field 1)
77+
IMAGE=$(openstack image list | egrep " $DEFAULT_IMAGE_NAME " | get_field 1)
7878
die_if_not_set $LINENO IMAGE "Failure getting image $DEFAULT_IMAGE_NAME"
7979

8080
# Security Groups

exercises/client-args.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ if [[ "$ENABLED_SERVICES" =~ "g-api" ]]; then
122122
STATUS_GLANCE="Skipped"
123123
else
124124
echo -e "\nTest Glance"
125-
if glance $TENANT_ARG $ARGS image-list; then
125+
if openstack $TENANT_ARG $ARGS image list; then
126126
STATUS_GLANCE="Succeeded"
127127
else
128128
STATUS_GLANCE="Failed"

exercises/client-env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ if [[ "$ENABLED_SERVICES" =~ "g-api" ]]; then
132132
STATUS_GLANCE="Skipped"
133133
else
134134
echo -e "\nTest Glance"
135-
if glance image-list; then
135+
if openstack image list; then
136136
STATUS_GLANCE="Succeeded"
137137
else
138138
STATUS_GLANCE="Failed"

exercises/floating_ips.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ nova list
7171
# ------
7272

7373
# List the images available
74-
glance image-list
74+
openstack image list
7575

7676
# Grab the id of the image to launch
77-
IMAGE=$(glance image-list | egrep " $DEFAULT_IMAGE_NAME " | get_field 1)
77+
IMAGE=$(openstack image list | egrep " $DEFAULT_IMAGE_NAME " | get_field 1)
7878
die_if_not_set $LINENO IMAGE "Failure getting image $DEFAULT_IMAGE_NAME"
7979

8080
# Security Groups

exercises/neutron-adv-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function foreach_tenant_net {
134134
}
135135

136136
function get_image_id {
137-
local IMAGE_ID=$(glance image-list | egrep " $DEFAULT_IMAGE_NAME " | get_field 1)
137+
local IMAGE_ID=$(openstack image list | egrep " $DEFAULT_IMAGE_NAME " | get_field 1)
138138
die_if_not_set $LINENO IMAGE_ID "Failure retrieving IMAGE_ID"
139139
echo "$IMAGE_ID"
140140
}

exercises/volumes.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ nova list
6868
# ------
6969

7070
# List the images available
71-
glance image-list
71+
openstack image list
7272

7373
# Grab the id of the image to launch
74-
IMAGE=$(glance image-list | egrep " $DEFAULT_IMAGE_NAME " | get_field 1)
74+
IMAGE=$(openstack image list | egrep " $DEFAULT_IMAGE_NAME " | get_field 1)
7575
die_if_not_set $LINENO IMAGE "Failure getting image $DEFAULT_IMAGE_NAME"
7676

7777
# Security Groups

lib/tempest

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ function configure_tempest {
112112
image_uuid_alt="$IMAGE_UUID"
113113
fi
114114
images+=($IMAGE_UUID)
115+
# TODO(stevemar): update this command to use openstackclient's `openstack image list`
116+
# when it supports listing by status.
115117
done < <(glance image-list --status=active | awk -F'|' '!/^(+--)|ID|aki|ari/ { print $3,$2 }')
116118

117119
case "${#images[*]}" in

lib/trove

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ function init_trove {
210210
# The image is uploaded by stack.sh -- see $IMAGE_URLS handling
211211
GUEST_IMAGE_NAME=$(basename "$TROVE_GUEST_IMAGE_URL")
212212
GUEST_IMAGE_NAME=${GUEST_IMAGE_NAME%.*}
213-
TROVE_GUEST_IMAGE_ID=$(glance --os-auth-token $TOKEN --os-image-url http://$GLANCE_HOSTPORT image-list | grep "${GUEST_IMAGE_NAME}" | get_field 1)
213+
TROVE_GUEST_IMAGE_ID=$(openstack --os-token $TOKEN --os-url http://$GLANCE_HOSTPORT image list | grep "${GUEST_IMAGE_NAME}" | get_field 1)
214214
if [ -z "$TROVE_GUEST_IMAGE_ID" ]; then
215215
# If no glance id is found, skip remaining setup
216216
echo "Datastore ${TROVE_DATASTORE_TYPE} will not be created: guest image ${GUEST_IMAGE_NAME} not found."

0 commit comments

Comments
 (0)