"; $opt = Array(); $opt['name'] = "Test"; $opt['tags'] = ['test', 'openstack']; //$opt['containerFormat'] = 'ami'; //$opt['diskFormat'] = 'iso'; $opt['visibility'] = 'public'; $opt['minDisk'] = 1; $opt['protected'] = false; $opt['minRam'] = 10; $App->setPostParam('opt', $opt); $image->action("createImage"); $retCreate = json_decode($App->show(), true)["Images"]; $idNew = $retCreate['id']; */ /* // Delete Image $App->setPostParam('id', $idNew); $image->action("deleteImage"); */ // Liste images $image->action("listImage"); $im = $App->show(); $images = json_decode($im, true)["Images"]; echo "List images :
"; foreach($images as $i){ echo $i['name']."
"; // Nom echo $i['status']."
"; // Status $id = $i['id']; // Id echo $id."
"; foreach ($i['tags'] as $tag) { // Tags echo $tag."
"; } echo "
"; } // Details images echo "Détail image :
"; $App->setPostParam('id', $id); $image->action("detailsImage"); $retDetails = json_decode($App->show(), true)["Images"]; echo $retDetails['id']."
"; echo "
"; /* // Download image $App->setPostParam('id', $id); $image->action("downloadImage"); */ // Desactivate Images echo "Desactivate image :
"; echo $id."
"; $App->setPostParam('id', $id); $err = $image->action("desactivateImage"); echo "
"; /* // Resactivate Images echo $id."
"; $App->setPostParam('id', $id); $err = $image->action("resactivateImage"); */ /* // Details images echo "Update image :
"; $optUpdate = Array(); $optUpdate['tags'] = ['ciros', 'testUpdate']; $App->setPostParam('id', $id); $App->setPostParam('opt', $optUpdate); $image->action("updateImage"); $retDetails = json_decode($App->show(), true)["Images"]; foreach ($retDetails['tags'] as $tag) { // Tags echo $tag."
"; } */ /* echo "Flavors: "; echo "
"; $compute->action("listFlavors"); $flavors = json_decode($App->show(), true)["Flavors"]; foreach($flavors as $f){ echo "Id=".$f['id'].", "; echo "name=".$f['name'].", "; echo "ram=".$f['ram'].", "; echo "disk=".$f['disk'].", "; echo "vcpus=".$f['vcpus']; echo "
"; } */ ?>