Comment 3 for bug 798262

Revision history for this message
dan wendlandt (danwent) wrote :

Hi Salvatore, I still seem to be seeing this with the latest trunk when using the client lib. Not sure why the unit tests are not seeing this.

For example, the client gets the following XML back, showing 4 networks:

<networks><network id="a61a7eab-1c93-43df-9225-6f166f122fea"/><network id="4a50deb5-c960-4e73-b23d-a60cc4c6b94f"/><network id="6bbeac1a-48ce-4ab3-9c64-d531473016dd"/><network id="78641c7b-8aef-4223-b8ba-d5769e9a9212"/></networks>

But the deserialized data looks like:

 {u'networks': {u'network': {u'id': u'78641c7b-8aef-4223-b8ba-d5769e9a9212'}}}

Can easily be reproduced by changing the format in quantum/cli.py to xml, then running:

PYTHONPATH=.:$PYTHONPATH python quantum/cli.py create_net foo net1
PYTHONPATH=.:$PYTHONPATH python quantum/cli.py create_net foo net2
$PYTHONPATH python quantum/cli.py list_nets foo

The list_net command will blow up with:

Traceback (most recent call last):
  File "quantum/cli.py", line 386, in <module>
    commands[cmd]["api_func"](client, *args)
  File "quantum/cli.py", line 52, in api_list_nets
    net_id = n["id"]
TypeError: string indices must be integers