diff options
| author | yogg@epsina.com <evan.pisani@etudiant.univ-rennes1.fr> | 2016-01-31 11:36:58 +0100 |
|---|---|---|
| committer | yogg@epsina.com <evan.pisani@etudiant.univ-rennes1.fr> | 2016-01-31 11:36:58 +0100 |
| commit | 325362a386687dd77c6c42dc5ab266d646bd9842 (patch) | |
| tree | 812db70dcf8b866578f31d2d397bb9fe96451527 /server/test.php | |
| parent | 83fd3eb19dc9943d3ad53154f330ed4782ccff81 (diff) | |
list_images and images_details
Diffstat (limited to 'server/test.php')
| -rw-r--r-- | server/test.php | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/server/test.php b/server/test.php index 4e6743f..6881923 100644 --- a/server/test.php +++ b/server/test.php @@ -16,7 +16,6 @@ $openstack = new OpenStack\OpenStack($options); // Since usernames will not be unique across an entire OpenStack installation, // when authenticating with them you must also provide your domain ID. You do // not have to do this if you authenticate with a user ID. - /*$token = $identity->generateToken([ 'user' => [ 'name' => 'admin', @@ -28,20 +27,33 @@ $openstack = new OpenStack\OpenStack($options); ]); */ //$compute = $openstack->computeV2(["region" => "RegionOne"]); - //$image= $openstack->imagesV2(["region" => "RegionOne"]); +//var_dump($compute->client); +//$servers = $compute->listServers(true); + +// Initialisation Image() $optImage = Array(); $optImage["region"] = "RegionOne"; $image = new Image($openstack, $optImage); +//Liste des images $images = $image->list_images(); -//var_dump($compute->client); -//$servers = $compute->listServers(true); +echo "Images présentes :"; +echo "</br>"; foreach($images as $i){ - //echo $server->id." !!! "; echo $i->name; + if($i->name == "TinyCore"){ + $id_image = $i->id; + } echo "</br>"; } +echo "</br>"; + + +// Détails Image +$details = $image->image_details($id_image); + +?>
\ No newline at end of file |
