Assign the resource_type when search resource by gnocchiclient
The default resource_type parameter of search resource by gnocchiclient is 'generic' [1], which the retrieve resource did not include metadata like flavor_id, display_name, volume_type, etc. The metadata is the key of field in hashmap rating module, [1] http://gnocchi.xyz/gnocchiclient/api/gnocchiclient.v1.resource.html#gnocchiclient.v1.resource.ResourceManager.search Closes-Bug: 1678166 Change-Id: If6475a27011a7ae5cd1a0c9aa36eb90273938a1a
This commit is contained in:
parent
26d2062707
commit
d28ba9755a
|
@ -204,6 +204,7 @@ class GnocchiCollector(collector.BaseCollector):
|
|||
if q_filter:
|
||||
query_parameters.append(q_filter)
|
||||
resources = self._conn.resource.search(
|
||||
resource_type=resource_type,
|
||||
query=self.extend_filter(*query_parameters))
|
||||
return resources
|
||||
|
||||
|
|
Loading…
Reference in New Issue