File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ public function getResourceMetricMeasures(): array
121121 'metric ' => $ this ->params ->idUrl ('metric ' ),
122122 'type ' => $ this ->params ->resourceType (),
123123 'granularity ' => $ this ->params ->granularity (),
124+ 'aggregation ' => $ this ->params ->aggregation (),
124125 ],
125126 ];
126127 }
Original file line number Diff line number Diff line change @@ -58,8 +58,16 @@ public function granularity()
5858 {
5959 return [
6060 'location ' => self ::QUERY ,
61- 'type ' => self ::STRING ,
61+ 'type ' => self ::STRING_TYPE ,
6262 'description ' => 'Specify the granularity to retrieve, rather than all the granularities available ' ,
6363 ];
6464 }
65+
66+ public function aggregation ()
67+ {
68+ return [
69+ 'location ' => self ::QUERY ,
70+ 'type ' => self ::STRING_TYPE
71+ ];
72+ }
6573}
Original file line number Diff line number Diff line change @@ -28,7 +28,12 @@ public function listResources(array $options = []): \Generator
2828 return $ this ->model (Resource::class)->enumerate ($ this ->api ->getResources (), $ options );
2929 }
3030
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
3237 {
3338 $ this ->injectGenericType ($ options );
3439
@@ -40,6 +45,8 @@ public function getResource(array $options = []): Resource
4045
4146 public function searchResources (array $ options = []): \Generator
4247 {
48+ $ this ->injectGenericType ($ options );
49+
4350 /**
4451 * $options['criteria'] must send as STRING
4552 * This will check input $options and perform json_encode if needed.
You can’t perform that action at this time.
0 commit comments