vrandom yet another random IT blog

vcloud ondemand basic authentication

Overview

Whilst testing a number of tools for compatibility with the vCloud OnDemand service I confirmed most them don’t function. As such I undertook manually authenticating using the REST API to understand the differences.

Exploring the API

My first port of call was to hit the https://vca.vmware.com/api/iam/login address, however I quickly found this redirected to https://us-california-1-3.vchs.vmware.com/api/iam/login. So rather than make the request again I’ve added ‘–location-trusted’ to inform curl to follow the redirect AND send the credentials again. This way if VMware change where we should auth we’ll hopefully follow it.

$ curl -H "Accept: application/json;version=5.7" -u "username@vrandom.com:complexpassword" --location-trusted -i -XPOST https://vca.vmware.com/api/iam/login
HTTP/1.1 302 Found
Date: Tue, 27 Jan 2015 10:16:44 GMT
Server: Apache/2.2.15 (CentOS)
Location: https://us-california-1-3.vchs.vmware.com/api/iam/login
Vary: Accept-Encoding
Content-Length: 320
Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 201 Created
Date: Tue, 27 Jan 2015 10:16:46 GMT
Server: Apache-Coyote/1.1
vchs-authorization: eyJhbGciOiJSUzI1NiJ9.1aa66435b148adc4b0640657a4ec3167.E_22c82ed2c328f14a6eb4810a5c707698_zcN_a61c5d8374d684fc4741444c1f4bae12_411240fbafd8e4fe294946cdd9069dca-9aee4b9ef90322efe8b2b0222af177eb_3oq9ABdax3vKwk1zAz1KhS0_G8t3E4G7ptx2Lp_2p-cc40ba8f3176df6c58e664e2e2e0fa90
Content-Type: application/json; version=5.7
Content-Length: 60
Set-Cookie: ROUTEID=.187; path=/; Domain=.vmware.com
Via: 1.1 us-california-1-3.vchs.vmware.com

{"serviceGroupIds":["a2881798-ddd7-04a9-f15d-5ff19bec"]}

The key thing to look for here is the vchs-authorization header. Now we need to pull the instances we have access to, to do this we will make a request to https://vca.vmware.com/api/sc/instances (again following the redirect) We will want to parse the result, as such I’m going to pipe the output through python -mjson.tool

$ export auth='eyJhbGciOiJSUzI1NiJ9.1aa66435b148adc4b0640657a4ec3167.E_22c82ed2c328f14a6eb4810a5c707698_zcN_a61c5d8374d684fc4741444c1f4bae12_411240fbafd8e4fe294946cdd9069dca-9aee4b9ef90322efe8b2b0222af177eb_3oq9ABdax3vKwk1zAz1KhS0_G8t3E4G7ptx2Lp_2p-cc40ba8f3176df6c58e664e2e2e0fa90'
$ curl -H "Accept: application/json;version=5.7" -H "Authorization: BEARER $auth" -u "username@vrandom.com:complexpassword" --location-trusted https://vca.vmware.com/api/sc/instances | python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
105  1795  105  1795    0     0   1076      0  0:00:01  0:00:01 --:--:-- 1752k
{
    "instances": [
        {
            "apiUrl": "https://uk-slough-1-6.vchs.vmware.com/api/compute/api/org/2208f489-812e-981c-5bea-42ce9a6c", 
            "dashboardUrl": "https://uk-slough-1-6.vchs.vmware.com/api/compute/compute/ui?orgName=4a11c9d1-dba9-2281-f78f-d91facde&serviceInstanceId=2208f489-812e-981c-5bea-42ce9a6c", 
            "description": "Create virtual machines, and easily scale up or down as your needs change.", 
            "id": "4e8730a8-4325-6e64-3552-adfdcc06", 
            "instanceAttributes": "{\"orgName\":\"4a11c9d1-dba9-2281-f78f-d91facde\",\"sessionUri\":\"https://uk-slough-1-6.vchs.vmware.com/api/compute/api/sessions\",\"apiVersionUri\":\"https://uk-slough-1-6.vchs.vmware.com/api/compute/api/versions\"}", 
            "instanceVersion": "1.0", 
            "link": [], 
            "name": "Virtual Private Cloud OnDemand", 
            "planId": "c917b8bc-9089-6220-0b57-2c45f1b2", 
            "region": "uk-slough-1-6.vchs.vmware.com", 
            "serviceGroupId": "a2881798-ddd7-04a9-f15d-5ff19bec"
        }, 
        {
            "apiUrl": "https://us-virginia-1-4.vchs.vmware.com/api/compute/api/org/22899d89-1fc1-7b44-dfbd-0ff060b2", 
            "dashboardUrl": "https://us-virginia-1-4.vchs.vmware.com/api/compute/compute/ui?orgName=24ba2db6-7e6a-1ada-eab5-c0a7c1c0&serviceInstanceId=22899d89-1fc1-7b44-dfbd-0ff060b2", 
            "description": "Create virtual machines, and easily scale up or down as your needs change.", 
            "id": "8718e398-d1d0-ec3a-856b-dbcec9f1", 
            "instanceAttributes": "{\"orgName\":\"24ba2db6-7e6a-1ada-eab5-c0a7c1c0\",\"sessionUri\":\"https://us-virginia-1-4.vchs.vmware.com/api/compute/api/sessions\",\"apiVersionUri\":\"https://us-virginia-1-4.vchs.vmware.com/api/compute/api/versions\"}", 
            "instanceVersion": "1.0", 
            "link": [], 
            "name": "Virtual Private Cloud OnDemand", 
            "planId": "42d62077-ebe4-998c-7e7c-a6ddd8e0", 
            "region": "us-virginia-1-4.vchs.vmware.com", 
            "serviceGroupId": "a2881798-ddd7-04a9-f15d-5ff19bec"
        }
    ]
}

