summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoggzo <yogg@epsina.com>2016-03-30 12:14:11 +0200
committerYoggzo <yogg@epsina.com>2016-03-30 12:14:11 +0200
commit957d9c4dccc53c63e83cb33f81218593489a8e7c (patch)
treee7b2d59f6c4a50a27f84da94f456016326a14a3e
parentba8b5feb07a7a19ca4a694313fa16d03a2fb2508 (diff)
verif tests image --> OK
-rw-r--r--server/Test/imageTests.php39
1 files changed, 25 insertions, 14 deletions
diff --git a/server/Test/imageTests.php b/server/Test/imageTests.php
index 4adec08..a99fbd7 100644
--- a/server/Test/imageTests.php
+++ b/server/Test/imageTests.php
@@ -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");
*/