summaryrefslogtreecommitdiff
path: root/server/Test/automatingTests.php
diff options
context:
space:
mode:
authorYoggzo <yogg@epsina.com>2016-04-21 21:51:46 +0200
committerYoggzo <yogg@epsina.com>2016-04-21 21:51:46 +0200
commit3f6af0b6446725462362de94f09daf9a723b130d (patch)
tree2cae5a13c6bd98a236ac147d5e8c7572017af27f /server/Test/automatingTests.php
parent94ce37f5175eb6f528d5ad29a446c04d981628f1 (diff)
modification in structure for ip and routers
Diffstat (limited to 'server/Test/automatingTests.php')
-rwxr-xr-xserver/Test/automatingTests.php40
1 files changed, 5 insertions, 35 deletions
diff --git a/server/Test/automatingTests.php b/server/Test/automatingTests.php
index 3f32d02..e8e8475 100755
--- a/server/Test/automatingTests.php
+++ b/server/Test/automatingTests.php
@@ -4,12 +4,11 @@ include_once("../core/Image.php");
include_once("../core/Compute.php");
include_once("../core/Network.php");
//include_once("../core/Automating.php");
-include_once("../core/FloatingIp.php");
+include_once("../core/NetworkLayer3.php");
$image = new Image($App);
$compute = new Compute($App);
-$network = new Network($App);
-$floatingIp = new FloatingIp($App);
+$networkLayer3 = new NetworkLayer3($App);
//$automating = new Automating($App);
// Liste des serveurs
@@ -25,15 +24,7 @@ foreach($servers as $server){
}
echo "</br>";
-/*
-// Liste des ports
-echo "Liste des ports : </br>";
-$network->action("listPorts");
-$ports = json_decode($App->show(), true)["Network"];
-foreach ($ports as $p) {
- echo $p["fixedIps"]."</br>";
-}
-*/
+
//Liste des networks
echo "Liste des network : </br>";
$network->action("list_network_ids");
@@ -44,32 +35,11 @@ foreach($servers as $server){
}
echo "</br>";
-/*
-// Création d'une ip flotante
-$opt = array();
-//$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");
-$float = json_decode($App->show(), true)["FloatingIp"];
-if(!isset($float)){
- echo "Erreur pendant la création</br>";
-}
-echo "</br>";
-*/
-
-
// liste des floatingip
echo "Liste des floatingip : </br>";
-$floatingIp->action("listFloatingIp");
-$listFloatingIp = json_decode($App->show(), true)["FloatingIp"];
+$networkLayer3->action("listFloatingIp");
+$listFloatingIp = json_decode($App->show(), true)["NetworkLayer3"];
foreach ($listFloatingIp as $floatIp){
echo $floatIp['floatingIpAddress']." ".$floatIp['id']." ".$floatIp["status"]."<br>";
}