diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-12-11 10:04:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-11 10:04:28 -0500 |
commit | 335c59e7dcd06429c56c0f58e859f7694fcbc891 (patch) | |
tree | 01f45e8bef7d62f8dfc8a6f677a668c1b7bfa142 /pkg | |
parent | dd954781e6e308a0bbecfaf6699b41426100a58d (diff) | |
parent | 2a35387e9e7e94ae8192f4fc6bda4673b053cd99 (diff) | |
download | podman-335c59e7dcd06429c56c0f58e859f7694fcbc891.tar.gz podman-335c59e7dcd06429c56c0f58e859f7694fcbc891.tar.bz2 podman-335c59e7dcd06429c56c0f58e859f7694fcbc891.zip |
Merge pull request #8691 from Luap99/network-compat
Fix some network compat api problems
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/api/handlers/compat/networks.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/api/handlers/compat/networks.go b/pkg/api/handlers/compat/networks.go index fe13971b0..f0b922885 100644 --- a/pkg/api/handlers/compat/networks.go +++ b/pkg/api/handlers/compat/networks.go @@ -131,7 +131,7 @@ func getNetworkResourceByNameOrID(nameOrID string, runtime *libpod.Runtime, filt Name: conf.Name, ID: network.GetNetworkID(conf.Name), Created: time.Unix(int64(stat.Ctim.Sec), int64(stat.Ctim.Nsec)), // nolint: unconvert - Scope: "", + Scope: "local", Driver: network.DefaultNetworkDriver, EnableIPv6: false, IPAM: dockerNetwork.IPAM{ @@ -197,7 +197,7 @@ func ListNetworks(w http.ResponseWriter, r *http.Request) { } var reports []*types.NetworkResource - logrus.Errorf("netNames: %q", strings.Join(netNames, ", ")) + logrus.Debugf("netNames: %q", strings.Join(netNames, ", ")) for _, name := range netNames { report, err := getNetworkResourceByNameOrID(name, runtime, query.Filters) if err != nil { @@ -239,7 +239,7 @@ func CreateNetwork(w http.ResponseWriter, r *http.Request) { Internal: networkCreate.Internal, Labels: networkCreate.Labels, } - if networkCreate.IPAM != nil && networkCreate.IPAM.Config != nil { + if networkCreate.IPAM != nil && len(networkCreate.IPAM.Config) > 0 { if len(networkCreate.IPAM.Config) > 1 { utils.InternalServerError(w, errors.New("compat network create can only support one IPAM config")) return |