-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.php
40 lines (27 loc) · 968 Bytes
/
options.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
include('login.php');
// create an SDK Admin object
$sdkAdmin = $service->createSDKAdminObj();
// get references to administrative organization entities
$orgRefs = $sdkAdmin->getAdminOrgRefs();
//var_dump($orgRefs[0]->getAdminVdcStorageProfile());
//exit;
$orgs = array();
foreach($orgRefs as $orgRef):
$sdkOrg = $service->createSDKObj($orgRef);
$orgs[$orgRef->get_name()] = array();
$vdcRefs = $sdkOrg->getAdminVdcs();
foreach ( $vdcRefs as $vdc)
{
$vdc_info = array(
'cpu' => $vdc->getComputeCapacity()->getCpu(),
'memory' => $vdc->getComputeCapacity()->getMemory(),
//'storage' => $vdc->getAdminVdcStorageProfiles(),
);
//echo "href=" . $vdc->get_href() . " name=" . $vdc->get_name() . " AllocationModel= " . $vdc->getAllocationModel() . " Resources= " . $vdc->getComputeCapacity() . "\n";
$orgs[$orgRef->get_name()]['vdc'][ $vdc->get_name() ] = $vdc_info;
}
endforeach;
var_dump($orgs);
include('logout.php')
?>