Class GetMOREF

    • 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.RetrieveResult containerViewByType​(com.vmware.vim25.ManagedObjectReference container, java.lang.String morefType, com.vmware.vim25.RetrieveOptions retrieveOptions)  
      com.vmware.vim25.RetrieveResult containerViewByType​(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 list
      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)  
      java.util.Map<java.lang.String,​java.lang.Object> entityProps​(com.vmware.vim25.ManagedObjectReference entityMor, java.lang.String[] props)
      Method to retrieve properties of a ManagedObjectReference
      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)
      Method to retrieve properties of list of ManagedObjectReference
      com.vmware.vim25.TraversalSpec getVMTraversalSpec()  
      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 container
      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)  
      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 container
      java.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 folder
      static java.lang.String populate​(com.vmware.vim25.RetrieveResult rslts, java.util.List<com.vmware.vim25.ObjectContent> listobjcontent)  
      static java.lang.String populate​(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.ManagedObjectReference vmByVMname​(java.lang.String vmName, com.vmware.vim25.ManagedObjectReference propCollectorRef)
      Get the MOR of the Virtual Machine by its name.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.RuntimeFaultFaultMsg
        com.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.InvalidPropertyFaultMsg
        Returns the raw RetrieveResult object for the provided container filtered on properties list
        Parameters:
        container - - container to look in
        morefType - - type to filter for
        morefProperties - - properties to include
        Returns:
        com.vmware.vim25.RetrieveResult for this query
        Throws:
        com.vmware.vim25.RuntimeFaultFaultMsg
        com.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.RuntimeFaultFaultMsg
        com.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.InvalidPropertyFaultMsg
        Returns all the MOREFs of the specified type that are present under the folder
        Parameters:
        folder - ManagedObjectReference of the folder to begin the search from
        morefType - 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.InvalidPropertyFaultMsg
        com.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.RuntimeFaultFaultMsg
        Returns all the MOREFs of the specified type that are present under the container
        Parameters:
        container - ManagedObjectReference of the container to begin the search from
        morefType - Type of the managed entity that needs to be searched
        morefProperties - 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.InvalidPropertyFaultMsg
        com.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.RuntimeFaultFaultMsg
        Returns all the MOREFs of the specified type that are present under the container
        Parameters:
        folder - ManagedObjectReference of the container to begin the search from
        morefType - 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.InvalidPropertyFaultMsg
        com.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.InvalidPropertyFaultMsg
        com.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.RuntimeFaultFaultMsg
        Get the MOR of the Virtual Machine by its name.
        Parameters:
        vmName - The name of the Virtual Machine
        propCollectorRef -
        Returns:
        The Managed Object reference for this VM
        Throws:
        com.vmware.vim25.RuntimeFaultFaultMsg
        com.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.RuntimeFaultFaultMsg
        Method to retrieve properties of a ManagedObjectReference
        Parameters:
        entityMor - ManagedObjectReference of the entity
        props - 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 exist
        com.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.RuntimeFaultFaultMsg
        Method to retrieve properties of list of ManagedObjectReference
        Parameters:
        entityMors - List of ManagedObjectReference for which the properties needs to be retrieved
        props - Common properties that need to be retrieved for all the ManagedObjectReference passed
        Returns:
        Map of ManagedObjectReference and their corresponding name value pair of properties
        Throws:
        com.vmware.vim25.InvalidPropertyFaultMsg
        com.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.InvalidPropertyFaultMsg
        com.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.RuntimeFaultFaultMsg
        com.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.InvalidPropertyFaultMsg
        com.vmware.vim25.RuntimeFaultFaultMsg