Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 176483

VdcStorageProfile StorageCapacity

$
0
0

Apologies if this isn't posted in the correct forum. I'm a bit confused with all various vmware APIs I've found recently.

 

I need to find the StorageProfiles used capacity for all VDCs using csharp/.Net.

 

This is the code I've come up with so far.

 

vCloudClient client = new vCloudClient(args[6], com.vmware.vcloud.sdk.constants.Version.V1_5);

//vCloudClient client = new vCloudClient(args[6], com.vmware.vcloud.sdk.constants.Version.V5_1);

client.Login(args[7], args[8]);

 

Dictionary<String, ReferenceType> orgsList = client.GetOrgRefsByName();

foreach (ReferenceType orgRef in orgsList.Values)

{

     foreach (ReferenceType vdcLink in Organization.GetOrganizationByReference(client, orgRef).GetVdcRefs())

     {

               Vdc vdc = Vdc.GetVdcByReference(client, vdcLink);                          

               var storageCapacity = vdc.Resource.StorageCapacity;

               var storageProfiles = vdc.Resource.VdcStorageProfiles;

     }

}

 

If I connect using V1_5 storageCapacity is returned fine with the default profile and storageProfiles is null

If I connect using V5_1 storageCapacity is returned as null and storageProfiles contains a list of the 3 storage profiles of the vdc in question.

 

Any ideas how I can get ALL the storage profiles under each vdc in .Net?

 

Thanks,


Phonsie.


Viewing all articles
Browse latest Browse all 176483

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>