### --start_docs ## Validate the undercloud installation ## ==================================== script_return_value=0 ## * Install deps for subunit results sudo yum install -y python-os-testr ## * Set the uri of TripleO UI based on SSL usage ## :: ## * Specify the function to test UI ## :: function ui_sanity_check { if [ -f "/etc/httpd/conf.d/25-tripleo-ui.conf" ]; then if ! curl http://192.168.24.1:3000 2>/dev/null | grep -q 'TripleO'; then echo "ERROR: TripleO UI front page is not loading." generate-subunit $(date +%s) 10 fail tripleo_ui_test >> /home/zuul/undercloud_sanity.subunit script_return_value=1 fi generate-subunit $(date +%s) 10 success tripleo_ui_test >> /home/zuul/undercloud_sanity.subunit fi } # * Specify the function to test CLI ## :: function citest { test_name=`sed 's/ /_/g' <<< "$@"` "$@" local status=$? if [ $status -ne 0 ]; then echo "error with $1" >&2 generate-subunit $(date +%s) 10 fail $test_name >> /home/zuul/undercloud_sanity.subunit script_return_value=1 else generate-subunit $(date +%s) 10 success $test_name >> /home/zuul/undercloud_sanity.subunit fi return $status } ## * Check the answers from each undercloud service ## :: set -x rm -f /home/zuul/undercloud_sanity.subunit.gz rm -f /home/zuul/undercloud_sanity.subunit source /home/zuul/stackrc citest openstack user list citest openstack catalog list citest nova service-list citest glance image-list citest neutron subnet-list citest neutron net-list citest neutron agent-list citest openstack baremetal node list citest openstack stack list ui_sanity_check exit $script_return_value set +x ### --stop_docs