241 Commits

Author SHA1 Message Date
Stephen Finucane
f98006ca9d pre-commit: Migrate pyupgrade to ruff
Change-Id: Ic50d2a5e0bc9dcdfe29f382607135cab510cd396
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-09-12 18:08:23 +01:00
Stephen Finucane
2ba90581d5 pre-commit: Migrate from flake8 to ruff
Well, mostly. We still keep our own flake8 hooks and the hacking hooks
enabled. Everything else can be handled by ruff.

Doing this enables a couple of hacking checks that were previously
unaddressed. It also highlights a few cases that flake8 missed. Both are
addressed.

Change-Id: If81c7055e9ef692425da2789bae18a96d04b104f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-08-29 15:55:13 +01:00
Stephen Finucane
438e40db36 Remove python-novaclient
There are a few remnants left here but this is trivial to clean up now.

Change-Id: I517d906796338e64a31afa08b9ee6909b08e0115
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-18 13:28:51 +01:00
Stephen Finucane
c5b772db76 trivial: Prepare for pyupgrade pre-commit hook
This change is entirely automated save for the update of some mocks from
'io.open' to '__builtins__.open').

We are keeping this change separate from addition of the actual hook so
that we can ignore the commit later.

Change-Id: I0a9d8736632084473b57b57b693322447d7be519
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-04-23 12:24:23 +01:00
Stephen Finucane
ee23995004 pre-commit: Bump versions
We fold in the new black changes also.

Change-Id: I326a0529b6b9f2aa9fbc33862567131839460797
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-04-23 12:22:26 +01:00
Zuul
a79cb608b0 Merge "Add image metadef resource type association commands 'create', 'list', 'delete'" 2024-04-15 14:01:02 +00:00
Zuul
c13977fd68 Merge "image cache clear: fix value of default target" 2024-04-15 13:00:43 +00:00
Antonia Gaete
276dbb6f56 Add image metadef resource type association commands
'create', 'list', 'delete'

Change-Id: I2c860427b0b2693076cfe57841f0e512ad1f6388
2024-04-15 11:42:45 +00:00
Cyril Roelandt
0970dd4096 image cache clear: fix value of default target
When using the "openstack image cache clear" command, the "clear_cache"
method from the OpenStack SDK is used. It expects its only argument to
be one of "both", "cache" or "queue". However, when passing neither
"--cache" nor "--queue", it is currently passed None as a value. Fix
this by specifying "both" as the default value to be passed.

Change-Id: I17c6e3d435a84b4ba453845086ff3fe272b54f58
2024-03-14 04:03:08 +01:00
Mridula Joshi
2a90a6f07b Adds CLI support for `glance md-object-property-show`
This patch adds a command "image metadef object property show" which
describe a specific metadata definitions property inside an object.

Change-Id: I738e2e3c27c9819290d5a2a8781878b81f03b5f9
2024-02-15 14:16:34 +00:00
Zuul
2eea916b35 Merge "Adds CLI support for `glance md-object-update`" 2024-02-14 12:01:10 +00:00
Mridula Joshi
3cd5ad2c1b Adds CLI support for `glance md-object-update`
This patch adds a command "image metadef object update" which
update metadata definitions object inside a namespace.

Change-Id: I2dd8f54f9224abda5adc7a1b6a1c270c49d473a7
2024-02-13 18:28:00 +00:00
Stephen Finucane
c128ae1969 trivial: Don't ignore missing resources
An openstacksdk 'find_foo' proxy method will return None by default if a
resource is not found. You can change this behavior by setting
'ignore_missing=False'. We were doing this in most, but not all cases:
correct the issue.

In the event of calling 'image delete' with multiple images, it will no
longer fail on the first missing image and will instead attempt to
delete remaining images before failing.

