com.vmware.vcloud.sdk
Class VappTemplate

java.lang.Object
  extended by com.vmware.vcloud.sdk.VcloudResource<T>
      extended by com.vmware.vcloud.sdk.VcloudEntity<com.vmware.vcloud.api.rest.schema.VAppTemplateType>
          extended by com.vmware.vcloud.sdk.VappTemplate

public class VappTemplate
extends VcloudEntity<com.vmware.vcloud.api.rest.schema.VAppTemplateType>

Helper class to access the vApp Template Resource in vCloud API.

See Also:
VAppTemplateType

Constructor Summary
VappTemplate(VcloudClient client, com.vmware.vcloud.api.rest.schema.VAppTemplateType vAppTemplateType_v1_5)
          Constructor to create a vapp template
 
Method Summary
 Task consolidate()
          Consolidates a vm.The operation is supported only for Virtual Center version 5.0 and later.
static Task consolidate(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateVmRef)
          Consolidates a vm.
 Task delete()
          Delete vAppTemplate.
static Task delete(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vAppTemplateRef)
          Delete vAppTemplate.
 Task deleteVappTemplate()
          1.
static Task deleteVappTemplate(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vAppTemplateRef)
          1.
 void disableDownload()
          Disable Download for vAppTemplate
static void disableDownload(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vAppTemplateRef)
          Disable Download for vAppTemplate
 InputStream downloadFile(String fileName)
          Downloading the File.
 InputStream downloadLosslessOVF()
          Download lossless vAppTemplate OVF.
 InputStream downloadOVFFile()
          Downloading the OVF File.
 void downloadVappTemplate(String downloadLocation)
          Download the vAppTemplate as an ovf package.
 Task enableDownload()
          Enable Download for vAppTemplate
static Task enableDownload(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vAppTemplateRef)
          Enable Download for vAppTemplate
 com.vmware.vcloud.api.rest.schema.ReferenceType getCatalogItemReference()
          Returns the CatalogItem ReferenceType.
 List<VappTemplate> getChildren()
          Get the list of children VappTemplate
 VirtualCpu getCpu()
          Returns the Virtual CPU for the vAppTemplate VM
static VirtualCpu getCpu(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateVmRef)
          Returns VirtualCpu Item for the given vAppTemplate VM
 com.vmware.vcloud.api.rest.schema.CustomizationSectionType getCustomizationSection()
          Returns the CustomizationSectionType
static com.vmware.vcloud.api.rest.schema.CustomizationSectionType getCustomizationSection(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateRef)
          Returns the CustomizationSection
 List<VirtualDisk> getDisks()
          Returns the Virtual Disks for the vAppTemplate VM.
static List<VirtualDisk> getDisks(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateVmRef)
          Returns VirtualDisks for the given vAppTemplate VM
 HashMap<String,com.vmware.vcloud.api.rest.schema.ovf.FileType> getDownloadFileNames()
          Returns all the file names which can be downloaded.
 com.vmware.vcloud.api.rest.schema.GuestCustomizationSectionType getGuestCustomizationSection()
          Returns the Guest customization section type
static com.vmware.vcloud.api.rest.schema.GuestCustomizationSectionType getGuestCustomizationSection(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateRef)
          Returns the GuestCustomizationSection
 com.vmware.vcloud.api.rest.schema.LeaseSettingsSectionType getLeaseSettingsSection()
          Returns the LeaseSettingsSectionType
static com.vmware.vcloud.api.rest.schema.LeaseSettingsSectionType getLeaseSettingsSection(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateRef)
          Returns the LeaseSettingsSection
 List<VirtualMedia> getMedia()
          Returns the Virtual Media for the vAppTemplate VM
static List<VirtualMedia> getMedia(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateVmRef)
          Returns VirtualMedia Item for the given vAppTemplate VM
 VirtualMemory getMemory()
          Returns the Virtual Memory for the vAppTemplate VM
static VirtualMemory getMemory(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateVmRef)
          Returns VirtualMemory Item for the given vAppTemplate VM
 List<VirtualNetworkCard> getNetworkCards()
          Returns the Virtual NetworkCards for the vAppTemplate VM
