- if ! openstack image list --property name="$IMAGE_NAME" | grep "active"; then
- echo "ERROR: No matching image found for $IMAGE_NAME"
- error=true
- fi
- # Set the $HARDWARE_ID variable to the the file's HARDWARE_ID value
- export "$(grep ^HARDWARE_ID= "$file")"
- # The flavor should be listed. Spaces in grep string ensure complete match.
+ if ! openstack image list --property name="$IMAGE_NAME" | grep "active"; then
+ echo "ERROR: No matching image found for $IMAGE_NAME"
+ error=true
+ fi
+ # Set the $HARDWARE_ID variable to the the file's HARDWARE_ID value
+ export "$(grep ^HARDWARE_ID= "$file")"
+ # The flavor should be listed. Spaces in grep string ensure complete match.
+
+ if ! openstack flavor list | grep " $HARDWARE_ID "; then
+ echo "ERROR: No matching flavor found for $HARDWARE_ID"
+ error=true
+ fi
+ done
+}
+
+for cloud in jenkins-config/clouds/openstack/*; do
+ echo "Verifying that cloud has a master configuration file"
+ # Verify that we have a cloud config file
+ if [ -f "$cloud/cloud.cfg" ]; then
+ # Get the OS_CLOUD variable from cloud config and export it
+ OS_CLOUD=$(grep ^CLOUD_CREDENTIAL_ID= "$cloud/cloud.cfg" | cut -d'=' -f2)
+ export OS_CLOUD