nova migration-list failed due to ger wrong data format

Bug #1291329 reported by ChangBo Guo(gcb)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Undecided
Santiago Baldassin

Bug Description

API return wrong format RESP BODY: {"migrations": {"objects": []}} , This should like RESP BODY: {"migrations": [] }

[gcb@localhost devstack]$ nova --debug migration-list
RESP: [200] CaseInsensitiveDict({'date': 'Wed, 12 Mar 2014 11:51:15 GMT', 'content-length': '31', 'content-type': 'application/json', 'x-compute-request-id': 'req-c278cd5c-4873-44cc-9fed-2dbb8a53938d'})
RESP BODY: {"migrations": {"objects": []}}

DEBUG (shell:777) 'unicode' object has no attribute 'iteritems'
Traceback (most recent call last):
  File "/opt/stack/python-novaclient/novaclient/shell.py", line 774, in main
    OpenStackComputeShell().main(map(strutils.safe_decode, sys.argv[1:]))
  File "/opt/stack/python-novaclient/novaclient/shell.py", line 710, in main
    args.func(self.cs, args)
  File "/opt/stack/python-novaclient/novaclient/v1_1/contrib/migrations.py", line 70, in do_migration_list
    args.cell_name))
  File "/opt/stack/python-novaclient/novaclient/v1_1/contrib/migrations.py", line 52, in list
    return self._list("/os-migrations%s" % query_string, "migrations")
  File "/opt/stack/python-novaclient/novaclient/base.py", line 81, in _list
    for res in data if res]
  File "/opt/stack/python-novaclient/novaclient/openstack/common/apiclient/base.py", line 429, in __init__
    self._add_details(info)
  File "/opt/stack/python-novaclient/novaclient/openstack/common/apiclient/base.py", line 448, in _add_details
    for (k, v) in six.iteritems(info):
  File "/usr/lib/python2.7/site-packages/six.py", line 484, in iteritems
    return iter(getattr(d, _iteritems)(**kw))
AttributeError: 'unicode' object has no attribute 'iteritems'
ERROR: 'unicode' object has no attribute 'iteritems'
[gcb@localhost devstack]$

Tags: api
description: updated
Tracy Jones (tjones-i)
tags: added: api
Changed in nova:
assignee: nobody → Santiago Baldassin (santiago-b-baldassin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: New → In Progress
Revision history for this message
ChangBo Guo(gcb) (glongwave) wrote :

just find this is duplicated with https://bugs.launchpad.net/nova/+bug/1260249

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.