static List<VirtualNetworkCard> getNetworkCards(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateVmRef)
          Returns VirtualNetworkCards for the given vAppTemplate VM
 com.vmware.vcloud.api.rest.schema.NetworkConfigSectionType getNetworkConfigSection()
          Returns the NetworkConfigSection
static com.vmware.vcloud.api.rest.schema.NetworkConfigSectionType getNetworkConfigSection(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateRef)
          Returns the NetworkConfigSection
 com.vmware.vcloud.api.rest.schema.NetworkConnectionSectionType getNetworkConnectionSection()
          Returns the NetworkConnectionSection
static com.vmware.vcloud.api.rest.schema.NetworkConnectionSectionType getNetworkConnectionSection(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateRef)
          Returns the NetworkConnectionSection
 com.vmware.vcloud.api.rest.schema.ovf.NetworkSectionType getNetworkSection()
          Returns the NetworkSection
static com.vmware.vcloud.api.rest.schema.ovf.NetworkSectionType getNetworkSection(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateRef)
          Returns the network section
 com.vmware.vcloud.api.rest.schema.ovf.EnvelopeType getOvf()
          Get the ovf of the vapptemplate
static com.vmware.vcloud.api.rest.schema.ovf.EnvelopeType getOvf(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateRef)
          Get the ovf of the vapptemplate
static com.vmware.vcloud.api.rest.schema.ovf.EnvelopeType getOvf(VcloudClient client, String vAppTemplateOvfUrl)
          Get the ovf of the vapptemplate
 String getOVFDownloadURL()
          GET the OVF Download url
 com.vmware.vcloud.api.rest.schema.ReferenceType getOwner()
          Returns the owner of the vapp template.
 com.vmware.vcloud.api.rest.schema.ReferenceType getParentVappTemplateReference()
          Returns the Parent VappTemplate ReferenceType
 List<com.vmware.vcloud.api.rest.schema.ovf.ProductSectionType> getProductSections()
          Returns the ProductSections of a vAppTemplate
static List<com.vmware.vcloud.api.rest.schema.ovf.ProductSectionType> getProductSections(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vappRef)
          Returns the ProductSections for the vAppTemplate
 Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getShadowVmReferences()
          Returns a collection of shadow vm references.
 Set<String> getUploadedFileNames()
          Get the uploaded file names for this vApp Template.
 Set<String> getUploadFileNames()
          Get the upload vmdk file names and the manifest file (if any) for this vApp Template.
static VappTemplate getVappTemplateById(VcloudClient client, String vCloudId)
          Get VappTemplate helper using the vCloud ID
static VappTemplate getVappTemplateByReference(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplRef)
          Get vApp Template helper for the given reference
 BigInteger getVappTemplateSize()
          Returns the vAppTemplate's/vAppTemplate's VM Size in MB.
 VappTemplateStatus getVappTemplateStatus()
          Returns the vAppTemplate Status
 com.vmware.vcloud.api.rest.schema.ReferenceType getVdcReference()
          Returns the Parent Vdc ReferenceType.
 com.vmware.vcloud.api.rest.schema.ReferenceType getVdcStorageProfileReference()
          Returns the Vdc storage class reference.
 com.vmware.vcloud.api.rest.schema.ovf.VirtualHardwareSectionType getVirtualHardwareSection()
          Returns the VirtualHardwareSection for the vAppTemplate VM
static com.vmware.vcloud.api.rest.schema.ovf.VirtualHardwareSectionType getVirtualHardwareSection(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateVmRef)
          Returns the VirtualHardwareSectionType for the vAppTemplate VM
 com.vmware.vcloud.api.rest.schema.extension.VimObjectRefType getVMDatastoreVimRef()
          Returns the Virtual Machine Datastore VIM Object reference.
 Integer getVMDiskChainLength()
          Returns the disks of a fast provisioned VM link to parent disks in a chain, and this number is the depth of this VMs disks in that chain.
 com.vmware.vcloud.api.rest.schema.extension.VimObjectRefType getVMHostVimRef()
          Returns the Virtual Machine Host VIM Object reference.
 com.vmware.vcloud.api.rest.schema.extension.VimObjectRefType getVMVimRef()
          Returns the Virtual Machine VIM Object reference.
 boolean isPartOfCatalogItem()
          Returns true if VappTemplate is in Catalog, otherwise false.
 Boolean isVm()
          Check if the vAppTemplate is a VM.
 HashMap<String,com.vmware.vcloud.api.rest.schema.FileType> monitorUpload()
          Monitor the file upload status.
 Task relocate(com.vmware.vcloud.api.rest.schema.ReferenceType datastoreReference)
          Deprecated. API 5.1, SDK 5.1
