The method 'list' throw unexpected exceptions when was inserted the 'entity_id' parameter.

Bug #1628253 reported by Arthur Miranda
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-keystoneclient
Expired
Low
Unassigned

Bug Description

The <<client>> as a V3 client, so follows the scenarios

---------------Scenario 1------------------
client.<entity>.list(id='any value')
e.g. >>> client.users.list(id='any value')

Output: [ behaviour OK ]
TypeError: list() got an unexpected keyword argument 'id'.
To retrieve a single object using a globally unique identifier,
try using get() instead.

---------------Scenario 2-----------------
client.<entity>.list(entity_id='existent id')
e.g. >>> client.projects.list(project_id='3f18beea64e94b2da763448d070085bf')

Output: [ unexpected behaviour ]
[...]
File "[...]base.py", line 74, in func return f(*args, **new_kwargs)
File "[...]base.py", line 386, in list self.collection_key)
File "[...]base.py", line 129, in _list data = body[response_key]
KeyError: 'projects'

---------------Scenario 3-----------------
client.<entity>.list(entity_id='nonexistent id')
e.g. : client.projects.list(project_id='nonexistent')

Output: [ unexpected behaviour ]
[...]
File "[...]/__init__.py", line 101, in inner return wrapped(*args, **kwargs)
File "[...]session.py", line 570, in request
raise exceptions.from_response(resp, method, url)
NotFound: Could not find project: as (HTTP 404) (Request-ID:[...]) instead.

----------------------------------------

It's very simple to resolve it and implies changes in only one line
of 'list' function of the CrudManager

Arthur Miranda (artmr)
description: updated
description: updated
Arthur Miranda (artmr)
Changed in python-keystoneclient:
assignee: nobody → Arthur Miranda (artmr)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/378001

Changed in python-keystoneclient:
status: New → In Progress
Changed in python-keystoneclient:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-keystoneclient (master)

Change abandoned by Arthur Miranda (<email address hidden>) on branch: master
Review: https://review.openstack.org/378001
Reason: I'm not sure about the adopted strategy. Maybe the right way be a new patch.

Revision history for this message
Lance Bragstad (lbragstad) wrote :

Automatically unassigning due to inactivity.

Changed in python-keystoneclient:
assignee: Arthur Miranda (artmr) → nobody
status: In Progress → Triaged
Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

IS this still an issue, marking incomplete.

Changed in python-keystoneclient:
status: Triaged → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for python-keystoneclient because there has been no activity for 60 days.]

Changed in python-keystoneclient:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.