@@ -29,6 +29,7 @@ public function postVolumes(): array
2929 'imageId ' => $ this ->params ->imageRef (),
3030 'volumeType ' => $ this ->params ->volumeType (),
3131 'metadata ' => $ this ->params ->metadata (),
32+ 'projectId ' => $ this ->params ->projectId (),
3233 ],
3334 ];
3435 }
@@ -191,21 +192,21 @@ public function getSnapshots(): array
191192 'method ' => 'GET ' ,
192193 'path ' => 'snapshots ' ,
193194 'params ' => [
194- 'marker ' => $ this ->params ->marker (),
195- 'limit ' => $ this ->params ->limit (),
196- 'sortDir ' => $ this ->params ->sortDir (),
197- 'sortKey ' => $ this ->params ->sortKey (),
195+ 'marker ' => $ this ->params ->marker (),
196+ 'limit ' => $ this ->params ->limit (),
197+ 'sortDir ' => $ this ->params ->sortDir (),
198+ 'sortKey ' => $ this ->params ->sortKey (),
199+ 'allTenants ' => $ this ->params ->allTenants (),
198200 ],
199201 ];
200202 }
201203
202204 public function getSnapshotsDetail (): array
203205 {
204- return [
205- 'method ' => 'GET ' ,
206- 'path ' => 'snapshots/detail ' ,
207- 'params ' => [],
208- ];
206+ $ api = $ this ->getSnapshots ();
207+ $ api ['path ' ] .= '/detail ' ;
208+
209+ return $ api ;
209210 }
210211
211212 public function getSnapshot (): array
@@ -304,4 +305,45 @@ public function putQuotaSet(): array
304305 ],
305306 ];
306307 }
308+
309+ public function postVolumeBootable (): array
310+ {
311+ return [
312+ 'method ' => 'POST ' ,
313+ 'path ' => 'volumes/{id}/action ' ,
314+ 'jsonKey ' => 'os-set_bootable ' ,
315+ 'params ' => [
316+ 'id ' => $ this ->params ->idPath (),
317+ 'bootable ' => $ this ->params ->bootable (),
318+ ],
319+ ];
320+ }
321+
322+ public function postImageMetadata (): array
323+ {
324+ return [
325+ 'method ' => 'POST ' ,
326+ 'path ' => 'volumes/{id}/action ' ,
327+ 'jsonKey ' => 'os-set_image_metadata ' ,
328+ 'params ' => [
329+ 'id ' => $ this ->params ->idPath (),
330+ 'metadata ' => $ this ->params ->metadata (),
331+ ],
332+ ];
333+ }
334+
335+ public function postResetStatus (): array
336+ {
337+ return [
338+ 'method ' => 'POST ' ,
339+ 'path ' => 'volumes/{id}/action ' ,
340+ 'jsonKey ' => 'os-reset_status ' ,
341+ 'params ' => [
342+ 'id ' => $ this ->params ->idPath (),
343+ 'status ' => $ this ->params ->volumeStatus (),
344+ 'migrationStatus ' => $ this ->params ->volumeMigrationStatus (),
345+ 'attachStatus ' => $ this ->params ->volumeAttachStatus (),
346+ ],
347+ ];
348+ }
307349}
0 commit comments