Documentation ¶
Index ¶
- type AppNsConfigurator
- func (c *AppNsConfigurator) Close() error
- func (c *AppNsConfigurator) ConfigureAppNamespace(ns *l4.AppNamespaces_AppNamespace) error
- func (c *AppNsConfigurator) ConfigureL4FeatureFlag(features *l4.L4Features) error
- func (c *AppNsConfigurator) DeleteAppNamespace(ns *l4.AppNamespaces_AppNamespace) error
- func (c *AppNsConfigurator) DeleteL4FeatureFlag() error
- func (c *AppNsConfigurator) GetAppNsIndexes() nsidx.AppNsIndexRW
- func (c *AppNsConfigurator) Init(logger logging.PluginLogger, goVppMux govppmux.API, ...) (err error)
- func (c *AppNsConfigurator) LogError(err error) error
- func (c *AppNsConfigurator) ModifyAppNamespace(newNs *l4.AppNamespaces_AppNamespace, oldNs *l4.AppNamespaces_AppNamespace) error
- func (c *AppNsConfigurator) ResolveCreatedInterface(ifName string, ifIdx uint32) error
- func (c *AppNsConfigurator) ResolveDeletedInterface(ifName string, ifIdx uint32) error
- func (c *AppNsConfigurator) ResyncAppNs(appNamespaces []*l4.AppNamespaces_AppNamespace) error
- func (c *AppNsConfigurator) ResyncFeatures(l4Features *l4.L4Features) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppNsConfigurator ¶
type AppNsConfigurator struct {
// contains filtered or unexported fields
}
AppNsConfigurator runs in the background in its own goroutine where it watches for any changes in the configuration of interfaces as modelled by the proto file "../model/l4/l4.proto" and stored in ETCD under the keys "/vnf-agent/{vnf-agent}/vpp/config/v1/l4/l4ftEnabled" and "/vnf-agent/{vnf-agent}/vpp/config/v1/l4/namespaces/{namespace_id}". Updates received from the northbound API are compared with the VPP run-time configuration and differences are applied through the VPP binary API.
func (*AppNsConfigurator) ConfigureAppNamespace ¶
func (c *AppNsConfigurator) ConfigureAppNamespace(ns *l4.AppNamespaces_AppNamespace) error
ConfigureAppNamespace process the NB AppNamespace config and propagates it to bin api calls
func (*AppNsConfigurator) ConfigureL4FeatureFlag ¶
func (c *AppNsConfigurator) ConfigureL4FeatureFlag(features *l4.L4Features) error
ConfigureL4FeatureFlag process the NB Features config and propagates it to bin api calls
func (*AppNsConfigurator) DeleteAppNamespace ¶
func (c *AppNsConfigurator) DeleteAppNamespace(ns *l4.AppNamespaces_AppNamespace) error
DeleteAppNamespace process the NB AppNamespace config and propagates it to bin api calls. This case is not currently supported by VPP
func (*AppNsConfigurator) DeleteL4FeatureFlag ¶
func (c *AppNsConfigurator) DeleteL4FeatureFlag() error
DeleteL4FeatureFlag process the NB Features config and propagates it to bin api calls
func (*AppNsConfigurator) GetAppNsIndexes ¶
func (c *AppNsConfigurator) GetAppNsIndexes() nsidx.AppNsIndexRW
GetAppNsIndexes returns application namespace memory indexes
func (*AppNsConfigurator) Init ¶
func (c *AppNsConfigurator) Init(logger logging.PluginLogger, goVppMux govppmux.API, swIfIndexes ifaceidx.SwIfIndex) (err error)
Init members (channels...) and start go routines
func (*AppNsConfigurator) LogError ¶
func (c *AppNsConfigurator) LogError(err error) error
LogError prints error if not nil, including stack trace. The same value is also returned, so it can be easily propagated further
func (*AppNsConfigurator) ModifyAppNamespace ¶
func (c *AppNsConfigurator) ModifyAppNamespace(newNs *l4.AppNamespaces_AppNamespace, oldNs *l4.AppNamespaces_AppNamespace) error
ModifyAppNamespace process the NB AppNamespace config and propagates it to bin api calls
func (*AppNsConfigurator) ResolveCreatedInterface ¶
func (c *AppNsConfigurator) ResolveCreatedInterface(ifName string, ifIdx uint32) error
ResolveCreatedInterface looks for application namespace this interface is assigned to and configures them
func (*AppNsConfigurator) ResolveDeletedInterface ¶
func (c *AppNsConfigurator) ResolveDeletedInterface(ifName string, ifIdx uint32) error
ResolveDeletedInterface looks for application namespace this interface is assigned to and removes
func (*AppNsConfigurator) ResyncAppNs ¶
func (c *AppNsConfigurator) ResyncAppNs(appNamespaces []*l4.AppNamespaces_AppNamespace) error
ResyncAppNs configures app namespaces to the empty VPP
func (*AppNsConfigurator) ResyncFeatures ¶
func (c *AppNsConfigurator) ResyncFeatures(l4Features *l4.L4Features) error
ResyncFeatures sets initial L4Features flag