Class VCUtil
- java.lang.Object
-
- com.vmware.spbm.connection.helpers.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 aManagedObjectReferencestatic 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.
-
-
-
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 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
-
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 forfilterProps- Properties list to filterendWaitProps- Properties list to check for expected values these be properties of a property in the filter properties listexpectedVals- values for properties to end the wait- Returns:
- true indicating expected values were met, and false otherwise
- Throws:
com.vmware.vim25.RuntimeFaultFaultMsgcom.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.InvalidCollectorVersionFaultMsg
-
-