)]}'
{"nova/tests/unit/virt/xenapi/test_xenapi.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"4dcc3211d445f88429b47eea66a70d65ebd45fb3","unresolved":false,"context_lines":[{"line_number":646,"context_line":"                              \u0027dns\u0027: sorted([\u0027192.168.1.4\u0027, \u0027192.168.1.3\u0027]),"},{"line_number":647,"context_line":"                              \u0027gateway\u0027: \u0027192.168.1.1\u0027,"},{"line_number":648,"context_line":"                              \u0027gateway_v6\u0027: \u00272001:db8:0:1::1\u0027,"},{"line_number":649,"context_line":"                              \u0027ip6s\u0027: sorted([{\u0027enabled\u0027: \u00271\u0027,"},{"line_number":650,"context_line":"                                        \u0027ip\u0027: \u00272001:db8:0:1:dcad:beff:feef:1\u0027,"},{"line_number":651,"context_line":"                                        \u0027netmask\u0027: 64,"},{"line_number":652,"context_line":"                                        \u0027gateway\u0027: \u00272001:db8:0:1::1\u0027}]),"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_27e38d06","line":649,"updated":"2015-03-05 13:48:37.000000000","message":"the first 2 of these we can manually sort in here. I\u0027d think that the last one has a stable sort order as well. Ideally we\u0027d only sort items on one side of the compare not both.","commit_id":"8d68cb91e7f33e6de3d2f5b6a4ef3256822f8db6"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"725841a75a603d7eecda1c1e7bc224611046d667","unresolved":false,"context_lines":[{"line_number":646,"context_line":"                              \u0027dns\u0027: sorted([\u0027192.168.1.4\u0027, \u0027192.168.1.3\u0027]),"},{"line_number":647,"context_line":"                              \u0027gateway\u0027: \u0027192.168.1.1\u0027,"},{"line_number":648,"context_line":"                              \u0027gateway_v6\u0027: \u00272001:db8:0:1::1\u0027,"},{"line_number":649,"context_line":"                              \u0027ip6s\u0027: sorted([{\u0027enabled\u0027: \u00271\u0027,"},{"line_number":650,"context_line":"                                        \u0027ip\u0027: \u00272001:db8:0:1:dcad:beff:feef:1\u0027,"},{"line_number":651,"context_line":"                                        \u0027netmask\u0027: 64,"},{"line_number":652,"context_line":"                                        \u0027gateway\u0027: \u00272001:db8:0:1::1\u0027}]),"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_3b910653","line":649,"in_reply_to":"9a80dd14_27e38d06","updated":"2015-03-11 10:33:49.000000000","message":"Removed \u0027ips\u0027 sorting.  sorting only on one side wouldn\u0027t help. tcpip_data and reference object must be sorted both.","commit_id":"8d68cb91e7f33e6de3d2f5b6a4ef3256822f8db6"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"231013b7534bb130ba4010d3c1f018db2f406220","unresolved":false,"context_lines":[{"line_number":645,"context_line":"                              \u0027dns\u0027: sorted([\u0027192.168.1.4\u0027, \u0027192.168.1.3\u0027]),"},{"line_number":646,"context_line":"                              \u0027gateway\u0027: \u0027192.168.1.1\u0027,"},{"line_number":647,"context_line":"                              \u0027gateway_v6\u0027: \u00272001:db8:0:1::1\u0027,"},{"line_number":648,"context_line":"                              \u0027ip6s\u0027: sorted([{\u0027enabled\u0027: \u00271\u0027,"},{"line_number":649,"context_line":"                                        \u0027ip\u0027: \u00272001:db8:0:1:dcad:beff:feef:1\u0027,"},{"line_number":650,"context_line":"                                        \u0027netmask\u0027: 64,"},{"line_number":651,"context_line":"                                        \u0027gateway\u0027: \u00272001:db8:0:1::1\u0027}]),"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a80dd14_dc0fb6df","line":648,"updated":"2015-03-12 16:30:37.000000000","message":"I\u0027m wondering how sorting is done here. Maybe it would make sense to use key argument here, e.g. something like:\n\n  import operator\n\n  ...\n\n  sorted(..., key\u003doperator.itemgetter(\u0027ip\u0027))\n\nto ensure ip is used as a key for sorting.","commit_id":"ed66afa49fd291bce18f800e66ce1d9a63b3a427"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"53747c4a7c3246a59d85b3f96282767a10d9f3f8","unresolved":false,"context_lines":[{"line_number":639,"context_line":"            xenstore_value \u003d xenstore_data[key]"},{"line_number":640,"context_line":"            tcpip_data \u003d ast.literal_eval(xenstore_value)"},{"line_number":641,"context_line":"            tcpip_data[\u0027dns\u0027] \u003d sorted(tcpip_data[\u0027dns\u0027])"},{"line_number":642,"context_line":"            tcpip_data[\u0027ip6s\u0027] \u003d sorted(tcpip_data[\u0027ip6s\u0027])"},{"line_number":643,"context_line":"            self.assertEqual(tcpip_data,"},{"line_number":644,"context_line":"                             {\u0027broadcast\u0027: \u0027192.168.1.255\u0027,"},{"line_number":645,"context_line":"                              \u0027dns\u0027: sorted([\u0027192.168.1.4\u0027, \u0027192.168.1.3\u0027]),"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_1cce8a2e","line":642,"updated":"2015-03-13 09:05:06.000000000","message":"see suggestion on using of sorted() below","commit_id":"ebfab2b7026091e7c9406197aeb4a7d397a650da"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"53747c4a7c3246a59d85b3f96282767a10d9f3f8","unresolved":false,"context_lines":[{"line_number":645,"context_line":"                              \u0027dns\u0027: sorted([\u0027192.168.1.4\u0027, \u0027192.168.1.3\u0027]),"},{"line_number":646,"context_line":"                              \u0027gateway\u0027: \u0027192.168.1.1\u0027,"},{"line_number":647,"context_line":"                              \u0027gateway_v6\u0027: \u00272001:db8:0:1::1\u0027,"},{"line_number":648,"context_line":"                              \u0027ip6s\u0027: sorted([{\u0027enabled\u0027: \u00271\u0027,"},{"line_number":649,"context_line":"                                        \u0027ip\u0027: \u00272001:db8:0:1:dcad:beff:feef:1\u0027,"},{"line_number":650,"context_line":"                                        \u0027netmask\u0027: 64,"},{"line_number":651,"context_line":"                                        \u0027gateway\u0027: \u00272001:db8:0:1::1\u0027}]),"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_dcbeb2ad","line":648,"updated":"2015-03-13 09:05:06.000000000","message":"Ok. so this is a 1-element list, so I\u0027m not why we need a sorted() here at all. If the intention was to make this test extendable in the future, then we\u0027ll need to figure out what to do with \u0027ordering\u0027 of dicts. E.g. on Python 3 this would fail:\n\n  \u003e\u003e\u003e sorted([{\u0027enabled\u0027: \u00271\u0027, \u0027ip\u0027: \u00272001:db8:0:1:dcad:beff:feef:2\u0027,\u0027netmask\u0027: 64, \u0027gateway\u0027: \u00272001:db8:0:1::1\u0027}, {\u0027enabled\u0027: \u00271\u0027, \u0027ip\u0027: \u00272001:db8:0:1:dcad:beff:feef:1\u0027,\u0027netmask\u0027: 64, \u0027gateway\u0027: \u00272001:db8:0:1::1\u0027}])\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\nTypeError: unorderable types: dict() \u003c dict()\n\nOn Python 2.x this works, but I\u0027m not really sure how dicts are compared.\n\nIf we want this sorted() call here, I suggest we do something like:\n\n  import operator\n\n  ...\n\n   sorted([\n       {\u0027enabled\u0027: \u00271\u0027, \u0027ip\u0027: \u00272001:db8:0:1:dcad:beff:feef:2\u0027,\u0027netmask\u0027: 64, \u0027gateway\u0027: \u00272001:db8:0:1::1\u0027},\n       {\u0027enabled\u0027: \u00271\u0027, \u0027ip\u0027: \u00272001:db8:0:1:dcad:beff:feef:1\u0027,\u0027netmask\u0027: 64, \u0027gateway\u0027: \u00272001:db8:0:1::1\u0027}],\n       key\u003doperator.itemgetter(\u0027ip\u0027))\n\nto ensure code works on both Python 2 and 3 and the order of entries is predictable (i.e. they are sorted by the value of \u0027ip\u0027 item ascending)","commit_id":"ebfab2b7026091e7c9406197aeb4a7d397a650da"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"51f50adee0edd8a4c6ff4f56ee27260289e4d18b","unresolved":false,"context_lines":[{"line_number":645,"context_line":"                              \u0027dns\u0027: sorted([\u0027192.168.1.4\u0027, \u0027192.168.1.3\u0027]),"},{"line_number":646,"context_line":"                              \u0027gateway\u0027: \u0027192.168.1.1\u0027,"},{"line_number":647,"context_line":"                              \u0027gateway_v6\u0027: \u00272001:db8:0:1::1\u0027,"},{"line_number":648,"context_line":"                              \u0027ip6s\u0027: sorted([{\u0027enabled\u0027: \u00271\u0027,"},{"line_number":649,"context_line":"                                        \u0027ip\u0027: \u00272001:db8:0:1:dcad:beff:feef:1\u0027,"},{"line_number":650,"context_line":"                                        \u0027netmask\u0027: 64,"},{"line_number":651,"context_line":"                                        \u0027gateway\u0027: \u00272001:db8:0:1::1\u0027}]),"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_0ede3d6d","line":648,"in_reply_to":"9a80dd14_dcbeb2ad","updated":"2015-03-13 16:03:43.000000000","message":"Agree, I\u0027d rather not put the extra \u0027sorted\u0027 here on the 1 element list.","commit_id":"ebfab2b7026091e7c9406197aeb4a7d397a650da"}]}
