com.vmware.vcloud.sdk
Class Vdc

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

public class Vdc
extends VcloudEntity<com.vmware.vcloud.api.rest.schema.VdcType>

Helper class to access the vDC Resource in vCLoud API.

See Also:
VdcType

Method Summary
 VappTemplate captureVapp(com.vmware.vcloud.api.rest.schema.CaptureVAppParamsType captureVappParamsType)
          Capture a vAppTemplate
 VappTemplate captureVapp(com.vmware.vcloud.api.rest.schema.CaptureVAppParamsType captureVappParamsType, com.vmware.vcloud.api.rest.schema.ReferenceType catalogRef)
          Capture a vAppTemplate and add to the catalog.
 Media cloneMedia(com.vmware.vcloud.api.rest.schema.CloneMediaParamsType cloneMediaParamsType)
          Cloning a Media
 Media cloneMedia(com.vmware.vcloud.api.rest.schema.CloneMediaParamsType cloneMediaParamsType, com.vmware.vcloud.api.rest.schema.ReferenceType catalogRef)
          Cloning Media and attach it to the catalog.
 Vapp cloneVapp(com.vmware.vcloud.api.rest.schema.CloneVAppParamsType cloneVappParamsType)
          Cloning a vApp
 VappTemplate cloneVappTemplate(com.vmware.vcloud.api.rest.schema.CloneVAppTemplateParamsType cloneVappTemplateParamsType)
          Cloning a vAppTemplate
 VappTemplate cloneVappTemplate(com.vmware.vcloud.api.rest.schema.CloneVAppTemplateParamsType cloneVappTemplateParamsType, com.vmware.vcloud.api.rest.schema.ReferenceType catalogRef)
          Cloning vAppTemplate and attach it to the catalog.
 Vapp composeVapp(com.vmware.vcloud.api.rest.schema.ComposeVAppParamsType composeVappParamsType)
          Composing a vApp
 Disk createDisk(com.vmware.vcloud.api.rest.schema.DiskCreateParamsType diskCreateParams)
          Creating a disk.
 Media createMedia(com.vmware.vcloud.api.rest.schema.MediaType mediaParams)
          Creating and Upload Media.
 OrgVdcNetwork createOrgVdcNetwork(com.vmware.vcloud.api.rest.schema.OrgVdcNetworkType orgVdcNetworkParams)
          Create an isolated/routed Org vDC Network.
 VappTemplate createVappTemplate(com.vmware.vcloud.api.rest.schema.UploadVAppTemplateParamsType vappTemplParams)
          Creating and Uploading a vapp template.
 com.vmware.vcloud.api.rest.schema.TaskType createVmAffinityRule(com.vmware.vcloud.api.rest.schema.VmAffinityRuleType vmAffinityRuleType)
          Creates a new VM affinity/anti-affinity rule.
 Task delete()
          Delete Vdc
static Task delete(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vdcRef)
          Delete Vdc
 com.vmware.vcloud.api.rest.schema.ReferenceType getAvailableNetworkRefByName(String name)
          Deprecated. SDK 5.5
 Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getAvailableNetworkRefs()
          Deprecated. SDK 5.5
 HashMap<String,com.vmware.vcloud.api.rest.schema.ReferenceType> getAvailableNetworkRefsByName()
          Deprecated. SDK 5.5
 Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getDiskRefs()
          Getting the disk references
 ReferenceResult getEdgeGatewayRefs()
          Returns the list of all the edgeGateway references
 Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getMediaRefs()
          Getting the media references
 Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getMediaRefsByName(String mediaName)
          Getting the Media references by name
 com.vmware.vcloud.api.rest.schema.ReferenceType getOrgReference()
          Returns the Parent Organization ReferenceType.
 com.vmware.vcloud.api.rest.schema.extension.VimObjectRefType getResourcePoolVimRef()
          Returns the Resource Pool VIM Object reference.
 com.vmware.vcloud.api.rest.schema.ReferenceType getVappRefByName(String name)
          Getting the vapp references by name
 Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getVappRefs()
          Getting the vapp references
 HashMap<String,com.vmware.vcloud.api.rest.schema.ReferenceType> getVappRefsByName()
          Getting the vapp references by name
 Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getVappTemplateRefs()
          Getting the vapp template references
 Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getVappTemplateRefsByName(String vAppTemplateName)
          Getting the vapp template references by name
static Vdc getVdcById(VcloudClient client, String vCloudId)
          Get Vdc helper using the vCloud ID
static Vdc getVdcByReference(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vdcRef)
          Get VDC helper using the VDC ref typically obtained from the Organization.
 Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getVdcStorageProfileRefs()
          Returns the storage profile references for this vdc.
 List<com.vmware.vcloud.api.rest.schema.VmAffinityRuleType> getVmAffinityRules()
          Retrieves a list of all VM affinity/anti-affinity rules within a given vDC.
 Vapp instantiateOvf(com.vmware.vcloud.api.rest.schema.InstantiateOvfParamsType instantiateOvfParams)
          Instantiate a vApp or VM
 Vapp instantiateVappTemplate(com.vmware.vcloud.api.rest.schema.InstantiateVAppTemplateParamsType instVappTemplParamsType)
          Instantiate a vApp from vAppTemplate
 Task updateVdc(com.vmware.vcloud.api.rest.schema.VdcType vdcParams)
          Modify the name and/or description of an organization vDC.
 Media uploadMedia(String mediaName, String mediaDescription, ImageType mediaType, String localMediaFile, com.vmware.vcloud.api.rest.schema.ReferenceType vdcStorageProfileRef, com.vmware.vcloud.api.rest.schema.ReferenceType catalogRef)
          Uploading media to the vdc and add to the catalog.
 Vapp uploadVapp(com.vmware.vcloud.api.rest.schema.InstantiateOvfParamsType InstantiateOvfParamsType, String localOvfFileLocation)
          Uploading the ovf package as a vapp.
 VappTemplate uploadVappTemplate(String vAppTemplateName, String vAppTemplateDesc, String localOvfFileLocation, Boolean manifestRequired, com.vmware.vcloud.api.rest.schema.ReferenceType vdcStorageRef, com.vmware.vcloud.api.rest.schema.ReferenceType catalogRef)
          Uploading the ovf package as a vapp template and add to the catalog.
 
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
 

Method Detail

getVdcByReference

public static Vdc getVdcByReference(VcloudClient client,
                                    com.vmware.vcloud.api.rest.schema.ReferenceType vdcRef)
                             throws VCloudException
Get VDC helper using the VDC ref typically obtained from the Organization.

Parameters:
client - vCloud API client VcloudClient
vdcRef - Vdc ReferenceType ReferenceType
Returns:
VDC helper
Throws:
VCloudException
See Also:
Organization.getVdcRefs(), Organization.getVdcRefsByName(), Organization.getVdcRefByName(String)

getVdcById

public static Vdc getVdcById(VcloudClient client,
                             String vCloudId)
                      throws VCloudException
Get Vdc 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:
Vdc
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

getResourcePoolVimRef

public com.vmware.vcloud.api.rest.schema.extension.VimObjectRefType getResourcePoolVimRef()
                                                                                   throws VCloudException
Returns the Resource Pool VIM Object reference.

Returns:
VimObjectRefType
Throws:
VCloudException

getOrgReference

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

Returns:
ReferenceType
Throws:
VCloudException

getAvailableNetworkRefsByName

public HashMap<String,com.vmware.vcloud.api.rest.schema.ReferenceType> getAvailableNetworkRefsByName()
Deprecated. SDK 5.5

Getting AvailableNetwork References By Name The network names might not be unique, if there are shared networks. This method might return less number of networks, when there are shared networks It is advisable to use the getResource().getAvailableNetworks() and get the complete list of network references.

Returns:
HashMap

getAvailableNetworkRefByName

public com.vmware.vcloud.api.rest.schema.ReferenceType getAvailableNetworkRefByName(String name)
Deprecated. SDK 5.5

Getting AvailableNetwork ReferenceType By Name The network names might not be unique, if there are shared networks. This method might return less number of networks, when there are shared networks It is advisable to use the getResource().getAvailableNetworks() and get the complete list of network references.

Parameters:
name - The name for the network
Returns:
ReferenceType

getAvailableNetworkRefs

public Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getAvailableNetworkRefs()
Deprecated. SDK 5.5

Getting AvailableNetwork References The network names might not be unique, if there are shared networks. This method might return less number of networks, when there are shared networks It is advisable to use the getResource().getAvailableNetworks() and get the complete list of network references.

