util

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2018 License: Apache-2.0 Imports: 21 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) error

GatewayInit creates a gateway router for the local chassis.

func GenerateMac

func GenerateMac() string

GenerateMac generates mac address.

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 PathExist

func PathExist(path string) bool

PathExist checks the path exist or not.

func RunOVNNbctl

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

RunOVNNbctl runs a command via ovn-nbctl.

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 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