static Task relocate(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vmRef, com.vmware.vcloud.api.rest.schema.ReferenceType datastoreReference)
          Deprecated. API 5.1, SDK 5.1
 Task updateGoldMaster(Boolean goldMasterFlag)
          Updating/Setting the template as goldmaster.
 Task updateSection(com.vmware.vcloud.api.rest.schema.ovf.SectionType sectionType)
          Deprecated. API 5.1, SDK 5.1 CustomizationSection, GuestCustomizationSection sections
 Task updateVappTemplate(com.vmware.vcloud.api.rest.schema.VAppTemplateType vappTemplateType)
          Updates name and description of VappTemplate .Any other attributes/elements will be ignored.
 void uploadFile(String fileName, InputStream is, long size)
          Upload the vApp Template related files.
 void uploadFile(String fileName, InputStream is, long startByte, long endByte)
          Partial upload for the vApp Template related files.
 void uploadOVFFile(InputStream is, long size)
          Upload the OVF file for the vApp Template.
 
Methods inherited from class com.vmware.vcloud.sdk.VcloudEntity
getMetadata, getReference, getTasks
 
Methods inherited from class com.vmware.vcloud.sdk.VcloudResource
getResource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VappTemplate

public VappTemplate(VcloudClient client,
                    com.vmware.vcloud.api.rest.schema.VAppTemplateType vAppTemplateType_v1_5)
Constructor to create a vapp template

Parameters:
client - VcloudClient
vAppTemplateType_v1_5 - VAppTemplateType
Method Detail

isVm

public Boolean isVm()
Check if the vAppTemplate is a VM.

Returns:
Boolean
Since:
API 1.0, SDK 1.5

getChildren

public List<VappTemplate> getChildren()
Get the list of children VappTemplate

Returns:
List

getVappTemplateByReference

public static VappTemplate getVappTemplateByReference(VcloudClient client,
                                                      com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplRef)
                                               throws VCloudException
Get vApp Template helper for the given reference

Parameters:
client - vCloud API client VcloudClient
vappTemplRef - ReferenceType to the vApp template ReferenceType
Returns:
VappTemplate helper
Throws:
VCloudException
See Also:
Vdc.getVappTemplateRefs()

getVappTemplateById

public static VappTemplate getVappTemplateById(VcloudClient client,
                                               String vCloudId)
                                        throws VCloudException
Get VappTemplate helper using the vCloud ID

Parameters:
client - VcloudClient
vCloudId - format - The vCloud ID is of the form: "urn:vcloud:type:uuid". For example: "urn:vcloud:media:d9d976ba-e0ec-4682-a67d-380af49b54e1". String
Returns:
VappTemplate
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

getVdcReference

public com.vmware.vcloud.api.rest.schema.ReferenceType getVdcReference()
                                                                throws VCloudException
Returns the Parent Vdc ReferenceType. The root VappTemplate contains this information

Returns:
ReferenceType
Throws:
VCloudException

getVdcStorageProfileReference

public com.vmware.vcloud.api.rest.schema.ReferenceType getVdcStorageProfileReference()
                                                                              throws VCloudException
Returns the Vdc storage class reference.

Returns:
ReferenceType
Throws:
VCloudException
Since:
API 5.1, SDK 5.1

getCatalogItemReference

public com.vmware.vcloud.api.rest.schema.ReferenceType getCatalogItemReference()
                                                                        throws VCloudException
Returns the CatalogItem ReferenceType. The root VappTemplate contains this information.

Returns:
ReferenceType
Throws:
VCloudException

getParentVappTemplateReference

public com.vmware.vcloud.api.rest.schema.ReferenceType getParentVappTemplateReference()
                                                                               throws VCloudException
Returns the Parent VappTemplate ReferenceType

Returns:
ReferenceType
Throws:
VCloudException

getVMDatastoreVimRef

public com.vmware.vcloud.api.rest.schema.extension.VimObjectRefType getVMDatastoreVimRef()
                                                                                  throws VCloudException
