summaryrefslogtreecommitdiff
path: root/pkg/api/handlers
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2021-03-15 10:45:24 +0100
committerPaul Holzinger <paul.holzinger@web.de>2021-03-15 14:01:52 +0100
commit762148deb6be6925d17bd12f219f7385e1402439 (patch)
tree9efd0b493ce2e590cb79960507b1a4d9ec967189 /pkg/api/handlers
parentfc02d16e728dfdd5a5f2e3bc622bbceb7f8c0d24 (diff)
downloadpodman-762148deb6be6925d17bd12f219f7385e1402439.tar.gz
podman-762148deb6be6925d17bd12f219f7385e1402439.tar.bz2
podman-762148deb6be6925d17bd12f219f7385e1402439.zip
Split libpod/network package
The `libpod/network` package should only be used on the backend and not the client. The client used this package only for two functions so move them into a new `pkg/network` package. This is needed so we can put linux only code into `libpod/network`, see #9710. [NO TESTS NEEDED] Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'pkg/api/handlers')
-rw-r--r--pkg/api/handlers/compat/networks.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/networks.go b/pkg/api/handlers/compat/networks.go
index 28e90ac28..dfb1d7fda 100644
--- a/pkg/api/handlers/compat/networks.go
+++ b/pkg/api/handlers/compat/networks.go
@@ -16,6 +16,7 @@ import (
"github.com/containers/podman/v3/pkg/api/handlers/utils"
"github.com/containers/podman/v3/pkg/domain/entities"
"github.com/containers/podman/v3/pkg/domain/infra/abi"
+ networkid "github.com/containers/podman/v3/pkg/network"
"github.com/docker/docker/api/types"
dockerNetwork "github.com/docker/docker/api/types/network"
"github.com/gorilla/schema"
@@ -135,7 +136,7 @@ func getNetworkResourceByNameOrID(nameOrID string, runtime *libpod.Runtime, filt
report := types.NetworkResource{
Name: conf.Name,
- ID: network.GetNetworkID(conf.Name),
+ ID: networkid.GetNetworkID(conf.Name),
Created: time.Unix(int64(stat.Ctim.Sec), int64(stat.Ctim.Nsec)), // nolint: unconvert
Scope: "local",
Driver: network.DefaultNetworkDriver,