File: const.go

package info (click to toggle)
golang-github-containers-common 0.64.1%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 5,932 kB
  • sloc: makefile: 132; sh: 111
file content (66 lines) | stat: -rw-r--r-- 2,056 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package types

const (
	// BridgeNetworkDriver defines the bridge driver
	BridgeNetworkDriver = "bridge"
	// DefaultNetworkDriver is the default network type used
	DefaultNetworkDriver = BridgeNetworkDriver
	// MacVLANNetworkDriver defines the macvlan driver
	MacVLANNetworkDriver = "macvlan"
	// MacVLANNetworkDriver defines the macvlan driver
	IPVLANNetworkDriver = "ipvlan"

	// IPAM drivers
	Driver = "driver"
	// HostLocalIPAMDriver store the ip locally in a db
	HostLocalIPAMDriver = "host-local"
	// DHCPIPAMDriver get subnet and ip from dhcp server
	DHCPIPAMDriver = "dhcp"
	// NoneIPAMDriver do not provide ipam management
	NoneIPAMDriver = "none"

	// DefaultSubnet is the name that will be used for the default CNI network.
	DefaultNetworkName = "podman"
	// DefaultSubnet is the subnet that will be used for the default CNI network.
	DefaultSubnet = "10.88.0.0/16"

	BridgeModeManaged   = "managed"
	BridgeModeUnmanaged = "unmanaged"

	// valid macvlan driver mode values
	MacVLANModeBridge   = "bridge"
	MacVLANModePrivate  = "private"
	MacVLANModeVepa     = "vepa"
	MacVLANModePassthru = "passthru"

	// valid ipvlan driver modes
	IPVLANModeL2  = "l2"
	IPVLANModeL3  = "l3"
	IPVLANModeL3s = "l3s"

	// valid network options
	VLANOption     = "vlan"
	MTUOption      = "mtu"
	ModeOption     = "mode"
	IsolateOption  = "isolate"
	MetricOption   = "metric"
	NoDefaultRoute = "no_default_route"
	BclimOption    = "bclim"
	VRFOption      = "vrf"
)

type NetworkBackend string

const (
	CNI      NetworkBackend = "cni"
	Netavark NetworkBackend = "netavark"
)

// ValidBridgeModes is the list of valid mode options for the bridge driver
var ValidBridgeModes = []string{BridgeModeManaged, BridgeModeUnmanaged}

// ValidMacVLANModes is the list of valid mode options for the macvlan driver
var ValidMacVLANModes = []string{MacVLANModeBridge, MacVLANModePrivate, MacVLANModeVepa, MacVLANModePassthru}

// ValidIPVLANModes is the list of valid mode options for the ipvlan driver
var ValidIPVLANModes = []string{IPVLANModeL2, IPVLANModeL3, IPVLANModeL3s}