Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 180259

vCloud 5.1 api SourcedVmInstantiationParams

$
0
0

hi,

as 5.1 now supports the ability to choose the storage profile when provisioning I'm trying to rework my instantiateVAppTemplate php sctipt. The REST API shows:

 

<InstantiateVAppTemplateParams xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" name="xs:string" deploy="xs:boolean" powerOn="xs:boolean" linkedClone="xs:boolean">     <Description> xs:string </Description>     <VAppParent href="xs:anyURI" id="xs:string" name="xs:string" type="xs:string"/>     <InstantiationParams>         <ovf:Section> ovf:Section_Type </ovf:Section>     </InstantiationParams>     <Source href="xs:anyURI" id="xs:string" name="xs:string" type="xs:string"/>     <IsSourceDelete> xs:boolean </IsSourceDelete>     <SourcedVmInstantiationParams>         <Source href="xs:anyURI" id="xs:string" name="xs:string" type="xs:string"/>         <StorageProfile href="xs:anyURI" id="xs:string" name="xs:string" type="xs:string"/>         <LocalityParams>             <ResourceEntity href="xs:anyURI" id="xs:string" name="xs:string" type="xs:string"/>         </LocalityParams>     </SourcedVmInstantiationParams>     <AllEULAsAccepted> xs:boolean </AllEULAsAccepted></InstantiateVAppTemplateParams>

 

meaning that I can eitehr use the old 1.5 api to instanciate (source) or use SourcedVmInstantiationParams to chose a storage profile.

 

in PHP SDK I found: setSourcedVmInstantiationParams ( $SourcedVmInstantiationParams)

 

and I came up with

 

$SourcedVmInstantiationParams= new VMware_VCloud_API_SourcedVmInstantiationParamsType();
$SourcedVmInstantiationParams->setsource($vAppTemplateRef);
$SourcedVmInstantiationParams->setStorageProfile($StorProRef);

$params = new VMware_VCloud_API_InstantiateVAppTemplateParamsType();
$params->set_name($vAppName);
$params->setDescription("Nada");
$params->setInstantiationParams($iparams);
#$params->setSource($vAppTemplateRef);
$params->setSourcedVmInstantiationParams(array($SourcedVmInstantiationParams));

 

however in the PHP SDK there is no further info about the internal workings of  $SourcedVmInstantiationParams so....any ideas?

 

BTW: when enabling the  #$params->setSource($vAppTemplateRef); line, the whole thing works, however it put the VApp onto the default Storage Profile -> seems to ignore the  SourcedVmInstantiation section\

 

However this is NOT a PHP problem. looks like its the same in the REST API....seee below


Viewing all articles
Browse latest Browse all 180259

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>