begining of automating tasks
This commit is contained in:
parent
db2c1490b3
commit
dcf0d8b2ba
3 changed files with 117 additions and 2 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue