From cc3ad266916e352d445fe54ab129f1fb70a51235 Mon Sep 17 00:00:00 2001 From: Tomofumi Hayashi Date: Thu, 26 Jul 2018 21:29:43 +0900 Subject: [PATCH] Incorporate Casey's comments --- plugins/ipam/static/main.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/plugins/ipam/static/main.go b/plugins/ipam/static/main.go index 74505644..e4267220 100644 --- a/plugins/ipam/static/main.go +++ b/plugins/ipam/static/main.go @@ -30,12 +30,9 @@ import ( // The top-level network config - IPAM plugins are passed the full configuration // of the calling plugin, not just the IPAM section. type Net struct { - Name string `json:"name"` - CNIVersion string `json:"cniVersion"` - IPAM *IPAMConfig `json:"ipam"` - RuntimeConfig struct { - Addresses []Address `json:"addresses,omitempty"` - } `json:"runtimeConfig,omitempty"` + Name string `json:"name"` + CNIVersion string `json:"cniVersion"` + IPAM *IPAMConfig `json:"ipam"` } type IPAMConfig struct { @@ -87,10 +84,6 @@ func LoadIPAMConfig(bytes []byte, envArgs string) (*IPAMConfig, string, error) { return nil, "", fmt.Errorf("IPAM config missing 'ipam' key") } - if len(n.RuntimeConfig.Addresses) != 0 { - n.IPAM.Addresses = append(n.RuntimeConfig.Addresses, n.IPAM.Addresses...) - } - // Validate all ranges numV4 := 0 numV6 := 0