summaryrefslogtreecommitdiff
path: root/cmd/podman/shared
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-04-11 14:42:28 -0500
committerbaude <bbaude@redhat.com>2019-04-17 11:08:54 -0500
commit3c0147e55916335ea605972999c594fdf52716e8 (patch)
treef15ec89e0d8bfa38a6817d36d1b8d144653dbf08 /cmd/podman/shared
parenta87cf6fef8f84ded410d547aa772b8f942c5f273 (diff)
downloadpodman-3c0147e55916335ea605972999c594fdf52716e8.tar.gz
podman-3c0147e55916335ea605972999c594fdf52716e8.tar.bz2
podman-3c0147e55916335ea605972999c594fdf52716e8.zip
podman-remote start
enable the ability to start containers from the remote-client. also, enable start integration tests for remote testing. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/shared')
-rw-r--r--cmd/podman/shared/intermediate_varlink.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/cmd/podman/shared/intermediate_varlink.go b/cmd/podman/shared/intermediate_varlink.go
index 95a0d6287..d62a65955 100644
--- a/cmd/podman/shared/intermediate_varlink.go
+++ b/cmd/podman/shared/intermediate_varlink.go
@@ -4,8 +4,10 @@ package shared
import (
"fmt"
+
"github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/containers/libpod/cmd/podman/varlink"
+ "github.com/containers/libpod/pkg/rootless"
"github.com/pkg/errors"
)
@@ -318,6 +320,12 @@ func VarlinkCreateToGeneric(opts iopodman.Create) GenericCLIResults {
// We do not get a default network over varlink. Unlike the other default values for some cli
// elements, it seems it gets set to the default anyway.
+ var memSwapDefault int64 = -1
+ netModeDefault := "bridge"
+ if rootless.IsRootless() {
+ netModeDefault = "slirp4netns"
+ }
+
m := make(map[string]GenericCLIResult)
m["add-host"] = stringSliceFromVarlink(opts.AddHost, "add-host", nil)
m["annotation"] = stringSliceFromVarlink(opts.Annotation, "annotation", nil)
@@ -374,10 +382,10 @@ func VarlinkCreateToGeneric(opts iopodman.Create) GenericCLIResults {
m["memory"] = stringFromVarlink(opts.Memory, "memory", nil)
m["memory-reservation"] = stringFromVarlink(opts.MemoryReservation, "memory-reservation", nil)
m["memory-swap"] = stringFromVarlink(opts.MemorySwap, "memory-swap", nil)
- m["memory-swappiness"] = int64FromVarlink(opts.MemorySwappiness, "memory-swappiness", nil)
+ m["memory-swappiness"] = int64FromVarlink(opts.MemorySwappiness, "memory-swappiness", &memSwapDefault)
m["name"] = stringFromVarlink(opts.Name, "name", nil)
- m["net"] = stringFromVarlink(opts.Net, "net", nil)
- m["network"] = stringFromVarlink(opts.Network, "network", 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)
m["oom-score-adj"] = intFromVarlink(opts.OomScoreAdj, "oom-score-adj", nil)