Get Information About A Vapp Or Virtual Machine; Get Information About A Network - VMware VCLOUD API 1.0 - API Programming Manual

Table of Contents

Advertisement

vCloud API Programming Guide

Get Information About a vApp or Virtual Machine

Catalogs cannot contain references to vApps or the virtual machines (Vm objects) that they contain. A client can 
discover the URL of a vApp by browsing in a vDC for a ResourceEntity element that references it. After 
client has the template's URL, it can use it as the target of a GET request, as shown in Example 2‐8 on page
to retrieve the vApp representation and the Vm elements it contains.

Get Information About a Network

Network (OrgNetwork) elements can be contained by Org and Vdc elements. If an organization contains any 
networks, each one is referenced by a Link element where rel="down" in the Org body. Each organization 
network is a member of the AvailableNetworks element in each of the organization's vDCs.
To get information about a network, make a GET request to its URL, as shown in Example
Example 3-7. Get Information About a Network
Request:
GET http://vcloud.example.com/api/v1.0/network/54
Response:
200 OK
Content-Type: application/vnd.vmware.admin.network+xml
...
<OrgNetwork xmlns="http://www.vmware.com/vcloud/v1" name="Internet"
<Link rel="alternate" type="application/vnd.vmware.vcloud.network+xml"
<Link rel="edit" type="application/vnd.vmware.admin.network+xml"
<Link rel="remove" href="http://vcloud.example.com/api/v1.0/admin/network/54"/>
<Link rel="up" type="application/vnd.vmware.admin.organization+xml"
<Description>Bridged to the Public Internet</Description>
<Configuration>
<IpScope>
<IsInherited>true</IsInherited>
<Gateway>10.147.56.253</Gateway>
<Netmask>255.255.255.0</Netmask>
<Dns1>10.147.115.1</Dns1>
<Dns2>10.147.115.2</Dns2>
<DnsSuffix>example.com</DnsSuffix>
<IpRanges>
</IpRanges>
</IpScope>
<ParentNetwork type="application/vnd.vmware.admin.network+xml" name="ExternalNetwork-VC1"
<FenceMode>bridged</FenceMode>
</Configuration>
</OrgNetwork>
40
type="application/vnd.vmware.admin.network+xml"
ref="http://vcloud.example.com/api/v1.0/admin/network/54" ...>
href="http://vcloud.example.com/api/v1.0/network/54"/>
href="http://vcloud.example.com/api/v1.0/admin/network/54"/>
href="http://vcloud.example.com/api/v1.0//org/26"/>
<IpRange>
<StartAddress>10.147.56.1</StartAddress>
<EndAddress>10.147.56.255</EndAddress>
</IpRange>
href="http://vcloud.example.com/api/v1.0/admin/network/7"/>
39 
3‐7.
VMware, Inc.

Advertisement

Table of Contents
loading

Table of Contents