Converting network_get and network_get_all to use objects broke
the display of the os_networks extension, because IPAddress
fields in Network objects are dumped as lists by the jsonutils
extension. We therefore must explicitly convert these object
field values to string.
The tests are updated to use objects so that we pick up bugs
like this in the future. Incorrect assertEqual parameter order
is fixed in the tests too since these are comparing dicts and
it's not fun debugging a MismatchError when the reference/actual
values are backwards.
Change-Id: I0f05a9b4d7bbe5fe0a3b110c191455ca7edefcb5
Closes-Bug: #1376945
Co-authored-by: Matt Riedemann <email address hidden>
(cherry picked from commit da25467aafce9b62dd3fdff9d6cd84121fbee17e)
Reviewed: https:/ /review. openstack. org/125815 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=0aeffa12a62 604ee3238323d96 9345e41937b642
Committed: https:/
Submitter: Jenkins
Branch: proposed/juno
commit 0aeffa12a62604e e3238323d969345 e41937b642
Author: Vishvananda Ishaya <email address hidden>
Date: Wed Oct 1 07:43:19 2014 -0700
Fix the os_networks display to show cidr properly
Converting network_get and network_get_all to use objects broke
the display of the os_networks extension, because IPAddress
fields in Network objects are dumped as lists by the jsonutils
extension. We therefore must explicitly convert these object
field values to string.
The tests are updated to use objects so that we pick up bugs
like this in the future. Incorrect assertEqual parameter order
is fixed in the tests too since these are comparing dicts and
it's not fun debugging a MismatchError when the reference/actual
values are backwards.
Change-Id: I0f05a9b4d7bbe5 fe0a3b110c19145 5ca7edefcb5 2dd3fdff9d6cd84 121fbee17e)
Closes-Bug: #1376945
Co-authored-by: Matt Riedemann <email address hidden>
(cherry picked from commit da25467aafce9b6