nfn

package
v1.0.1-0...-1280aca Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Ovn4nfvAnnotationTag tag on already processed Pods
	SFCannotationTag = "k8s.plugin.opnfv.org/sfc"
	SFCcreated       = "created"
	SFCprocessing    = "processing"
	SFCNotrequired   = "notrequired"
	SFCHead          = "sfchead"
	SFCTail          = "sfctail"
)

Variables

This section is empty.

Functions

func AddPodNetworkAnnotations

func AddPodNetworkAnnotations(pod corev1.Pod, networkname string, toDelete bool) (string, error)

AddPodNetworkAnnotations returns ...

func CalculateDstforTail

func CalculateDstforTail(networklist []string) ([]string, error)

CalculateDstforTail return ...

func CalculateRoutes

func CalculateRoutes(cr *k8sv1alpha1.NetworkChaining, cs bool, onlyPodSelector bool) ([]PodNetworkInfo, []RoutingInfo, error)

CalculateRoutes returns the routing info

func CheckForOnlyNFLabel

func CheckForOnlyNFLabel(cr *k8sv1alpha1.NetworkChaining) (bool, string, error)

CheckForOnlyNFLabel return

func CheckNetForNetPool

func CheckNetForNetPool(cr *k8sv1alpha1.NetworkChaining) error

CheckNetForNetPool return

func CheckNetFromLabel

func CheckNetFromLabel(label string) error

CheckNetFromLabel return

func CheckPodStatusFromPodLabel

func CheckPodStatusFromPodLabel(podLabel string) (bool, string, error)

CheckPodStatusFromPodLabel return error

func CheckSFCPodLabelStatus

func CheckSFCPodLabelStatus(cr *k8sv1alpha1.NetworkChaining) (bool, error)

CheckSFCPodLabelStatus returns true, if all the pods in the SFC are up and running

func ConfigureforSFC

func ConfigureforSFC(podname string, podnamespace string) (bool, []PodNetworkInfo, []RoutingInfo, error)

ConfigureforSFC returns

func ContainerAddInteface

func ContainerAddInteface(containerPid int, payload *pb.PodAddNetwork) error

ContainerAddInteface return

func ContainerAddRoute

func ContainerAddRoute(containerPid int, route []*pb.RouteData) error

ContainerAddRoute return containerPid and route

func ContainerDelInteface

func ContainerDelInteface(containerPid int, payload *pb.PodDelNetwork) error

ContainerDelInteface return

func ContainerDelRoute

func ContainerDelRoute(containerPid int, route []*pb.RouteData) error

ContainerDelRoute return containerPid and route

func DerivedNetworkFromNetworklist

func DerivedNetworkFromNetworklist(networklabellist []string) ([]string, error)

DerivedNetworkFromNetworklist returns the network list

func GetPidForContainer

func GetPidForContainer(id string) (int, error)

func IsPodNetwork

func IsPodNetwork(pod corev1.Pod, networkname string) (bool, error)

IsPodNetwork return ...

func ValidateNetworkChaining

func ValidateNetworkChaining(cr *k8sv1alpha1.NetworkChaining) (string, error)

ValidateNetworkChaining return ...

Types

type PodNetworkInfo

type PodNetworkInfo struct {
	Name        string
	Namespace   string
	Id          string
	Node        string
	NetworkInfo string
	Route       []k8sv1alpha1.Route
}

PodNetworkInfo is ...

type RoutingInfo

type RoutingInfo struct {
	Name                 string              // Name of the pod
	Namespace            string              // Namespace of the Pod
	Id                   string              // Container ID for pod
	Node                 string              // Hostname where Pod is scheduled
	LeftNetworkRoute     []k8sv1alpha1.Route // TODO: Update to support multiple networks
	RightNetworkRoute    []k8sv1alpha1.Route // TODO: Update to support multiple networks
	DynamicNetworkRoutes []k8sv1alpha1.Route
}

RoutingInfo is ...

func (RoutingInfo) IsEmpty

func (r RoutingInfo) IsEmpty() bool

IsEmpty return true or false

Jump to

Keyboard shortcuts

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