verif tests image --> OK
This commit is contained in:
parent
ba8b5feb07
commit
957d9c4dcc
1 changed files with 25 additions and 14 deletions
|
@ -14,7 +14,7 @@ $opt['name'] = "Test";
|
|||
$opt['tags'] = ['test', 'openstack'];
|
||||
//$opt['containerFormat'] = 'ami';
|
||||
//$opt['diskFormat'] = 'iso';
|
||||
$opt['visibility'] = 'public';
|
||||
//$opt['visibility'] = 'public';
|
||||
$opt['minDisk'] = 1;
|
||||
$opt['protected'] = false;
|
||||
$opt['minRam'] = 10;
|
||||
|
@ -25,30 +25,39 @@ $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 :</br>";
|
||||
$res;
|
||||
echo "List images :</br></br>";
|
||||
foreach($images as $i){
|
||||
echo $i['name']."</br>"; // Nom
|
||||
$name = $i['name'];
|
||||
if(strcmp($name,"Test") == 0)
|
||||
{
|
||||
$res = $i['id'];
|
||||
}
|
||||
echo $name."</br>"; // Nom
|
||||
echo $i['status']."</br>"; // Status
|
||||
$id = $i['id']; // Id
|
||||
echo $id."</br>";
|
||||
foreach ($i['tags'] as $tag) { // Tags
|
||||
/*foreach ($i['tags'] as $tag) { // Tags
|
||||
echo $tag."</br>";
|
||||
}
|
||||
}*/
|
||||
echo "</br>";
|
||||
}
|
||||
|
||||
// Delete Image
|
||||
/*
|
||||
$App->setPostParam('id', $res);
|
||||
$image->action("deleteImage");
|
||||
*/
|
||||
|
||||
/*
|
||||
// Details images
|
||||
echo "Détail image :</br>";
|
||||
$App->setPostParam('id', $id);
|
||||
|
@ -56,7 +65,7 @@ $image->action("detailsImage");
|
|||
$retDetails = json_decode($App->show(), true)["Images"];
|
||||
echo $retDetails['id']."</br>";
|
||||
echo "</br>";
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
// Download image
|
||||
|
@ -66,18 +75,20 @@ $image->action("downloadImage");
|
|||
|
||||
|
||||
// Desactivate Images
|
||||
/*
|
||||
echo "Desactivate image : </br>";
|
||||
echo $id."</br>";
|
||||
$App->setPostParam('id', $id);
|
||||
$err = $image->action("desactivateImage");
|
||||
echo "</br>";
|
||||
*/
|
||||
|
||||
|
||||
// Reactivate Images
|
||||
/*
|
||||
// Resactivate Images
|
||||
echo $id."</br>";
|
||||
$App->setPostParam('id', $id);
|
||||
$err = $image->action("resactivateImage");
|
||||
$App->setPostParam('id', $res);
|
||||
$image->action("reactivateImage");
|
||||
*/
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue