/** * Instantiate a vApp template with default settings. * * @param string $name Name of the vApp to be created * @param VMware_VCloud_API_ReferenceType $sourceRef Reference to the * source vApp template * @param boolean $deploy A flag indicates deploy or not after * instantiation * @param boolean $powerOn A flag indicates power on or not after * instantiation * @param string $description Description of the vApp to be created * @return VMware_VCloud_API_VAppType * @since Version 1.0.0 */ public function instantiateVAppTemplateDefault($name, $sourceRef, $deploy = false, $powerOn = false, $description = null) { $instantiateVAppTemplateParams = new VMware_VCloud_API_InstantiateVAppTemplateParamsType(); $instantiateVAppTemplateParams->set_name($name); $sourceRef->set_tagName('Source'); $instantiateVAppTemplateParams->setSource($sourceRef); $instantiateVAppTemplateParams->set_deploy($deploy); $instantiateVAppTemplateParams->set_powerOn($powerOn); $instantiateVAppTemplateParams->setDescription($description); return $this->instantiateVAppTemplate($instantiateVAppTemplateParams); }
/** * Construct a VMware_VCloud_API_ReferenceType data object. * * @param string $url URL used as href attribute * @param string $tagName Tag name used as the XML element tag * @param string $type Content-type of the vCloud resource entity * @param string $name Name of the entity, used as name attribute * @return VMware_VCloud_API_ReferenceType * @since Version 1.0.0 */ public static function createReferenceTypeObj($url, $tagName = null, $type = null, $name = null) { $ref = new VMware_VCloud_API_ReferenceType(); $ref->set_href($url); if ($type) { $ref->set_type($type); } if ($name) { $ref->set_name($name); } if ($tagName) { $ref->set_tagName($tagName); } return $ref; }