diff options
Diffstat (limited to 'server/Test/create_subnet.php')
| -rw-r--r-- | server/Test/create_subnet.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/server/Test/create_subnet.php b/server/Test/create_subnet.php new file mode 100644 index 0000000..644a77d --- /dev/null +++ b/server/Test/create_subnet.php @@ -0,0 +1,30 @@ +<?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"]); + $ln = $networking->listNetworks(); + + + + + +$array = $networking->createSubnet(array( + 'name' => 'SubOthmane', + 'networkId' => '5f78d3c1-1f53-4be7-897b-cf3c797961e0', + 'ipVersion' => 4, + 'cidr' => '192.168.0.0/24' +)); + + + + + + |
