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>
This commit is contained in:
baude
2021-02-01 14:42:38 -06:00
parent 20183349fd
commit e11d8f15e8
6 changed files with 84 additions and 12 deletions

View File

@ -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 {