Documentation ¶
Index ¶
- Constants
- Variables
- func IsSameNetworkOpts(opts1, opts2 *NuageNetworkParams) bool
- func MD5Hash(networkOpts *NuageNetworkParams) string
- func SetLogLevel(conf *NuageLibNetworkConfig)
- func SetupLogging()
- func ValidateNuageParams(nuageParams *NuageNetworkParams) error
- type NuageEventMetadata
- type NuageLibNetworkConfig
- type NuageNetworkParams
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 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
Click to show internal directories.
Click to hide internal directories.