From 20dc35d9ab6ce3b9aafeeca14be52b70a30aaf1e Mon Sep 17 00:00:00 2001 From: EoleDev Date: Wed, 20 Apr 2016 09:45:24 +0200 Subject: Error correction automating --- server/Test/automatingTests.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'server/Test') diff --git a/server/Test/automatingTests.php b/server/Test/automatingTests.php index 078f86b..6b0e9d6 100755 --- a/server/Test/automatingTests.php +++ b/server/Test/automatingTests.php @@ -34,7 +34,15 @@ foreach ($ports as $p) { echo $p["fixedIps"]."
"; } */ - +//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 :
"; @@ -50,12 +58,13 @@ echo "
"; // Création d'une ip flotante $opt = array(); -$opt['floatingNetworkId'] = $id; -$opt['floatingip'] = $ip; +//$opt['floatingNetworkId'] = $id; !!!!! TOTALEMENT FAUX ici tu passe en parametre l id du serveur et non du network +//$opt['floatingip'] = $ip; !!!! il n y a pas d objet floatingip a passer en param, celui ci est compose, regarde bien les exemples de l api OpenStack //$opt['tenantId'] = "fbf5f920a7954b61b352bc09ce5ae803 "; //$opt['fixedIpAddress'] = "10.0.0.52"; //$opt['floatingIpAddress'] = "148.60.11.116"; //$opt['portId'] = "10.0.0.52"; +$opt['floatingNetworkId'] = "251b4641-20ff-4a72-8549-1758788b51ce"; $App->setPostParam('opt', $opt); $floatingIp->action("createFloatingIp"); -- cgit v1.2.3