Merge "Use gnocchiclient for integration script"
diff --git a/ceilometer/tests/integration/hooks/post_test_hook.sh b/ceilometer/tests/integration/hooks/post_test_hook.sh
index 6d4e418..bea2be8 100755
--- a/ceilometer/tests/integration/hooks/post_test_hook.sh
+++ b/ceilometer/tests/integration/hooks/post_test_hook.sh
@@ -62,16 +62,15 @@
     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