nova api support parameters like 'name', 'server', 'status',
etc in image-list(). So openstackclient should support this too.
DocImpact
Closes-Bug: #1698742
Change-Id: Ice66b409f989e6785aa3b2d42f2fdbf6e23fa0aa
This feature will allow image owners to share images across multiple
tenants/projects without explicitly creating members individually
through the glance API V2. “Community images” will not appear iu
user's default image listings
Change-Id: Ic02bf44cca5d6d793d68a8737d3cfe3f44407d88
Closes-Bug: #1626837
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
Change-Id: I2c31746ed6ded3845244e03e57d809f8bc0e6b9d
Added parser.add_mutually_exclusive_group() for --file and --volume
in openstack image create.
Change-Id: I4d9fc6314801d569354e5644e231ddd6c7f1853d
Closes-Bug: 1666551
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.
Change-Id: Icdea5fab801abd651baf45cf96c920c7df79f11b
Closes-bug: #1658138
Include option '--human-readable' to 'image show' command.
This option displays image size in human readable format
(such as K, M, G, T,..)
Related Commit: I0ef74c2ec978483fe49156c88acf5c369a8fa5c2
Closes-Bug: #1640086
Change-Id: I28cd5702925d51303d0607ed8dccf12c56434682
This patch adds 3 new options to the "image set" command: --accept,
--reject and --pending. This updates the membership status for
an image.
Closes-Bug: 1620481
Change-Id: I13b8c067aad68ece9ff636fbdd83bcb3663c91b2
This reverts commit 0b6fdcbe4c3f3142fdd18bfd827653d894607941.
Adapt "image list" to not loop when --marker is specified on command
line.
Update tests to work with current state of code.
Change-Id: I8af58adf8637a9e34371c6280db40935d22bc3c3
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.
Related-Bug: 1635518
Change-Id: Ib4c66b06e07f1d4e5bfe1b74053f2215cccad890
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)
Change-Id: I6c61f6e5a04824d655ccf43477afcec9652101df
Closes-Bug: #1639231
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.
Closes-Bug: 1636209
Depends-On: Id915f6aa7d95a0ff3dc6e2ceaac5decb3f3bf0da
Change-Id: I8673080bb5625e8e3c499feaefd42dfc7121e96f
The checksum could potentially be useful for spotting duplicated images or
checking if images with the same name are identical or different.
Closes-Bug: #1602073
Change-Id: Ia0c41970c846d550de14297e18bc738e847e5a3b
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.
Change-Id: I5fb6dea5da7fb6e1e2b339a713c7d37f8c99e407
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.
Change-Id: Icdff4dab17dedcb40289700c4cd278e6e62eea25
Use file logger for all command specific logs.
This patch also fixes some usage that doesn't
follow rules in:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html
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.
Change-Id: I114f73ee6c7e84593d71e724bc1ad00d343c1896
Implements: blueprint log-usage
Use osc-lib directly for exceptions.
Leave openstackclient.common.exceptions for deprecation period.
Change-Id: Iea3e862302372e1b31ccd27f69db59b4953ca828
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.
Change-Id: I1a6da8d791fa0ae67cac46eec81bcbcb420729c3
Closes-Bug: #1559344
Users could specify the last image (name or ID) of the previous page with
--marker option to control the start image of the output.
Change-Id: Idca0235ee83b1226b00c89cf3d38500fa898b7d0
Closes-Bug: #1540988
This option is quite useful if there are too many images.
Change-Id: If6a901c27c5da2d1f4412e8fa9ba3bed3b72fdd9
Co-Authored-By: Tang Chen <chen.tang@easystack.cn>
Partial-Bug: #1540988
Since --page-size has never worked, there is no paginate logic needs
to be implemented in "image list" command. So remove the unnecessary
loop.
And also, the marker is not necessary because --marker option has not
been implemented. Will add it back when implementing --marker option.
Change-Id: I71fea1502f92f447a49697edb52e8e82f336772f
Partial-Bug: #1540988
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.
Closes-Bug: #1532294
Change-Id: I43cd0290a4353c68c075bade9571c940733da1be
* 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
Change-Id: Iccb1a1d9175ef9b5edcd79d294607db12641c1f0
This change allows admins to deactivate and reactivate their
images. Currently this has to be done with the REST api or the
glanceclient.
This change introduces `--deactivate` and `--activate` for the `image
set` command.
This requires glanceclient 1.2.0. Which got bumped here:
https://review.openstack.org/#/c/257512/
Change-Id: I476c44a0343cdc92d58ddc93fb06470242de2345
Depends-On: I2c370c6bf6ff664d94d756cc76aaa983fbdb8869
Closes-Bug: 1516661
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).
Change-Id: Id2a9f86f0de5310f8f5ff9a46bf1b7411094b519
Closes-Bug: #1519181
This was previously part of the command, so added it in for backwards
compatibility. This adds the --volume command and the complimentary
--force command allowing users to create images from volumes.
It seems it may not be possible to add it to image set v2.
Change-Id: Ica36e70989f75d80959af3227f66708758fae68d
This adds --owner to `image create`. This is backwards compatable with v1.
Change-Id: I9e79cf880c91a1386419db729818d23dfe632179
Depends-On: I8d572a070bbb04dccdd051b8e0ad199c5754746e
image_member doesn't have a _info attribute, glanceclient returns
warlock object instead of a Resource object.
Change-Id: If6e7c4bd404454bd6cbe8c111879c1afa1380211
Closes-Bug: #1509054
the rest of OSC set commands do not show the resource after it has
been updated. unless the update fails then we report back a failure,
otherwise the user should assume everything went fine.
Change-Id: I2bd4188450c3853b4a1bc25f80fc9450cda32bdd
This adds --tag to the v2 version of `image set`. This
is another step to compatability between the osc image api.
Added merge of tags into existing tags and handling duplicates,
and tests for same.
Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com>
Change-Id: Ie800fcbf8bbc0978c54ace3278750a18023e8ce4
Make the Image v2 image set command meet at the intersection of the v1
image set command and the v2 image create command:
* Add visibility to the deadopts list and remove the option
* Put the options in the same order as v1 image set
* Make the help text match
* Add --properties
* Move the additional options that do not appear in either v1 image set or
v2 image create after --property as they are really pre-defined properties
* Add tests for v2 image set to match v1 and then some
* Put the SetImage class in v2/image.py in alphabetical order
Change-Id: I102b914e8ad09a014f6fdd846c5766b6c2eaadb8