From 78ccbc659252dd14d255c0727df2c5d1ba37b604 Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Tue, 20 Oct 2015 10:47:08 +0200 Subject: [PATCH] Use gnocchiclient for integration script Change-Id: I3f88c7ad41518f742ac21dd3ae8e48daa4b4377c --- ceilometer/tests/integration/hooks/post_test_hook.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ceilometer/tests/integration/hooks/post_test_hook.sh b/ceilometer/tests/integration/hooks/post_test_hook.sh index 6d4e418d..bea2be8a 100755 --- a/ceilometer/tests/integration/hooks/post_test_hook.sh +++ b/ceilometer/tests/integration/hooks/post_test_hook.sh @@ -62,16 +62,15 @@ if [ $EXIT_CODE -ne 0 ] ; then echo "* Nova instance list:" openstack server list - # TODO(sileht): replace by gnocchiclient when available echo "* Gnocchi instance list:" - curl -s -X GET -H 'Content-Type: application/json' -H "X-Auth-Token: $ADMIN_TOKEN" $GNOCCHI_SERVICE_URL/v1/resource/instance | python -m "json.tool" + gnocchi resource list -t instance for instance_id in $(openstack server list -f value -c ID); do echo "* Nova instance detail:" openstack server show $instance_id - + echo "* Gnocchi instance detail:" + gnocchi resource show -t instance $instance_id echo "* Gnocchi measures for instance ${instance_id}:" - output=$(curl -s -X GET -H 'Content-Type: application/json' -H "X-Auth-Token: $ADMIN_TOKEN" $GNOCCHI_SERVICE_URL/v1/resource/instance/$instance_id/metric/cpu_util/measures) - echo $output | python -m "json.tool" || echo -e "\n$output" + gnocchi measures show -r $instance_id cpu_util done # Be sure to source Gnocchi settings before