Add create_image and delete_image
This commit is contained in:
parent
325362a386
commit
10a6cd146d
2 changed files with 33 additions and 11 deletions
|
@ -21,17 +21,25 @@ class Image {
|
|||
//$this->plugins = $apiP;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Details about an image
|
||||
*
|
||||
* @param array $opt
|
||||
* options for the image creation
|
||||
*
|
||||
*/
|
||||
public function create_image(array $opt){
|
||||
// OPTIONS A VOIR
|
||||
// VOIR COMMENT RENDRE LES CHAMPS OPTIONNELS (SAUF NAME)
|
||||
$image = $this->oidentity->createImage([
|
||||
'name' => $opt[name],
|
||||
'tags' => ['{tag1}', '{tag2}'], // A VOIR
|
||||
'containerFormat' => $opt[containerFormat],
|
||||
'diskFormat' => $opt[diskFormat],
|
||||
'visibility' => $opt[visibility],
|
||||
'minDisk' => 10,
|
||||
'protected' => true,
|
||||
'minRam' => 10,
|
||||
'name' => $opt['name'],
|
||||
//'tags' => $opt['tag'], // A VOIR COMMENT CA MARCHE
|
||||
'containerFormat' => $opt['containerFormat'],
|
||||
'diskFormat' => $opt['diskFormat'],
|
||||
'visibility' => $opt['visibility'],
|
||||
'minDisk' => $opt['minDisk'],
|
||||
'protected' => $opt['protected'],
|
||||
'minRam' => $opt['minRam'],
|
||||
]);
|
||||
|
||||
return $image;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue