com.vmware.vcloud.sdk.admin.extensions
Class VMWVimServer

java.lang.Object
  extended by com.vmware.vcloud.sdk.VcloudResource<T>
      extended by com.vmware.vcloud.sdk.VcloudEntity<com.vmware.vcloud.api.rest.schema.extension.VimServerType>
          extended by com.vmware.vcloud.sdk.admin.extensions.VMWVimServer

public class VMWVimServer
extends VcloudEntity<com.vmware.vcloud.api.rest.schema.extension.VimServerType>

Helper class for the VMWVimServer Resource in vCloud Admin Extension API.

Author:
Administrator

Method Summary
 Task forceVMWVimServerReconnect()
          Forcing the vimserver reconnect.
static Task forceVMWVimServerReconnect(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vmwVimServerRef)
          Forcing the vimserver reconnect
 HashMap<String,com.vmware.vcloud.api.rest.schema.extension.VimObjectRefType> getNetworkVimRefsByMoref()
          Retrieves the unused/available Network References by Moref for a VMWVimServer.
static HashMap<String,com.vmware.vcloud.api.rest.schema.extension.VimObjectRefType> getNetworkVimRefsByMoref(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vimServerRef)
          Retrieves the unused/available Port Group Network References by Moref for a VMWVimServer
 HashMap<String,com.vmware.vcloud.api.rest.schema.extension.ResourcePoolType> getResourcePools()
          Returns a HashMap of the ResourcePools By Name
static HashMap<String,com.vmware.vcloud.api.rest.schema.extension.ResourcePoolType> getResourcePools(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vimServerRef)
          Returns a HashMap of the ResourcePools By Name
 HashMap<String,com.vmware.vcloud.api.rest.schema.extension.VmObjectRefType> getVms()
          Retrieves the vm's in the VimServer by name
 HashMap<String,com.vmware.vcloud.api.rest.schema.extension.VmObjectRefType> getVms(int page)
          Retrieves the vm's in the VimServer by name
 HashMap<String,com.vmware.vcloud.api.rest.schema.extension.VmObjectRefType> getVms(int page, int pageSize)
          Retrieves the vm's in the VimServer by name
static HashMap<String,com.vmware.vcloud.api.rest.schema.extension.VmObjectRefType> getVms(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vimServerRef)
          Returns the list of vms
static HashMap<String,com.vmware.vcloud.api.rest.schema.extension.VmObjectRefType> getVms(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vimServerRef, int page)
          Returns the list of vms
static HashMap<String,com.vmware.vcloud.api.rest.schema.extension.VmObjectRefType> getVms(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vimServerRef, int page, int pageSize)
          Returns the list of vms
 HashMap<String,com.vmware.vcloud.api.rest.schema.ReferenceType> getVMWHostRefsByName()
          Returns a HashMap of the VMWHostReferences By Name
static HashMap<String,com.vmware.vcloud.api.rest.schema.ReferenceType> getVMWHostRefsByName(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vimServerRef)
          Returns a HashMap of the VMWHostReferences By Name
 List<com.vmware.vcloud.api.rest.schema.extension.VMWStorageProfileType> getVMWStorageProfiles()
          Returns a list of all the storage profiles in this vmw vimserver.
static VMWVimServer getVMWVimServerById(VcloudClient client, String vCloudId)
          Get VMWVimServer helper using the vCloud ID
