Class VCUtil


  • public class VCUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      VCUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<java.lang.String,​java.lang.Object> getEntityProps​(Connection connection, com.vmware.vim25.ManagedObjectReference entityMor, java.lang.String[] props)
      Method to retrieve properties of a ManagedObjectReference
      static java.lang.Object[] waitForTask​(Connection connection, com.vmware.vim25.ManagedObjectReference objmor, java.lang.String[] filterProps, java.lang.String[] endWaitProps, java.lang.Object[][] expectedVals)
      Handle Updates for a single object.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VCUtil

        public VCUtil()
    • Method Detail

      • getEntityProps

        public static java.util.Map<java.lang.String,​java.lang.Object> getEntityProps​(Connection connection,
                                                                                            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
      • waitForTask

        public static java.lang.Object[] waitForTask​(Connection connection,
                                                     com.vmware.vim25.ManagedObjectReference objmor,
                                                     java.lang.String[] filterProps,
                                                     java.lang.String[] endWaitProps,
                                                     java.lang.Object[][] expectedVals)
                                              throws com.vmware.vim25.InvalidPropertyFaultMsg,
                                                     com.vmware.vim25.RuntimeFaultFaultMsg,
                                                     com.vmware.vim25.InvalidCollectorVersionFaultMsg
        Handle Updates for a single object. waits till expected values of properties to check are reached Destroys the ObjectFilter when done.
        Parameters:
        objmor - MOR of the Object to wait for
        filterProps - Properties list to filter
        endWaitProps - Properties list to check for expected values these be properties of a property in the filter properties list
        expectedVals - values for properties to end the wait
        Returns:
        true indicating expected values were met, and false otherwise
        Throws:
        com.vmware.vim25.RuntimeFaultFaultMsg
        com.vmware.vim25.InvalidPropertyFaultMsg
        com.vmware.vim25.InvalidCollectorVersionFaultMsg