l3plugin

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LinuxArpConfigurator

type LinuxArpConfigurator struct {
	Log logging.Logger

	LinuxIfIdx ifaceidx.LinuxIfIndexRW
	ArpIdxSeq  uint32

	// Time measurement
	Stopwatch *measure.Stopwatch // timer used to measure and store time
	// contains filtered or unexported fields
}

LinuxArpConfigurator watches for any changes in the configuration of static ARPs as modelled by the proto file "model/l3/l3.proto" and stored in ETCD under the key "/vnf-agent/{vnf-agent}/linux/config/v1/arp". Updates received from the northbound API are compared with the Linux network configuration and differences are applied through the Netlink AP

func (*LinuxArpConfigurator) Close

func (plugin *LinuxArpConfigurator) Close() error

Close closes all goroutines started during Init

func (*LinuxArpConfigurator) ConfigureLinuxStaticArpEntry

func (plugin *LinuxArpConfigurator) ConfigureLinuxStaticArpEntry(arpEntry *l3.LinuxStaticArpEntries_ArpEntry) error

ConfigureLinuxStaticArpEntry reacts to a new northbound Linux ARP entry config by creating and configuring the entry in the host network stack through Netlink API.

func (*LinuxArpConfigurator) DeleteLinuxStaticArpEntry

func (plugin *LinuxArpConfigurator) DeleteLinuxStaticArpEntry(arpEntry *l3.LinuxStaticArpEntries_ArpEntry) error

DeleteLinuxStaticArpEntry reacts to a removed NB configuration of a Linux ARP entry.

func (*LinuxArpConfigurator) Init

func (plugin *LinuxArpConfigurator) Init(arpIndexes l3idx.LinuxARPIndexRW) error

Init initializes ARP configurator and starts goroutines

func (*LinuxArpConfigurator) LookupLinuxArpEntries

func (plugin *LinuxArpConfigurator) LookupLinuxArpEntries() error

LookupLinuxArpEntries reads all ARP entries from all interfaces and registers them if needed

func (*LinuxArpConfigurator) ModifyLinuxStaticArpEntry

func (plugin *LinuxArpConfigurator) ModifyLinuxStaticArpEntry(newArpEntry *l3.LinuxStaticArpEntries_ArpEntry, oldArpEntry *l3.LinuxStaticArpEntries_ArpEntry) error

ModifyLinuxStaticArpEntry applies changes in the NB configuration of a Linux ARP through Netlink API.

func (*LinuxArpConfigurator) Resync

func (plugin *LinuxArpConfigurator) Resync(arpEntries []*l3.LinuxStaticArpEntries_ArpEntry) error

Resync configures an initial set of ARPs. Existing Linux ARPs are registered and potentially re-configured.

type LinuxRouteConfigurator

type LinuxRouteConfigurator struct {
	Log logging.Logger

	LinuxIfIdx  ifaceidx.LinuxIfIndexRW
	RouteIdxSeq uint32

	// Time measurement
	Stopwatch *measure.Stopwatch // timer used to measure and store time
	// contains filtered or unexported fields
}

LinuxRouteConfigurator watches for any changes in the configuration of static routes as modelled by the proto file "model/l3/l3.proto" and stored in ETCD under the key "/vnf-agent/{vnf-agent}/linux/config/v1/route". Updates received from the northbound API are compared with the Linux network configuration and differences are applied through the Netlink AP

func (*LinuxRouteConfigurator) Close

func (plugin *LinuxRouteConfigurator) Close() error

Close closes all goroutines started during Init

func (*LinuxRouteConfigurator) ConfigureLinuxStaticRoute

func (plugin *LinuxRouteConfigurator) ConfigureLinuxStaticRoute(route *l3.LinuxStaticRoutes_Route) error

ConfigureLinuxStaticRoute reacts to a new northbound Linux static route config by creating and configuring the route in the host network stack through Netlink API.

func (*LinuxRouteConfigurator) DeleteLinuxStaticRoute

func (plugin *LinuxRouteConfigurator) DeleteLinuxStaticRoute(route *l3.LinuxStaticRoutes_Route) error

DeleteLinuxStaticRoute reacts to a removed NB configuration of a Linux static route entry.

func (*LinuxRouteConfigurator) Init

func (plugin *LinuxRouteConfigurator) Init(rtIndexes l3idx.LinuxRouteIndexRW, rtCachedIndexes l3idx.LinuxRouteIndexRW) error

Init initializes static route configurator and starts goroutines

func (*LinuxRouteConfigurator) LookupLinuxRoutes

func (plugin *LinuxRouteConfigurator) LookupLinuxRoutes() error

LookupLinuxRoutes reads all routes and registers them if needed

func (*LinuxRouteConfigurator) ModifyLinuxStaticRoute

func (plugin *LinuxRouteConfigurator) ModifyLinuxStaticRoute(newRoute *l3.LinuxStaticRoutes_Route, oldRoute *l3.LinuxStaticRoutes_Route) error

ModifyLinuxStaticRoute applies changes in the NB configuration of a Linux static route into the host network stack through Netlink API.

func (*LinuxRouteConfigurator) ResolveCreatedInterface added in v1.0.8

func (plugin *LinuxRouteConfigurator) ResolveCreatedInterface(name string, index uint32) error

ResolveCreatedInterface manages cached static routes for new interface

func (*LinuxRouteConfigurator) ResolveDeletedInterface added in v1.0.8

func (plugin *LinuxRouteConfigurator) ResolveDeletedInterface(name string, index uint32) error

ResolveDeletedInterface manages static routes for removed interface

func (*LinuxRouteConfigurator) Resync

func (plugin *LinuxRouteConfigurator) Resync(routes []*l3.LinuxStaticRoutes_Route) error

Resync configures an initial set of static routes. Existing Linux static routes are registered and potentially re-configured.

Directories

Path Synopsis
Package l3idx implements name-to-index mapping registry and cache for Linux static arp entries and static routes.
Package l3idx implements name-to-index mapping registry and cache for Linux static arp entries and static routes.
model
l3
Package l3 is a generated protocol buffer package.
Package l3 is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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