network

package
v1.34.3 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VMSwitch string

Functions

func AddHostEntryToInstance added in v1.25.0

func AddHostEntryToInstance(driver drivers.Driver, hostname string, ipAddress string)

AddHostEntryToInstance will add an entry to /etc/hosts

func AddNameserversToInstance added in v1.15.0

func AddNameserversToInstance(driver drivers.Driver, nameservers []string)

AddNameserversToInstance will add additional nameservers to the end of the /etc/resolv.conf file inside the instance.

func CheckInternetConnectivity added in v1.15.0

func CheckInternetConnectivity(address string) bool

CheckInternetConnectivity return false if user is not connected to internet

func ConfigureDynamicAssignment added in v1.15.0

func ConfigureDynamicAssignment(driver drivers.Driver)

ConfigureDynamicAssignment will write configuration files which will force DHCP assignment, which will be used by minishift-set-ipaddress on start of the instance.

func ConfigureNetworking

func ConfigureNetworking(machineName string, networkSettings NetworkSettings)

func ConfigureStaticAssignment added in v1.15.0

func ConfigureStaticAssignment(driver drivers.Driver) (string, error)

ConfigureStaticAssignment will collect NetworkSettings from the current running instance and write this the values as configuration files, which will be used by minishift-set-ipaddress on start of the instance.

func DetermineHostIP added in v1.15.0

func DetermineHostIP(driver drivers.Driver) (string, error)

func GetIP added in v1.15.0

func GetIP(driver drivers.Driver) (string, error)

This will return the address as used by libmachine

func GetVMSwitchId added in v1.26.0

func GetVMSwitchId() string

GetVMSwitchId returns the ID of the vswitch in use by the running minishift vm on hyperv

func GetVMSwitchName added in v1.26.0

func GetVMSwitchName() string

GetVMSwitchName returns the name of the vswitch in use by the running minishift vm on hyperv

func HasNameserverConfiguredLocally added in v1.16.0

func HasNameserverConfiguredLocally(nameserver string) (bool, error)

func HasNameserversConfigured added in v1.15.0

func HasNameserversConfigured(driver drivers.Driver) bool

HasNameserversConfigured returns true if the instance uses nameservers This is related to an issues when LCOW is used on Windows.

func HostIPs added in v1.15.0

func HostIPs() []string

HostIPs returns the IP addresses assigned to the host

func IsIPReachable added in v1.15.0

func IsIPReachable(driver drivers.Driver, ip string, printOutput bool) bool

IsIPReachable returns true is IP address is reachable from the virtual instance

func IsRetrievable added in v1.15.0

func IsRetrievable(driver drivers.Driver, url string, printOutput bool) bool

func IsUsingDefaultSwitch added in v1.26.0

func IsUsingDefaultSwitch() bool

IsUsingDefaultSwitch returns true if the Default Switch is used before creating the VM

func NetworkContains added in v1.15.0

func NetworkContains(network string, ip string) bool

NetworkContains returns true if the IP address belongs to the network given

func OverrideInsecureSkipVerifyForLocalConnections added in v1.25.0

func OverrideInsecureSkipVerifyForLocalConnections(insecureSkipVerify bool) error

AllowInsecureCertificatesOnLocalConnections will not verify certificates for TLS connections

func OverrideProxyForLocalConnections added in v1.25.0

func OverrideProxyForLocalConnections(proxyAddr string) error

OverrideProxyForLocalConnections will set a single proxy target for the default connection

func WriteNetworkSettingsToInstance added in v1.15.0

func WriteNetworkSettingsToInstance(driver drivers.Driver, networkSettings NetworkSettings) bool

WriteNetworkSettingsToInstance takes NetworkSettings and writes the values as a configuration file to be used by minishift-set-ipaddress

Types

type NetworkSettings

type NetworkSettings struct {
	Device    string
	IPAddress string
	Netmask   string
	Gateway   string
	DNS1      string
	DNS2      string
	UseDHCP   bool
	Disabled  bool
}

func GetNetworkSettingsFromInstance added in v1.15.0

func GetNetworkSettingsFromInstance(driver drivers.Driver) NetworkSettings

GetNetworkSettingsFromInstance will collect various network settings from the running instance and will populate a NetworkSettings struct with these values

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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