summaryrefslogtreecommitdiff
path: root/libpod/define
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-19 13:57:13 +0100
committerGitHub <noreply@github.com>2021-11-19 13:57:13 +0100
commit5432bb95f1a0b818a81565cd46c3f1cef1904e30 (patch)
tree412e3b0f2ff33446d0227715c51165e4517a3308 /libpod/define
parentc603318b43187bd5e1642246d84da2bcd5c68aae (diff)
parent2e5d3e8fb34ba3ab42d53da9ba39b71e1f53bb75 (diff)
downloadpodman-5432bb95f1a0b818a81565cd46c3f1cef1904e30.tar.gz
podman-5432bb95f1a0b818a81565cd46c3f1cef1904e30.tar.bz2
podman-5432bb95f1a0b818a81565cd46c3f1cef1904e30.zip
Merge pull request #12174 from fgimenez/fix-docker-networksettings-type-discrepancy
Introduces Address type to be used in secondary IPv4 and IPv6 inspect data structure
Diffstat (limited to 'libpod/define')
-rw-r--r--libpod/define/container_inspect.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/libpod/define/container_inspect.go b/libpod/define/container_inspect.go
index 9f939335c..8e07cff81 100644
--- a/libpod/define/container_inspect.go
+++ b/libpod/define/container_inspect.go
@@ -542,6 +542,12 @@ type InspectContainerHostConfig struct {
CgroupConf map[string]string `json:"CgroupConf"`
}
+// Address represents an IP address.
+type Address struct {
+ Addr string
+ PrefixLength int
+}
+
// InspectBasicNetworkConfig holds basic configuration information (e.g. IP
// addresses, MAC address, subnet masks, etc) that are common for all networks
// (both additional and main).
@@ -556,7 +562,7 @@ type InspectBasicNetworkConfig struct {
IPPrefixLen int `json:"IPPrefixLen"`
// SecondaryIPAddresses is a list of extra IP Addresses that the
// container has been assigned in this network.
- SecondaryIPAddresses []string `json:"SecondaryIPAddresses,omitempty"`
+ SecondaryIPAddresses []Address `json:"SecondaryIPAddresses,omitempty"`
// IPv6Gateway is the IPv6 gateway this network will use.
IPv6Gateway string `json:"IPv6Gateway"`
// GlobalIPv6Address is the global-scope IPv6 Address for this network.
@@ -565,7 +571,7 @@ type InspectBasicNetworkConfig struct {
GlobalIPv6PrefixLen int `json:"GlobalIPv6PrefixLen"`
// SecondaryIPv6Addresses is a list of extra IPv6 Addresses that the
// container has been assigned in this network.
- SecondaryIPv6Addresses []string `json:"SecondaryIPv6Addresses,omitempty"`
+ SecondaryIPv6Addresses []Address `json:"SecondaryIPv6Addresses,omitempty"`
// MacAddress is the MAC address for the interface in this network.
MacAddress string `json:"MacAddress"`
// AdditionalMacAddresses is a set of additional MAC Addresses beyond