static VMWVimServer getVMWVimServerByReference(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vmwVimServerRef)
          Retrieves the VimServer helper by reference
 com.vmware.vcloud.api.rest.schema.extension.ShieldManagerType getvShieldManager()
          Returns the vShieldManger properties.
 String getvSphereWebClientUrl(String vimObjectType, String vimObjectMoref)
          Retrieve the vSphere URL of an object.
 Media importMedia(com.vmware.vcloud.api.rest.schema.extension.ImportMediaParamsType importMediaParamsType)
          Imports Media.
 Vapp importVmAsVApp(com.vmware.vcloud.api.rest.schema.extension.ImportVmAsVAppParamsType importVmAsVAppParamsType)
          Imports VM from the vim server as Vapp
 VappTemplate importVmAsVAppTemplate(com.vmware.vcloud.api.rest.schema.extension.ImportVmAsVAppTemplateParamsType importVmAsVAppTemplateParamsType)
          Imports VM from vim server as VappTemplate
 Task importVmIntoVApp(com.vmware.vcloud.api.rest.schema.extension.ImportVmIntoExistingVAppParamsType importVmIntoVAppParamsType)
          Imports VM from the vim server into an existing Vapp.
 Task refreshStorageProfiles()
          Refresh the VMW Vimservers storage profiles.
static Task refreshStorageProfiles(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vmwVimServerRef)
          Refresh the VMW Vimservers storage profiles.
 Task refreshVimServer()
          Refresh vCenter server.
 Task unregisterVMWVimServer()
          Unregister the vim server
static Task unregisterVMWVimServer(VcloudClient client, com.vmware.vcloud.api.rest.schema.ReferenceType vmwVimServerRef)
          Unregister the vim server
 Task updateVMWVimServer(com.vmware.vcloud.api.rest.schema.extension.VimServerType vimServerType)
          Updates the vim server.
 Task updatevShieldManager(com.vmware.vcloud.api.rest.schema.extension.ShieldManagerType shieldManager)
          Updates the vShield Manager.
 
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

getVMWVimServerByReference

public static VMWVimServer getVMWVimServerByReference(VcloudClient client,
                                                      com.vmware.vcloud.api.rest.schema.ReferenceType vmwVimServerRef)
                                               throws VCloudException
Retrieves the VimServer helper by reference

Parameters:
client -
Returns:
VMWVimServer
Throws:
VCloudException

getVMWVimServerById

public static VMWVimServer getVMWVimServerById(VcloudClient client,
                                               String vCloudId)
                                        throws VCloudException
Get VMWVimServer 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

updateVMWVimServer

public Task updateVMWVimServer(com.vmware.vcloud.api.rest.schema.extension.VimServerType vimServerType)
                        throws VCloudException
Updates the vim server. To update the vim server pass the valid credentials

Parameters:
vimServerType - VimServerType
Returns:
Task
Throws:
VCloudException

forceVMWVimServerReconnect

public Task forceVMWVimServerReconnect()
                                throws VCloudException
Forcing the vimserver reconnect.

Returns:
Task
Throws:
VCloudException

forceVMWVimServerReconnect

public static Task forceVMWVimServerReconnect(VcloudClient client,
                                              com.vmware.vcloud.api.rest.schema.ReferenceType vmwVimServerRef)
                                       throws VCloudException
Forcing the vimserver reconnect

Parameters:
client -
vmwVimServerRef -
Returns:
Task
Throws:
VCloudException

unregisterVMWVimServer

public Task unregisterVMWVimServer()
                            throws VCloudException
Unregister the vim server

Returns:
Task
Throws:
VCloudException

refreshVimServer

public Task refreshVimServer()
                      throws VCloudException
Refresh vCenter server.

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

unregisterVMWVimServer

public static Task unregisterVMWVimServer(VcloudClient client,
                                          com.vmware.vcloud.api.rest.schema.ReferenceType vmwVimServerRef)
                                   throws VCloudException
Unregister the vim server

Parameters:
client -
vmwVimServerRef -
Returns:
Task
Throws:
VCloudException

getResourcePools

public static HashMap<String,com.vmware.vcloud.api.rest.schema.extension.ResourcePoolType> getResourcePools(VcloudClient client,
                                                                                                            com.vmware.vcloud.api.rest.schema.ReferenceType vimServerRef)
                                                                                                     throws VCloudException
Returns a HashMap of the ResourcePools By Name

Parameters:
client - - VcloudClient
vimServerRef - - ReferenceType to the VMWVimServer
Returns:
HashMap<String,ResourcePoolType>
Throws:
VCloudException

getNetworkVimRefsByMoref

