image query doesn't recognize protected param

Bug #1755862 reported by Karl Bielefeldt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack SDK
New
Undecided
Unassigned

Bug Description

Querying for a list of images that are not protected:

    conn.image.images(protected='false')

Yields the following exception:

  File "/home/kbielefe/source/nms-suite-openstack/venv/lib/python2.7/site-packages/openstack/resource.py", line 885, in list
    cls._query_mapping._validate(params, base_path=cls.base_path)
  File "/home/kbielefe/source/nms-suite-openstack/venv/lib/python2.7/site-packages/openstack/resource.py", line 252, in _validate
    extra_data=invalid_keys)
openstack.exceptions.InvalidResourceQuery: Invalid query params: protected

Docs list 'protected' as a valid query param here: https://developer.openstack.org/api-ref/image/v2/index.html#id7

Adding 'protected' to the _query_mapping in image/v2/image.py produces the desired result.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers