quota show for a project blows up

Bug #1481803 reported by Michael Hagedorn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Medium
Terry Howe

Bug Description

openstack quota show <projectid> --debug

 keystoneclient.session REQ: curl -g -i -X GET http://servername:9696/v2.0/quotas/e73cf9d64b834f788008f4f3a3beea68.json -H "User-Agent: python-neutronclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}440d3af57c44fcf5536c01908d0f799add90bcc0"
DEBUG: keystoneclient.session RESP: [200] date: Wed, 05 Aug 2015 14:30:20 GMT connection: keep-alive content-type: application/json; charset=UTF-8 content-length: 286 x-openstack-request-id: req-830efd76-f077-42f7-bb3e-a5781ff350ca
RESP BODY: {"quota": {"subnet": 10, "ikepolicy": -1, "network": 10, "ipsec_site_connection": -1, "floatingip": 50, "ipsecpolicy": -1, "security_group_rule": 100, "listener": -1, "vpnservice": -1, "loadbalancer": 10, "security_group": 10, "router": 10, "port": 50, "pool": 10, "healthmonitor": -1}}

ERROR: openstack 'id'
Traceback (most recent call last):
  File "/opt/stack/venv/openstackclient-20150804T111345Z/lib/python2.7/site-packages/cliff/app.py", line 303, in run_subcommand
    result = cmd.run(parsed_args)
  File "/opt/stack/venv/openstackclient-20150804T111345Z/lib/python2.7/site-packages/cliff/display.py", line 91, in run
    column_names, data = self.take_action(parsed_args)
  File "/opt/stack/venv/openstackclient-20150804T111345Z/lib/python2.7/site-packages/openstackclient/common/quota.py", line 216, in take_action
    if info['id']:
KeyError: 'id'
DEBUG: openstackclient.shell clean_up ShowQuota
DEBUG: openstackclient.shell got an error: 'id'
ERROR: openstackclient.shell Traceback (most recent call last):
  File "/opt/stack/venv/openstackclient-20150804T111345Z/lib/python2.7/site-packages/openstackclient/shell.py", line 176, in run
    return super(OpenStackShell, self).run(argv)
  File "/opt/stack/venv/openstackclient-20150804T111345Z/lib/python2.7/site-packages/cliff/app.py", line 238, in run
    result = self.run_subcommand(remainder)
  File "/opt/stack/venv/openstackclient-20150804T111345Z/lib/python2.7/site-packages/cliff/app.py", line 303, in run_subcommand
    result = cmd.run(parsed_args)
  File "/opt/stack/venv/openstackclient-20150804T111345Z/lib/python2.7/site-packages/cliff/display.py", line 91, in run
    column_names, data = self.take_action(parsed_args)
  File "/opt/stack/venv/openstackclient-20150804T111345Z/lib/python2.7/site-packages/openstackclient/common/quota.py", line 216, in take_action
    if info['id']:
KeyError: 'id'

problem is that quota.py is assuming an "id" key

Terry Howe (thowe-g)
Changed in python-openstackclient:
assignee: nobody → Terry Howe (thowe-g)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

Changed in python-openstackclient:
status: New → In Progress
Changed in python-openstackclient:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/209576
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=fd617115857a5c666befbc05d21309de0af742fc
Submitter: Jenkins
Branch: master

commit fd617115857a5c666befbc05d21309de0af742fc
Author: TerryHowe <email address hidden>
Date: Wed Aug 5 09:55:29 2015 -0600

    Fix quota show when there is no project id

    If no id is in the response, quota show fails.

    Change-Id: I9905431b006404c9ba8453eba016cec9ebe19402
    Closes-Bug: #1481803

Changed in python-openstackclient:
status: In Progress → Fix Committed
Changed in python-openstackclient:
milestone: none → 1.6.0
status: Fix Committed → Fix Released
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.