Returns the Virtual Machine Datastore VIM Object reference.

Returns:
VimObjectRefType
Throws:
VCloudException
Since:
API 1.5, SDK 5.1

getVMHostVimRef

public com.vmware.vcloud.api.rest.schema.extension.VimObjectRefType getVMHostVimRef()
                                                                             throws VCloudException
Returns the Virtual Machine Host VIM Object reference.

Returns:
VimObjectRefType
Throws:
VCloudException
Since:
API 1.5, SDK 5.1

getVMDiskChainLength

public Integer getVMDiskChainLength()
                             throws VCloudException
Returns the disks of a fast provisioned VM link to parent disks in a chain, and this number is the depth of this VMs disks in that chain. A chain length of 1 indicates that all the disks are flat and don't refer to parent disks.

Returns:
Integer
Throws:
VCloudException
Since:
API 1.5, SDK 5.1

getVMVimRef

public com.vmware.vcloud.api.rest.schema.extension.VimObjectRefType getVMVimRef()
                                                                         throws VCloudException
Returns the Virtual Machine VIM Object reference.

Returns:
VimObjectRefType
Throws:
VCloudException
Since:
API 1.5

getOwner

public com.vmware.vcloud.api.rest.schema.ReferenceType getOwner()
                                                         throws VCloudException
Returns the owner of the vapp template.

Returns:
ReferenceType
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

getVappTemplateStatus

public VappTemplateStatus getVappTemplateStatus()
Returns the vAppTemplate Status

Returns:
VappTemplateStatus
Throws:
VCloudException

getOvf

public static com.vmware.vcloud.api.rest.schema.ovf.EnvelopeType getOvf(VcloudClient client,
                                                                        com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateRef)
                                                                 throws VCloudException
Get the ovf of the vapptemplate

Parameters:
client -
vappTemplateRef -
Returns:
EnvelopeType
Throws:
VCloudException

getOvf

public com.vmware.vcloud.api.rest.schema.ovf.EnvelopeType getOvf()
                                                          throws VCloudException
Get the ovf of the vapptemplate

Returns:
EnvelopeType
Throws:
VCloudException

getOvf

public static com.vmware.vcloud.api.rest.schema.ovf.EnvelopeType getOvf(VcloudClient client,
                                                                        String vAppTemplateOvfUrl)
                                                                 throws VCloudException
Get the ovf of the vapptemplate

Parameters:
client -
vAppTemplateOvfUrl -
Returns:
EnvelopeType
Throws:
VCloudException

delete

public Task delete()
            throws VCloudException
Delete vAppTemplate.

Returns:
Task
Throws:
VCloudException

delete

public static Task delete(VcloudClient client,
                          com.vmware.vcloud.api.rest.schema.ReferenceType vAppTemplateRef)
                   throws VCloudException
Delete vAppTemplate.

Parameters:
client - VcloudClient
vAppTemplateRef - vApp Template Ref
Returns:
Task
Throws:
VCloudException

deleteVappTemplate

public Task deleteVappTemplate()
                        throws VCloudException
1. Deletes vappTemplate and its catalog item, if the vappTemplate is attached to a catalog item. 2. Deletes vappTemplate alone, if the vappTemplate is not attached to any catalog item.

Returns:
Task
Throws:
VCloudException
Since:
API 1.5, SDK 5.1

deleteVappTemplate

public static Task deleteVappTemplate(VcloudClient client,
                                      com.vmware.vcloud.api.rest.schema.ReferenceType vAppTemplateRef)
                               throws VCloudException
1. Deletes vappTemplate and its catalog item, if the vappTemplate is attached to a catalog item. 2. Deletes vappTemplate alone, if the vappTemplate is not attached to any catalog item.

Parameters:
client - VcloudClient
vAppTemplateRef - vApp Template Ref
Returns:
Task
Throws:
VCloudException
Since:
API 1.5, SDK 5.1

disableDownload

public void disableDownload()
                     throws VCloudException
Disable Download for vAppTemplate

Throws:
VCloudException

disableDownload

public static void disableDownload(VcloudClient client,
                                   com.vmware.vcloud.api.rest.schema.ReferenceType vAppTemplateRef)
                            throws VCloudException
