Class 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 ConnectedVimServiceBase
     Move
    
     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]
     
    • Constructor Detail

      • Move

        public Move()
    • 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.InvalidCollectorVersionFaultMsg
        This 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.InvalidCollectorVersionFaultMsg
        com.vmware.vim25.RuntimeFaultFaultMsg
        com.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.InvalidPropertyFaultMsg
        com.vmware.vim25.RuntimeFaultFaultMsg
        com.vmware.vim25.DuplicateNameFaultMsg
        com.vmware.vim25.InvalidFolderFaultMsg
        com.vmware.vim25.InvalidStateFaultMsg
        com.vmware.vim25.InvalidCollectorVersionFaultMsg