summaryrefslogtreecommitdiff
path: root/cmd/podman/ps.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-12-29 12:16:43 +0100
committerGitHub <noreply@github.com>2019-12-29 12:16:43 +0100
commit9e03aa14b63f9351926071ba0a8b7064154cb0fe (patch)
tree59a63f7bf23d72f3a3ad65d968edb5457f91602a /cmd/podman/ps.go
parentfa551fd16d20d8a427cb988feb8428c91827a21d (diff)
parent8bc394ce6ec597f3c5bfb0fab5eb39b51afbe67d (diff)
downloadpodman-9e03aa14b63f9351926071ba0a8b7064154cb0fe.tar.gz
podman-9e03aa14b63f9351926071ba0a8b7064154cb0fe.tar.bz2
podman-9e03aa14b63f9351926071ba0a8b7064154cb0fe.zip
Merge pull request #4748 from NevilleC/nc-podname
[Issue #4703] Add the pod name when we use `podman ps -p`
Diffstat (limited to 'cmd/podman/ps.go')
-rw-r--r--cmd/podman/ps.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/podman/ps.go b/cmd/podman/ps.go
index 4ac779430..d2c5e19e2 100644
--- a/cmd/podman/ps.go
+++ b/cmd/podman/ps.go
@@ -31,6 +31,7 @@ const (
hsize = "SIZE"
hinfra = "IS INFRA" //nolint
hpod = "POD"
+ hpodname = "POD NAME"
nspid = "PID"
nscgroup = "CGROUPNS"
nsipc = "IPC"
@@ -355,7 +356,7 @@ func psDisplay(c *cliconfig.PsValues, runtime *adapter.LocalRuntime) error {
fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\t%s", hid, himage, hcommand, hcreated, hstatus, hports, hnames)
// User wants pod info
if opts.Pod {
- fmt.Fprintf(w, "\t%s", hpod)
+ fmt.Fprintf(w, "\t%s\t%s", hpod, hpodname)
}
//User wants size info
if opts.Size {
@@ -374,7 +375,7 @@ func psDisplay(c *cliconfig.PsValues, runtime *adapter.LocalRuntime) error {
fmt.Fprintf(w, "\n%s\t%s\t%s\t%s\t%s\t%s\t%s", container.ID, container.Image, container.Command, container.Created, container.Status, container.Ports, container.Names)
// User wants pod info
if opts.Pod {
- fmt.Fprintf(w, "\t%s", container.Pod)
+ fmt.Fprintf(w, "\t%s\t%s", container.Pod, container.PodName)
}
//User wants size info
if opts.Size {