Disable Download for vAppTemplate

Parameters:
client - VcloudClient
vAppTemplateRef -
Throws:
VCloudException

enableDownload

public Task enableDownload()
                    throws VCloudException
Enable Download for vAppTemplate

Returns:
Task
Throws:
VCloudException

relocate

public static Task relocate(VcloudClient client,
                            com.vmware.vcloud.api.rest.schema.ReferenceType vmRef,
                            com.vmware.vcloud.api.rest.schema.ReferenceType datastoreReference)
                     throws VCloudException
Deprecated. API 5.1, SDK 5.1

Relocate/Migrate a vm to a different datastore. The datastore should be from the same Organization vDc.

Parameters:
client - VcloudClient
vmRef - ReferenceType
datastoreReference - ReferenceType
Returns:
Task
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

relocate

public Task relocate(com.vmware.vcloud.api.rest.schema.ReferenceType datastoreReference)
              throws VCloudException
Deprecated. API 5.1, SDK 5.1

Relocate/Migrate a vm to a different datastore. The operation can be performed on powered on and powered off VMs. The datastore should be from the same Organization vDc.

Parameters:
datastoreReference - ReferenceType
Returns:
Task
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

consolidate

public Task consolidate()
                 throws VCloudException
Consolidates a vm.The operation is supported only for Virtual Center version 5.0 and later.

Returns:
Task
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

consolidate

public static Task consolidate(VcloudClient client,
                               com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateVmRef)
                        throws VCloudException
Consolidates a vm. The opration is supported only for Virtual Center version 5.0 and later.

Parameters:
client - VcloudClient
vappTemplateVmRef - ReferenceType
Returns:
Task
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

enableDownload

public static Task enableDownload(VcloudClient client,
                                  com.vmware.vcloud.api.rest.schema.ReferenceType vAppTemplateRef)
                           throws VCloudException
Enable Download for vAppTemplate

Parameters:
client - VcloudClient
vAppTemplateRef -
Returns:
Task
Throws:
VCloudException

getUploadFileNames

public Set<String> getUploadFileNames()
                               throws VCloudException
Get the upload vmdk file names and the manifest file (if any) for this vApp Template. If the OVF file is not uploaded then exception is thrown as VMDK file names and manifest file (if any) are not available.

Returns:
Set
Throws:
VCloudException

getUploadedFileNames

public Set<String> getUploadedFileNames()
                                 throws VCloudException
Get the uploaded file names for this vApp Template.

Returns:
Set
Throws:
VCloudException

uploadOVFFile

public void uploadOVFFile(InputStream is,
                          long size)
                   throws VCloudException
Upload the OVF file for the vApp Template. Once the ovf file is uploaded completely the ovfDescriptorUploaded becomes true.

Parameters:
is - Input stream for the file contents
size - File Size
Throws:
VCloudException
See Also:
Vdc.createVappTemplate(UploadVAppTemplateParamsType), uploadFile(String, InputStream, long), uploadFile(String, InputStream, long, long), monitorUpload(), getUploadFileNames()

uploadFile

public void uploadFile(String fileName,
                       InputStream is,
                       long size)
                throws VCloudException
Upload the vApp Template related files. This can be vmdk or a manifest file and must be present in the vApp file Map.

Parameters:
fileName - vApp Template File name
is - Input stream for the file contents
size - The total file size
Throws:
VCloudException
See Also:
Vdc.createVappTemplate(UploadVAppTemplateParamsType), uploadOVFFile(InputStream, long), uploadFile(String, InputStream, long, long), monitorUpload(), getUploadFileNames()

uploadFile

public void uploadFile(String fileName,
                       InputStream is,
                       long startByte,
                       long endByte)
                throws VCloudException
Partial upload for the vApp Template related files. This can be vmdk or manifest file and must be present in the vApp file Map.

Parameters:
fileName - vApp Template File name
is - Input stream for the partial file contents
startByte - The starting byte
endByte - The ending byte
Throws:
VCloudException
See Also:
Vdc.createVappTemplate(UploadVAppTemplateParamsType), uploadOVFFile(InputStream, long), uploadFile(String, InputStream, long), monitorUpload(), getUploadFileNames()

downloadVappTemplate

public void downloadVappTemplate(String downloadLocation)
                          throws VCloudException
