Faulty XML deserialization
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Critical
|
Salvatore Orlando | ||
quantum (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
Deserialization of XML responses does not work well with lists:
For instance:
<networks>
<network id="047"/>
<network id="045"/>
<network id="044"/>
<network id="043"/>
<network id="002"/>
<network id="001"/>
<network id="026"/>
<network id="021"/>
<network id="020"/>
<network id="023"/>
<network id="022"/>
<network id="033"/>
<network id="046"/>
<network id="009"/>
<network id="008"/>
<network id="029"/>
<network id="028"/>
<network id="041"/>
<network id="040"/>
<network id="024"/>
<network id="027"/>
<network id="007"/>
<network id="006"/>
</networks>
When deserialized, is transformed into the following dictionary:
{u'networks': {u'network': {u'id': u'006'}}}
Related branches
- dan wendlandt: Approve
- Tyler Smith: Approve
-
Diff: 1535 lines (+968/-413)12 files modifiedbin/cli (+165/-0)
quantum/api/attachments.py (+1/-0)
quantum/api/views/networks.py (+1/-1)
quantum/api/views/ports.py (+1/-1)
quantum/cli.py (+0/-392)
quantum/cli_lib.py (+223/-0)
quantum/cli_output.template (+56/-0)
quantum/client.py (+43/-19)
tests/unit/client_tools/__init__.py (+15/-0)
tests/unit/client_tools/stubs.py (+65/-0)
tests/unit/test_cli.py (+397/-0)
tools/pip-requires (+1/-0)
- Netstack Core Developers: Pending requested
-
Diff: 65 lines (+17/-5)2 files modifiedquantum/cli.py (+2/-2)
quantum/client.py (+15/-3)
Changed in quantum: | |
assignee: | nobody → Salvatore Orlando (salvatore-orlando) |
Changed in quantum: | |
importance: | Undecided → Medium |
Changed in quantum: | |
status: | In Progress → Fix Committed |
Changed in quantum: | |
status: | In Progress → Fix Committed |
Changed in quantum: | |
status: | Fix Committed → Fix Released |
Changed in quantum (Ubuntu): | |
status: | New → Fix Released |
tags: | added: neutron-proactive-backport-potential |
tags: | removed: neutron-proactive-backport-potential |
tags: | added: neutron-proactive-backport-potential |
tags: | removed: neutron-proactive-backport-potential |
There are two components in this bug:
1) the test case in which it was found was not using the deserializer properly, as metadata for plurals (eg.: networks/network) were not specified
2) the code for handling building the set corresponding to a collection of XML nodes was not filtering out text nodes.