platform

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2019 License: MIT Imports: 8 Imported by: 15

Documentation

Index

Constants

View Source
const (
	// CNMRuntimePath is the path where CNM state files are stored.
	CNMRuntimePath = "/var/lib/azure-network/"

	// CNIRuntimePath is the path where CNI state files are stored.
	CNIRuntimePath = "/var/run/"

	// CNSRuntimePath is the path where CNS state files are stored.
	CNSRuntimePath = "/var/run/"

	// CNI runtime path on a Kubernetes cluster
	K8SCNIRuntimePath = "/opt/cni/bin"

	// Network configuration file path on a Kubernetes cluster
	K8SNetConfigPath = "/etc/cni/net.d"

	// NPMRuntimePath is the path where NPM logging files are stored.
	NPMRuntimePath = "/var/run/"

	// DNCRuntimePath is the path where DNC logging files are stored.
	DNCRuntimePath = "/var/run/"
)

Variables

This section is empty.

Functions

func ClearNetworkConfiguration added in v1.0.16

func ClearNetworkConfiguration() (bool, error)

ClearNetworkConfiguration clears the azure-vnet.json contents. This will be called only when reboot is detected - This is windows specific

func ConvertStringToIPAddress

func ConvertStringToIPAddress(address string) net.IP

ConvertStringToIPAddress converts the given IP address string to a net.IP object. The input string can be in regular dotted notation or CIDR notation.

func ConvertStringToIPNet

func ConvertStringToIPNet(address string) (*net.IPNet, error)

ConvertStringToIPNet converts the given IP address string to a net.IPNet object.

func CreateDefaultExtNetwork added in v1.0.19

func CreateDefaultExtNetwork(networkType string) error

CreateDefaultExtNetwork creates the default ext network (if it doesn't exist already) to create external switch on windows platform. This is windows platform specific.

func CreateHnsNetwork added in v1.0.19

func CreateHnsNetwork(nwConfig cns.CreateHnsNetworkRequest) error

CreateHnsNetwork creates the HNS network with the provided configuration This is windows platform specific.

func DeleteDefaultExtNetwork added in v1.0.19

func DeleteDefaultExtNetwork() error

DeleteDefaultExtNetwork deletes the default HNS network. This is windows platform specific.

func DeleteHnsNetwork added in v1.0.19

func DeleteHnsNetwork(networkName string) error

DeleteHnsNetwork deletes the HNS network with the provided name. This is windows platform specific.

func ExecuteCommand added in v1.0.8

func ExecuteCommand(command string) (string, error)

func GenerateAddress

func GenerateAddress(subnet *net.IPNet, hostID net.IP) net.IP

GenerateAddress generates an IP address from the given network and host ID.

func GetLastRebootTime added in v1.0.0

func GetLastRebootTime() (time.Time, error)

GetLastRebootTime returns the last time the system rebooted.

func GetOSInfo

func GetOSInfo() string

GetOSInfo returns OS version information.

func KillProcessByName added in v1.0.18

func KillProcessByName(processName string) error

func SetOutboundSNAT

func SetOutboundSNAT(subnet string) error

func SetSdnRemoteArpMacAddress

func SetSdnRemoteArpMacAddress() error

SetSdnRemoteArpMacAddress sets the regkey for SDNRemoteArpMacAddress needed for multitenancy This operation is specific to windows OS

Types

type AddressFamily

type AddressFamily int

AddressFamily specifies a protocol address family number.

const (
	AfUnspec AddressFamily = 0
	AfINET   AddressFamily = 0x2
	AfINET6  AddressFamily = 0xa
)

func GetAddressFamily

func GetAddressFamily(address *net.IP) AddressFamily

GetAddressFamily returns the address family of an IP address.

Jump to

Keyboard shortcuts

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