net

package
v0.0.1-beta.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

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.VMContext,
	client *client.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