Returns:
Collection

getVappTemplateRefs

public Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getVappTemplateRefs()
Getting the vapp template references

Returns:
Collection

getMediaRefs

public Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getMediaRefs()
Getting the media references

Returns:
Collection

getDiskRefs

public Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getDiskRefs()
Getting the disk references

Returns:
Collection
Since:
API 5.1, SDK 5.1

getVappRefsByName

public HashMap<String,com.vmware.vcloud.api.rest.schema.ReferenceType> getVappRefsByName()
Getting the vapp references by name

Returns:
HashMap

getVappTemplateRefsByName

public Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getVappTemplateRefsByName(String vAppTemplateName)
Getting the vapp template references by name

Parameters:
vAppTemplateName - name of the vApp template
Returns:
Collection
Since:
API 1.5, SDK 5.1

getMediaRefsByName

public Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getMediaRefsByName(String mediaName)
Getting the Media references by name

Parameters:
mediaName - name of the Media
Returns:
Collection
Since:
API 1.5, SDK 5.1

getVappRefByName

public com.vmware.vcloud.api.rest.schema.ReferenceType getVappRefByName(String name)
Getting the vapp references by name

Parameters:
name - name of the vapp
Returns:
ReferenceType

getVappRefs

public Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getVappRefs()
Getting the vapp references

Returns:
Collection

createVappTemplate

public VappTemplate createVappTemplate(com.vmware.vcloud.api.rest.schema.UploadVAppTemplateParamsType vappTemplParams)
                                throws VCloudException
Creating and Uploading a vapp template. This is the initial step for Creating a vapp template

Parameters:
vappTemplParams - UploadVAppTemplateParamsType
Returns:
VappTemplate helper
Throws:
VCloudException
See Also:
VappTemplate.uploadOVFFile(java.io.InputStream, long), VappTemplate.uploadFile(String, java.io.InputStream, long), VappTemplate.uploadFile(String, java.io.InputStream, long, long), VappTemplate.monitorUpload(), VappTemplate.getUploadFileNames()

uploadVappTemplate

public VappTemplate uploadVappTemplate(String vAppTemplateName,
                                       String vAppTemplateDesc,
                                       String localOvfFileLocation,
                                       Boolean manifestRequired,
                                       com.vmware.vcloud.api.rest.schema.ReferenceType vdcStorageRef,
                                       com.vmware.vcloud.api.rest.schema.ReferenceType catalogRef)
                                throws VCloudException,
                                       DuplicateNameException,
                                       ResourceNotAddedException,
                                       TimeoutException
Uploading the ovf package as a vapp template and add to the catalog. Make sure that the ovf file, manifest file(if any) and its corresponding vmdk files are residing in the same location.

Parameters:
vAppTemplateName - - name of the vapptemplate
vAppTemplateDesc - - description of the vapptempalte
localOvfFileLocation - - local media file location.
manifestRequired - - does the vapptemplate contains a manifest file which needs to be uploaded.
vdcStorageRef - - vdc's storage profile reference. If null, defaults to the vdc's default storage profile. For vCD 1.5 this parameter should be set to null.
catalogRef - ReferenceType
Returns:
VappTemplate
Throws:
VCloudException
DuplicateNameException
MissingPropertyException
ResourceNotAddedException
TimeoutException
Since:
API 1.5, SDK 5.1

uploadMedia

public Media uploadMedia(String mediaName,
                         String mediaDescription,
                         ImageType mediaType,
                         String localMediaFile,
                         com.vmware.vcloud.api.rest.schema.ReferenceType vdcStorageProfileRef,
                         com.vmware.vcloud.api.rest.schema.ReferenceType catalogRef)
                  throws VCloudException,
                         DuplicateNameException,
                         ResourceNotAddedException,
                         TimeoutException
Uploading media to the vdc and add to the catalog.

Parameters:
mediaName - - media name
mediaDescription - - media description
mediaType - - media type ImageType
localMediaFile - - local media file location.
vdcStorageProfileRef - - vdc's storage profile reference. If null, defaults to the vdc's default storage profile. For vCD 1.5 this parameter should be set to null.
catalogRef - ReferenceType
Returns:
Media
Throws:
VCloudException
DuplicateNameException
MissingPropertyException
ResourceNotAddedException
TimeoutException
Since:
API 1.5, SDK 5.1

createMedia

