Cleanup help strings and docs for clarity and to keep things consistent:
* --limit metavar should be <num-resource> to indicate what is being counted
* --marker metavar should be <resource> or <resource-id> to indicate the
type of value being specified
* <*-ip-address> metavars should be just <ip-address> as there is no difference
in format between fixed and floating IPs
* Move all occurances of '(name or ID)' to end of help text
The choices for valid container formats is out of date in the
image v1 and v2 help text. This patch adds 'ova' and 'docker'
and does some minor refactoring to align the container_format
option with the disk_format option.
This patch adds 3 new options to the "image set" command: --accept,
--reject and --pending. This updates the membership status for
This reverts commit 0b6fdcbe4c.
Adapt "image list" to not loop when --marker is specified on command
Update tests to work with current state of code.
Use choices for image set and image create commands, this aligns
with our use of choices in networking commands.
Also update the help text to match that of the networking
commands, where we iterate through the options.
Set the default key and dir for openstack image list,
if no command line argument passed
Changing sort_key to name(old value: created_at)
Leverage the new cliff command class attribute (_description)
to get the help of a command, this allows us to mark strings
for translation. We could not do this before since the help
was grabbed from the docstring.
This also depends on a new release of cliff and a bump to the
minimum level in osc's requirements.
Convert to using ClientManager and OpenStackShell from osc-lib.
* Change all internal uses of ClientManager private attributes that are
now public in osc-lib's ClientManager. Leave back-compat copies in
place in OSC's clientManager so we don't break plugins.
* Put some work-arounds in place for changes in osc-lib that we need until
a new release makes it through the g-r and u-c change process.
* Add a test for Unicode decoding of argv in shell.main() to parallel
the one in osc-lib.
The checksum could potentially be useful for spotting duplicated images or
checking if images with the same name are identical or different.
When an exception was caught and rethrown,
it should call 'raise' without any arguments
because it shows the place where an exception
occured initially instead of place where the exception re-raised.
When OSC failed to set a image's property, it will print
the image name and status, which is an useful info to
users. So translate this massage, and record it in log.
Use file logger for all command specific logs.
This patch also fixes some usage that doesn't
follow rules in:
After this patch, all self.log and self.app.log
will be standardized to LOG().
NOTE: In shell.py, we got the log in class OpenStackShell,
which is also known as self.app.log in other classes.
This logger is used to record non-command-specific logs.
So we leave it as-is.
Implements: blueprint log-usage
It is perfectly valid for a Cinder volume to have a volume_type of
"none", so don't make the Image API v2 require that one be set.
Users could specify the last image (name or ID) of the previous page with
--marker option to control the start image of the output.
Since --page-size has never worked, there is no paginate logic needs
to be implemented in "image list" command. So remove the unnecessary
And also, the marker is not necessary because --marker option has not
been implemented. Will add it back when implementing --marker option.
Previously each command logs take_action parameters explicitly
by using @utils.log_method decorator or log.debug().
Some commands have no logging.
This commit calls a logger in the base class and
drops all logging definition from individual commands.
* image create and image set now use --project to specify an alternate
project to own the image
* --owner is still silently accepted but deprecated, add warning messages
* --project and --owner are mutually exclusive to prevent precedence issues
Closes Bug: 1527833
This change allows admins to deactivate and reactivate their
images. Currently this has to be done with the REST api or the
This change introduces `--deactivate` and `--activate` for the `image
This requires glanceclient 1.2.0. Which got bumped here:
Actually, the status column is useful for the user.
So, it`s better to output this info by default (or, user had
to specify the extra option, i.e. --long).