diff options
Diffstat (limited to 'server/Test')
| -rwxr-xr-x | server/Test/automatingTests.php | 15 |
1 files changed, 12 insertions, 3 deletions
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"]."</br>"; } */ - +//Liste des networks +echo "Liste des network : </br>"; +$network->action("list_network_ids"); +$servers = json_decode($App->show(), true)["ListNetworkIds"]; +$id = null; +foreach($servers as $server){ + echo $server."<br>"; +} +echo "</br>"; // liste des floatingip echo "Liste des floatingip : </br>"; @@ -50,12 +58,13 @@ echo "</br>"; // 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"); |