public Media createMedia(com.vmware.vcloud.api.rest.schema.MediaType mediaParams)
                  throws VCloudException
Creating and Upload Media. This is the initial step in creating a media

Parameters:
mediaParams - MediaType
Returns:
Media helper
Throws:
VCloudException
See Also:
Media.uploadFile(String, java.io.InputStream, long), Media.uploadFile(String, java.io.InputStream, long, long), Media.getUploadFileNames(), Media.monitorUpload()

composeVapp

public Vapp composeVapp(com.vmware.vcloud.api.rest.schema.ComposeVAppParamsType composeVappParamsType)
                 throws VCloudException
Composing a vApp

Parameters:
composeVappParamsType - ComposeVAppParamsType
Returns:
Vapp helper
Throws:
VCloudException

captureVapp

public VappTemplate captureVapp(com.vmware.vcloud.api.rest.schema.CaptureVAppParamsType captureVappParamsType)
                         throws VCloudException
Capture a vAppTemplate

Parameters:
captureVappParamsType - CaptureVAppParamsType
Returns:
VappTemplate helper
Throws:
VCloudException

captureVapp

public VappTemplate captureVapp(com.vmware.vcloud.api.rest.schema.CaptureVAppParamsType captureVappParamsType,
                                com.vmware.vcloud.api.rest.schema.ReferenceType catalogRef)
                         throws VCloudException,
                                DuplicateNameException,
                                ResourceNotAddedException,
                                TimeoutException,
                                MissingPropertyException
Capture a vAppTemplate and add to the catalog.

Parameters:
captureVappParamsType - CaptureVAppParamsType
catalogRef - ReferenceType
Returns:
VappTemplate helper
Throws:
VCloudException
DuplicateNameException
MissingPropertyException
ResourceNotAddedException
TimeoutException
MissingPropertyException
Since:
API 1.5, SDK 5.1

instantiateVappTemplate

public Vapp instantiateVappTemplate(com.vmware.vcloud.api.rest.schema.InstantiateVAppTemplateParamsType instVappTemplParamsType)
                             throws VCloudException
Instantiate a vApp from vAppTemplate

Parameters:
instVappTemplParamsType - InstantiateVAppTemplateParamsType
Returns:
Vapp helper
Throws:
VCloudException

cloneVapp

public Vapp cloneVapp(com.vmware.vcloud.api.rest.schema.CloneVAppParamsType cloneVappParamsType)
               throws VCloudException
Cloning a vApp

Parameters:
cloneVappParamsType - CloneVAppParamsType
Returns:
Vapp helper
Throws:
VCloudException

cloneVappTemplate

public VappTemplate cloneVappTemplate(com.vmware.vcloud.api.rest.schema.CloneVAppTemplateParamsType cloneVappTemplateParamsType)
                               throws VCloudException
Cloning a vAppTemplate

Parameters:
cloneVappTemplateParamsType - CloneVAppTemplateParamsType
Returns:
VappTemplate helper
Throws:
VCloudException

cloneMedia

public Media cloneMedia(com.vmware.vcloud.api.rest.schema.CloneMediaParamsType cloneMediaParamsType)
                 throws VCloudException
Cloning a Media

Parameters:
cloneMediaParamsType - CloneMediaParamsType
Returns:
Media helper
Throws:
VCloudException

cloneVappTemplate

public VappTemplate cloneVappTemplate(com.vmware.vcloud.api.rest.schema.CloneVAppTemplateParamsType cloneVappTemplateParamsType,
                                      com.vmware.vcloud.api.rest.schema.ReferenceType catalogRef)
                               throws VCloudException,
                                      DuplicateNameException,
                                      MissingPropertyException,
                                      ResourceNotAddedException,
                                      TimeoutException
Cloning vAppTemplate and attach it to the catalog.

Parameters:
cloneVappTemplateParamsType - CloneVAppTemplateParamsType
catalogRef - ReferenceType
Returns:
VappTemplate helper
Throws:
VCloudException
DuplicateNameException
MissingPropertyException
ResourceNotAddedException
TimeoutException
Since:
API 1.5, SDK 5.1

cloneMedia

public Media cloneMedia(com.vmware.vcloud.api.rest.schema.CloneMediaParamsType cloneMediaParamsType,
                        com.vmware.vcloud.api.rest.schema.ReferenceType catalogRef)
                 throws VCloudException,
                        DuplicateNameException,
                        MissingPropertyException,
                        ResourceNotAddedException,
                        TimeoutException
