summaryrefslogtreecommitdiff
path: root/pkg/specgen
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-21 02:11:22 +0100
committerGitHub <noreply@github.com>2020-11-21 02:11:22 +0100
commitb30ca110ec1deced8dc9322665f3d0ffe8e61bee (patch)
tree6284b74e5e6f4419af172fde21d317dbd061a117 /pkg/specgen
parentbff3bd610a3cc814fb5dde9dc62286f0f6c351c3 (diff)
parentf441190d10ca3d41e01a076e4b9b3a63746888b6 (diff)
downloadpodman-b30ca110ec1deced8dc9322665f3d0ffe8e61bee.tar.gz
podman-b30ca110ec1deced8dc9322665f3d0ffe8e61bee.tar.bz2
podman-b30ca110ec1deced8dc9322665f3d0ffe8e61bee.zip
Merge pull request #8410 from Luap99/fix-multiple-networks
Allow multiple --network flags for podman run/create
Diffstat (limited to 'pkg/specgen')
-rw-r--r--pkg/specgen/namespaces.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/pkg/specgen/namespaces.go b/pkg/specgen/namespaces.go
index 90c56d366..11108a5c1 100644
--- a/pkg/specgen/namespaces.go
+++ b/pkg/specgen/namespaces.go
@@ -272,16 +272,10 @@ func ParseNetworkNamespace(ns string) (Namespace, []string, error) {
toReturn.NSMode = Private
case strings.HasPrefix(ns, "ns:"):
split := strings.SplitN(ns, ":", 2)
- if len(split) != 2 {
- return toReturn, nil, errors.Errorf("must provide a path to a namespace when specifying ns:")
- }
toReturn.NSMode = Path
toReturn.Value = split[1]
case strings.HasPrefix(ns, "container:"):
split := strings.SplitN(ns, ":", 2)
- if len(split) != 2 {
- return toReturn, nil, errors.Errorf("must provide name or ID or a container when specifying container:")
- }
toReturn.NSMode = FromContainer
toReturn.Value = split[1]
default: