VMware, Inc.
129
Chapter 7 VMware vSphere Platform Operations
<vmext:MoRef>datastore-322</vmext:MoRef>
<vmext:VimObjectType>DATASTORE</vmext:VimObjectType>
</vmext:VimObjectRef>
<vmext:VimObjectRef>
<vmext:MoRef>datastore-350</vmext:MoRef>
<vmext:VimObjectType>DATASTORE</vmext:VimObjectType>
</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 7
‐
18
.
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.vmwprovxml
...
<vmext:VMWProviderVdc xmlns:vmext="http://www.vmware.com/vcloud/extension/v1"
xmlns:vcloud="http://www.vmware.com/vcloud/v1" name="PvDC-VC2"
type="application/vnd.vmware.admin.vmwprovxml">
<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.vmwvirtuaxml"
name="VC2"
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/
101"/>
<vmext:MoRef>datastore-418</vmext:MoRef>
<vmext:VimObjectType>DATASTORE</vmext:VimObjectType>
</vmext:VimObjectRef>
</vmext:DataStoreRefs>
<vmext:ResourcePoolRef>
<vmext:VimServerRef type="application/vnd.vmware.admin.vmwvirtuaxml" name="VC2"
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/101"/>
<vmext:MoRef>resgroup-220</vmext:MoRef>
<vmext:VimObjectType>RESOURCE_POOL</vmext:VimObjectType>
</vmext:ResourcePoolRef>
<vmext:VimServer type="application/vnd.vmware.admin.vmwvirtuaxml" name="VC2"
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/101"/>
</vmext:VMWProviderVdc>
Response:
201 Created
Content-Type: application/vnd.vmware.admin.vmwprovxml
Summary of Contents for VCLOUD API 1.0 - TECHNICAL NOTE
Page 10: ...vCloud API Programming Guide 10 VMware Inc...
Page 20: ...vCloud API Programming Guide 20 VMware Inc...
Page 32: ...vCloud API Programming Guide 32 VMware Inc...
Page 90: ...vCloud API Programming Guide 90 VMware Inc...
Page 150: ...vCloud API Programming Guide 150 VMware Inc...
Page 170: ...vCloud API Programming Guide 170 VMware Inc...