Files
deb-python-pyvmomi/docs/vim/host/NetworkSystem.rst
Shawn Hartsock c83651f5be pyvmomi RST docs do not properly show lists
Fixes RST documents to include list mark up when appropriate.

closes: https://github.com/vmware/pyvmomi/issues/76
2014-08-13 14:49:24 -04:00

24 KiB

vim.host.NetworkSystem

This managed object type describes networking host configuration and serves as the top level container for relevant networking data objects.

extends

vim.ExtensibleManagedObject

Attributes

capabilities (vim.host.NetCapabilities):

Capability vector indicating the available product features.

networkInfo (vim.host.NetworkInfo):

The network configuration and runtime information.

offloadCapabilities (vim.host.NetOffloadCapabilities):

The offload capabilities available on this server.

networkConfig (vim.host.NetworkConfig):

Network configuration information. This information can be applied using the updateNetworkConfig() method. The information is a strict subset of the information available in NetworkInfo.See HostNetworkInfo

dnsConfig (vim.host.DnsConfig):

Client-side DNS configuration.

ipRouteConfig (vim.host.IpRouteConfig):

The IP route configuration.

consoleIpRouteConfig (vim.host.IpRouteConfig):

IP route configuration for the service console. The IP route configuration is global to the entire host. This property is set only if IP routing can be configured for the service console.

Methods

UpdateNetworkConfig(config, changeMode):

Applies the network configuration. This method operates primarily in two modes:replaceormodifymode.replaceWhen called inreplacemode, this method applies the fully specified networking configuration to the networking system.Upon successful completion of the call, the state of networking will match the configuration specified inconfig. In general, objects are created or destroyed to match the elements in the array of configurations. The identifier field in each element in an array of configurations is used to match an existing network entity. The state of existing network entities is patched to match that of the configuration.An exception to this approach applies to the array of PhysicalNic.Config objects. The cardinality of physical network adapters cannot be changed through this operation. Thus, the identifier of every element in the array must match an existing PhysicalNic. If there are fewer elements in the array than there are existing PhysicalNics, then no change is made on the unreferenced PhysicalNic objects.If the call fails, the networking error is returned as an exception and the state of networking reverts to the state prior to the start of the call.modifyWhen called inmodifymode, only changes that are specified are made. For singleton entities like DnsConfig, the state is changed only if the data object is set. For array elements, there is an Operation field that indicates if the element should be added, removed, or edited. In the case of editing or removal, the entity must exist or an exception is thrown. In the case of adding, a specification needs to be provided.It returns device names of vmkernel and service console virtual network adapter added to the system.Currently, the only mode that is implemented is incremental mode. Only add operations are supported for instances. Singleton configuration is not supported. The dynamic privilege check will ensure that users have Host.Config.Network privilege on the host, and Network.Assign privilege on the connecting DVPortGroup, or DVS if connecting to a standalone DVPort. Network.Assign privilege is not required for operations on standard network or for operations performed directly on the hostSee HostConfigChangeMode

Privilege:

dynamic

Args:
config (vim.host.NetworkConfig):

See HostConfigChangeMode

changeMode (str):

See HostConfigChangeMode

Returns:

vim.host.NetworkConfig.Result:

Raises:

vim.fault.AlreadyExists:

when a network entity specified in the configuration already exists.See HostConfigChangeMode

vim.fault.NotFound:

when a network entity specified in the configuration already exists.See HostConfigChangeMode

vim.fault.HostConfigFault:

for all other configuration failures.See HostConfigChangeMode

vim.fault.ResourceInUse:

See HostConfigChangeMode

vmodl.fault.InvalidArgument:

if an invalid parameter is passed in for one of the networking objects.See HostConfigChangeMode

vmodl.fault.NotSupported:

if modify mode is not used, a remove or set operation is specified for an instance, or a singleton entity is configured.See HostConfigChangeMode

UpdateDnsConfig(config):

Applies the client-side DNS configuration.

Privilege:

Host.Config.Network

Args:

config (vim.host.DnsConfig):

Returns:

None

Raises:

vim.fault.NotFound:

when the DHCP virtual network adapter specified does not exist.

vim.fault.HostConfigFault:

for all other configuration failures.

vmodl.fault.InvalidArgument:

if any of the IP addresses are invalid, or for a DHCP DNS, if the DHCP virtual network adapter is not specified or the virtual network adapter specified is not DHCP enabled.

vmodl.fault.NotSupported:

if the host is not an ESX Server system.

vim.fault.HostInDomain:

if an attempt is made to change the host or domain name while the host is part of a Windows domain.

UpdateIpRouteConfig(config):

