diff options
| author | Yoggzo <yogg@epsina.com> | 2016-03-23 15:46:57 +0100 |
|---|---|---|
| committer | Yoggzo <yogg@epsina.com> | 2016-03-23 15:46:57 +0100 |
| commit | dcf0d8b2ba2547720215f7de55a747bf7ec47a0b (patch) | |
| tree | b1a2509a91d29ee8bebd83367a286cbe30af0931 /server/Test/imageTests.php | |
| parent | db2c1490b3e7a9be5ce8cbee37f772a1bd4f2268 (diff) | |
begining of automating tasks
Diffstat (limited to 'server/Test/imageTests.php')
| -rw-r--r-- | server/Test/imageTests.php | 18 |
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"); |
