diff options
Diffstat (limited to 'cmd/podman/shared')
-rw-r--r-- | cmd/podman/shared/create.go | 13 | ||||
-rw-r--r-- | cmd/podman/shared/intermediate.go | 1 | ||||
-rw-r--r-- | cmd/podman/shared/intermediate_varlink.go | 2 |
3 files changed, 2 insertions, 14 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"), diff --git a/cmd/podman/shared/intermediate.go b/cmd/podman/shared/intermediate.go index d1f0e602e..cfb3f612c 100644 --- a/cmd/podman/shared/intermediate.go +++ b/cmd/podman/shared/intermediate.go @@ -423,7 +423,6 @@ func NewIntermediateLayer(c *cliconfig.PodmanCommand, remote bool) GenericCLIRes m["memory-swap"] = newCRString(c, "memory-swap") m["memory-swappiness"] = newCRInt64(c, "memory-swappiness") m["name"] = newCRString(c, "name") - m["net"] = newCRString(c, "net") m["network"] = newCRString(c, "network") m["no-hosts"] = newCRBool(c, "no-hosts") m["oom-kill-disable"] = newCRBool(c, "oom-kill-disable") diff --git a/cmd/podman/shared/intermediate_varlink.go b/cmd/podman/shared/intermediate_varlink.go index 89bd52324..691c4f92d 100644 --- a/cmd/podman/shared/intermediate_varlink.go +++ b/cmd/podman/shared/intermediate_varlink.go @@ -127,7 +127,6 @@ func (g GenericCLIResults) MakeVarlink() iopodman.Create { MemorySwap: StringToPtr(g.Find("memory-swap")), MemorySwappiness: AnyIntToInt64Ptr(g.Find("memory-swappiness")), Name: StringToPtr(g.Find("name")), - Net: StringToPtr(g.Find("net")), Network: StringToPtr(g.Find("network")), OomKillDisable: BoolToPtr(g.Find("oom-kill-disable")), OomScoreAdj: AnyIntToInt64Ptr(g.Find("oom-score-adj")), @@ -386,7 +385,6 @@ func VarlinkCreateToGeneric(opts iopodman.Create) GenericCLIResults { m["memory-swap"] = stringFromVarlink(opts.MemorySwap, "memory-swap", nil) m["memory-swappiness"] = int64FromVarlink(opts.MemorySwappiness, "memory-swappiness", &memSwapDefault) m["name"] = stringFromVarlink(opts.Name, "name", nil) - m["net"] = stringFromVarlink(opts.Net, "net", &netModeDefault) m["network"] = stringFromVarlink(opts.Network, "network", &netModeDefault) m["no-hosts"] = boolFromVarlink(opts.NoHosts, "no-hosts", false) m["oom-kill-disable"] = boolFromVarlink(opts.OomKillDisable, "oon-kill-disable", false) |