Applies the IP route configuration.

Privilege:

Host.Config.Network

Args:

config (vim.host.IpRouteConfig):

Returns:

None

Raises:

vim.fault.HostConfigFault:

for all other configuration failures.

vim.fault.InvalidState:

if the an ipv6 address is specified in an ipv4 only system

vmodl.fault.InvalidArgument:

if any of the IP addresses are invalid.

vmodl.fault.NotSupported:

if the host is not an ESX Server system.

UpdateConsoleIpRouteConfig(config):

Applies the IP route configuration for the service console.

Privilege:

Host.Config.Network

Args:

config (vim.host.IpRouteConfig):

Returns:

None

Raises:

vim.fault.HostConfigFault:

for all other configuration failures.

vmodl.fault.InvalidArgument:

if any of the IP addresses are invalid.

vmodl.fault.NotSupported:

if the host is not an ESX Server system.

UpdateIpRouteTableConfig(config):

Applies the IP route table configuration. since: vSphere API 4.0

Privilege:

Host.Config.Network

Args:

config (vim.host.IpRouteTableConfig):

Returns:

None

Raises:

vim.fault.HostConfigFault:

for all other configuration failures.

vmodl.fault.InvalidArgument:

if any of the IP addresses are invalid.

vmodl.fault.NotSupported:

if the host is not an ESX Server system.

AddVirtualSwitch(vswitchName, spec):

Adds a new virtual switch to the system with the given name. The name must be unique with respect to other virtual switches on the host and is limited to 32 characters.See UpdateVirtualSwitch

Privilege:

Host.Config.Network

Args:
vswitchName (str):

See UpdateVirtualSwitch

spec (vim.host.VirtualSwitch.Specification, optional):

See UpdateVirtualSwitch

Returns:

None

Raises:

vim.fault.AlreadyExists:

if the virtual switch already exists.See UpdateVirtualSwitch

vim.fault.ResourceInUse:

if the physical network adapter being bridged is already in use.See UpdateVirtualSwitch

vim.fault.HostConfigFault:

for all other configuration failures.See UpdateVirtualSwitch

vmodl.fault.InvalidArgument:

if network vswitchName exceeds the maximum allowed length, or the number of ports specified falls out of valid range, or the network policy is invalid, or beacon configuration is invalid.See UpdateVirtualSwitch

RemoveVirtualSwitch(vswitchName):

Removes an existing virtual switch from the system.

Privilege:

Host.Config.Network

Args:

vswitchName (str):

Returns:

None

Raises:

vim.fault.NotFound:

if the virtual switch does not exist.

vim.fault.ResourceInUse:

if there are virtual network adapters associated with the virtual switch.

vim.fault.HostConfigFault:

for all other configuration failures.

UpdateVirtualSwitch(vswitchName, spec):

Updates the properties of the virtual switch.If the bridge is NULL, the configuration will be unset.If a network adapter is listed in the active or standby list, then changing the set of network adapters to which the physical network adapter is associated may have a side effect of changing the network adapter order policy. If a network adapter is removed from the bridge configuration, then the network adapter is removed from the network adapter teaming order.The BondBridge configuration is the only valid bridge configuration for an ESX Server system.See HostNicOrderPolicy

Privilege:

Host.Config.Network

Args:
vswitchName (str):

See HostNicOrderPolicy

spec (vim.host.VirtualSwitch.Specification):

See HostNicOrderPolicy

Returns:

None

Raises:

vim.fault.ResourceInUse:

if the physical network adapter being bridged is already in use.See HostNicOrderPolicy

vim.fault.NotFound:

if the virtual switch does not exist.See HostNicOrderPolicy

vim.fault.HostConfigFault:

for all other configuration failures.See HostNicOrderPolicy

vmodl.fault.InvalidArgument:

if the bridge parameter is bad or the network policy is invalid or does not exist or the number of ports specified falls out of valid range, or the beacon configuration is invalid.See HostNicOrderPolicy

vmodl.fault.NotSupported:

if network adapter teaming policy is set but is not supported.See HostNicOrderPolicy

AddPortGroup(portgrp):

Adds a port group to the virtual switch.

Privilege:

Host.Config.Network

Args:

portgrp (vim.host.PortGroup.Specification):

Returns:

None

Raises:

vim.fault.AlreadyExists:

if the port group already exists.

vim.fault.NotFound:

if the virtual switch does not exist.

vim.fault.HostConfigFault:

for all other configuration failures.

vmodl.fault.InvalidArgument:

if the PortGroup vlanId is invalid. Valid vlanIds range from [0,4095], where 0 means no vlan tagging. Exception is also thrown if network policy is invalid.