public HashMap<String,com.vmware.vcloud.api.rest.schema.extension.VimObjectRefType> getNetworkVimRefsByMoref()
                                                                                                      throws VCloudException
Retrieves the unused/available Network References by Moref for a VMWVimServer. Returns the unused/available vSphere port groups.

Returns:
HashMap<String,VimObjectRefType>
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

getNetworkVimRefsByMoref

public static HashMap<String,com.vmware.vcloud.api.rest.schema.extension.VimObjectRefType> getNetworkVimRefsByMoref(VcloudClient client,
                                                                                                                    com.vmware.vcloud.api.rest.schema.ReferenceType vimServerRef)
                                                                                                             throws VCloudException
Retrieves the unused/available Port Group Network References by Moref for a VMWVimServer

Parameters:
client - - VcloudClient
vimServerRef - - ReferenceType to the VMWVimServer
Returns:
HashMap<String,VimObjectRefType>
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

getVMWHostRefsByName

public HashMap<String,com.vmware.vcloud.api.rest.schema.ReferenceType> getVMWHostRefsByName()
                                                                                     throws VCloudException
Returns a HashMap of the VMWHostReferences By Name

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

getVMWHostRefsByName

public static HashMap<String,com.vmware.vcloud.api.rest.schema.ReferenceType> getVMWHostRefsByName(VcloudClient client,
                                                                                                   com.vmware.vcloud.api.rest.schema.ReferenceType vimServerRef)
                                                                                            throws VCloudException
Returns a HashMap of the VMWHostReferences By Name

Parameters:
client - - VcloudClient
vimServerRef - - ReferenceType to the VMWVimServer
Returns:
HashMap
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

getResourcePools

public HashMap<String,com.vmware.vcloud.api.rest.schema.extension.ResourcePoolType> getResourcePools()
                                                                                              throws VCloudException
Returns a HashMap of the ResourcePools By Name

Returns:
HashMap<String,ResourcePoolType>
Throws:
VCloudException

getVms

public HashMap<String,com.vmware.vcloud.api.rest.schema.extension.VmObjectRefType> getVms()
                                                                                   throws VCloudException
Retrieves the vm's in the VimServer by name

Returns:
HashMap<String, VmObjectRefType>
Throws:
VCloudException

getVms

public HashMap<String,com.vmware.vcloud.api.rest.schema.extension.VmObjectRefType> getVms(int page,
                                                                                          int pageSize)
                                                                                   throws VCloudException
Retrieves the vm's in the VimServer by name

Parameters:
page - - parameter page must be greater or equal to 1 && less or equal to 100
pageSize - - parameter pageSize must be greater or equal to 1
Returns:
HashMap<String, VmObjectRefType>
Throws:
VCloudException

getVms

public HashMap<String,com.vmware.vcloud.api.rest.schema.extension.VmObjectRefType> getVms(int page)
                                                                                   throws VCloudException
Retrieves the vm's in the VimServer by name

Parameters:
page - - parameter page must be greater or equal to 1 && less or equal to 100
Returns:
HashMap<String, VmObjectRefType>
Throws:
VCloudException

getVms

public static HashMap<String,com.vmware.vcloud.api.rest.schema.extension.VmObjectRefType> getVms(VcloudClient client,
                                                                                                 com.vmware.vcloud.api.rest.schema.ReferenceType vimServerRef)
                                                                                          throws VCloudException
Returns the list of vms

Parameters:
client -
vimServerRef -
Returns:
HashMap<String, VmObjectRefType>
Throws:
VCloudException

getVms

public static HashMap<String,com.vmware.vcloud.api.rest.schema.extension.VmObjectRefType> getVms(VcloudClient client,
                                                                                                 com.vmware.vcloud.api.rest.schema.ReferenceType vimServerRef,
                                                                                                 int page)
                                                                                          throws VCloudException
Returns the list of vms

Parameters:
client -
vimServerRef -
page - - parameter page must be greater or equal to 1 && less or equal to 100
Returns:
HashMap<String, VmObjectRefType>
Throws:
VCloudException

