Commit graph

10 commits

Author SHA1 Message Date
Daniel J Walsh
4e4a7c5c1d Merge pull request #959 from rhatdan/validate
validateFlags command line options to make sure the user entered a value
2017-10-04 18:29:57 -04:00
TomSweeneyRedHat
f92ed659ab Add pause state to ps, touchup kpod man page
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2017-10-04 07:42:21 -04:00
Daniel J Walsh
04e96d05fc validateFlags command line options to make sure the user entered a value
When a user enters a CLI with a StringFlags or StringSliceFlags and does not add
a value the CLI mistakently takes the next option and uses it as a value.

This usually ends up with an error like not enough options or others.  Some times
it could also succeed, with weird results.  This patch looks for any values that
begin with a "-" and return an error.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-10-04 09:36:29 +00:00
umohnani8
036658b844 Modified namespace field in json struct
The namespace field was not being omitted when empty

Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-09-15 17:30:25 -04:00
umohnani8
38e9f07844 Add namespace flag to kpod ps
The namespace flag prints out information about the namespaces

Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-09-10 11:21:49 -04:00
umohnani8
45c7100253 Slight modification to kpod ps based on QE feedback
QE noticed that kpod ps --last 0 was returning the running containers
Fixed that problem so that it returns nothing

Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-09-08 10:32:11 -04:00
baude
94602a1e85 cmd/kpod/ps.go: Use getCommand for JSON
The getCommand func strips out unwanted characters around the
command of the container.  The JSON output should use this func
like the regular ps output for both consistency and because
Python does a literal interpretation of the bracket [] characters
when consuming as JSON.

Signed-off-by: baude <bbaude@redhat.com>
2017-08-30 09:26:20 -05:00
baude
6f492593ec Add image_id to json output
Consumers of the json output, like the atomic cli, need the ID of the
image for the container as well as the name.  Specifically, it is used
to tract "used" and "vulnerable" images.

Signed-off-by: baude <bbaude@redhat.com>
2017-08-28 20:44:22 -05:00
umohnani8
d76e500b59 Modify the JSON output of kpod ps
Changed the JSON output to hold the actual type of the data.
For example the creation time of a container will be of form time.Time.
The human readable output modifies all the fields to type string, which
is not helpful when the JSON output wants to be used for further processing.

Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-08-27 20:41:50 -04:00
umohnani8
35ca80abe6 Add 'kpod ps' command
kpod ps lists the containers currently stored

Displays the list of containers

Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-08-22 16:40:45 -04:00