Cool, so I want to conenct to the slough instance, so I will now build a request for that using the orgName and the sessionUri. Note, this is picky about the Accept header, it MUST be as below.

$ curl -H "Accept: application/*+xml;version=5.7" -u "username@vrandom.com@4a11c9d1-dba9-2281-f78f-d91facde:complexpassword" -i -XPOST https://uk-slough-1-6.vchs.vmware.com/api/compute/api/sessions
HTTP/1.1 200 OK
Date: Tue, 27 Jan 2015 10:33:34 GMT
X-VMWARE-VCLOUD-REQUEST-ID: 5ed84504-e680-1d5a-2436-9a19aadf
Expires: Thu, 01 Jan 1970 00:00:00 GMT
x-vcloud-authorization: 25a7d628bbd7b49b853ce5ef921f832d
X-7caa7c-427232-3a16be1-a7f2615f5-: 1016
Content-Type: application/vnd.vmware.vcloud.session+xml;version=5.7
Content-Length: 1959
Set-Cookie: vcloud_session_id=25a7d628bbd7b49b853ce5ef921f832d; Secure; Path=/; HttpOnly
Via: 1.1 uk-slough-1-6.vchs.vmware.com

<?xml version="1.0" encoding="UTF-8"?>
<Session xmlns="http://www.vmware.com/vcloud/v1.5" org="4a11c9d1-dba9-2281-f78f-d91facde" roles="Account Administrator" user="username@vrandom.com" userId="urn:vcloud:user:f5adbea0-58bc-1b37-f8c9-a14a0f60" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/session" type="application/vnd.vmware.vcloud.session+xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://uk-slough-1-6.vchs.vmware.com/api/compute/api/v1.5/schema/master.xsd">
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/org/" type="application/vnd.vmware.vcloud.orgList+xml"/>
    <Link rel="remove" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/session"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/admin/" type="application/vnd.vmware.admin.vcloud+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/org/2208f489-812e-981c-5bea-42ce9a6c" name="4a11c9d1-dba9-2281-f78f-d91facde" type="application/vnd.vmware.vcloud.org+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/query" type="application/vnd.vmware.vcloud.query.queryList+xml"/>
    <Link rel="entityResolver" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/entity/" type="application/vnd.vmware.vcloud.entity+xml"/>
    <Link rel="down:extensibility" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/extensibility" type="application/vnd.vmware.vcloud.apiextensibility+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vchs/query?type=orgVdcNetwork" type="application/vnd.vmware.vchs.query.records+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vchs/query?type=edgeGateway" type="application/vnd.vmware.vchs.query.records+xml"/>
</Session>