Change-Id: I1e01d3c096dcaab731c28e496a182dd911229227
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-02-13 16:33:56 +00:00
Zuul
0e5802c945 Merge "trivial: Fix typo" 2024-02-02 12:38:41 +00:00
Zuul
c8ecba2a9e Merge "image: Fix the default description of image visibility" 2024-02-02 11:23:51 +00:00
Stephen Finucane
d0f81f5717 trivial: Fix typo
Change-Id: I936cc07af38bdd5d389cc5edafa93861f8fac3a6
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-02-02 10:14:29 +00:00
Stephen Finucane
8a63b51039 image: Trivial fixes
Mostly stylistic, with the exception that we now allow deleting multiple
metadef properties in a given namespace.

Change-Id: Ib0c243f0d647ce74c0165ee666beed6eb5d5c5a7
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-01-29 13:53:34 +00:00
Zuul
dc8d9d3541 Merge "Adding CLI command for `glance member-get`" 2024-01-26 17:37:15 +00:00
Mridula Joshi
1517f4af21 Explicitly specify namespace fields for output
Rather than excluding the few fields we don't want, explicitly indicate
the ones we do want.

Note that this is a problem in the tests for virtually all commands
that will be seen as the SDK continues to evolve and new fields are
added to existing resources.

Change-Id: Ia8d487e1e7804fa177fce46497c0202aed8acb08
2024-01-16 15:14:55 +00:00
Mridula Joshi
93b2e66d2d Adding CLI command for `glance member-get`
This patch adds a command ``image member get`` which displays
a particular member associated to the image.

Change-Id: I48d3151f8e204e1eb5cfff67ce1e333d1cfb9322
2023-12-20 05:03:40 +00:00
Zuul
19896ec720 Merge "Adds command `image metadef object delete`" 2023-11-22 11:05:26 +00:00
Mridula Joshi
5d1afcee68 Adds command `image metadef object delete`
Change-Id: Ib94b7ba625ca0679ae4ae841e217ea251baff371
2023-11-17 10:46:35 +00:00
Zuul
1ac5d63c53 Merge "Adds command `image metadef object list`" 2023-11-08 18:01:44 +00:00
Zuul
8aee1a2889 Merge "Adds command `image metadef object show`" 2023-11-08 18:01:42 +00:00
Zuul
71f232aafa Merge "Add "image metadef property set" command" 2023-11-08 10:46:35 +00:00
Mridula Joshi
4bb6efa8f8 Adds command `image metadef object list`
Depends-on: https://review.opendev.org/c/openstack/openstacksdk/+/858350
Change-Id: I0691f7519e8fb9f01836e6232e0bcebd2c428ac3
2023-11-08 10:44:31 +00:00
Masayoshi Mizuma
a3730afe2e image: Fix the default description of image visibility
The default image visibility was changed to 'shared' in API v2.5. Fix
the help information of image visibility, centralizing options in the
process.

Change-Id: Ib3017fc4f618c1e14e3b26b616ff9374d0e24eaa
Co-authored-by: Stephen Finucane <stephenfin@redhat.com>
2023-11-08 10:41:07 +00:00
Zuul
c09c1fbf51 Merge "Add "image metadef property delete" command" 2023-11-08 10:35:38 +00:00
Mridula Joshi
78ef009a3a Adds command `image metadef object show`
Depends-on: https://review.opendev.org/c/openstack/openstacksdk/+/858350
Change-Id: I97bcb0ccee9d25fb26475ec9e10660556e6072a6
2023-11-08 09:57:02 +00:00
Zuul
0439f17ed3 Merge "image: Add support for cache commands" 2023-11-07 09:31:24 +00:00
Zuul
e54bdfbba3 Merge "Adds command `image metadef object create`" 2023-11-07 09:31:21 +00:00
Stephen Finucane
c7e3529dea Add pagination helpers
Add some pagination helpers to configure pagination parameters for
various commands. Two pagination schemes are supported, based on what we
currently support across OSC commands: marker-based pagination and
offset-based pagination.

