diff options
author | baude <bbaude@redhat.com> | 2019-11-14 12:48:45 -0600 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-12-09 08:40:40 -0600 |
commit | ef872dcd21c60af70ab1848a7e0c873f142f6f44 (patch) | |
tree | b1d98078a7c620cec454708ff85ca0df70a32b19 /pkg/network/config.go | |
parent | 225f22b9d5dfd0d1582a56530142fe8ffb960a91 (diff) | |
download | podman-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/config.go')
-rw-r--r-- | pkg/network/config.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/network/config.go b/pkg/network/config.go index 37eb0dd64..e47b16143 100644 --- a/pkg/network/config.go +++ b/pkg/network/config.go @@ -90,6 +90,22 @@ func (p PortMapConfig) Bytes() ([]byte, error) { return json.MarshalIndent(p, "", "\t") } +type IPAMDHCP struct { + DHCP string `json:"type"` +} + +// MacVLANConfig describes the macvlan config +type MacVLANConfig struct { + PluginType string `json:"type"` + Master string `json:"master"` + IPAM IPAMDHCP `json:"ipam"` +} + +// Bytes outputs the configuration as []byte +func (p MacVLANConfig) Bytes() ([]byte, error) { + return json.MarshalIndent(p, "", "\t") +} + // FirewallConfig describes the firewall plugin type FirewallConfig struct { PluginType string `json:"type"` |