Use gnocchi search api to check gnocchi resources
When running the tests against production cloud, the resource list call
would return tons of records, so it's better to use resource search api
instead to check the resources.
Change-Id: I723f99e5b19ddf4dc2d9c20738e818b7399f54a4
diff --git a/telemetry_tempest_plugin/scenario/telemetry_integration_gabbits/autoscaling.yaml b/telemetry_tempest_plugin/scenario/telemetry_integration_gabbits/autoscaling.yaml
index ca53bfb..d6eb3d1 100644
--- a/telemetry_tempest_plugin/scenario/telemetry_integration_gabbits/autoscaling.yaml
+++ b/telemetry_tempest_plugin/scenario/telemetry_integration_gabbits/autoscaling.yaml
@@ -54,14 +54,18 @@
- name: check gnocchi resources
desc: Check the gnocchi resources for this two servers exists
- url: $ENVIRON['GNOCCHI_SERVICE_URL']/v1/resource/instance
- method: GET
+ url: $ENVIRON['GNOCCHI_SERVICE_URL']/v1/search/resource/instance
+ method: POST
+ request_headers:
+ content-type: application/json
+ data:
+ =:
+ server_group: $RESPONSE['$.servers[0].metadata."metering.server_group"']
poll:
count: 30
delay: 1
- response_strings:
- - '"id": "$RESPONSE["$.servers[0].id"]"'
- - '"id": "$RESPONSE["$.servers[1].id"]"'
+ response_json_paths:
+ $.`len`: 2
- name: check event
desc: Check panko for new instance.create.end event