util

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

func RestartOvnController() error

RestartOvnController restarts ovn-controller

func RunOVNNbctl

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

RunOVNNbctl runs a command via ovs-nbctl.

func RunOVNNbctlWithTimeout

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

RunOVNNbctlWithTimeout runs command via ovs-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 StartOVS

func StartOVS() error

StartOVS starts OVS service

func StartOvnNorthd

func StartOvnNorthd() error

StartOvnNorthd starts ovn-northd

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