Cloning Media and attach it to the catalog.

Parameters:
cloneMediaParamsType - CloneMediaParamsType
catalogRef - ReferenceType
Returns:
Media helper
Throws:
VCloudException
DuplicateNameException
MissingPropertyException
ResourceNotAddedException
TimeoutException
Since:
API 1.5, SDK 5.1

getVdcStorageProfileRefs

public Collection<com.vmware.vcloud.api.rest.schema.ReferenceType> getVdcStorageProfileRefs()
Returns the storage profile references for this vdc.

Returns:
Collection
Since:
API 5.1, SDK 5.1

createDisk

public Disk createDisk(com.vmware.vcloud.api.rest.schema.DiskCreateParamsType diskCreateParams)
                throws VCloudException
Creating a disk.

Parameters:
diskCreateParams - DiskCreateParamsType
Returns:
Disk
Throws:
VCloudException
Since:
API 5.1, SDK 5.1

instantiateOvf

public Vapp instantiateOvf(com.vmware.vcloud.api.rest.schema.InstantiateOvfParamsType instantiateOvfParams)
                    throws VCloudException
Instantiate a vApp or VM

Parameters:
instantiateOvfParams - InstantiateOvfParamsType
Returns:
Vapp
Throws:
VCloudException
Since:
API 5.5, SDK 5.5

uploadVapp

public Vapp uploadVapp(com.vmware.vcloud.api.rest.schema.InstantiateOvfParamsType InstantiateOvfParamsType,
                       String localOvfFileLocation)
                throws VCloudException
Uploading the ovf package as a vapp. Make sure that the ovf file, and its corresponding vmdk files are residing in the same location.

Parameters:
InstantiateOvfParamsType - InstantiateOvfParamsType
Returns:
Vapp
Throws:
VCloudException
Since:
API 5.5, SDK 5.5

createOrgVdcNetwork

public OrgVdcNetwork createOrgVdcNetwork(com.vmware.vcloud.api.rest.schema.OrgVdcNetworkType orgVdcNetworkParams)
                                  throws VCloudException,
                                         MissingPropertyException
Create an isolated/routed Org vDC Network.

Parameters:
orgVdcNetworkParams - OrgVdcNetworkType
Returns:
OrgVdcNetwork
Throws:
VCloudException
MissingPropertyException
Since:
API 5.5, SDK 5.5

getEdgeGatewayRefs

public ReferenceResult getEdgeGatewayRefs()
                                   throws VCloudException
Returns the list of all the edgeGateway references

Returns:
ReferenceResult
Throws:
VCloudException
Since:
API 5.1, SDK 5.5

updateVdc

public Task updateVdc(com.vmware.vcloud.api.rest.schema.VdcType vdcParams)
               throws VCloudException
Modify the name and/or description of an organization vDC.

Parameters:
vdcParams - VdcType
Returns:
Task
Throws:
VCloudException
Since:
API 5.7, SDK 5.7
See Also:
VdcType

delete

public Task delete()
            throws VCloudException
Delete Vdc

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

delete

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

Parameters:
client - vCloud Client VcloudClient
vdcRef - Vdc Ref
Returns:
Task
Throws:
VCloudException
Since:
API 5.7, SDK 5.7

getVmAffinityRules

public List<com.vmware.vcloud.api.rest.schema.VmAffinityRuleType> getVmAffinityRules()
                                                                              throws VCloudException
Retrieves a list of all VM affinity/anti-affinity rules within a given vDC.

Returns:
Throws:
VCloudException
Since:
API 20.0, SDK 8.10

createVmAffinityRule

public com.vmware.vcloud.api.rest.schema.TaskType createVmAffinityRule(com.vmware.vcloud.api.rest.schema.VmAffinityRuleType vmAffinityRuleType)
                                                                throws VCloudException
Creates a new VM affinity/anti-affinity rule. This operation is asynchronous and returns a task that you can monitor to track the progress of the request.

Parameters:
vmAffinityRuleType - VmAffinityRuleType
Returns:
TaskType
Throws:
VCloudException
Since:
API 20.0, SDK 8.10


Copyright © 2016. All Rights Reserved.