config

package
v5.4.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: BSD-3-Clause Imports: 9 Imported by: 5

Documentation

Index

Constants

View Source
const (
	LOGDIR               = "/var/log/nuage-libnetwork"
	LOGFILE              = "/var/log/nuage-libnetwork/nuage-libnetwork.log"
	PluginDir            = "/run/docker/plugins"
	PluginName           = "nuage"
	ContainerIfacePrefix = "eth"
	BasePrefix           = "nln"
	EntityPortKey        = "entityport"
	BridgePortKey        = "brPort"
	UUIDKey              = "vmuuid"
	MACKey               = "mac"
	NameKey              = "name"
	PolicyGroupKey       = "policy-group"
	StaticIPKey          = "static-ip"
	MaxIntfNum           = 4000000
	InvalidPortName      = -1
	BridgeName           = "alubr0"
	VSDContainerIDKey    = "cont-uuid"
	UserKey              = "NUAGE-USER"
	EnterpriseKey        = "NUAGE-ENTERPRISE"
	DomainKey            = "NUAGE-DOMAIN"
	ZoneKey              = "NUAGE-ZONE"
	NetworkKey           = "NUAGE-NETWORK"
	NetworkTypeKey       = "NUAGE-NETWORK-TYPE"
)

Config data used across packages

Variables

View Source
var DockerNetworkType = map[string]string{"v1": "nuage", "v2": "nuage:latest"}

Functions

func IsSameNetworkOpts

func IsSameNetworkOpts(opts1, opts2 *NuageNetworkParams) bool

IsSameNetworkOpts checks if nuage network options matches

func MD5Hash

func MD5Hash(networkOpts *NuageNetworkParams) string

MD5Hash generates md5 hash string for given network options

func SetLogLevel

func SetLogLevel(conf *NuageLibNetworkConfig)

SetLogLevel sets the default log level

func SetupLogging

func SetupLogging()

SetupLogging sets up logging infrastructure

func ValidateNuageParams

func ValidateNuageParams(nuageParams *NuageNetworkParams) error

ValidateNuageParams validates the nuage parameters

Types

type NuageEventMetadata

type NuageEventMetadata struct {
	IPAddress       string
	UUID            string
	Name            string
	PolicyGroup     string
	OrchestrationID string
	NetworkParams   *NuageNetworkParams
}

NuageEventMetadata struct contains the metadata required to communicate across channels

type NuageLibNetworkConfig

type NuageLibNetworkConfig struct {
	NumOfRetries     int
	TimeInterval     int
	LogFileSize      int
	URL              string
	Port             string
	Username         string
	Password         string
	Organization     string
	Scope            string
	LogLevel         string
	VRSBridge        string
	VRSSocketFile    string
	DockerSocketFile string
	PluginVersion    string
}

NuageLibNetworkConfig configuration data for nuage libnetwork remote and ipam drivers

func ReadConfigFile

func ReadConfigFile(configFile string) (*NuageLibNetworkConfig, error)

ReadConfigFile reads, validates and sets defaults to config file

type NuageNetworkParams

type NuageNetworkParams struct {
	Organization string
	Domain       string
	Zone         string
	User         string
	SubnetName   string
	SubnetCIDR   string
	Gateway      string
}

NuageNetworkParams nuage network metadata

func ParseNuageParams

func ParseNuageParams(networkOptions map[string]string) *NuageNetworkParams

ParseNuageParams Parses all the nuage options passed

func (NuageNetworkParams) String

func (v NuageNetworkParams) String() string

String stringifies NuageNetworkParams

Jump to

Keyboard shortcuts

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