From ef872dcd21c60af70ab1848a7e0c873f142f6f44 Mon Sep 17 00:00:00 2001 From: baude Date: Thu, 14 Nov 2019 12:48:45 -0600 Subject: macvlan networks add the ability to a macvlan network with podman network create. Signed-off-by: baude --- pkg/network/netconflist.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'pkg/network/netconflist.go') diff --git a/pkg/network/netconflist.go b/pkg/network/netconflist.go index e19051b88..a8217097a 100644 --- a/pkg/network/netconflist.go +++ b/pkg/network/netconflist.go @@ -132,3 +132,15 @@ func HasDNSNamePlugin(paths []string) bool { } return false } + +// NewMacVLANPlugin creates a macvlanconfig with a given device name +func NewMacVLANPlugin(device string) MacVLANConfig { + i := IPAMDHCP{DHCP: "dhcp"} + + m := MacVLANConfig{ + PluginType: "macvlan", + Master: device, + IPAM: i, + } + return m +} -- cgit v1.2.3-54-g00ecf