Package com.vmware.host
Class RemoveVirtualNic
- java.lang.Object
-
- com.vmware.connection.ConnectedVimServiceBase
-
- com.vmware.host.RemoveVirtualNic
-
@Sample(name="remove-virtual-nic", description="removes a Virtual Nic from a PortGroup on a vSwitch") public class RemoveVirtualNic extends ConnectedVimServiceBaseRemoveVirtualNic This sample removes a Virtual Nic from a PortGroup on a vSwitch Parameters: url [required] : url of the web service username [required] : username for the authentication password [required] : password for the authentication portgroupname [required] : Name of port group to remove Virtual Nic from hostname [required] : Name of host datacentername [optional] : Name of datacenter Command Line: Remove a VirtualNic from a PortGroup run.bat com.vmware.host.RemoveVirtualNic --url [webserviceurl] --username [username] --password [password] --datacentername [mydatacenter] --portgroupname [myportgroup] --hostname [hostname] Remove a VirtualNic from a PortGroup without hostname run.bat com.vmware.host.RemoveVirtualNic --url [webserviceurl] --username [username] --password [password] --datacentername [mydatacenter] --portgroupname [myportgroup] Remove a VirtualNic from a PortGroup without datacentername run.bat com.vmware.host.RemoveVirtualNic --url [webserviceurl] --username [username] --password [password] --portgroupname [myportgroup] --hostname [name of the host]
-
-
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 RemoveVirtualNic()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun()voidsetDatacenter(java.lang.String datacenter)voidsetHost(java.lang.String host)voidsetPortgroupname(java.lang.String portgroupname)-
Methods inherited from class com.vmware.connection.ConnectedVimServiceBase
basicConnectionFromConnection, connect, disconnect, getServiceInstanceReference, setConnection, setHostConnection
-
-
-
-
Method Detail
-
setDatacenter
@Option(name="datacentername", required=false, description="Name of datacenter") public void setDatacenter(java.lang.String datacenter)
-
setHost
@Option(name="hostname", description="name of host") public void setHost(java.lang.String host)
-
setPortgroupname
@Option(name="portgroupname", description="Name of port group to remove Virtual Nic from") public void setPortgroupname(java.lang.String portgroupname)
-
run
@Action public void run()
-
-