From 0fc14b5761e558680aecc57e4d1ae8075121f01e Mon Sep 17 00:00:00 2001 From: Yoggzo Date: Thu, 21 Apr 2016 23:57:37 +0200 Subject: structure of Automating --- server/Test/automatingTests.php | 60 +++++++++++------------------------------ 1 file changed, 16 insertions(+), 44 deletions(-) (limited to 'server/Test/automatingTests.php') diff --git a/server/Test/automatingTests.php b/server/Test/automatingTests.php index e8e8475..8088102 100755 --- a/server/Test/automatingTests.php +++ b/server/Test/automatingTests.php @@ -1,48 +1,20 @@ "; -$compute->action("listServers"); -$servers = json_decode($App->show(), true)["Servers"]; -$id = null; -foreach($servers as $server){ - echo $server['name']." ".$server['id']." ".$server['ipv4']."
"; - if(strcmp($server['name'], "bob")){ - $id = $server['id']; - } -} -echo "
"; - - -//Liste des networks -echo "Liste des network :
"; -$network->action("list_network_ids"); -$servers = json_decode($App->show(), true)["ListNetworkIds"]; -$id = null; -foreach($servers as $server){ - echo $server."
"; -} -echo "
"; - - -// liste des floatingip -echo "Liste des floatingip :
"; -$networkLayer3->action("listFloatingIp"); -$listFloatingIp = json_decode($App->show(), true)["NetworkLayer3"]; -foreach ($listFloatingIp as $floatIp){ - echo $floatIp['floatingIpAddress']." ".$floatIp['id']." ".$floatIp["status"]."
"; -} - +include_once("../core/Automating.php"); + +$automating = new Automating($App); + +//$id = // id du réseau + +/* +// Création serveur avec ip publique +echo "Test création serveur avec ip publique :
"; +$App->setPostParam('networkId', $id); +$App->setPostParam('imageName', "ImageTest"); +$App->setPostParam('serverName', "ServerTest"); +$App->setPostParam('flavor', 1); +$compute->action("createPublicServer"); +$servers = json_decode($App->show(), true)["Automating"]; +*/ ?> \ No newline at end of file -- cgit v1.2.3