Hi!
I'm successfully using VMware PHP vCloud API to gather information from my vCloud Organitzation objects (orgs, vDCs, vShield Edges, vApps, VMs) (my scripts), but how can I get the usage of my Storage Profiles?
On my tests, I get a reference to a vDC ($vdcRef), then I create a VMware_VCloud_SDK_Vdc object doing:
$sdkVdc = $service->createSDKObj($vdcRef);
then I get it's StorageProfiles doing
$sdkVdc->getVdcStorageProfiles();
but this array contains objects of class VMware_VCloud_API_VdcStorageProfileType , which has methods like getEnabled() , getUnits() , getLimit() , getDefault() and getDescription() , but it just shows me the limit (getLimit()), not it's current disk usage.
Looking at API source, I realize that depending on your authorizations some methods return admin or a non-admin object. For example: on file "VMware/VCloud/Admin.php", you can see that the method getAdminVdcRefs() from VMware_VCloud_SDK_AdminOrg class returns "Admin Vdc references" for "System/Cloud Administrator" but it returns "Vdc references" for "Organization/Tenant Administrators/Users" (that's my case). Maybe if I where and administrator then I could get an object with more information about my Storage Profiles, I don't know.
Any way, using vCloud Director web user interface I really can get my storage profile's usage. So my account really has permissions to get this information. This way I just can imagine two possibilities:
* or the VMware PHP vCloud API just provides this information to "System/Cloud Administrators"
* or it provides it but I'm not hitting it
I bet second option :) How can I do it?
If it's the first option (API is not for me), then at least I may be able to access this information requesting it to the vCloud REST API... but browsing it and folling links I can't get this information. I may be missing something.
Thanks and best regards!
/Ángel