From dff92c2d58f1683988f1cb8f170c7086e06105c3 Mon Sep 17 00:00:00 2001 From: Yoggzo Date: Sun, 14 Feb 2016 18:41:45 +0100 Subject: tests --- server/Test/imageTests.php | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) (limited to 'server/Test') diff --git a/server/Test/imageTests.php b/server/Test/imageTests.php index 94ff7b6..b406cee 100644 --- a/server/Test/imageTests.php +++ b/server/Test/imageTests.php @@ -1,35 +1,6 @@ "admin", "password"=>"ae5or6cn", "domain"=>["id"=>"Default"]); -$options["scope"] = Array("project"=>Array("name"=>"admin", "domain"=>["id"=>"Default"])); -$options["authUrl"] = "http://148.60.11.31:5000/v3"; - -$openstack = new OpenStack\OpenStack($options); - -//$identity = $openstack->identityV3(); -//var_dump($identity); -// 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', - 'password' => 'ae5or6cn', - 'domain' => [ - 'id' => 'Default' - ] - ] - ]); - */ -//$compute = $openstack->computeV2(["region" => "RegionOne"]); -//$image= $openstack->imagesV2(["region" => "RegionOne"]); -//var_dump($compute->client); -//$servers = $compute->listServers(true); -echo 'toto'; +include('InitTest.php'); +include_once("../core/Image.php"); $image = new Image($App); @@ -45,9 +16,8 @@ $opt['minRam'] = 10; //$new_image = $image->create_image($opt); - //Liste des images -$images = $image->list_images(); +$images = $image["listImages"]; echo "Images présentes :"; echo "
"; -- cgit v1.2.3