Hi everyone,
I'm using SDK 1.5 for .NET and vCloud Director 1.5.1.
I have problem to get public IPs and used storage:
1) Public IPs
vm.GetIpAddressesById().Count; give me all the IP but not the one with public IP
The only trick I can think of is to check the subnet of the IP to know if it's public IP.
Any other better solution?
2) Used Storage
Let's say I have 1 virtual disk provisioned at 10 GB (thin provisioning).
And I only used up to 5 GB.
foreach (VirtualDisk disk in vm.GetDisks())
{
if (disk.IsHardDisk())
diskSize += (int)disk.GetHardDiskSize();
}
The following code give me the provisioned storage size 10 GB.
How to get the used storage 5GB?
I saw Vmware chargeback can get the used storage. So there must be a way to do so.
Thanks so much for any help