Hi Niclas,
I put some code together to get the info you want:
# This function does a HTTP GET against the vCloud 5.1 API using our current API session.
# It accepts any vCloud HREF.
function Get-vCloud51($href)
{
$request = [System.Net.HttpWebRequest]::Create($href)
$request.Accept = "application/*+xml;version=5.1"
$request.Headers.add("x-vcloud-authorization",$global:DefaultCIServers[0].SessionId)
$response = $request.GetResponse()
$streamReader = new-object System.IO.StreamReader($response.getResponseStream())
[xml]$xmldata = $streamreader.ReadToEnd()
$streamReader.close()
$response.close()
return $xmldata
}
# The following gets an OrgVdc via 1.5 API, then 5.1 API.
# It then gets the storage profiles associated with the OrgVdc
# and displays them on the screen
$orgVdc = Get-OrgVdc "MyOrgVDC" # Change this to the OrgVdc you want
$orgVdc51 = Get-vCloud51 $orgVdc.Href
$storageLimits = @()
foreach ($storageProfile in $orgVdc51.adminvdc.VdcStorageProfiles.VdcStorageProfile)
{
$storageProfile51 = Get-vCloud51 $storageprofile.href
$storageLimits += $storageProfile51.adminVdcStorageProfile | select name, Limit
}
$storageLimits
Jake Robinson VCP, vExpert - geekafterfive.com -
Twitter: @jakerobinson