Download the vAppTemplate as an ovf package. The ovf file and its vmdk contents are downloaded to the specified location. Before downloading make sure the vapptemplate is enabled for download.

Parameters:
downloadLocation -
Throws:
VCloudException
Since:
API 1.5, SDK 5.1
See Also:
enableDownload()

downloadOVFFile

public InputStream downloadOVFFile()
                            throws VCloudException
Downloading the OVF File. Close the input stream after use

Returns:
InputStream
Throws:
VCloudException

getOVFDownloadURL

public String getOVFDownloadURL()
                         throws VCloudException
GET the OVF Download url

Throws:
VCloudException

getDownloadFileNames

public HashMap<String,com.vmware.vcloud.api.rest.schema.ovf.FileType> getDownloadFileNames()
                                                                                    throws VCloudException
Returns all the file names which can be downloaded.

Returns:
HashMap
Throws:
VCloudException
See Also:
downloadOVFFile(), downloadFile(String), enableDownload(), disableDownload()

downloadFile

public InputStream downloadFile(String fileName)
                         throws VCloudException
Downloading the File. Close the input stream after use.

Parameters:
fileName - - Name f the file which needs to be downloaded
Returns:
InputStream
Throws:
VCloudException
See Also:
getDownloadFileNames(), downloadOVFFile(), enableDownload(), disableDownload()

monitorUpload

public HashMap<String,com.vmware.vcloud.api.rest.schema.FileType> monitorUpload()
                                                                         throws VCloudException
Monitor the file upload status. The returned hash map contains file name and its filetype (which contains more information like totalBytes, bytesTransferred etc.). Successive invocations of this method gives an updated hashmap of the progress.

Returns:
HashMap<String, FileType>
Throws:
VCloudException

updateVappTemplate

public Task updateVappTemplate(com.vmware.vcloud.api.rest.schema.VAppTemplateType vappTemplateType)
                        throws VCloudException
Updates name and description of VappTemplate .Any other attributes/elements will be ignored.

Parameters:
vappTemplateType - VAppTemplateType
Returns:
Task
Throws:
VCloudException

getProductSections

public List<com.vmware.vcloud.api.rest.schema.ovf.ProductSectionType> getProductSections()
                                                                                  throws VCloudException
Returns the ProductSections of a vAppTemplate

Returns:
List<ProductSectionType>
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

getProductSections

public static List<com.vmware.vcloud.api.rest.schema.ovf.ProductSectionType> getProductSections(VcloudClient client,
                                                                                                com.vmware.vcloud.api.rest.schema.ReferenceType vappRef)
                                                                                         throws VCloudException
Returns the ProductSections for the vAppTemplate

Parameters:
client - VcloudClient
vappRef - ReferenceType
Returns:
List<ProductSectionType>
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

getNetworkSection

public com.vmware.vcloud.api.rest.schema.ovf.NetworkSectionType getNetworkSection()
Returns the NetworkSection

Returns:
NetworkSectionType
Throws:
VCloudException

getNetworkSection

public static com.vmware.vcloud.api.rest.schema.ovf.NetworkSectionType getNetworkSection(VcloudClient client,
                                                                                         com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateRef)
                                                                                  throws VCloudException
Returns the network section

Parameters:
client -
vappTemplateRef -
Returns:
NetworkSectionType
Throws:
VCloudException

getNetworkConfigSection

public com.vmware.vcloud.api.rest.schema.NetworkConfigSectionType getNetworkConfigSection()
Returns the NetworkConfigSection

Returns:
NetworkConfigSectionType
Throws:
VCloudException

getNetworkConfigSection

public static com.vmware.vcloud.api.rest.schema.NetworkConfigSectionType getNetworkConfigSection(VcloudClient client,
                                                                                                 com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateRef)
                                                                                          throws VCloudException
Returns the NetworkConfigSection

Parameters:
client -
vappTemplateRef -
Returns:
NetworkConfigSectionType
Throws:
VCloudException

getLeaseSettingsSection

public com.vmware.vcloud.api.rest.schema.LeaseSettingsSectionType getLeaseSettingsSection()
Returns the LeaseSettingsSectionType

Returns:
LeaseSettingsSectionType
Throws:
VCloudException

