summaryrefslogtreecommitdiff
path: root/libpod/network/cni/run.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-15 16:11:14 -0400
committerGitHub <noreply@github.com>2021-09-15 16:11:14 -0400
commit5f41ffdd194a828625b3bb6ec55ed87d2830fe58 (patch)
treea625a713dc2205ac80122883f3532fc31bfb8fe2 /libpod/network/cni/run.go
parent505c9718cc717433780be8240250a247253ba34f (diff)
parent5e8309464aea005fbc1604c304a94760aff4ee9a (diff)
downloadpodman-5f41ffdd194a828625b3bb6ec55ed87d2830fe58.tar.gz
podman-5f41ffdd194a828625b3bb6ec55ed87d2830fe58.tar.bz2
podman-5f41ffdd194a828625b3bb6ec55ed87d2830fe58.zip
Merge pull request #11322 from Luap99/network-libpod
Wire network interface into libpod
Diffstat (limited to 'libpod/network/cni/run.go')
-rw-r--r--libpod/network/cni/run.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/libpod/network/cni/run.go b/libpod/network/cni/run.go
index 14634262c..b69953c4b 100644
--- a/libpod/network/cni/run.go
+++ b/libpod/network/cni/run.go
@@ -114,7 +114,7 @@ func (n *cniNetwork) Setup(namespacePath string, options types.SetupOptions) (ma
}
logrus.Debugf("cni result for container %s network %s: %v", options.ContainerID, name, cnires)
var status types.StatusBlock
- status, retErr = cniResultToStatus(cnires)
+ status, retErr = CNIResultToStatus(cnires)
if retErr != nil {
return nil, retErr
}
@@ -123,8 +123,9 @@ func (n *cniNetwork) Setup(namespacePath string, options types.SetupOptions) (ma
return results, nil
}
-// cniResultToStatus convert the cni result to status block
-func cniResultToStatus(cniResult *current.Result) (types.StatusBlock, error) {
+// CNIResultToStatus convert the cni result to status block
+// nolint:golint
+func CNIResultToStatus(cniResult *current.Result) (types.StatusBlock, error) {
result := types.StatusBlock{}
nameservers := make([]net.IP, 0, len(cniResult.DNS.Nameservers))
for _, nameserver := range cniResult.DNS.Nameservers {