RemovePortGroup(pgName):

Removes port group from the virtual switch.

Privilege:

Host.Config.Network

Args:

pgName (str):

Returns:

None

Raises:

vim.fault.NotFound:

if the port group or virtual switch does not exist.

vim.fault.ResourceInUse:

if the port group can not be removed because there are virtual network adapters associated with it.

vim.fault.HostConfigFault:

for all other configuration failures.

UpdatePortGroup(pgName, portgrp):

Reconfigures a port group on the virtual switch.

Privilege:

Host.Config.Network

Args:

pgName (str):

portgrp (vim.host.PortGroup.Specification):

Returns:

None

Raises:

vim.fault.AlreadyExists:

if the update causes the port group to conflict with an existing port group.

vim.fault.NotFound:

if the port group or virtual switch does not exist.

vim.fault.HostConfigFault:

for all other configuration failures.

vmodl.fault.InvalidArgument:

if the PortGroup vlanId is invalid. Valid vlanIds range from [0,4095], where 0 means no vlan tagging. Exception is also thrown if network policy is invalid.

UpdatePhysicalNicLinkSpeed(device, linkSpeed):

Configures link speed and duplexity. If linkSpeed is not specified, physical network adapter will be set to autonegotiate.See canSetPhysicalNicLinkSpeed

Privilege:

Host.Config.Network

Args:
device (str):

See canSetPhysicalNicLinkSpeed

linkSpeed (vim.host.PhysicalNic.LinkSpeedDuplex, optional):

See canSetPhysicalNicLinkSpeed

Returns:

None

Raises:

vim.fault.NotFound:

if the physical network adapter does not exist.See canSetPhysicalNicLinkSpeed

vim.fault.HostConfigFault:

for all other configuration failures.See canSetPhysicalNicLinkSpeed

vmodl.fault.NotSupported:

if the host is not an ESX Server system.See canSetPhysicalNicLinkSpeed

vmodl.fault.InvalidArgument:

if the speed and duplexity is not one of the valid configurations.See canSetPhysicalNicLinkSpeed

QueryNetworkHint(device):

Requests network hint information for a physical network adapter. A network hint is some information about the network to which the physical network adapter is attached. The method receives in a list of physical network adapter devices and returns an equal number of hints if some devices are provided. If the list of devices is empty, then the method accesses hints for all physical network adapters.See supportsNetworkHints See device

Privilege:

System.Read

Args:
device (str, optional):

See supportsNetworkHints See device

Returns:

[vim.host.PhysicalNic.NetworkHint]:

Raises:

vim.fault.NotFound:

if a specified physical network adapter does not exist.See supportsNetworkHints See device

vim.fault.HostConfigFault:

for all other configuration failures.See supportsNetworkHints See device

vmodl.fault.InvalidArgument:

if the speed and duplexity combination is not valid for the current link driver.See supportsNetworkHints See device

vmodl.fault.NotSupported:

if the host is not an ESX Server system.See supportsNetworkHints See device

AddVirtualNic(portgroup, nic):

Adds a virtual host/VMkernel network adapter. Returns the device of the virtual network adapter.IP configuration is required although it does not have to be enabled if the host is an ESX Server system. The dynamic privilege check will ensure that users have Host.Config.Network privilege on the host, and Network.Assign privilege on the connecting DVPortGroup, or DVS if connecting to a standalone DVPort. Network.Assign privilege is not required for operations on standard network or for operations performed directly on the host.

Privilege:

dynamic

Args:
portgroup (str):

Note: Must be the empty string in case nic.distributedVirtualPort is set.

nic (vim.host.VirtualNic.Specification):

Returns:

str:

Raises:

vim.fault.AlreadyExists:

if the portgroup already has a virtual network adapter.

vim.fault.HostConfigFault:

for all other configuration failures.

vim.fault.InvalidState:

if the an ipv6 address is specified in an ipv4 only system

vmodl.fault.InvalidArgument:

if the IP address or subnet mask in the IP configuration are invalid. In the case of an ESX Server system, DHCP is not supported and this exception will be thrown if DHCP is specified. Exception may also be thrown if the named PortGroup does not exist.

RemoveVirtualNic(device):

Removes a virtual host/VMkernel network adapter.

Privilege:

Host.Config.Network

Args:

device (str):

Returns:

None

Raises:

vim.fault.NotFound:

if the virtual network adapter cannot be found.

vim.fault.HostConfigFault:

for all other configuration failures.

UpdateVirtualNic(device, nic):

