aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-04-27 14:30:24 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-04-27 17:08:52 +0200
commitd227d44fd68457f3c288edcb48b0253d6c7106c2 (patch)
tree1dba3c95403e0a511da1edb941fbc4c48ec74945
parenta7318f7364bef0803f901f9723dfb24d93feaa2d (diff)
downloadpodman-d227d44fd68457f3c288edcb48b0253d6c7106c2.tar.gz
podman-d227d44fd68457f3c288edcb48b0253d6c7106c2.tar.bz2
podman-d227d44fd68457f3c288edcb48b0253d6c7106c2.zip
namespaces: accept pod namespace
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r--pkg/specgen/namespaces.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/specgen/namespaces.go b/pkg/specgen/namespaces.go
index cee49ff51..f0161a793 100644
--- a/pkg/specgen/namespaces.go
+++ b/pkg/specgen/namespaces.go
@@ -159,6 +159,8 @@ func (n *Namespace) validate() error {
func ParseNamespace(ns string) (Namespace, error) {
toReturn := Namespace{}
switch {
+ case ns == "pod":
+ toReturn.NSMode = FromPod
case ns == "host":
toReturn.NSMode = Host
case ns == "private":
@@ -214,6 +216,8 @@ func ParseNetworkNamespace(ns string) (Namespace, []string, error) {
toReturn := Namespace{}
var cniNetworks []string
switch {
+ case ns == "pod":
+ toReturn.NSMode = FromPod
case ns == "bridge":
toReturn.NSMode = Bridge
case ns == "none":