summaryrefslogtreecommitdiff
path: root/pkg/bindings/network/network.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-03-16 11:31:33 +0100
committerGitHub <noreply@github.com>2021-03-16 11:31:33 +0100
commit0f954e2371265c1da2a337172c390eaae3a04229 (patch)
tree1b53295917b1e37a2337f93e60510206529f3f29 /pkg/bindings/network/network.go
parentd9f84692c13406f7e4e22d4bb16db4e8a7d086ab (diff)
parent7b0155cf780f396f6ffc4455ae5825f5fc14ca79 (diff)
downloadpodman-0f954e2371265c1da2a337172c390eaae3a04229.tar.gz
podman-0f954e2371265c1da2a337172c390eaae3a04229.tar.bz2
podman-0f954e2371265c1da2a337172c390eaae3a04229.zip
Merge pull request #9695 from jmguzik/array-inspect-network-fix
Fix array instead of one elem network http api
Diffstat (limited to 'pkg/bindings/network/network.go')
-rw-r--r--pkg/bindings/network/network.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/bindings/network/network.go b/pkg/bindings/network/network.go
index 46a3719fe..6f3aa8594 100644
--- a/pkg/bindings/network/network.go
+++ b/pkg/bindings/network/network.go
@@ -40,6 +40,7 @@ func Create(ctx context.Context, options *CreateOptions) (*entities.NetworkCreat
// Inspect returns low level information about a CNI network configuration
func Inspect(ctx context.Context, nameOrID string, options *InspectOptions) ([]entities.NetworkInspectReport, error) {
var reports []entities.NetworkInspectReport
+ reports = append(reports, entities.NetworkInspectReport{})
if options == nil {
options = new(InspectOptions)
}
@@ -52,7 +53,7 @@ func Inspect(ctx context.Context, nameOrID string, options *InspectOptions) ([]e
if err != nil {
return nil, err
}
- return reports, response.Process(&reports)
+ return reports, response.Process(&reports[0])
}
// Remove deletes a defined CNI network configuration by name. The optional force boolean