VMware VCLOUD API 1.0 - API Programming Manual page 129

Table of Contents

Advertisement

</vmext:VimObjectRef>
<vmext:VimObjectRef>
</vmext:VimObjectRef>
</vmext:DataStoreRefs>
</vmext:ResourcePool>
</vmext:ResourcePoolList>
You can use this information to get values for the DataStoreRefs and ResourcePoolRef elements in the 
VMWProviderVdc, then POST the VMWProviderVdc body to the rel="add"link for providervdcs in the 
VMWExtension element, as shown in Example
Example 7-18. Create a Provider vDC
Request:
POST http://vcloud.example.com/api/v1.0/admin/extension/providervdcs
Content-Type: application/vnd.vmware.admin.vmwprovidervdc+xml
...
<vmext:VMWProviderVdc xmlns:vmext="http://www.vmware.com/vcloud/extension/v1"
<vcloud:Description>New Provider vDC</vcloud:Description>
<vcloud:ComputeCapacity>
<vcloud:Cpu>
<vcloud:Units>MHz</vcloud:Units>
<vcloud:Allocation>2241</vcloud:Allocation>
<vcloud:Total>24675</vcloud:Total>
</vcloud:Cpu>
<vcloud:Memory>
<vcloud:Units>MB</vcloud:Units>
<vcloud:Allocation>1319056</vcloud:Allocation>
<vcloud:Total>2097152</vcloud:Total>
</vcloud:Memory>
</vcloud:ComputeCapacity>
<vcloud:StorageCapacity>
<vcloud:Units>MB</vcloud:Units>
<vcloud:Allocation>18944</vcloud:Allocation>
<vcloud:Total>2260224</vcloud:Total>
</vcloud:StorageCapacity>
<vmext:DataStoreRefs>
<vmext:VimObjectRef>
<vmext:VimServerRef type="application/vnd.vmware.admin.vmwvirtualcenter+xml"
<vmext:MoRef>datastore-418</vmext:MoRef>
<vmext:VimObjectType>DATASTORE</vmext:VimObjectType>
</vmext:VimObjectRef>
</vmext:DataStoreRefs>
<vmext:ResourcePoolRef>
<vmext:VimServerRef type="application/vnd.vmware.admin.vmwvirtualcenter+xml" name="VC2"
<vmext:MoRef>resgroup-220</vmext:MoRef>
<vmext:VimObjectType>RESOURCE_POOL</vmext:VimObjectType>
</vmext:ResourcePoolRef>
<vmext:VimServer type="application/vnd.vmware.admin.vmwvirtualcenter+xml" name="VC2"
</vmext:VMWProviderVdc>
Response:
201 Created
Content-Type: application/vnd.vmware.admin.vmwprovidervdc+xml
VMware, Inc.
<vmext:MoRef>datastore-322</vmext:MoRef>
<vmext:VimObjectType>DATASTORE</vmext:VimObjectType>
<vmext:MoRef>datastore-350</vmext:MoRef>
<vmext:VimObjectType>DATASTORE</vmext:VimObjectType>
xmlns:vcloud="http://www.vmware.com/vcloud/v1" name="PvDC-VC2"
type="application/vnd.vmware.admin.vmwprovidervdc+xml">
name="VC2"
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/
101"/>
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/101"/>
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/101"/>
Chapter 7 VMware vSphere Platform Operations
7‐18.
129

Advertisement

Table of Contents
loading

Table of Contents