)]}'
{"nova/objects/instance.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"044cea3e9dd9b6ab83b1f674bc310946ce191901","unresolved":false,"context_lines":[{"line_number":201,"context_line":"                del primitive[\u0027security_groups\u0027]"},{"line_number":202,"context_line":"            if (\u0027pci_devices\u0027 in primitive and"},{"line_number":203,"context_line":"                    primitive[\u0027pci_devices\u0027] is None):"},{"line_number":204,"context_line":"                del primitive[\u0027pci_devices\u0027]"},{"line_number":205,"context_line":"        if target_version \u003c (1, 7):"},{"line_number":206,"context_line":"            # NOTE(danms): Before 1.7, we couldn\u0027t handle unicode in"},{"line_number":207,"context_line":"            # string fields, so squash it here"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2FkUI%3D","line":204,"updated":"2013-11-01 07:02:24.000000000","message":"I might be totally missing something here, but if this is a \u003e\u003d1.8 object then the field can\u0027t be none ... and the \u003c1.8 target is ok with None anyway, no?","commit_id":"fe8a7343c574dab16846d753f2fc6b79ce28e92a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0293c0dea70e578eab7bb32219ebee202eb0494c","unresolved":false,"context_lines":[{"line_number":201,"context_line":"                del primitive[\u0027security_groups\u0027]"},{"line_number":202,"context_line":"            if (\u0027pci_devices\u0027 in primitive and"},{"line_number":203,"context_line":"                    primitive[\u0027pci_devices\u0027] is None):"},{"line_number":204,"context_line":"                del primitive[\u0027pci_devices\u0027]"},{"line_number":205,"context_line":"        if target_version \u003c (1, 7):"},{"line_number":206,"context_line":"            # NOTE(danms): Before 1.7, we couldn\u0027t handle unicode in"},{"line_number":207,"context_line":"            # string fields, so squash it here"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2B55c%3D","line":204,"in_reply_to":"AAAATn%2F%2FkUI%3D","updated":"2013-11-18 18:45:10.000000000","message":"Yeah, this whole bit isn\u0027t needed. This patch started out as just a (not very well thought-out) example of the  usage of the obj_make_compatible() and then I filled it out after that :)","commit_id":"fe8a7343c574dab16846d753f2fc6b79ce28e92a"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"a811e6ae2283d095f6016d4f672bdb00bd721c44","unresolved":false,"context_lines":[{"line_number":185,"context_line":"    def obj_make_compatible(self, primitive, target_version):"},{"line_number":186,"context_line":"        target_version \u003d (int(target_version.split(\u0027.\u0027)[0]),"},{"line_number":187,"context_line":"                          int(target_version.split(\u0027.\u0027)[1]))"},{"line_number":188,"context_line":"        unicode_attributes \u003d [\u0027user_id\u0027, \u0027project_id\u0027, \u0027image_ref\u0027,"},{"line_number":189,"context_line":"                              \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":190,"context_line":"                              \u0027key_name\u0027, \u0027key_data\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":191,"context_line":"                              \u0027user_data\u0027, \u0027availability_zone\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BXh4%3D","line":188,"updated":"2013-11-26 20:59:14.000000000","message":"Can\u0027t we make this just a list of all StringFields and avoid this list. All others will be dropped anyway so no harm there.","commit_id":"a77ee9a34d903ebfbf2e3408d1e55ee94d0e1ccb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"eed4c2fbfe4b9cddf1d59474d982bce70bf172e7","unresolved":false,"context_lines":[{"line_number":185,"context_line":"    def obj_make_compatible(self, primitive, target_version):"},{"line_number":186,"context_line":"        target_version \u003d (int(target_version.split(\u0027.\u0027)[0]),"},{"line_number":187,"context_line":"                          int(target_version.split(\u0027.\u0027)[1]))"},{"line_number":188,"context_line":"        unicode_attributes \u003d [\u0027user_id\u0027, \u0027project_id\u0027, \u0027image_ref\u0027,"},{"line_number":189,"context_line":"                              \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":190,"context_line":"                              \u0027key_name\u0027, \u0027key_data\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":191,"context_line":"                              \u0027user_data\u0027, \u0027availability_zone\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BXUU%3D","line":188,"in_reply_to":"AAAATn%2F%2BXh4%3D","updated":"2013-11-26 21:51:25.000000000","message":"I suppose we could. In other places, we\u0027ve been pretty explicit about things like this so that it\u0027s easy to see what needs converting for a given version (there is a lot of manually-maintained stuff in the rpc layer). Feels safer and more visible to me, but, if you think it needs to be more automatic I suppose there is an argument to be made there.","commit_id":"a77ee9a34d903ebfbf2e3408d1e55ee94d0e1ccb"}],"nova/tests/objects/test_instance.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"044cea3e9dd9b6ab83b1f674bc310946ce191901","unresolved":false,"context_lines":[{"line_number":717,"context_line":"        inst \u003d instance.Instance()"},{"line_number":718,"context_line":"        primitive \u003d inst.obj_to_primitive()"},{"line_number":719,"context_line":"        primitive[\u0027pci_devices\u0027] \u003d \u0027fake-devices\u0027"},{"line_number":720,"context_line":"        inst.obj_make_compatible(primitive, target_version\u003d\u00271.5\u0027)"},{"line_number":721,"context_line":"        self.assertNotIn(\u0027pci_devices\u0027, primitive)"},{"line_number":722,"context_line":""},{"line_number":723,"context_line":"    def test_compat_none_lists(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2FkTw%3D","line":720,"updated":"2013-11-01 07:02:24.000000000","message":"I\u0027d prefer if we were doing obj_to_primitive(target_version\u003d\u00271.5\u0027) and giving it a realistic object","commit_id":"fe8a7343c574dab16846d753f2fc6b79ce28e92a"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"044cea3e9dd9b6ab83b1f674bc310946ce191901","unresolved":false,"context_lines":[{"line_number":724,"context_line":"        inst \u003d instance.Instance()"},{"line_number":725,"context_line":"        primitive \u003d inst.obj_to_primitive()"},{"line_number":726,"context_line":"        primitive[\u0027pci_devices\u0027] \u003d None"},{"line_number":727,"context_line":"        primitive[\u0027security_groups\u0027] \u003d None"},{"line_number":728,"context_line":"        inst.obj_make_compatible(primitive, target_version\u003d\u00271.7\u0027)"},{"line_number":729,"context_line":"        self.assertNotIn(\u0027pci_devices\u0027, primitive)"},{"line_number":730,"context_line":"        self.assertNotIn(\u0027security_groups\u0027, primitive)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F%2FkT4%3D","line":727,"updated":"2013-11-01 07:02:24.000000000","message":"See, you\u0027re setting the fields to None after converting to a primitive ... so, are you testing a case that can really happen?","commit_id":"fe8a7343c574dab16846d753f2fc6b79ce28e92a"}]}
