diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-12-09 07:53:55 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-09 07:53:55 -0800 |
commit | c2dab75f0ec1502e075cf5174d1b308267648fda (patch) | |
tree | 4c000064fd0f3a660446ce6cdf2bd1bc97992bf5 /pkg/network/netconflist.go | |
parent | 7287f69b52e5bcb59f9977b261ee488942465ecb (diff) | |
parent | ef872dcd21c60af70ab1848a7e0c873f142f6f44 (diff) | |
download | podman-c2dab75f0ec1502e075cf5174d1b308267648fda.tar.gz podman-c2dab75f0ec1502e075cf5174d1b308267648fda.tar.bz2 podman-c2dab75f0ec1502e075cf5174d1b308267648fda.zip |
Merge pull request #4517 from baude/macvlan
macvlan networks
Diffstat (limited to 'pkg/network/netconflist.go')
-rw-r--r-- | pkg/network/netconflist.go | 12 |
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 +} |