Package com.vmware.general
Class Move
- java.lang.Object
-
- com.vmware.connection.ConnectedVimServiceBase
-
- com.vmware.general.Move
-
@Sample(name="move", description="moves a managed entity from its current location in the inventory to a new location, in a specified folder") public class Move extends ConnectedVimServiceBaseMove This sample moves a managed entity from its current location in the inventory to a new location, in a specified folder. This sample finds both the managed entity and the target folder in the inventory tree before attempting the move. If either of these is not found, an error message displays. Parameters: url [required] : url of the web service username [required] : username for the authentication password [required] : password for the authentication entityname [required] : name of the inventory object - a managed entity foldername [required] : name of folder to move inventory object into Command Line: Move an inventory object into the target folder: run.bat com.vmware.general.Move --url [webserviceurl] --username [username] --password [password] --entityname [inventory object name] --foldername [target folder name]
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vmware.connection.ConnectedVimServiceBase
ConnectedVimServiceBase.ConnectionException
-
-
Field Summary
-
Fields inherited from class com.vmware.connection.ConnectedVimServiceBase
PROP_ME_NAME, SVC_INST_NAME
-
-
Constructor Summary
Constructors Constructor Description Move()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetTaskResultAfterDone(com.vmware.vim25.ManagedObjectReference task)This method returns a boolean value specifying whether the Task is succeeded or failed.voidmove()voidsetEntityname(java.lang.String entityname)voidsetFoldername(java.lang.String foldername)-
Methods inherited from class com.vmware.connection.ConnectedVimServiceBase
basicConnectionFromConnection, connect, disconnect, getServiceInstanceReference, setConnection, setHostConnection
-
-
-
-
Method Detail
-
setEntityname
@Option(name="entityname", description="name of the inventory object - a managed entity") public void setEntityname(java.lang.String entityname)
-
setFoldername
@Option(name="foldername", description="name of folder to move inventory object into") public void setFoldername(java.lang.String foldername)
-
getTaskResultAfterDone
public boolean getTaskResultAfterDone(com.vmware.vim25.ManagedObjectReference task) throws com.vmware.vim25.InvalidPropertyFaultMsg, com.vmware.vim25.RuntimeFaultFaultMsg, com.vmware.vim25.InvalidCollectorVersionFaultMsgThis method returns a boolean value specifying whether the Task is succeeded or failed.- Parameters:
task- ManagedObjectReference representing the Task.- Returns:
- boolean value representing the Task result.
- Throws:
com.vmware.vim25.InvalidCollectorVersionFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsgcom.vmware.vim25.InvalidPropertyFaultMsg
-
move
@Action public void move() throws com.vmware.vim25.InvalidPropertyFaultMsg, com.vmware.vim25.RuntimeFaultFaultMsg, com.vmware.vim25.DuplicateNameFaultMsg, com.vmware.vim25.InvalidFolderFaultMsg, com.vmware.vim25.InvalidStateFaultMsg, com.vmware.vim25.InvalidCollectorVersionFaultMsg- Throws:
com.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsgcom.vmware.vim25.DuplicateNameFaultMsgcom.vmware.vim25.InvalidFolderFaultMsgcom.vmware.vim25.InvalidStateFaultMsgcom.vmware.vim25.InvalidCollectorVersionFaultMsg
-
-