api

package
v3.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2019 License: Apache-2.0 Imports: 6 Imported by: 12

Documentation

Index

Constants

View Source
const (
	// SubnetMask defines the default subnet mask for pod addressing - TODO: must be refactored to consider CIDR
	SubnetMask = "/24"
	// VppVNI defines the default VNI for L2 connectivity - TODO: must be refactored to support configured values
	VppVNI = 10
)
View Source
const (
	// GlobalMsg defines the report bin where to put global (i.e.
	// non-node-specific) status/error messages
	GlobalMsg = "global"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContivTelemetryControllerReport

type ContivTelemetryControllerReport interface {
	GenerateCRDReport()
}

ContivTelemetryControllerReport defines the methods for the telemetry processor.

type ContivTelemetryProcessor

type ContivTelemetryProcessor interface {
	Validate()
}

ContivTelemetryProcessor defines the methods for the telemetry processor.

type K8sCache

type K8sCache interface {
	CreateK8sNode(name string, podCIDR string, providerID string,
		Addresses []*node.NodeAddress, nodeInfo *node.NodeSystemInfo) error
	RetrieveK8sNode(nodeName string) (*node.Node, error)
	UpdateK8sNode(name string, podCIDR string, providerID string,
		Addresses []*node.NodeAddress, nodeInfo *node.NodeSystemInfo) error
	DeleteK8sNode(nodeName string) error

	RetrieveAllK8sNodes() []*node.Node

	CreatePod(name string, namespace string, label []*pod2.Pod_Label, IPAddress,
		hostIPAdd string, container []*pod2.Pod_Container) error
	RetrievePod(name string) (*telemetrymodel.Pod, error)
	UpdatePod(name string, namespace string, label []*pod2.Pod_Label, IPAddress,
		hostIPAddress string, container []*pod2.Pod_Container) error
	DeletePod(name string) error

	RetrieveAllPods() []*telemetrymodel.Pod

	ReinitializeCache()
}

K8sCache defines the operations on the K8s data store / cache.

type Report

type Report interface {
	LogErrAndAppendToNodeReport(nodeName string, errString string)
	AppendToNodeReport(nodeName string, errString string)
	SetPrefix(string)
	SetTimeStamp(time time.Time)
	GetTimeStamp() time.Time
	Clear()
	Print()
	RetrieveReport() telemetrymodel.Reports
}

Report is the interface for collecting validation status/error messages and for printing them out.

type VppCache

type VppCache interface {
	CreateNode(ID uint32, nodeName, IPAdr string) error
	RetrieveNode(nodeName string) (*telemetrymodel.Node, error)
	UpdateNode(ID uint32, nodeName, IPAdr string) error
	DeleteNode(nodeName string) error

	RetrieveNodeByHostIPAddr(ipAddr string) (*telemetrymodel.Node, error)
	RetrieveNodeByLoopMacAddr(macAddress string) (*telemetrymodel.Node, error)
	RetrieveNodeByLoopIPAddr(ipAddress string) (*telemetrymodel.Node, error)
	RetrieveNodeByGigEIPAddr(ipAddress string) (*telemetrymodel.Node, error)

	RetrieveAllNodes() []*telemetrymodel.Node

	SetNodeLiveness(name string, nL *status.AgentStatus) error
	SetNodeInterfaces(name string, nInt telemetrymodel.NodeInterfaces) error
	SetNodeBridgeDomain(name string, nBridge telemetrymodel.NodeBridgeDomains) error
	SetNodeL2Fibs(name string, nL2f telemetrymodel.NodeL2FibTable) error
	SetNodeTelemetry(name string, nTele map[string]telemetrymodel.NodeTelemetry) error
	SetNodeIPARPs(name string, nArps telemetrymodel.NodeIPArpTable) error
	SetNodeStaticRoutes(nodeName string, nSrs telemetrymodel.NodeStaticRoutes) error
	SetNodeIPam(nodeName string, nIPam ipnet.IPAMData) error
	SetLinuxInterfaces(nodeName string, nInt telemetrymodel.LinuxInterfaces) error

	SetSecondaryNodeIndices(node *telemetrymodel.Node) []string

	ClearCache()
	ReinitializeCache()
	DumpCache()
}

VppCache defines the operations on the VPP node data store.

Jump to

Keyboard shortcuts

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