istic-openstack/server/Test/computeTest.php
2016-03-21 06:47:01 +01:00

20 lines
647 B
PHP
Executable file

re '../vendor/autoload.php';
include('/istic-openstack/server/init.php');
include_once("../core/Compute.php");
$compute = new compute($App);
$servers = $compute->listServers();
$servers= $compute->listServers(true);
foreach($servers as $server){
//print_r($server);
echo $server->name." ".$server->id."<br>";
//$opt = Array();
//$opt['name'] = "Test";
//$serverid = Array("id"=>"69d5bcc4-2fab-4634-b0d2-f455fee5b7bd");
//$serverid["id"] = "{69d5bcc4-2fab-4634-b0d2-f455fee5b7bd}";
//unset($server);
//$server = $compute->getServer($serverid);
//echo $server->name." ".$server->image;
//$server->update(array('name' => 'test'));