util

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2018 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BridgeToNic added in v0.3.0

func BridgeToNic(bridge string) error

BridgeToNic moves the IP address and routes of internal port of the bridge to underlying NIC interface and deletes the OVS bridge.

func GatewayInit

func GatewayInit(clusterIPSubnet, nodeName, nicIP, physicalInterface,
	bridgeInterface, defaultGW, rampoutIPSubnet string,
	gatewayLBEnable bool) error

GatewayInit creates a gateway router for the local chassis.

func GenerateMac

func GenerateMac() string

GenerateMac generates mac address.

func GetExec added in v0.3.11

func GetExec() kexec.Interface

GetExec returns the exec interface which can be used for running commands directly. Only use for passing an exec interface into pkg/config which cannot call this function directly because this module imports pkg/config already.

func GetK8sClusterRouter

func GetK8sClusterRouter() (string, error)

GetK8sClusterRouter returns back the OVN distibuted router

func GetNicName added in v0.3.0

func GetNicName(brName string) string

GetNicName returns the physical NIC name, given an OVS bridge name configured by NicToBridge()

func NewClientset added in v0.2.0

func NewClientset(conf *config.KubernetesConfig) (*kubernetes.Clientset, error)

NewClientset creates a Kubernetes clientset from either a kubeconfig, TLS properties, or an apiserver URL

func NextIP

func NextIP(ip net.IP) net.IP

NextIP returns IP incremented by 1

func NicToBridge

func NicToBridge(iface string) (string, error)

NicToBridge creates a OVS bridge for the 'iface' and also moves the IP address and routes of 'iface' to OVS bridge.

func RawExec added in v0.3.11

func RawExec(cmdPath string, args ...string) (string, string, error)

RawExec runs the given command via the exec interface. Should only be used for early calls before configuration is read.

func RemoveNode added in v0.3.11

func RemoveNode(nodeName string) error

RemoveNode removes all the NB DB objects created for that node.

func RunIP added in v0.3.11

func RunIP(args ...string) (string, string, error)

RunIP runs a command via the iproute2 "ip" utility

func RunNetsh added in v0.3.11

func RunNetsh(args ...string) (string, string, error)

RunNetsh runs a command via the Windows netsh utility

func RunOVNNbctl

func RunOVNNbctl(args ...string) (string, string, error)

RunOVNNbctl runs a command via ovn-nbctl.

func RunOVNNbctlHA added in v0.3.11

func RunOVNNbctlHA(args ...string) (string, string, error)

RunOVNNbctlHA connects to multiple servers if they are provided as an input. If there is a single server provided, it assumes that it is local and uses Unix domain sockets for the connection.

func RunOVNNbctlUnix added in v0.3.0

func RunOVNNbctlUnix(args ...string) (string, string, error)

RunOVNNbctlUnix runs command via ovn-nbctl, with ovn-nbctl using the unix domain sockets to connect to the ovsdb-server backing the OVN NB database.

func RunOVNNbctlWithTimeout

func RunOVNNbctlWithTimeout(timeout int, args ...string) (string, string,
	error)

RunOVNNbctlWithTimeout runs command via ovn-nbctl with a specific timeout

func RunOVSOfctl added in v0.2.0

func RunOVSOfctl(args ...string) (string, string, error)

RunOVSOfctl runs a command via ovs-ofctl.

func RunOVSVsctl

func RunOVSVsctl(args ...string) (string, string, error)

RunOVSVsctl runs a command via ovs-vsctl.

func RunPowershell added in v0.3.11

func RunPowershell(args ...string) (string, string, error)

RunPowershell runs a command via the Windows powershell utility

func RunRoute added in v0.3.11

func RunRoute(args ...string) (string, string, error)

RunRoute runs a command via the Windows route utility

func SetExec added in v0.3.11

func SetExec(exec kexec.Interface) error

SetExec validates executable paths and saves the given exec interface to be used for running various OVS and OVN utilites

func StringArg

func StringArg(context *cli.Context, name string) (string, error)

StringArg gets the named command-line argument or returns an error if it is empty

Types

This section is empty.

Jump to

Keyboard shortcuts

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