blob: d184d4450ab6b12469a8d1eb4b4fdc1657c1689e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
<?php
include('InitTest.php');
include_once("../core/Image.php");
$image = new Image($App);
$opt = Array();
$opt['name'] = "Test";
$opt['tags'] = ['test', 'openstack'];
//$opt['containerFormat'] = 'ami';
//$opt['diskFormat'] = 'iso';
$opt['visibility'] = 'public';
$opt['minDisk'] = 1;
$opt['protected'] = false;
$opt['minRam'] = 10;
//$App->setPostParam('id', 'sdfihlus154dfhj');
//$err = $image->action("createImage");
//Liste des images
$image->action("listImage");
$im = $App->show();
$images = json_decode($im, true)["Images"];
$recup;
echo "Images présentes :";
echo "</br>";
foreach($images as $i){
$recup = $i;
echo $recup['name'];
echo "</br>";
//echo $recup['id'];
}
echo "</br>";
echo "Erreur capturée: ";
echo "</br>";
/*
$App->setPostParam('id', 354);
$err = $image->action("deleteImage");
$temp = $App->show();
$ret = json_decode($temp, true)["Images"];
echo $ret['id'];
*/
?>
|