diff options
| author | yogg@epsina.com <evan.pisani@etudiant.univ-rennes1.fr> | 2016-01-31 13:00:04 +0100 |
|---|---|---|
| committer | yogg@epsina.com <evan.pisani@etudiant.univ-rennes1.fr> | 2016-01-31 13:00:04 +0100 |
| commit | 10a6cd146db2bc509059d07ff8b7887445524cab (patch) | |
| tree | aa824a0abf59439ca1bd23fe4ace6c74640ccdfe /server/core | |
| parent | 325362a386687dd77c6c42dc5ab266d646bd9842 (diff) | |
Add create_image and delete_image
Diffstat (limited to 'server/core')
| -rw-r--r-- | server/core/Image.php | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/server/core/Image.php b/server/core/Image.php index 498ebe8..bf67e75 100644 --- a/server/core/Image.php +++ b/server/core/Image.php @@ -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; |
