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>
We want to drop brute force mechainism for handling image
movement, this patch experiments with moving kpod pull
to use new libpod interfaces.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
kpod must parse the crio configuration file or the storage
is not set up correctly. By default it is not. We now read
/etc/crio/crio.conf in as the configuration file unless it is
overriden by the user and the global -c|--config switch.
Signed-off-by: baude <bbaude@redhat.com>
Before exiting, have kpod shut down the storage library if it can. This
should keep us from leaving mountpoints for the root (for non-vfs cases)
and run directory (with newer containers/storage) busy when testing kpod.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Add functions to go templates such as truncating a field. Also add
the table keyword, which, if placed at the beginning of a format string,
adds headers to the output
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
Also set default level of logging to errors, we should not see
info messages in the kpod command line.
While adding this patch, I found missing options in kpod command line
and bash completions, so I added them in.
Also fixed some sorting issues in the way commands are displayer in help or in
bash completions.
Finally fixed the error message to be output on failure using logrus.Errorf, so
we don't get the stack any longer.
Also updated README.md with missing kpod commands.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Make getStore() take a config struct from which it pulls the store
options, then update the kpod commands so that they call getConfig()
and pass the config into getStore()
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
'kpod images' lists all images on a system. 'kpod rmi' removes
one or more images from a system. The images will not be removed
if they are associated with a running container, unless the -f
option is used
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>