Okay, so now we are fully authenticated and have a x-vcloud-authorization token with which to access vCD. The major difference between access vCloud Air vs a local vCD instance is that this x-vcloud-authorization header needs to be included in all requests. So lets list our organizations, note I’ve dropped the -i as we no longer need the headers:

$ curl -H "Accept: application/*+xml;version=5.7" -H "x-vcloud-authorization: 25a7d628bbd7b49b853ce5ef921f832d" https://uk-slough-1-6.vchs.vmware.com/api/org
<?xml version="1.0" encoding="UTF-8"?>
<OrgList xmlns="http://www.vmware.com/vcloud/v1.5" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/org/" type="application/vnd.vmware.vcloud.orgList+xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://uk-slough-1-6.vchs.vmware.com/api/compute/api/v1.5/schema/master.xsd">
    <Org href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/org/2208f489-812e-981c-5bea-42ce9a6c" name="4a11c9d1-dba9-2281-f78f-d91facde" type="application/vnd.vmware.vcloud.org+xml"/>
</OrgList>

Quick timesaver, you’ll notice the above information was actually returned in the previous call towards the center of the response.

So lets explore our organization:

$ curl -H "Accept: application/*+xml;version=5.7" -H "x-vcloud-authorization: 25a7d628bbd7b49b853ce5ef921f832d" https://uk-slough-1-6.vchs.vmware.com/api/compute/api/org/2208f489-812e-981c-5bea-42ce9a6c
<?xml version="1.0" encoding="UTF-8"?>
<Org xmlns="http://www.vmware.com/vcloud/v1.5" name="4a11c9d1-dba9-2281-f78f-d91facde" id="urn:vcloud:org:2208f489-812e-981c-5bea-42ce9a6c" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/org/2208f489-812e-981c-5bea-42ce9a6c" type="application/vnd.vmware.vcloud.org+xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://uk-slough-1-6.vchs.vmware.com/api/compute/api/v1.5/schema/master.xsd">
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdc/2184c7cf-326d-155b-db8b-9aff671a" name="Alex-VDC" type="application/vnd.vmware.vcloud.vdc+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdc/692484b9-68cc-713d-111d-1429c364" name="Andre-VDC" type="application/vnd.vmware.vcloud.vdc+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdc/0fca5b3a-2f4e-2cbc-cfc2-52b37df1" name="Per-VDC" type="application/vnd.vmware.vcloud.vdc+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/tasksList/2208f489-812e-981c-5bea-42ce9a6c" type="application/vnd.vmware.vcloud.tasksList+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/catalog/7544e08d-c174-b464-7309-b565772a" name="default-catalog" type="application/vnd.vmware.vcloud.catalog+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/org/2208f489-812e-981c-5bea-42ce9a6c/catalog/7544e08d-c174-b464-7309-b565772a/controlAccess/" type="application/vnd.vmware.vcloud.controlAccess+xml"/>
    <Link rel="controlAccess" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/org/2208f489-812e-981c-5bea-42ce9a6c/catalog/7544e08d-c174-b464-7309-b565772a/action/controlAccess" type="application/vnd.vmware.vcloud.controlAccess+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/catalog/90277a8e-7eae-3dee-963b-acb2758a" name="Public Catalog" type="application/vnd.vmware.vcloud.catalog+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/org/2208f489-812e-981c-5bea-42ce9a6c/catalog/90277a8e-7eae-3dee-963b-acb2758a/controlAccess/" type="application/vnd.vmware.vcloud.controlAccess+xml"/>
    <Link rel="add" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/admin/org/2208f489-812e-981c-5bea-42ce9a6c/catalogs" type="application/vnd.vmware.admin.catalog+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/network/7f710b1c-2cf5-67bb-93e0-a00ff579" name="default-routed-network" type="application/vnd.vmware.vcloud.orgNetwork+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/network/d8350c2c-ffb7-50f2-c29e-3649d784" name="default-routed-network" type="application/vnd.vmware.vcloud.orgNetwork+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/network/b32b135a-e2b2-50ec-fbb5-13a50bee" name="default-routed-network" type="application/vnd.vmware.vcloud.orgNetwork+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/network/7eb6c483-23be-be59-b1e7-9e7f10d5" name="Isolated-Network" type="application/vnd.vmware.vcloud.orgNetwork+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/supportedSystemsInfo/" type="application/vnd.vmware.vcloud.supportedSystemsInfo+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/org/2208f489-812e-981c-5bea-42ce9a6c/metadata" type="application/vnd.vmware.vcloud.metadata+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/org/2208f489-812e-981c-5bea-42ce9a6c/hybrid" type="application/vnd.vmware.vcloud.hybridOrg+xml"/>
    <Link rel="alternate" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/admin/org/2208f489-812e-981c-5bea-42ce9a6c" type="application/vnd.vmware.admin.organization+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdcTemplates" type="application/vnd.vmware.admin.vdcTemplates+xml"/>
    <Link rel="instantiate" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/org/2208f489-812e-981c-5bea-42ce9a6c/action/instantiate" type="application/vnd.vmware.vcloud.instantiateVdcTemplateParams+xml"/>
    <Description/>
    <FullName>vrandom (4a11c9d1-dba9-2281-f78f-d91facde)</FullName>
