File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ public function getResourceMetricMeasures(): array
121
121
'metric ' => $ this ->params ->idUrl ('metric ' ),
122
122
'type ' => $ this ->params ->resourceType (),
123
123
'granularity ' => $ this ->params ->granularity (),
124
+ 'aggregation ' => $ this ->params ->aggregation (),
124
125
],
125
126
];
126
127
}
Original file line number Diff line number Diff line change @@ -58,8 +58,16 @@ public function granularity()
58
58
{
59
59
return [
60
60
'location ' => self ::QUERY ,
61
- 'type ' => self ::STRING ,
61
+ 'type ' => self ::STRING_TYPE ,
62
62
'description ' => 'Specify the granularity to retrieve, rather than all the granularities available ' ,
63
63
];
64
64
}
65
+
66
+ public function aggregation ()
67
+ {
68
+ return [
69
+ 'location ' => self ::QUERY ,
70
+ 'type ' => self ::STRING_TYPE
71
+ ];
72
+ }
65
73
}
Original file line number Diff line number Diff line change @@ -28,7 +28,12 @@ public function listResources(array $options = []): \Generator
28
28
return $ this ->model (Resource::class)->enumerate ($ this ->api ->getResources (), $ options );
29
29
}
30
30
31
- public function getResource (array $ options = []): Resource
31
+ /**
32
+ * @param array $options
33
+ *
34
+ * @return \OpenStack\Metric\v1\Gnocchi\Models\Resource
35
+ */
36
+ public function getResource (array $ options = []): \OpenStack \Metric \v1 \Gnocchi \Models \Resource
32
37
{
33
38
$ this ->injectGenericType ($ options );
34
39
@@ -40,6 +45,8 @@ public function getResource(array $options = []): Resource
40
45
41
46
public function searchResources (array $ options = []): \Generator
42
47
{
48
+ $ this ->injectGenericType ($ options );
49
+
43
50
/**
44
51
* $options['criteria'] must send as STRING
45
52
* This will check input $options and perform json_encode if needed.
You can’t perform that action at this time.
0 commit comments