28 lines
No EOL
839 B
PHP
28 lines
No EOL
839 B
PHP
<?php
|
|
include('InitTest.php');
|
|
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");
|
|
|
|
$image = new Image($App);
|
|
$compute = new Compute($App);
|
|
//$network = new Network($App);
|
|
$floatingIp = new FloatingIp($App);
|
|
//$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']."<br>";
|
|
}
|
|
|
|
// 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"]."<br>";
|
|
}
|
|
?>
|