getLeaseSettingsSection

public static com.vmware.vcloud.api.rest.schema.LeaseSettingsSectionType getLeaseSettingsSection(VcloudClient client,
                                                                                                 com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateRef)
                                                                                          throws VCloudException
Returns the LeaseSettingsSection

Parameters:
client -
vappTemplateRef -
Returns:
LeaseSettingsSectionType
Throws:
VCloudException

getNetworkConnectionSection

public com.vmware.vcloud.api.rest.schema.NetworkConnectionSectionType getNetworkConnectionSection()
Returns the NetworkConnectionSection

Returns:
NetworkConnectionSectionType
Throws:
VCloudException

getNetworkConnectionSection

public static com.vmware.vcloud.api.rest.schema.NetworkConnectionSectionType getNetworkConnectionSection(VcloudClient client,
                                                                                                         com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateRef)
                                                                                                  throws VCloudException
Returns the NetworkConnectionSection

Parameters:
client -
vappTemplateRef -
Returns:
NetworkConnectionSectionType
Throws:
VCloudException

getGuestCustomizationSection

public com.vmware.vcloud.api.rest.schema.GuestCustomizationSectionType getGuestCustomizationSection()
Returns the Guest customization section type

Returns:
GuestCustomizationSectionType
Throws:
VCloudException

getGuestCustomizationSection

public static com.vmware.vcloud.api.rest.schema.GuestCustomizationSectionType getGuestCustomizationSection(VcloudClient client,
                                                                                                           com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateRef)
                                                                                                    throws VCloudException
Returns the GuestCustomizationSection

Parameters:
client -
vappTemplateRef -
Returns:
GuestCustomizationSectionType
Throws:
VCloudException

getCustomizationSection

public com.vmware.vcloud.api.rest.schema.CustomizationSectionType getCustomizationSection()
Returns the CustomizationSectionType

Returns:
CustomizationSectionType
Throws:
VCloudException

getCustomizationSection

public static com.vmware.vcloud.api.rest.schema.CustomizationSectionType getCustomizationSection(VcloudClient client,
                                                                                                 com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateRef)
                                                                                          throws VCloudException
Returns the CustomizationSection

Parameters:
client -
vappTemplateRef -
Returns:
CustomizationSectionType
Throws:
VCloudException

updateSection

public Task updateSection(com.vmware.vcloud.api.rest.schema.ovf.SectionType sectionType)
                   throws VCloudException
Deprecated. API 5.1, SDK 5.1 CustomizationSection, GuestCustomizationSection sections

Updating the vAppTemplate Sections. You should be able to reconfigure LeaseSettingsSection.

Parameters:
sectionType -
Returns:
Task
Throws:
VCloudException

getVappTemplateSize

public BigInteger getVappTemplateSize()
                               throws VCloudException
Returns the vAppTemplate's/vAppTemplate's VM Size in MB.

Returns:
BigInteger
Throws:
VCloudException
Since:
API 1.0, SDK 1.5

getShadowVmReferences

public Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getShadowVmReferences()
                                                                                  throws VCloudException
Returns a collection of shadow vm references. vAppTemplate VM contains the shadow vm references.

Returns:
Collection<ReferenceType>
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

updateGoldMaster

public Task updateGoldMaster(Boolean goldMasterFlag)
                      throws VCloudException
Updating/Setting the template as goldmaster.

Parameters:
goldMasterFlag -
Returns:
Task
Throws:
VCloudException
Since:
API 5.1, SDK 5.1

isPartOfCatalogItem

public boolean isPartOfCatalogItem()
                            throws VCloudException
Returns true if VappTemplate is in Catalog, otherwise false.

Returns:
Boolean
Throws:
VCloudException
Since:
API 1.5, SDK 5.1

downloadLosslessOVF

public InputStream downloadLosslessOVF()
                                throws VCloudException
Download lossless vAppTemplate OVF. Lossless download mode generates ovf without loosing any of its configurations.

Returns:
InputStream
Throws:
VCloudException
Since:
API 5.1, SDK 5.1

getVirtualHardwareSection

public com.vmware.vcloud.api.rest.schema.ovf.VirtualHardwareSectionType getVirtualHardwareSection()
                                                                                           throws VCloudException
Returns the VirtualHardwareSection for the vAppTemplate VM

