client

package
v5.3.2-1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 23, 2018 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddIgnoreUnknownArgs

func AddIgnoreUnknownArgs() error

AddIgnoreUnknownArgs appends the 'IgnoreUnknown=1' option to CNI_ARGS before calling the CNI plugin. Otherwise, it will complain about the Kubernetes arguments. See https://github.com/kubernetes/kubernetes/pull/24983

func AssignIPToContainerIntf

func AssignIPToContainerIntf(netns string, containerInfo map[string]string) (*types.Result, error)

AssignIPToContainerIntf will configure the container end of the veth interface with IP address assigned by the Nuage CNI plugin

func ConnectToVRSOVSDB

func ConnectToVRSOVSDB(conf *config.Config) (vrsSdk.VRSConnection, error)

ConnectToVRSOVSDB will try connecting to VRS OVSDB via unix socket connection

func DeleteVethPair

func DeleteVethPair(brPort string, entityPort string) error

DeleteVethPair will help user delete veth pairs on VRS

func GetContainerNuageMetadata

func GetContainerNuageMetadata(nuageMetadata *NuageMetadata, args *skel.CmdArgs) error

GetContainerNuageMetadata populates NuageMetadata struct with network information from labels passed from CNI NetworkProtobuf

func GetNuagePortName

func GetNuagePortName(uuid string) string

GetNuagePortName creates a unique port name for container host port entry

func IsVSPFunctional

func IsVSPFunctional() bool

func SetDefaultsForNuageCNIConfig

func SetDefaultsForNuageCNIConfig(conf *config.Config)

SetDefaultsForNuageCNIConfig will set default values for Nuage CNI yaml parameters if they have not been set

func SetupVEth

func SetupVEth(netns string, containerInfo map[string]string, mtu int) (contVethMAC string, err error)

SetupVEth will set up veth pair for container to be connected to Nuage defined VSD network

Types

type Args

type Args struct {
	Mesos Mesos `json:"org.apache.mesos,omitempty"`
}

Args will hold the network metadata info to be passed to CNI plugins

type K8sArgs

type K8sArgs struct {
	types.CommonArgs
	IP                         net.IP
	K8S_POD_NAME               types.UnmarshallableString
	K8S_POD_NAMESPACE          types.UnmarshallableString
	K8S_POD_INFRA_CONTAINER_ID types.UnmarshallableString
}

K8sArgs is the valid CNI_ARGS used for Kubernetes

type Mesos

type Mesos struct {
	NetworkInfo NetworkInfo `json:"network_info"`
}

Mesos will hold the network information that will be passed to CNI plugins by Mesos runtime

type NetConf

type NetConf struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Hostname string `json:"hostname"`
	Args     Args   `json:"args"`
}

NetConf stores the common network config for Nuage CNI plugin

type NetworkInfo

type NetworkInfo struct {
	Name   string `json:"name"`
	Labels struct {
		Labels []struct {
			Key   string `json:"key"`
			Value string `json:"value"`
		} `json:"labels,omitempty"`
	} `json:"labels,omitempty"`
}

NetworkInfo defines CNI network name and network metadata labels that will be passed by CNI

type NuageMetadata

type NuageMetadata struct {
	Enterprise        string
	Domain            string
	Zone              string
	Network           string
	User              string
	PolicyGroup       string
	StaticIP          string
	RedirectionTarget string
}

NuageMetadata will hold metadata needed to resolve a port using Nuage defined overlay network

Jump to

Keyboard shortcuts

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