summaryrefslogtreecommitdiff
path: root/pkg/network/netconflist.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-11-14 12:48:45 -0600
committerbaude <bbaude@redhat.com>2019-12-09 08:40:40 -0600
commitef872dcd21c60af70ab1848a7e0c873f142f6f44 (patch)
treeb1d98078a7c620cec454708ff85ca0df70a32b19 /pkg/network/netconflist.go
parent225f22b9d5dfd0d1582a56530142fe8ffb960a91 (diff)
downloadpodman-ef872dcd21c60af70ab1848a7e0c873f142f6f44.tar.gz
podman-ef872dcd21c60af70ab1848a7e0c873f142f6f44.tar.bz2
podman-ef872dcd21c60af70ab1848a7e0c873f142f6f44.zip
macvlan networks
add the ability to a macvlan network with podman network create. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/network/netconflist.go')
-rw-r--r--pkg/network/netconflist.go12
1 files changed, 12 insertions, 0 deletions
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
+}