From d21c1aafe28cf59143655c7646f6eec7f9496686 Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Fri, 30 Apr 2021 09:12:22 -0500 Subject: Detect if in podman machine virtual vm When in podman machine virtual machines, podman needs to be able to detect as such. One implementation for this is when creating networks, the podman-machine cni plugin needs to be added to the configuration. This PR also includes the latest containers-common. [NO TESTS NEEDED] Signed-off-by: Brent Baude --- libpod/network/config.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libpod/network/config.go') diff --git a/libpod/network/config.go b/libpod/network/config.go index 294e23509..ac4478602 100644 --- a/libpod/network/config.go +++ b/libpod/network/config.go @@ -149,7 +149,18 @@ type DNSNameConfig struct { Capabilities map[string]bool `json:"capabilities"` } +// PodmanMachineConfig enables port handling on the host OS +type PodmanMachineConfig struct { + PluginType string `json:"type"` + Capabilities map[string]bool `json:"capabilities"` +} + // Bytes outputs the configuration as []byte func (d DNSNameConfig) Bytes() ([]byte, error) { return json.MarshalIndent(d, "", "\t") } + +// Bytes outputs the configuration as []byte +func (p PodmanMachineConfig) Bytes() ([]byte, error) { + return json.MarshalIndent(p, "", "\t") +} -- cgit v1.2.3-54-g00ecf