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>
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>
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>
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
This patch adds a command "image metadef object property show" which
describe a specific metadata definitions property inside an object.
Change-Id: I738e2e3c27c9819290d5a2a8781878b81f03b5f9
This patch adds a command "image metadef object update" which
update metadata definitions object inside a namespace.
Change-Id: I2dd8f54f9224abda5adc7a1b6a1c270c49d473a7
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>
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>
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
This patch adds a command ``image member get`` which displays
a particular member associated to the image.
Change-Id: I48d3151f8e204e1eb5cfff67ce1e333d1cfb9322
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>
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>
This patch will add ``image metadef resource type list`` using
SDK, output matches glance client output.
Change-Id: I29850abdbb06d5a4eaf8a9a60f565b46f4009f85
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>
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