VMware, Inc. 131
Chapter 7 VMware vSphere Platform Operations
</vmext:VimObjectRef>
</vmext:DataStoreRefs>
<vmext:ResourcePoolRef>
<vmext:VimServerRef type="application/vnd.vmware.admin.vmwvirtualcenter+xml" 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.vmwvirtualcenter+xml" name="VC2"
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/101"/>
<vmext:HostReferences>
<vmext:HostReference type="application/vnd.vmware.admin.host+xml" name="10.115.121.11"
href="http:// vcloud.example.com/api/v1.0/admin/extension/host/1"/>
<vmext:HostReference type="application/vnd.vmware.admin.host+xml" name="10.115.121.9"
href="http:// vcloud.example.com/api/v1.0/admin/extension/host/2"/>
</vmext:HostReferences>
</vmext:VMWProviderVdc>
Theî ±responseî ±echoesî ±theî ±requestî ±butî ±nowî ±hasî ±aî ±statusî ±attributeî ±whoseî ±valueî ±isî ±initiallyî ±0î ±andî ±anî ±hrefî ±
attributeî ±whoseî ±valueî ±isî ±theî ±URLî ±ofî ±theî ±newî ±providerî ±vDC.î ±Itî ±alsoî ±includesî ±someî ±additionalî ±elementsî ±createdî ±
byî ±theî ±server:
ïź Linkî ±elementsî ±forî ±actionsî ±andî ±relatedî ±references
ïź Aî ±Taskî ±elementî ±thatî ±tracksî ±creationî ±ofî ±theî ±providerî ±vDC.î ±Whenî ±theî ±taskî ±completes,î ±theî ±valueî ±ofî ±theî ±
providerî ±vDCâsî ±statusî ±attributeî ±changesî ±toî ±1.
ïź Aî ±HostReferencesî ±elementî ±thatî ±containsî ±referencesî ±toî ±theî ±ESX/ESXiî ±hostsî ±registeredî ±toî ±theî ±vCenterî ±
serverî ±backingî ±thisî ±providerî ±vDC.
Examine the vSphere Objects in a Provider vDC
Aî ±systemî ±administratorî ±canî ±retrieveî ±aî ±listî ±ofî ±ProviderVdcReferencesî ±(seeî ±âListî ±Providerî ±vDCsî ±inî ±aî ±vCloudâî ±
onî ±page 120),î ±thenî ±useî ±theî ±valueî ±ofî ±theî ±hrefî ±attributeî ±inî ±anyî ±ProviderVdcReferenceî ±asî ±theî ±targetî ±ofî ±aî ±GETî ±
request.î ±Theî ±responseî ±isî ±aî ±VMWProviderVdcî ±bodyî ±similarî ±toî ±theî ±oneî ±shownî ±inî ±theî ±responseî ±in
î ±Example 7â18.
Modify a Provider vDC
Toî ±modifyî ±aî ±providerî ±vDC,î ±makeî ±aî ±PUTî ±requestî ±toî ±itsî ±editî ±link,î ±andî ±supplyî ±aî ±modifiedî ±versionî ±ofî ±theî ±
VMWProviderVdcî ±elementî ±inî ±theî ±requestî ±body.î ±Inî ±Example 7â19,î ±theî ±clientî ±modifiesî ±theî ±Cpu Allocationî ±ofî ±
theî ±providerî ±vDCî ±createdî ±inî ±Example 7â18,î ±thenî ±includesî ±theî ±modifiedî ±elementî ±inî ±aî ±PUT
î ±requestî ±toî ±theî ±editî ±
linkî ±inî ±theî ±VMWProviderVdcî ±element.
Youî ±mustî ±includeî ±allî ±requiredî ±elementsî ±andî ±attributesî ±inî ±theî ±request,î ±evenî ±thoseî ±thatî ±youî ±areî ±notî ±changing.î ±
Example 7-19. Modify a Provider vDC
Request:
PUT http://vcloud.example.com/api/v1.0/admin/extension/providervdc/2
Content-Type: application/vnd.vmware.admin.vmwprovidervdc+xml
...
<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.vmwprovidervdc+xml">
<vcloud:ComputeCapacity>
<vcloud:Cpu>
<vcloud:Units>MHz</vcloud:Units>
<vcloud:Allocation>4096</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>