getVms

public static HashMap<String,com.vmware.vcloud.api.rest.schema.extension.VmObjectRefType> getVms(VcloudClient client,
                                                                                                 com.vmware.vcloud.api.rest.schema.ReferenceType vimServerRef,
                                                                                                 int page,
                                                                                                 int pageSize)
                                                                                          throws VCloudException
Returns the list of vms

Parameters:
client -
vimServerRef -
page - - parameter page must be greater or equal to 1 && less or equal to 100
pageSize - - parameter pageSize must be greater or equal to 1
Returns:
HashMap<String, VmObjectRefType>
Throws:
VCloudException

importVmAsVApp

public Vapp importVmAsVApp(com.vmware.vcloud.api.rest.schema.extension.ImportVmAsVAppParamsType importVmAsVAppParamsType)
                    throws VCloudException
Imports VM from the vim server as Vapp

Parameters:
importVmAsVAppParamsType - ImportVmAsVAppParamsType
Returns:
Vapp
Throws:
VCloudException

importVmIntoVApp

public Task importVmIntoVApp(com.vmware.vcloud.api.rest.schema.extension.ImportVmIntoExistingVAppParamsType importVmIntoVAppParamsType)
                      throws VCloudException
Imports VM from the vim server into an existing Vapp.

Parameters:
importVmIntoVAppParamsType - ImportVmIntoExistingVAppParamsType
Returns:
Task
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

importVmAsVAppTemplate

public VappTemplate importVmAsVAppTemplate(com.vmware.vcloud.api.rest.schema.extension.ImportVmAsVAppTemplateParamsType importVmAsVAppTemplateParamsType)
                                    throws VCloudException
Imports VM from vim server as VappTemplate

Parameters:
importVmAsVAppTemplateParamsType - ImportVmAsVAppTemplateParamsType
Returns:
VappTemplate
Throws:
VCloudException

importMedia

public Media importMedia(com.vmware.vcloud.api.rest.schema.extension.ImportMediaParamsType importMediaParamsType)
                  throws VCloudException
Imports Media. Media types can be ISO and Floppy.

Parameters:
importMediaParamsType - - ImportMediaParamsType If catalog property is omitted from request the media is imported into VDC but not associated with catalog
Returns:
Media
Throws:
VCloudException
Since:
API 1.5, SDK 1.5

getvShieldManager

public com.vmware.vcloud.api.rest.schema.extension.ShieldManagerType getvShieldManager()
                                                                                throws VCloudException
Returns the vShieldManger properties.

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

updatevShieldManager

public Task updatevShieldManager(com.vmware.vcloud.api.rest.schema.extension.ShieldManagerType shieldManager)
                          throws VCloudException
Updates the vShield Manager.

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

getVMWStorageProfiles

public List<com.vmware.vcloud.api.rest.schema.extension.VMWStorageProfileType> getVMWStorageProfiles()
                                                                                              throws VCloudException
Returns a list of all the storage profiles in this vmw vimserver.

Returns:
List<VMWStorageProfileType>
Throws:
VCloudException
Since:
API 5.1, SDK 5.1

refreshStorageProfiles

public Task refreshStorageProfiles()
                            throws VCloudException
Refresh the VMW Vimservers storage profiles.

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

refreshStorageProfiles

public static Task refreshStorageProfiles(VcloudClient client,
                                          com.vmware.vcloud.api.rest.schema.ReferenceType vmwVimServerRef)
                                   throws VCloudException
Refresh the VMW Vimservers storage profiles.

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

getvSphereWebClientUrl

public String getvSphereWebClientUrl(String vimObjectType,
                                     String vimObjectMoref)
                              throws VCloudException
Retrieve the vSphere URL of an object.

Parameters:
vimObjectType - VimObjectTypeEnum
vimObjectMoref - ex: resgroup-25
Returns:
String
Throws:
VCloudException
Since:
API 5.1, SDK 5.1


Copyright © 2016. All Rights Reserved.