Documentation ¶
Index ¶
- func AddIgnoreUnknownArgs() error
- func AssignIPToContainerIntf(netns string, containerInfo map[string]string) (*types.Result, error)
- func ConnectToVRSOVSDB(conf *config.Config) (vrsSdk.VRSConnection, error)
- func DeleteVethPair(brPort string, entityPort string) error
- func GetContainerNuageMetadata(nuageMetadata *NuageMetadata, args *skel.CmdArgs) error
- func GetNuagePortName(uuid string) string
- func IsVSPFunctional() bool
- func SetDefaultsForNuageCNIConfig(conf *config.Config)
- func SetupVEth(netns string, containerInfo map[string]string, mtu int) (contVethMAC string, err error)
- type Args
- type K8sArgs
- type Mesos
- type NetConf
- type NetworkInfo
- type NuageMetadata
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 ¶
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 ¶
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 ¶
GetNuagePortName creates a unique port name for container host port entry
func IsVSPFunctional ¶
func IsVSPFunctional() bool
func SetDefaultsForNuageCNIConfig ¶
SetDefaultsForNuageCNIConfig will set default values for Nuage CNI yaml parameters if they have not been set
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