Class RemoveVirtualSwitch


  • @Sample(name="remove-virtual-switch",
            description="removes a virtual switch")
    public class RemoveVirtualSwitch
    extends ConnectedVimServiceBase
     RemoveVirtualSwitch
    
     This sample removes a virtual switch
    
     Parameters:
     url             [required] : url of the web service
     username        [required] : username for the authentication
     password        [required] : password for the authentication
     vswitchid       [required] : Name of the switch to be added
     hostname        [required] : Name of the host
    
     Command Line:
     Remove a Virtual Switch
     run.bat com.vmware.host.RemoveVirtualSwitch --url [webserviceurl]
     --username [username] --password  [password]
     --vswitchid [mySwitch] --hostname [hostname]
     
    • Constructor Detail

      • RemoveVirtualSwitch

        public RemoveVirtualSwitch()
    • Method Detail

      • setHost

        @Option(name="hostname",
                description="Name of the host")
        public void setHost​(java.lang.String host)
      • setVirtualswitchid

        @Option(name="vswitchid",
                description="Name of the switch to be added")
        public void setVirtualswitchid​(java.lang.String virtualswitchid)
      • run

        @Action
        public void run()
                 throws com.vmware.vim25.RuntimeFaultFaultMsg,
                        com.vmware.vim25.InvalidPropertyFaultMsg
        Throws:
        com.vmware.vim25.RuntimeFaultFaultMsg
        com.vmware.vim25.InvalidPropertyFaultMsg