net

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2021 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrOnLocalOnlyIPAddr

func ErrOnLocalOnlyIPAddr(addr string) error

ErrOnLocalOnlyIPAddr returns an error if the provided IP address is accessible only on the VM's guest OS.

Types

type NetworkStatus

type NetworkStatus struct {
	// Connected is a flag that indicates whether this network is currently
	// connected to the VM.
	Connected bool `json:"connected,omitempty"`

	// IPAddrs is one or more IP addresses reported by vm-tools.
	// +optional
	IPAddrs []string `json:"ipAddrs,omitempty"`

	// MACAddr is the MAC address of the network device.
	MACAddr string `json:"macAddr"`

	// NetworkName is the name of the network.
	// +optional
	NetworkName string `json:"networkName,omitempty"`
}

NetworkStatus provides information about one of a VM's networks.

func GetNetworkStatus

func GetNetworkStatus(
	ctx context.Context,
	client *vim25.Client,
	moRef types.ManagedObjectReference) ([]NetworkStatus, error)

GetNetworkStatus returns the network information for the specified VM.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL