summaryrefslogtreecommitdiff
path: root/server/Test
diff options
context:
space:
mode:
Diffstat (limited to 'server/Test')
-rw-r--r--server/Test/imageTests.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/server/Test/imageTests.php b/server/Test/imageTests.php
index d184d44..d86c664 100644
--- a/server/Test/imageTests.php
+++ b/server/Test/imageTests.php
@@ -1,8 +1,10 @@
<?php
include('InitTest.php');
include_once("../core/Image.php");
+include_once("../core/Compute.php");
$image = new Image($App);
+$compute = new Compute($App);
$opt = Array();
$opt['name'] = "Test";
@@ -22,7 +24,6 @@ $opt['minRam'] = 10;
$image->action("listImage");
$im = $App->show();
$images = json_decode($im, true)["Images"];
-$recup;
echo "Images présentes :";
echo "</br>";
@@ -33,9 +34,22 @@ foreach($images as $i){
//echo $recup['id'];
}
echo "</br>";
-echo "Erreur capturée: ";
+
+echo "Flavors: ";
echo "</br>";
+$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 "</br>";
+ }
+
/*
$App->setPostParam('id', 354);
$err = $image->action("deleteImage");