liste des cird
This commit is contained in:
parent
d2f5ae5c83
commit
5665d317db
1 changed files with 26 additions and 0 deletions
26
server/Test/DisplayListCidr.php
Normal file
26
server/Test/DisplayListCidr.php
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
ini_set('display_errors', 1);
|
||||
date_default_timezone_set("Europe/Paris");
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
$options = Array();
|
||||
$options["user"] = Array("name"=>"admin", "password"=>"ae5or6cn", "domain"=>["id"=>"Default"]);
|
||||
$options["scope"] = Array("project"=>Array("name"=>"admin", "domain"=>["id"=>"Default"]));
|
||||
$options["authUrl"] = "http://148.60.11.31:5000/v3";
|
||||
$openstack = new OpenStack\OpenStack($options);
|
||||
$networking = $openstack->networkingV2(["region"=>"RegionOne"]);
|
||||
$ls = $networking->listSubnets();
|
||||
|
||||
foreach ($ls as $subnet) {
|
||||
echo $subnet->cidr."<br>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Add table
Reference in a new issue