org.redhat.vmtruckloader.vmware
Class VMWareManagedObjectUtils
java.lang.Object
org.redhat.vmtruckloader.vmware.VMWareManagedObjectUtils
public class VMWareManagedObjectUtils
- extends Object
- Author:
- Romain Pelisse - romain@redhat.com
Method Summary |
static com.vmware.vim25.mo.Datastore |
findDataStore(String storagePodName,
int diskSize,
com.vmware.vim25.mo.ServiceInstance instance)
Find datastore with max available space in a given storage pod for a new
virtual machine with diskSize bytes. |
static com.vmware.vim25.mo.ResourcePool |
findResourcePoolByName(com.vmware.vim25.mo.ServiceInstance serviceInstance,
String resourcePoolName)
|
static List<com.vmware.vim25.mo.ManagedEntity> |
getManagedEntities(com.vmware.vim25.mo.InventoryNavigator inventoryNavigator,
String entityClass)
|
static List<com.vmware.vim25.mo.ManagedEntity> |
getManagedEntities(com.vmware.vim25.mo.ServiceInstance serviceInstance,
String entityClass)
|
static com.vmware.vim25.mo.VirtualMachine |
getVm(com.vmware.vim25.mo.ServiceInstance serviceInstance,
String vmName)
|
static com.vmware.vim25.mo.Folder |
lookVmFolder(com.vmware.vim25.mo.ServiceInstance serviceInstance,
String foldername)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VMWareManagedObjectUtils
public VMWareManagedObjectUtils()
getManagedEntities
public static List<com.vmware.vim25.mo.ManagedEntity> getManagedEntities(com.vmware.vim25.mo.InventoryNavigator inventoryNavigator,
String entityClass)
getManagedEntities
public static List<com.vmware.vim25.mo.ManagedEntity> getManagedEntities(com.vmware.vim25.mo.ServiceInstance serviceInstance,
String entityClass)
findResourcePoolByName
public static com.vmware.vim25.mo.ResourcePool findResourcePoolByName(com.vmware.vim25.mo.ServiceInstance serviceInstance,
String resourcePoolName)
lookVmFolder
public static com.vmware.vim25.mo.Folder lookVmFolder(com.vmware.vim25.mo.ServiceInstance serviceInstance,
String foldername)
findDataStore
public static com.vmware.vim25.mo.Datastore findDataStore(String storagePodName,
int diskSize,
com.vmware.vim25.mo.ServiceInstance instance)
- Find datastore with max available space in a given storage pod for a new
virtual machine with diskSize bytes. VMWare recommends to use data stores
up to 90%.
- Parameters:
storagePodName
- the storage pod name to usevc
- the virtual data centerdiskSize
- required disk size (in KB)
- Returns:
- a datastore or null if none found
getVm
public static com.vmware.vim25.mo.VirtualMachine getVm(com.vmware.vim25.mo.ServiceInstance serviceInstance,
String vmName)
Copyright © 2013. All Rights Reserved.