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>
Reviewed: https:/ /review. openstack. org/125814 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=da25467aafc e9b62dd3fdff9d6 cd84121fbee17e
Committed: https:/
Submitter: Jenkins
Branch: master
commit da25467aafce9b6 2dd3fdff9d6cd84 121fbee17e
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
Closes-Bug: #1376945
Co-authored-by: Matt Riedemann <email address hidden>