summaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr_network.go
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 /libpod/runtime_ctr_network.go
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 'libpod/runtime_ctr_network.go')
-rw-r--r--libpod/runtime_ctr_network.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/libpod/runtime_ctr_network.go b/libpod/runtime_ctr_network.go
new file mode 100644
index 000000000..51ed982e2
--- /dev/null
+++ b/libpod/runtime_ctr_network.go
@@ -0,0 +1,12 @@
+// +build linux
+
+package libpod
+
+import (
+ "github.com/containers/common/pkg/config"
+ "github.com/containers/podman/v3/libpod/network"
+)
+
+func normalizeNetworkName(config *config.Config, nameOrID string) (string, error) {
+ return network.NormalizeName(config, nameOrID)
+}