summaryrefslogtreecommitdiff
path: root/cmd/podman/shared/create.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-01-14 18:55:20 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2020-01-16 09:23:32 -0500
commit45e9a6b12e74d50b8f6ab271c7800cb165f451e4 (patch)
tree5083048ba4ccf238dadd5c434528ee65b49fae62 /cmd/podman/shared/create.go
parent61fbce710b8d69e1203ea9055479a3f9dbe626b9 (diff)
downloadpodman-45e9a6b12e74d50b8f6ab271c7800cb165f451e4.tar.gz
podman-45e9a6b12e74d50b8f6ab271c7800cb165f451e4.tar.bz2
podman-45e9a6b12e74d50b8f6ab271c7800cb165f451e4.zip
Remove c.String(net)
We have a lot of cludgy code trying to make --net and --network equivalent. This will allow --net to still exists but will eliminate the help and confusion. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/shared/create.go')
-rw-r--r--cmd/podman/shared/create.go13
1 files changed, 2 insertions, 11 deletions
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go
index 50a64b01c..15d6bddbb 100644
--- a/cmd/podman/shared/create.go
+++ b/cmd/podman/shared/create.go
@@ -355,14 +355,10 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod.
// Instead of integrating here, should be done in libpod
// However, that also involves setting up security opts
// when the pod's namespace is integrated
- namespaceNet := c.String("network")
- if c.Changed("net") {
- namespaceNet = c.String("net")
- }
namespaces = map[string]string{
"cgroup": c.String("cgroupns"),
"pid": c.String("pid"),
- "net": namespaceNet,
+ "net": c.String("network"),
"ipc": c.String("ipc"),
"user": c.String("userns"),
"uts": c.String("uts"),
@@ -636,11 +632,6 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod.
}
// This is done because cobra cannot have two aliased flags. So we have to check
// both
- network := c.String("network")
- if c.Changed("net") {
- network = c.String("net")
- }
-
memorySwappiness := c.Int64("memory-swappiness")
logDriver := libpod.KubernetesLogging
@@ -687,7 +678,7 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod.
DNSServers: c.StringSlice("dns"),
HTTPProxy: c.Bool("http-proxy"),
MacAddress: c.String("mac-address"),
- Network: network,
+ Network: c.String("network"),
NetMode: netMode,
IPAddress: c.String("ip"),
Publish: c.StringSlice("publish"),