mirror of
https://github.com/containers/podman.git
synced 2025-12-09 23:27:09 +08:00
podman-remote ps
add the ability to run ps on containers using the remote client. Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
@@ -162,3 +162,36 @@ func stringPullPolicyToType(s string) buildah.PullPolicy {
|
||||
}
|
||||
return buildah.PullIfMissing
|
||||
}
|
||||
|
||||
func derefBool(inBool *bool) bool {
|
||||
if inBool == nil {
|
||||
return false
|
||||
}
|
||||
return *inBool
|
||||
}
|
||||
|
||||
func derefString(in *string) string {
|
||||
if in == nil {
|
||||
return ""
|
||||
}
|
||||
return *in
|
||||
}
|
||||
|
||||
func makePsOpts(inOpts iopodman.PsOpts) shared.PsOptions {
|
||||
last := 0
|
||||
if inOpts.Last != nil {
|
||||
lastT := *inOpts.Last
|
||||
last = int(lastT)
|
||||
}
|
||||
return shared.PsOptions{
|
||||
All: inOpts.All,
|
||||
Last: last,
|
||||
Latest: derefBool(inOpts.Latest),
|
||||
NoTrunc: derefBool(inOpts.NoTrunc),
|
||||
Pod: derefBool(inOpts.Pod),
|
||||
Size: true,
|
||||
Sort: derefString(inOpts.Sort),
|
||||
Namespace: true,
|
||||
Sync: derefBool(inOpts.Sync),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user