Change-Id: I551bb4c3ff0568c6df5244a1d0f0669497bee58f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-11-03 23:16:18 +00:00
Mridula Joshi
f8c708900c Adds command `image metadef object create`
Depends-on: https://review.opendev.org/c/openstack/openstacksdk/+/858350
Change-Id: Ie74231c823d6128d149d5f01c90a66ed3afa3d1a
2023-11-01 07:15:59 +00:00
Cyril Roelandt
705ecef7a9 Add "image metadef property set" command
Change-Id: I8fbe8ef5b5119fb500df0ed1b6e645ea00eadf01
2023-10-18 14:02:34 +00:00
Cyril Roelandt
9094e540b5 Add "image metadef property delete" command
Change-Id: I2e13b26139424c421ae609804c546a6b42add5a4
2023-10-18 13:27:02 +00:00
Cyril Roelandt
d9c4c43a40 Add "image metadef property create" command
Change-Id: Icb4fab0aef13b28212771da3a3b7c4a0775bb38e
2023-10-18 13:26:15 +00:00
Cyril Roelandt
190f06a963 Add "image metadef property show" command
Change-Id: I326735014dfcb4477b109a99aa31f71b07b91c7b
2023-10-18 12:39:39 +00:00
Cyril Roelandt
5fb922e469 Add "image metadef property list" command.
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/857727
Change-Id: I8f6692e779c4721225052d348b4b947a545bd6c0
2023-10-18 12:39:35 +00:00
Mridula Joshi
c628c2dcd3 image: Add support for cache commands
Depends-on: https://review.opendev.org/c/openstack/openstacksdk/+/874372
Depends-on: https://review.opendev.org/c/openstack/openstacksdk/+/874940
Change-Id: I96b95cb93d298602b6d4b0cd35a213478babff5f
2023-10-10 09:28:12 +00:00
Mridula Joshi
18a6199ed0 Adding image stores info command
This is an equivalent for ``glance stores-info``.

Depends-on: https://review.opendev.org/c/openstack/openstacksdk/+/883493
Change-Id: I15d2c2c523ace1cfb32045328ecee8ce8beea63f
2023-08-10 07:34:19 +00:00
Zuul
7dc1276f40 Merge "Adding `image delete --store and image import info` commands" 2023-08-09 19:01:35 +00:00
Mridula Joshi
b347347986 Adding `image delete --store and image import info` commands
Change-Id: Ia5fc44c6738f8ee3a0781d824c7f7fa458185e0c
2023-08-07 17:13:33 +00:00
Antonia Gaete
52bf194741 Add image metadef resource type command 'list'
This patch will add ``image metadef resource type list`` using
SDK, output matches glance client output.

Change-Id: I29850abdbb06d5a4eaf8a9a60f565b46f4009f85
2023-07-06 17:27:21 +01:00
Stephen Finucane
7ca43885c2 Blacken openstackclient.image
Black used with the '-l 79 -S' flags.

A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.

Change-Id: I6420ec6fd550903b03083b9b1f8391511913c86f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-10 10:51:30 +01:00
Mridula Joshi
16c78fef15 Adding `image import` command
Change-Id: I7254d30431894879c8bd20e2263d83b12c99d5c8
2023-04-12 09:42:43 +00:00
lsmman
e53f706d0b Add missing documentation for state options for "image set"
The current "image set" with the state option behaves as follows: if you
use --project, it updates the membership status of the given project.

When this command was first added, it had the following description:

  If --project is passed, update the membership status for the given project

However, the description was missed when moving the documentation for
which command to the parser for each command method in commit f055fe67c.
Correct this oversight.

Co-authored-by: JAE YONG LEE <jaeljy135@gmail.com>
Change-Id: I18a29a19ce973971f68a52cbf4020cfa324c7a35
2023-02-22 10:14:21 +00:00
Zuul
f1da522cc3 Merge "image: Add support for additional image import methods" 2023-01-25 18:04:00 +00:00
Zuul
21c3c33087 Merge "image: Fail if we can't find an image" 2022-12-20 13:36:43 +00:00
Zuul
a805f7ebb1 Merge "image: Rename import" 2022-12-20 13:20:11 +00:00
Zuul
db6909bc63 Merge "Add image metadef namespace command" 2022-12-15 17:45:31 +00:00