From 3795d05a97dd144073d466be1ed0fd144683d8df Mon Sep 17 00:00:00 2001 From: Yoggzo Date: Tue, 19 Apr 2016 18:00:37 +0200 Subject: trying test floatingip --- server/Test/AppTestClass.php | 5 +++++ server/Test/automatingTests.php | 22 +++++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) (limited to 'server/Test') diff --git a/server/Test/AppTestClass.php b/server/Test/AppTestClass.php index a663514..eaea7f6 100755 --- a/server/Test/AppTestClass.php +++ b/server/Test/AppTestClass.php @@ -63,6 +63,11 @@ class AppTest{ $opt = $this->tokenClass->getOptions($service); return $this->openstack->networkingV2($opt); break; + case "FloatingIp": + if($this->tokenPost == NULL) $this->tokenClass->genNetworkToken(); + $opt = $this->tokenClass->getOptions($service); + return $this->openstack->networkingV2ExtLayer3($opt); + break; } } diff --git a/server/Test/automatingTests.php b/server/Test/automatingTests.php index 5cdee26..6de4de5 100644 --- a/server/Test/automatingTests.php +++ b/server/Test/automatingTests.php @@ -2,23 +2,27 @@ include('InitTest.php'); include_once("../core/Image.php"); include_once("../core/Compute.php"); -include_once("../core/Network.php"); +//include_once("../core/Network.php"); +//include_once("../core/Automating.php"); include_once("../core/FloatingIp.php"); -include_once("../core/Automating.php"); $image = new Image($App); $compute = new Compute($App); -$network = new Network($App); +//$network = new Network($App); $floatingIp = new FloatingIp($App); -$automating = new Automating($App); - - -$compute->listServers(); +//$automating = new Automating($App); +// Liste des serveurs +$compute->action("listServers"); $servers = json_decode($App->show(), true)["Servers"]; - foreach($servers as $server){ - echo $server->name." ".$server->id."
"; + echo $server['name']." ".$server['id']."
"; } +// liste des floatingip +$floatingIp->action("listFloatingIp"); +$listFloatingIp = json_decode($App->show(), true)["FloatingIp"]; +foreach ($listFloatingIp as $floatIp){ + echo $floatIp['floating_ip_address']." ".$floatIp['id']." ".$floatIp["status"]."
"; +} ?> \ No newline at end of file -- cgit v1.2.3