v2 image-update does not accept --location parameters
Bug #1271452 reported by
David Koo
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance Client |
Fix Released
|
High
|
David Koo |
Bug Description
Step1: Create an empty image (no image data) - doesn't matter which image api version you use.
Step2: Use glanceclient's v2 image-update API to set the location property of the image. It will fail with the following error:
glance image-update: error: too few arguments
This is an argparse error: according to the schema 'locations' is a list and so argparse treats the image ID as one of the positional arguments for 'locations'. The mandatory 'ID' positional parameter is therefore left empty, leading to this error.
Note: The Glance REST APIs allow modification of an image's 'location' property (provided it's in the queued state).
Changed in python-glanceclient: | |
assignee: | nobody → David Koo (kpublicmail) |
Changed in python-glanceclient: | |
status: | New → In Progress |
Changed in python-glanceclient: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I have noticed this issue as well. But I have no time to dig into it. I think the root cause is 'locations' is a 'wrapping' attribute based on the v2 image schema.
Thanks for working on this.