</Org>

So here we can see there are three VDC’s, named Alex-VDC, Andre-VDC and Per-VDC, lets list the devices in Andre-VDC

$ curl -H "Accept: application/*+xml;version=5.7" -H "x-vcloud-authorization: 25a7d628bbd7b49b853ce5ef921f832d" https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdc/692484b9-68cc-713d-111d-1429c364
<?xml version="1.0" encoding="UTF-8"?>
<Vdc xmlns="http://www.vmware.com/vcloud/v1.5" status="1" name="Andre-VDC" id="urn:vcloud:vdc:692484b9-68cc-713d-111d-1429c364" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdc/692484b9-68cc-713d-111d-1429c364" type="application/vnd.vmware.vcloud.vdc+xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://uk-slough-1-6.vchs.vmware.com/api/compute/api/v1.5/schema/master.xsd">
    <Link rel="up" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/org/2208f489-812e-981c-5bea-42ce9a6c" type="application/vnd.vmware.vcloud.org+xml"/>
    <Link rel="down" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdc/692484b9-68cc-713d-111d-1429c364/metadata" type="application/vnd.vmware.vcloud.metadata+xml"/>
    <Link rel="edit" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdc/692484b9-68cc-713d-111d-1429c364" type="application/vnd.vmware.vcloud.vdc+xml"/>
    <Link rel="remove" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdc/692484b9-68cc-713d-111d-1429c364"/>
    <Link rel="add" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdc/692484b9-68cc-713d-111d-1429c364/action/uploadVAppTemplate" type="application/vnd.vmware.vcloud.uploadVAppTemplateParams+xml"/>
    <Link rel="add" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdc/692484b9-68cc-713d-111d-1429c364/media" type="application/vnd.vmware.vcloud.media+xml"/>
    <Link rel="add" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdc/692484b9-68cc-713d-111d-1429c364/action/instantiateOvf" type="application/vnd.vmware.vcloud.instantiateOvfParams+xml"/>
    <Link rel="add" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdc/692484b9-68cc-713d-111d-1429c364/action/instantiateVAppTemplate" type="application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml"/>
    <Link rel="add" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdc/692484b9-68cc-713d-111d-1429c364/action/cloneVApp" type="application/vnd.vmware.vcloud.cloneVAppParams+xml"/>
    <Link rel="add" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdc/692484b9-68cc-713d-111d-1429c364/action/cloneVAppTemplate" type="application/vnd.vmware.vcloud.cloneVAppTemplateParams+xml"/>
    <Link rel="add" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdc/692484b9-68cc-713d-111d-1429c364/action/cloneMedia" type="application/vnd.vmware.vcloud.cloneMediaParams+xml"/>
    <Link rel="add" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdc/692484b9-68cc-713d-111d-1429c364/action/captureVApp" type="application/vnd.vmware.vcloud.captureVAppParams+xml"/>
    <Link rel="add" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdc/692484b9-68cc-713d-111d-1429c364/action/composeVApp" type="application/vnd.vmware.vcloud.composeVAppParams+xml"/>
    <Link rel="add" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdc/692484b9-68cc-713d-111d-1429c364/disk" type="application/vnd.vmware.vcloud.diskCreateParams+xml"/>
    <Link rel="edgeGateways" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/admin/vdc/692484b9-68cc-713d-111d-1429c364/edgeGateways" type="application/vnd.vmware.vcloud.query.records+xml"/>
    <Link rel="add" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/admin/vdc/692484b9-68cc-713d-111d-1429c364/networks" type="application/vnd.vmware.vcloud.orgVdcNetwork+xml"/>
    <Link rel="orgVdcNetworks" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/admin/vdc/692484b9-68cc-713d-111d-1429c364/networks" type="application/vnd.vmware.vcloud.query.records+xml"/>
    <Link rel="alternate" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/admin/vdc/692484b9-68cc-713d-111d-1429c364" type="application/vnd.vmware.admin.vdc+xml"/>
    <Link rel="vchs:edgeGateways" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vchs/query?type=edgeGateway&amp;vdcId=692484b9-68cc-713d-111d-1429c364" type="application/vnd.vmware.vchs.query.records+xml"/>
    <Link rel="vchs:orgVdcNetworks" href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vchs/query?type=orgVdcNetwork&amp;vdcId=692484b9-68cc-713d-111d-1429c364" type="application/vnd.vmware.vchs.query.records+xml"/>
    <Description/>
    <AllocationModel>AllocationVApp</AllocationModel>
    <ComputeCapacity>
        <Cpu>
            <Units>MHz</Units>
            <Allocated>0</Allocated>
            <Limit>130000</Limit>
            <Reserved>0</Reserved>
            <Used>5200</Used>
            <Overhead>0</Overhead>
        </Cpu>
        <Memory>
            <Units>MB</Units>
            <Allocated>0</Allocated>
            <Limit>102400</Limit>
            <Reserved>0</Reserved>
            <Used>6144</Used>
            <Overhead>74</Overhead>
        </Memory>
    </ComputeCapacity>
    <ResourceEntities>
        <ResourceEntity href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vAppTemplate/20c72903d769-2d4d0b53-b683-ae99--" name="VccValidationTemplate" type="application/vnd.vmware.vcloud.vAppTemplate+xml"/>
        <ResourceEntity href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vApp/de2b-16d42ee3-dca8-dcc9-93a4-f93" name="ANDRE-W2K12R2-1-VApp" type="application/vnd.vmware.vcloud.vApp+xml"/>
        <ResourceEntity href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vApp/10ee-bcdb4d9d-691e-5605-dffd-530" name="ANDRE-CENTOS64-1-VApp" type="application/vnd.vmware.vcloud.vApp+xml"/>
    </ResourceEntities>
    <AvailableNetworks>
        <Network href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/network/d8350c2c-ffb7-50f2-c29e-3649d784" name="default-routed-network" type="application/vnd.vmware.vcloud.network+xml"/>
    </AvailableNetworks>
    <Capabilities>
        <SupportedHardwareVersions>
            <SupportedHardwareVersion>vmx-04</SupportedHardwareVersion>
            <SupportedHardwareVersion>vmx-07</SupportedHardwareVersion>
            <SupportedHardwareVersion>vmx-08</SupportedHardwareVersion>
            <SupportedHardwareVersion>vmx-09</SupportedHardwareVersion>
            <SupportedHardwareVersion>vmx-10</SupportedHardwareVersion>
        </SupportedHardwareVersions>
    </Capabilities>
    <NicQuota>100</NicQuota>
    <NetworkQuota>100</NetworkQuota>
    <UsedNetworkCount>0</UsedNetworkCount>
    <VmQuota>50</VmQuota>
    <IsEnabled>true</IsEnabled>
    <VdcStorageProfiles>
        <VdcStorageProfile href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdcStorageProfile/0e9aa6f4-ccbf-5a61-37b3-abadadb6" name="Standard" type="application/vnd.vmware.vcloud.vdcStorageProfile+xml"/>
        <VdcStorageProfile href="https://uk-slough-1-6.vchs.vmware.com/api/compute/api/vdcStorageProfile/e8c03fb7-a274-fee6-ef3c-0724f877" name="SSD-Accelerated" type="application/vnd.vmware.vcloud.vdcStorageProfile+xml"/>
    </VdcStorageProfiles>
    <VCpuInMhz2>2600</VCpuInMhz2>
</Vdc>

Here we’ve listed a lot of information about this VDC, including the VM’s within it (see the ResourceEntities section above).

This brief (ish) walkthrough hopefully gives you some insight into how to get connected to and start consuming the vCloud Air API for OnDemand instances.

FIN