Returns:
VirtualHardwareSectionType
Throws:
VCloudException
Since:
API 5.6, SDK 5.6

getVirtualHardwareSection

public static com.vmware.vcloud.api.rest.schema.ovf.VirtualHardwareSectionType getVirtualHardwareSection(VcloudClient client,
                                                                                                         com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateVmRef)
                                                                                                  throws VCloudException
Returns the VirtualHardwareSectionType for the vAppTemplate VM

Parameters:
client -
vappTemplateVmRef -
Returns:
VirtualHardwareSectionType
Throws:
VCloudException
Since:
API 5.6, SDK 5.6

getCpu

public VirtualCpu getCpu()
                  throws VCloudException
Returns the Virtual CPU for the vAppTemplate VM

Returns:
VirtualCpu
Throws:
VCloudException
Since:
API 5.6, SDK 5.6

getCpu

public static VirtualCpu getCpu(VcloudClient client,
                                com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateVmRef)
                         throws VCloudException
Returns VirtualCpu Item for the given vAppTemplate VM

Parameters:
client -
vappTemplateVmRef -
Returns:
VirtualCpu helper VirtualCpu
Throws:
VCloudException
Since:
API 5.6, SDK 5.6

getDisks

public List<VirtualDisk> getDisks()
                           throws VCloudException
Returns the Virtual Disks for the vAppTemplate VM. The returned virtual disk list items contains the virtual disk and it associated controllers.

Returns:
List
Throws:
VCloudException
Since:
API 5.6, SDK 5.6

getDisks

public static List<VirtualDisk> getDisks(VcloudClient client,
                                         com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateVmRef)
                                  throws VCloudException
Returns VirtualDisks for the given vAppTemplate VM

Parameters:
client - vCloud API client VcloudClient
vappTemplateVmRef - vappTemplate VM Ref ReferenceType
Returns:
List of VirtualDisk helper List
Throws:
VCloudException
Since:
API 5.6, SDK 5.6

getMedia

public List<VirtualMedia> getMedia()
                            throws VCloudException
Returns the Virtual Media for the vAppTemplate VM

Returns:
List of virtual media helper List
Throws:
VCloudException
Since:
API 5.6, SDK 5.6

getMedia

public static List<VirtualMedia> getMedia(VcloudClient client,
                                          com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateVmRef)
                                   throws VCloudException
Returns VirtualMedia Item for the given vAppTemplate VM

Parameters:
client - vCloud API client VcloudClient
vappTemplateVmRef - vappTemplate VM Ref ReferenceType
Returns:
VirtualMedia helper VirtualMedia
Throws:
VCloudException
Since:
API 5.6, SDK 5.6

getMemory

public VirtualMemory getMemory()
                        throws VCloudException
Returns the Virtual Memory for the vAppTemplate VM

Returns:
VirtualMemory
Throws:
VCloudException
Since:
API 5.6, SDK 5.6

getMemory

public static VirtualMemory getMemory(VcloudClient client,
                                      com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateVmRef)
                               throws VCloudException
Returns VirtualMemory Item for the given vAppTemplate VM

Parameters:
client - vCloud API client VcloudClient
vappTemplateVmRef - vappTemplate VM Ref ReferenceType
Returns:
VirtualMemory helper VirtualMemory
Throws:
VCloudException
Since:
API 5.6, SDK 5.6

getNetworkCards

public List<VirtualNetworkCard> getNetworkCards()
                                         throws VCloudException
Returns the Virtual NetworkCards for the vAppTemplate VM

Returns:
List of VirtualNetworkCard helper List
Throws:
VCloudException
Since:
API 5.6, SDK 5.6

getNetworkCards

public static List<VirtualNetworkCard> getNetworkCards(VcloudClient client,
                                                       com.vmware.vcloud.api.rest.schema.ReferenceType vappTemplateVmRef)
                                                throws VCloudException
Returns VirtualNetworkCards for the given vAppTemplate VM

Parameters:
client - vCloud API client VcloudClient
vappTemplateVmRef - vappTemplate VM Ref ReferenceType
Returns:
List of VirtualNetworkCard helper List
Throws:
VCloudException
Since:
API 5.6, SDK 5.6


Copyright © 2016. All Rights Reserved.