Package com.vmware.connection.helpers
Class GetMOREF
- java.lang.Object
-
- com.vmware.connection.helpers.BaseHelper
-
- com.vmware.connection.helpers.GetMOREF
-
public class GetMOREF extends BaseHelper
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vmware.connection.helpers.BaseHelper
BaseHelper.HelperException
-
-
Constructor Summary
Constructors Constructor Description GetMOREF(Connection connection)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.vmware.vim25.RetrieveResultcontainerViewByType(com.vmware.vim25.ManagedObjectReference container, java.lang.String morefType, com.vmware.vim25.RetrieveOptions retrieveOptions)com.vmware.vim25.RetrieveResultcontainerViewByType(com.vmware.vim25.ManagedObjectReference container, java.lang.String morefType, com.vmware.vim25.RetrieveOptions retrieveOptions, java.lang.String... morefProperties)Returns the raw RetrieveResult object for the provided container filtered on properties listcom.vmware.vim25.RetrieveResultcontainerViewByType(com.vmware.vim25.ManagedObjectReference container, java.lang.String morefType, java.lang.String[] morefProperties, com.vmware.vim25.RetrieveOptions retrieveOptions, com.vmware.vim25.PropertyFilterSpec... propertyFilterSpecs)java.util.Map<java.lang.String,java.lang.Object>entityProps(com.vmware.vim25.ManagedObjectReference entityMor, java.lang.String[] props)Method to retrieve properties of aManagedObjectReferencejava.util.Map<com.vmware.vim25.ManagedObjectReference,java.util.Map<java.lang.String,java.lang.Object>>entityProps(java.util.List<com.vmware.vim25.ManagedObjectReference> entityMors, java.lang.String[] props)Method to retrieve properties of list ofManagedObjectReferencecom.vmware.vim25.TraversalSpecgetVMTraversalSpec()java.util.Map<java.lang.String,com.vmware.vim25.ManagedObjectReference>inContainerByType(com.vmware.vim25.ManagedObjectReference container, java.lang.String morefType)java.util.Map<java.lang.String,com.vmware.vim25.ManagedObjectReference>inContainerByType(com.vmware.vim25.ManagedObjectReference folder, java.lang.String morefType, com.vmware.vim25.RetrieveOptions retrieveOptions)Returns all the MOREFs of the specified type that are present under the containerjava.util.Map<com.vmware.vim25.ManagedObjectReference,java.util.Map<java.lang.String,java.lang.Object>>inContainerByType(com.vmware.vim25.ManagedObjectReference container, java.lang.String morefType, java.lang.String[] strings)java.util.Map<com.vmware.vim25.ManagedObjectReference,java.util.Map<java.lang.String,java.lang.Object>>inContainerByType(com.vmware.vim25.ManagedObjectReference container, java.lang.String morefType, java.lang.String[] morefProperties, com.vmware.vim25.RetrieveOptions retrieveOptions)Returns all the MOREFs of the specified type that are present under the containerjava.util.Map<java.lang.String,com.vmware.vim25.ManagedObjectReference>inFolderByType(com.vmware.vim25.ManagedObjectReference folder, java.lang.String morefType)java.util.Map<java.lang.String,com.vmware.vim25.ManagedObjectReference>inFolderByType(com.vmware.vim25.ManagedObjectReference folder, java.lang.String morefType, com.vmware.vim25.RetrieveOptions retrieveOptions)Returns all the MOREFs of the specified type that are present under the folderstatic java.lang.Stringpopulate(com.vmware.vim25.RetrieveResult rslts, java.util.List<com.vmware.vim25.ObjectContent> listobjcontent)static java.lang.Stringpopulate(com.vmware.vim25.RetrieveResult rslts, java.util.Map<java.lang.String,com.vmware.vim25.ManagedObjectReference> tgtMoref)com.vmware.vim25.PropertyFilterSpec[]propertyFilterSpecs(com.vmware.vim25.ManagedObjectReference container, java.lang.String morefType, java.lang.String... morefProperties)java.util.Map<java.lang.String,com.vmware.vim25.ManagedObjectReference>toMap(com.vmware.vim25.RetrieveResult rslts)com.vmware.vim25.ManagedObjectReferencevmByVMname(java.lang.String vmName, com.vmware.vim25.ManagedObjectReference propCollectorRef)Get the MOR of the Virtual Machine by its name.
-
-
-
Constructor Detail
-
GetMOREF
public GetMOREF(Connection connection)
-
-
Method Detail
-
containerViewByType
public com.vmware.vim25.RetrieveResult containerViewByType(com.vmware.vim25.ManagedObjectReference container, java.lang.String morefType, com.vmware.vim25.RetrieveOptions retrieveOptions) throws com.vmware.vim25.RuntimeFaultFaultMsg, com.vmware.vim25.InvalidPropertyFaultMsg- Throws:
com.vmware.vim25.RuntimeFaultFaultMsgcom.vmware.vim25.InvalidPropertyFaultMsg
-
containerViewByType
public com.vmware.vim25.RetrieveResult containerViewByType(com.vmware.vim25.ManagedObjectReference container, java.lang.String morefType, com.vmware.vim25.RetrieveOptions retrieveOptions, java.lang.String... morefProperties) throws com.vmware.vim25.RuntimeFaultFaultMsg, com.vmware.vim25.InvalidPropertyFaultMsgReturns the raw RetrieveResult object for the provided container filtered on properties list- Parameters:
container- - container to look inmorefType- - type to filter formorefProperties- - properties to include- Returns:
- com.vmware.vim25.RetrieveResult for this query
- Throws:
com.vmware.vim25.RuntimeFaultFaultMsgcom.vmware.vim25.InvalidPropertyFaultMsg
-
propertyFilterSpecs
public com.vmware.vim25.PropertyFilterSpec[] propertyFilterSpecs(com.vmware.vim25.ManagedObjectReference container, java.lang.String morefType, java.lang.String... morefProperties) throws com.vmware.vim25.RuntimeFaultFaultMsg- Throws:
com.vmware.vim25.RuntimeFaultFaultMsg
-
containerViewByType
public com.vmware.vim25.RetrieveResult containerViewByType(com.vmware.vim25.ManagedObjectReference container, java.lang.String morefType, java.lang.String[] morefProperties, com.vmware.vim25.RetrieveOptions retrieveOptions, com.vmware.vim25.PropertyFilterSpec... propertyFilterSpecs) throws com.vmware.vim25.RuntimeFaultFaultMsg, com.vmware.vim25.InvalidPropertyFaultMsg- Throws:
com.vmware.vim25.RuntimeFaultFaultMsgcom.vmware.vim25.InvalidPropertyFaultMsg
-
inFolderByType
public java.util.Map<java.lang.String,com.vmware.vim25.ManagedObjectReference> inFolderByType(com.vmware.vim25.ManagedObjectReference folder, java.lang.String morefType, com.vmware.vim25.RetrieveOptions retrieveOptions) throws com.vmware.vim25.RuntimeFaultFaultMsg, com.vmware.vim25.InvalidPropertyFaultMsgReturns all the MOREFs of the specified type that are present under the folder- Parameters:
folder-ManagedObjectReferenceof the folder to begin the search frommorefType- Type of the managed entity that needs to be searched- Returns:
- Map of name and MOREF of the managed objects present. If none exist then empty Map is returned
- Throws:
com.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsg
-
inContainerByType
public java.util.Map<com.vmware.vim25.ManagedObjectReference,java.util.Map<java.lang.String,java.lang.Object>> inContainerByType(com.vmware.vim25.ManagedObjectReference container, java.lang.String morefType, java.lang.String[] morefProperties, com.vmware.vim25.RetrieveOptions retrieveOptions) throws com.vmware.vim25.InvalidPropertyFaultMsg, com.vmware.vim25.RuntimeFaultFaultMsgReturns all the MOREFs of the specified type that are present under the container- Parameters:
container-ManagedObjectReferenceof the container to begin the search frommorefType- Type of the managed entity that needs to be searchedmorefProperties- Array of properties to be fetched for the moref- Returns:
- Map of MOREF and Map of name value pair of properties requested of the managed objects present. If none exist then empty Map is returned
- Throws:
com.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsg
-
inContainerByType
public java.util.Map<java.lang.String,com.vmware.vim25.ManagedObjectReference> inContainerByType(com.vmware.vim25.ManagedObjectReference folder, java.lang.String morefType, com.vmware.vim25.RetrieveOptions retrieveOptions) throws com.vmware.vim25.InvalidPropertyFaultMsg, com.vmware.vim25.RuntimeFaultFaultMsgReturns all the MOREFs of the specified type that are present under the container- Parameters:
folder-ManagedObjectReferenceof the container to begin the search frommorefType- Type of the managed entity that needs to be searched- Returns:
- Map of name and MOREF of the managed objects present. If none exist then empty Map is returned
- Throws:
com.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsg
-
toMap
public java.util.Map<java.lang.String,com.vmware.vim25.ManagedObjectReference> toMap(com.vmware.vim25.RetrieveResult rslts) throws com.vmware.vim25.InvalidPropertyFaultMsg, com.vmware.vim25.RuntimeFaultFaultMsg- Throws:
com.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsg
-
populate
public static java.lang.String populate(com.vmware.vim25.RetrieveResult rslts, java.util.Map<java.lang.String,com.vmware.vim25.ManagedObjectReference> tgtMoref)
-
populate
public static java.lang.String populate(com.vmware.vim25.RetrieveResult rslts, java.util.List<com.vmware.vim25.ObjectContent> listobjcontent)
-
vmByVMname
public com.vmware.vim25.ManagedObjectReference vmByVMname(java.lang.String vmName, com.vmware.vim25.ManagedObjectReference propCollectorRef) throws com.vmware.vim25.InvalidPropertyFaultMsg, com.vmware.vim25.RuntimeFaultFaultMsgGet the MOR of the Virtual Machine by its name.- Parameters:
vmName- The name of the Virtual MachinepropCollectorRef-- Returns:
- The Managed Object reference for this VM
- Throws:
com.vmware.vim25.RuntimeFaultFaultMsgcom.vmware.vim25.InvalidPropertyFaultMsg
-
getVMTraversalSpec
public com.vmware.vim25.TraversalSpec getVMTraversalSpec()
- Returns:
- TraversalSpec specification to get to the VirtualMachine managed object.
-
entityProps
public java.util.Map<java.lang.String,java.lang.Object> entityProps(com.vmware.vim25.ManagedObjectReference entityMor, java.lang.String[] props) throws com.vmware.vim25.InvalidPropertyFaultMsg, com.vmware.vim25.RuntimeFaultFaultMsgMethod to retrieve properties of aManagedObjectReference- Parameters:
entityMor-ManagedObjectReferenceof the entityprops- Array of properties to be looked up- Returns:
- Map of the property name and its corresponding value
- Throws:
com.vmware.vim25.InvalidPropertyFaultMsg- If a property does not existcom.vmware.vim25.RuntimeFaultFaultMsg
-
entityProps
public java.util.Map<com.vmware.vim25.ManagedObjectReference,java.util.Map<java.lang.String,java.lang.Object>> entityProps(java.util.List<com.vmware.vim25.ManagedObjectReference> entityMors, java.lang.String[] props) throws com.vmware.vim25.InvalidPropertyFaultMsg, com.vmware.vim25.RuntimeFaultFaultMsgMethod to retrieve properties of list ofManagedObjectReference- Parameters:
entityMors- List ofManagedObjectReferencefor which the properties needs to be retrievedprops- Common properties that need to be retrieved for all theManagedObjectReferencepassed- Returns:
- Map of
ManagedObjectReferenceand their corresponding name value pair of properties - Throws:
com.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsg
-
inContainerByType
public java.util.Map<java.lang.String,com.vmware.vim25.ManagedObjectReference> inContainerByType(com.vmware.vim25.ManagedObjectReference container, java.lang.String morefType) throws com.vmware.vim25.InvalidPropertyFaultMsg, com.vmware.vim25.RuntimeFaultFaultMsg- Throws:
com.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsg
-
inFolderByType
public java.util.Map<java.lang.String,com.vmware.vim25.ManagedObjectReference> inFolderByType(com.vmware.vim25.ManagedObjectReference folder, java.lang.String morefType) throws com.vmware.vim25.RuntimeFaultFaultMsg, com.vmware.vim25.InvalidPropertyFaultMsg- Throws:
com.vmware.vim25.RuntimeFaultFaultMsgcom.vmware.vim25.InvalidPropertyFaultMsg
-
inContainerByType
public java.util.Map<com.vmware.vim25.ManagedObjectReference,java.util.Map<java.lang.String,java.lang.Object>> inContainerByType(com.vmware.vim25.ManagedObjectReference container, java.lang.String morefType, java.lang.String[] strings) throws com.vmware.vim25.InvalidPropertyFaultMsg, com.vmware.vim25.RuntimeFaultFaultMsg- Throws:
com.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsg
-
-