although python-openstackclient run command(image import) with invalid uri,
but the request succeeds. Fixed it to throw an exception
when requesting with an invalid URI.
unit test added. the test cover --uri 'invalid value'
Task: 52251
Story: 2011468
Closes-Bug: 2111777
Change-Id: I62cd8cdf054b6a5e07d664a543b0923ce5f20f83
This doesn't make sense: SDK (and the server) will handle this for us.
Change-Id: I31b84e09eca0dc2bc5316d6727620346ae519512
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2106760
The values of these dictionaries are not used when SDK is in use,
which should soon account for all use cases. Eventually we should
probably look for plugins to return a proper class or typeddict but
that's a job for another day.
This began as a fix for in openstackclient/object/client.py which
referenced a non-existent class and quickly snowballed.
Change-Id: I7b807ec3a97124b35828ffdecbb36f6fde11e7b5
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
the flag should store False to 'allow_failure', not True.
Also, make the --allow-failure and --disallow-failure flags
mutually exclusive.
Change-Id: I03699e14d4d69d9f08caab647293732fc211dbad
creating the image is a 2step process, first an 'empty' image is created
and then the data is uploaded.
Currently the output of the 'image create' command is that 'empty'
image, in `queued` status etc.
A more user friendly approach would be to make a second refresh call
to show the user image as it is after data was uploaded.
Change-Id: I2f78b113dcc3c941f8cf8dd9b63262971a780a39
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>