XML deserialization does not properly handle integers

Bug #818960 reported by dan wendlandt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Invalid
Undecided
Tyler Smith

Bug Description

The XML deserialization code deserializes everything to a python string, while the JSON code will properly deserialize an integer to a python integer. This leads to inconsistent behavior if API objects contain integers.

Related to bug #818321, but we are using that bug to track the D3 action, which was to remove the code triggering the problem. This bug is to track actual changes to the API code to fix the problem.

Revision history for this message
Tyler Smith (tylesmit) wrote :

I'd be more than happy to take this bug if nobody else is clamoring for it. Which of the two routes mentioned in bug #818321 is preferred? Force everything to str, or force all ints to ints and the rest strings?

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

Awesome Tyler :)

My feeling is that it would be best if the XML deserialization properly handled integers.

Tyler Smith (tylesmit)
Changed in quantum:
assignee: nobody → Tyler Smith (tylesmit)
status: New → In Progress
Revision history for this message
Tyler Smith (tylesmit) wrote :

I think the simple change in the linked branch should do it. I've tested it and get integer values as ints and other values as strings.

dan wendlandt (danwent)
Changed in quantum:
status: In Progress → Invalid
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.