| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Simplify some logic by using a common 'dest' for mutually exclusive
options.
Change-Id: Ie5f3600672953f40be52de51e84717c8912ddaf8
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the command ``openstack image create --volume`` calls cinderclient
to upload the volume to image service (glance) but OSC passes ``visibility``
and ``protected`` fields which are only available in microversion 3.1 or
greater. This generates an error if the user is using volume microversion
< 3.1 and wants to create an image from volume.
This patch fixes that by only passing ``visibility`` and ``protected`` fields
when the volume microversion is 3.1 or greater and fail otherwise i.e. the
following 3 cases:
1) visibility/protected argument + mv >= 3.1 = pass
2) visibility/protected argument + mv < 3.1 = fail
3) not visibility/protected argument + any mv = pass
Story: 2010060
Task: 45511
Change-Id: I568a0ea0af8f7f82b16d49a6a1bb0391b99c50dc
|
| |
|
|
|
|
|
|
| |
Add a "--all" option to "openstack image list", which allows the user to
list all of the images.
Story: 2010071
Change-Id: I56a2e4846d0380d07803305fb830d1a43dfd71b3
|
| |
|
|
|
|
|
|
|
| |
Currently in case of passing `--tag` several times, only last one will
be picked up for the filtering. In the meanwhile Glance allow option to
be repeated multiple times to filter based on the multiple tags.
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/789827
Change-Id: I7379d0b0014f0e3d13b02ee5ec6b642a7a5aa7d1
|
| |
|
|
|
|
|
|
|
| |
This was a very difficult command to grok, due to the layering on of
additional features over the years. Make this a little easier to follow
by grouping related logic and making use of argparse features.
Change-Id: I4e1a0aed09ea5d6a8c26ec3e888c9c7b6cefc25a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
These clients are intended to fake out the old glanceclient client which
we no longer use. They were only "working" because we weren't actually
using any of the glancelclient-based stuff and were instead overriding
everything within the tests. Move these overrides back to the main
fake client and remove the crud.
Change-Id: I92ee74a1df72a6dd23f9d2dc04342aab0cbd3210
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
|
| |
|
|
|
|
|
|
|
| |
We're no longer creating fake versions of glanceclient's 'Resource'
object but rather openstacksdk objects. As such, there's no point
nesting things under a fake resource class.
Change-Id: I39cd5302622f4542db9eebcccfad0cb90d077441
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
|
| |
|
|
|
|
|
|
|
| |
These haven't been used since we switched the image commands from
glanceclient to openstacksdk. There's more cleanup to be done here but
that can be done later.
Change-Id: I3de1f24323886b122b3a30660fb3de18eb7014e9
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Delete duplicate return code.
While adding return of a new Member type, the existing return code part is not deleted.
Note the code in fakes.py in the below commit where these codes were added.
- Project: python-openstackclient
- The commit: 60e7c51df4cf061ebbb435a959ad63c7d3a296bf
Change-Id: Iae44770a784732991962cd38472095f76ab2543f
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
assertItemsEqual was removed from Python's unittest.TestCase in
Python 3.3 [1][2]. We have been able to use them since then, because
testtools required unittest2, which still included it. With testtools
removing Python 2.7 support [3][4], we will lose support for
assertItemsEqual, so we should switch to use assertCountEqual.
[1] - https://bugs.python.org/issue17866
[2] - https://hg.python.org/cpython/rev/d9921cb6e3cd
[3] - testing-cabal/testtools#286
[4] - testing-cabal/testtools#277
Change-Id: I0bbffbec8889b8b3067cfe17d258f5cb16624f38
|
| |
|
|
|
|
|
|
|
| |
openstack image set [--hidden|--unhidden] IMAGE
openstack image list --hidden
Task: 41734
Story: 2008581
Change-Id: Ie84f10c0f7aa2e7b7f78bfadc70132a10673866e
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, we attempt to unset an image property by setting it to None.
This doesn't work for known properties and is rightly rejected by the
Glance API with the following error:
BadRequestException: 400: Client Error for url:
http://172.20.4.87/image/v2/images/368c5751-2b0b-4a38-a255-fd146fe52d31,
Bad Request
The solution is to actually unset the field by deleting it.
Change-Id: Ie156bedbe0f9244f82c81401679706f484caf9aa
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Story: #2008463
Task: #41493
|
| |/
|
|
|
|
| |
The motivation is to filter the image by owner
Change-Id: I1f08da175a06e62a844f76b0ec18cb3332efef86
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This requires fixes found in cliff 3.5.0 [1] and osc-lib 2.3.0 [2]. With
these fixes in place, we can remove the icky, still broken
'assertItemEqual' and 'assertListItemEqual' helpers.
[1] https://review.opendev.org/761421
[2] https://review.opendev.org/761394
Change-Id: Id6c26b37c3c7d5ec6761361abca57f9219b76838
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
|
| |
|
|
|
|
|
|
|
|
| |
+ Fixes issue with large images hogging memory
+ stream image downloads
+ output to stdout if file not specified
Change-Id: Ia01ff9b21a2dac5d0ccf2bd58a8640e88c5cbb36
Story: 2007672
Task: 39776
|
| |
|
|
|
|
|
|
|
|
|
| |
With 60e7c51df4cf061ebbb435a959ad63c7d3a296bf the behaviour of
`openstack image create` changed so that you can't create an image
with the same name. This patch restores the previous functionality.
Story: 2008229
Task: 41069
Change-Id: Ia0f4920371a918e94d1ccf9fcfcbf90ff885a455
|
| |
|
|
|
|
|
|
|
|
| |
openstacksdk added support for using image import as a fallback
which is transparently supported here, but also provides an
override flag to allow a user to force use of import. Expose that
here.
Depends-On: https://review.opendev.org/737608
Change-Id: Ied938a8f63f305305a20ace42e9f4c84b0a5c00e
|
| |
|
|
|
|
|
|
|
| |
In https://review.opendev.org/#/c/650374/ a work has been started to
switch image service support from glanceclient with all it's
dependencies to the SDK version. With this change version 1 (anyway
deprecated since ages) is also being switched to SDK.
Change-Id: Ic391500af02a73d81d64a9e9113cca85c9e24390
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is a work to switch OSC from using glanceclient to OpenStackSDK.
With this change only v2 is using OpenStackSDK. V1 is still using
glanceclient and will be switched in a separate change.
Remove the direct depend on keystoneauth- let that flow through
openstacksdk.
Depends-on: https://review.opendev.org/#/c/698972
Change-Id: I36f292fb70c98f6e558f58be55d533d979c47ca7
|
| |
|
|
|
|
|
|
|
|
|
| |
We had this library capped at a release that is a few years old. Now
that we have dropped py2 testing, we can pick up the latest version.
This uncovered a few things to clean up. Mostly the fact that mock is
now a part of the StdLib unittest since Python 3.3.
Change-Id: I27484dd4c25378413ff16e97a35a1a46062357bc
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
Related functional tests are converted into JSON format.
Otherwise, it is not easy to check results.
Partial-Bug: #1687955
Partially implement blueprint osc-formattable-columns
Change-Id: Ib82e15738544975fede0c54cc5eaf239f4c67277
|
| |
|
|
|
|
|
| |
* Remove ``image create|set`` option ``--owner``
Change-Id: I1fabab98c8660eba6d0dd75e74544c6c9d432b9e
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
* Remove openstackclient.api.utils and use osc_lib.api.utils
* Remove openstackclient.common.clientmanager.ClientManager.auth_ref
* Remove openstackclient.common.commandmanager
Change-Id: I67e1dbc53cc0b37967c0011bcb2fc09bdef62d94
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Client site fix of --limit option.
This bugfix makes client "image list" command working again with
"--limit" option. This option was ignored and even if user specified it,
still list of all available images was returned.
Story: 2004314
Change-Id: I30a78d65a644c9b7d23706a6637ce77bca2c2386
Depends-On: https://review.openstack.org/#/c/634776/
|
| |/
|
|
|
|
|
|
|
| |
In order to see image sharing membership it is required to additionally
pass member_status filter to API. Otherwise only those with status 'all'
will be returned. Thus adding possibility to see images shared with
project to be approved or rejected.
Change-Id: Ifd6e13e5a4ef09fbc29e76d464c93fbdbb178ae4
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
"--community" was added to "image create" and "image set" previously,
but was missed in "image list".
Change-Id: I959fdd7f67ae62c8326659ce52389228152ec019
Story: 2001925
Task: 14453
|
| |/
|
|
|
|
|
|
| |
Need to bump osc-lib to 1.10.0
Closes-Bug: #1736696
Depends-On: I2aab5cc1f550848bda2b90ef7ef9a60f07b88996
Change-Id: I7420204f28d36529354e5671bd88587d9b15bb06
|
| |
|
|
| |
Change-Id: I2e222d3e69df9d8d7cd472663caaee31bedd848c
|
| |
|
|
|
|
|
|
| |
The OpenStack client presently has support to add or remove members
from an image, but no way to list image members. This patch addreses
this issue.
Change-Id: Ie85c5de23c6beb21fd6b4c04c83ddf2a116606ef
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now if Glance v2 cannot find image data it returns an empty
response with 204 status code, instead of raising an error.
Glance client handles this situation and wraps the response
with a RequestIdProxy object, whose 'wrapped' attribute is
None.
But when openstack client tries to parse this object using
glanceclient's save_image util function, it fails with
"NoneType object is not iterable" message, for the
object doesn't contain any data.
This patch adds additional check to prevent such behaviour
and raises SystemExit exception if no data was returned from
the server.
Glance v1 is not affected, because it raises an error if can't
find an image data.
Change-Id: I016a60462ba586f9fa7585c2cfafffd7be38de7b
Closes-Bug: #1741223
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The current openstackclient implementation cannot accept 0
for --min-disk and --min-ram with the "openstack image set" command.
If theses options get set to 0, the option parser in openstackclient
wrongly interprets 0 as no option value. The 0 is valid for these
options if administrators want to make it the default(no minimum
requirements).
This patch fix the parser so that it avoids only 'None'.
Change-Id: Ie8ee37484c02c26f54adc56263fcd167c0ce7eb3
Closes-bug: #1719499
|
| |/
|
|
|
| |
Closes-Bug: #1717130
Change-Id: I33c6fc7897dfee85d1c197a1267bde4abfa5bbd9
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In reviews we usually check import grouping but it is boring.
By using flake8-import-order plugin, we can avoid this.
It enforces loose checking so it sounds good to use it.
This flake8 plugin is already used in tempest.
Note that flake8-import-order version is pinned to avoid unexpected
breakage of pep8 job.
Setup for unit tests of hacking rules is tweaked to disable
flake8-import-order checks. This extension assumes an actual file exists
and causes hacking rule unit tests.
Change-Id: I12b596820727aeeb379bee16c2bc993dee9eb637
|
| |
|
|
|
|
|
|
|
| |
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
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| | |
Change-Id: I72a1da209df38e226ec02d9dbd0142ed4020c0d2
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Fix option-describe typos
- Correct option and envvar markup, for commands that are using the
reference form instead of the definition form or are marking up
option arguments as options
- Avoid duplicate commands
- Fix some invalid docstrings
- Fix some invalid indentation
- Disable the murano plugin, which has invalid docs
- Correct issues with- and track the network-topology spec
- Include API modules in docs
Change-Id: I3d5ed5e872540fe13f3e4bd5e9335829dc9a5226
|
| | |
| |
| |
| |
| |
| |
| | |
Let's try just unrolling the member status tests and not getting
too fancy here.
Change-Id: I30022ebd2da6d6cf1abba424d7d7fa679285f291
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
|
|
|
|
|
|
| |
Add FakeImage class, and refactor the unit tests
with it in image v1.
Change-Id: I9024ca5eca5c604e7588c1d905562bf6838309f1
Implements: bp improve-image-unittest-framework
|
| |
|
|
|
| |
Change-Id: I7aeceede6bd3cb88cf04f398454f9758dbee20f1
Closes-Bug: #1475722
|
|
|
this will better isolate the unit tests from the functional tests.
unfortunately, the "integration" tests had to be lumped into the
"unit" tests since we need the separation in testr.conf
Change-Id: Ifd12198c1f90e4e3c951c73bfa1884ab300d8ded
|