summaryrefslogtreecommitdiff
path: root/libpod/network/network.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2021-02-01 14:42:38 -0600
committerbaude <bbaude@redhat.com>2021-02-01 14:42:38 -0600
commite11d8f15e8d7559bc70ebef2dd0125be9d692da5 (patch)
tree93cb63e3a92b39ebb33ceb8aed07e31a283011e9 /libpod/network/network.go
parent20183349fd2c6a9a569c6c79234af48bb5d92ff7 (diff)
downloadpodman-e11d8f15e8d7559bc70ebef2dd0125be9d692da5.tar.gz
podman-e11d8f15e8d7559bc70ebef2dd0125be9d692da5.tar.bz2
podman-e11d8f15e8d7559bc70ebef2dd0125be9d692da5.zip
add macvlan as a supported network driver
instead of using the --macvlan to indicate that you want to make a macvlan network, podman network create now honors the driver name of *macvlan*. Any options to macvlan, like the parent device, should be specified as a -o option. For example, -o parent=eth0. the --macvlan option was marked as deprecated in the man page but is still supported for the duration of 3.0. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/network/network.go')
-rw-r--r--libpod/network/network.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/libpod/network/network.go b/libpod/network/network.go
index 0fb878b18..0ff14c1f7 100644
--- a/libpod/network/network.go
+++ b/libpod/network/network.go
@@ -17,11 +17,17 @@ import (
"github.com/sirupsen/logrus"
)
-// DefaultNetworkDriver is the default network type used
-var DefaultNetworkDriver = "bridge"
+var (
+ // BridgeNetworkDriver defines the bridge cni driver
+ BridgeNetworkDriver = "bridge"
+ // DefaultNetworkDriver is the default network type used
+ DefaultNetworkDriver = BridgeNetworkDriver
+ // MacVLANNetworkDriver defines the macvlan cni driver
+ MacVLANNetworkDriver = "macvlan"
+)
// SupportedNetworkDrivers describes the list of supported drivers
-var SupportedNetworkDrivers = []string{DefaultNetworkDriver}
+var SupportedNetworkDrivers = []string{BridgeNetworkDriver, MacVLANNetworkDriver}
// isSupportedDriver checks if the user provided driver is supported
func isSupportedDriver(driver string) error {