ajout des fonctions
This commit is contained in:
parent
38ba61c6ee
commit
70fcf3553a
3 changed files with 157 additions and 1 deletions
34
server/Test/getIdNetwork.php
Normal file
34
server/Test/getIdNetwork.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?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->getNetwork('5f78d3c1-1f53-4be7-897b-cf3c797961e0');
|
||||
try{
|
||||
$ls->retrieve();
|
||||
|
||||
|
||||
|
||||
echo "oui";}
|
||||
|
||||
catch (OpenStack\Common\Error\BadResponseError $e){
|
||||
echo "non"; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue