summaryrefslogtreecommitdiff
path: root/server/Test
diff options
context:
space:
mode:
authorYoggzo <yogg@epsina.com>2016-02-14 18:41:45 +0100
committerYoggzo <yogg@epsina.com>2016-02-14 18:41:45 +0100
commitdff92c2d58f1683988f1cb8f170c7086e06105c3 (patch)
tree32f1b5aa65296b82e4c3994b0b51e98891907923 /server/Test
parent219847749e0cb26f11c0f4231fccdcb73e919d97 (diff)
tests
Diffstat (limited to 'server/Test')
-rw-r--r--server/Test/imageTests.php36
1 files changed, 3 insertions, 33 deletions
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 @@
<?php
-require '../vendor/autoload.php';
-include('/istic-openstack/server/init.php');
-
-/*
-$options = Array();
-$options["user"] = Array("name"=>"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 "</br>";