Configures virtual host/VMkernel network adapter.IP configuration is required although it does not have to be enabled if the host is an ESX Server system. The dynamic privilege check will ensure that users have Host.Config.Network privilege on the host, and Network.Assign privilege on the connecting DVPortGroup, or DVS if connecting to a standalone DVPort. Network.Assign privilege is not required for operations on standard network or for operations performed directly on the host.

Privilege:

dynamic

Args:

device (str):

nic (vim.host.VirtualNic.Specification):

Returns:

None

Raises:

vim.fault.NotFound:

if the virtual network adapter cannot be found.

vim.fault.HostConfigFault:

for all other configuration failures.

vim.fault.InvalidState:

if the an ipv6 address is specified in an ipv4 only system

vmodl.fault.InvalidArgument:

if the IP address or subnet mask in the IP configuration are invalid. In the case of an ESX Server system, DHCP is not supported and this exception is thrown if DHCP is specified. Exception may also be thrown if the named PortGroup does not exist.

AddServiceConsoleVirtualNic(portgroup, nic):

Adds a virtual service console network adapter. Returns the device of the VirtualNic.IP configuration is required although it does not have to be enabled if the host is an ESX Server system. The dynamic privilege check will ensure that users have Host.Config.Network privilege on the host, and Network.Assign privilege on the connecting DVPortGroup, or DVS if connecting to a standalone DVPort. Network.Assign privilege is not required for operations on standard network or for operations performed directly on the hostSee usesServiceConsoleNic

Privilege:

dynamic

Args:
portgroup (str):

See usesServiceConsoleNic

nic (vim.host.VirtualNic.Specification):

See usesServiceConsoleNic

Returns:

str:

Raises:

vim.fault.HostConfigFault:

for all other configuration failures.See usesServiceConsoleNic

vmodl.fault.InvalidArgument:

if the IP address or subnet mask in the IP configuration are invalid or the named PortGroup does not exist.See usesServiceConsoleNic

vmodl.fault.NotSupported:

if the host is not an ESX Server system.See usesServiceConsoleNic

RemoveServiceConsoleVirtualNic(device):

Removes a virtual service console network adapter.See usesServiceConsoleNic

Privilege:

Host.Config.Network

Args:
device (str):

See usesServiceConsoleNic

Returns:

None

Raises:

vim.fault.NotFound:

if the virtual network adapter cannot be found.See usesServiceConsoleNic

vim.fault.ResourceInUse:

if the network adapter is currently used by DHCP DNS.See usesServiceConsoleNic

vim.fault.HostConfigFault:

for all other configuration failures.See usesServiceConsoleNic

vmodl.fault.NotSupported:

if the host is not an ESX Server system.See usesServiceConsoleNic

UpdateServiceConsoleVirtualNic(device, nic):

Configures the IP configuration for a virtual service console network adapter.IP configuration is required although it does not have to be enabled if the host is an ESX Server system. The dynamic privilege check will check that the users have Network.Assign privilege on the DVPortGroup or the DVS if the port resides on a DVPortGroup or is a stand-alone DVS port.See usesServiceConsoleNic

Privilege:

dynamic

Args:
device (str):

See usesServiceConsoleNic

nic (vim.host.VirtualNic.Specification):

See usesServiceConsoleNic

Returns:

None

Raises:

vim.fault.NotFound:

if the virtual network adapter cannot be found.See usesServiceConsoleNic

vim.fault.ResourceInUse:

if tries to turn of DHCP while the network adapter is currently used by DHCP DNS.See usesServiceConsoleNic

vim.fault.HostConfigFault:

for all other configuration failures.See usesServiceConsoleNic

vmodl.fault.InvalidArgument:

if the IP address or subnet mask in the IP configuration are invalid or the named PortGroup does not exist.See usesServiceConsoleNic

vmodl.fault.NotSupported:

if the host is not an ESX Server system.See usesServiceConsoleNic

RestartServiceConsoleVirtualNic(device):

Restart the service console virtual network adapter interface. If the service console virtual network adapter uses DHCP, restarting the interface may result it with a different IP configuration, or even fail to be brought up depending on the host system network configuration.See usesServiceConsoleNic

Privilege:

Host.Config.Network

Args:
device (str):

See usesServiceConsoleNic

Returns:

None

Raises:

vim.fault.NotFound:

if the virtual network adapter cannot be found.See usesServiceConsoleNic

vim.fault.HostConfigFault:

for all other configuration failures.See usesServiceConsoleNic

vmodl.fault.NotSupported:

if the host is not an ESX Server system.See usesServiceConsoleNic

RefreshNetworkSystem():

Refresh the network information and settings to pick up any changes that might have occurred.

Privilege:

Host.Config.Network

Args:

Returns:

None