)]}'
{"nova/utils.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"decfc3fce14f058bbca61683351ab2a5b5e41ce6","unresolved":false,"context_lines":[{"line_number":176,"context_line":"# a bootable volume, but they are not properties of a corresponding image."},{"line_number":177,"context_line":"VIM_NOT_IMAGE_PROPERTIES \u003d ("},{"line_number":178,"context_line":"    \u0027image_id\u0027, \u0027image_name\u0027, \u0027size\u0027, \u0027checksum\u0027,"},{"line_number":179,"context_line":"    \u0027container_format\u0027, \u0027disk_format\u0027, \u0027min_ram\u0027, \u0027min_disk\u0027,"},{"line_number":180,"context_line":")"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"_FILE_CACHE \u003d {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_116c4e9b","line":179,"updated":"2015-08-10 08:13:24.000000000","message":"hmmm isn\u0027t min ram still relevant? We want to compare it with the flavor if we can and not start the instance from this volume if it\u0027s not honoured?","commit_id":"abcbd673abaa1ea6c87ea41adfc17b2ad72581f8"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"ecd296454ef7fe6f8285708e5241839b4d1134ca","unresolved":false,"context_lines":[{"line_number":176,"context_line":"# a bootable volume, but they are not properties of a corresponding image."},{"line_number":177,"context_line":"VIM_NOT_IMAGE_PROPERTIES \u003d ("},{"line_number":178,"context_line":"    \u0027image_id\u0027, \u0027image_name\u0027, \u0027size\u0027, \u0027checksum\u0027,"},{"line_number":179,"context_line":"    \u0027container_format\u0027, \u0027disk_format\u0027, \u0027min_ram\u0027, \u0027min_disk\u0027,"},{"line_number":180,"context_line":")"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"_FILE_CACHE \u003d {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_91e61ee7","line":179,"in_reply_to":"1a4dcd0f_116c4e9b","updated":"2015-08-10 08:21:41.000000000","message":"They are relevant. But this list is used to remove them from properties list.\n\nvolume_image_metadata:\n\n {\u0027min_ram\u0027: xxx}\n\ncurrently get_image_metadata_from_volume (see below) returns:\n\n {\u0027min_ram\u0027: xxx,\n  \u0027properties\u0027: {\u0027min_ram\u0027: xxx}}\n\nwith this patch it returns:\n\n {\u0027min_ram\u0027: xxx,\n  \u0027properties\u0027: {}}\n\nSee L1185 - these fields are removed from properties dict after they have been promoted to the root level of image_meta","commit_id":"abcbd673abaa1ea6c87ea41adfc17b2ad72581f8"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"c489ac98562b9758f565e26f9cabb9fa8c03b2fd","unresolved":false,"context_lines":[{"line_number":176,"context_line":"# a bootable volume, but they are not properties of a corresponding image."},{"line_number":177,"context_line":"VIM_NOT_IMAGE_PROPERTIES \u003d ("},{"line_number":178,"context_line":"    \u0027image_id\u0027, \u0027image_name\u0027, \u0027size\u0027, \u0027checksum\u0027,"},{"line_number":179,"context_line":"    \u0027container_format\u0027, \u0027disk_format\u0027, \u0027min_ram\u0027, \u0027min_disk\u0027,"},{"line_number":180,"context_line":")"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"_FILE_CACHE \u003d {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_50ac07ed","line":179,"in_reply_to":"1a4dcd0f_71511262","updated":"2015-08-10 11:26:05.000000000","message":"Nice - sorry for not actually looking close enough :/","commit_id":"abcbd673abaa1ea6c87ea41adfc17b2ad72581f8"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"3707f78d1854e175da0b926cd7842e58b2c63dbb","unresolved":false,"context_lines":[{"line_number":176,"context_line":"# a bootable volume, but they are not properties of a corresponding image."},{"line_number":177,"context_line":"VIM_NOT_IMAGE_PROPERTIES \u003d ("},{"line_number":178,"context_line":"    \u0027image_id\u0027, \u0027image_name\u0027, \u0027size\u0027, \u0027checksum\u0027,"},{"line_number":179,"context_line":"    \u0027container_format\u0027, \u0027disk_format\u0027, \u0027min_ram\u0027, \u0027min_disk\u0027,"},{"line_number":180,"context_line":")"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"_FILE_CACHE \u003d {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_71511262","line":179,"in_reply_to":"1a4dcd0f_91e61ee7","updated":"2015-08-10 08:25:17.000000000","message":"Also you can look at test_utils.py in this patch. There is test_values_conversion which checks that min_ram is exposed in image_meta","commit_id":"abcbd673abaa1ea6c87ea41adfc17b2ad72581f8"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"4aeac967b73d6f2336d02933fb260281e3254b41","unresolved":false,"context_lines":[{"line_number":1167,"context_line":""},{"line_number":1168,"context_line":""},{"line_number":1169,"context_line":"def get_image_metadata_from_volume(volume):"},{"line_number":1170,"context_line":"    properties \u003d volume.get(\u0027volume_image_metadata\u0027, {})"},{"line_number":1171,"context_line":"    image_meta \u003d {\u0027properties\u0027: properties}"},{"line_number":1172,"context_line":"    # NOTE(yjiang5): restore the basic attributes"},{"line_number":1173,"context_line":"    # NOTE(mdbooth): These values come from volume_glance_metadata"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_f380bd8d","line":1170,"updated":"2015-08-10 11:59:21.000000000","message":"I know it doesn\u0027t matter on this particular day in history as volume is never used again. I also know that this is done all over nova. However, I really don\u0027t like functions which accidentally modify their input. Could you deepcopy properties here?","commit_id":"abcbd673abaa1ea6c87ea41adfc17b2ad72581f8"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"74e797d99adb07bb6022673776848d9b7f9c1e58","unresolved":false,"context_lines":[{"line_number":1167,"context_line":""},{"line_number":1168,"context_line":""},{"line_number":1169,"context_line":"def get_image_metadata_from_volume(volume):"},{"line_number":1170,"context_line":"    properties \u003d volume.get(\u0027volume_image_metadata\u0027, {})"},{"line_number":1171,"context_line":"    image_meta \u003d {\u0027properties\u0027: properties}"},{"line_number":1172,"context_line":"    # NOTE(yjiang5): restore the basic attributes"},{"line_number":1173,"context_line":"    # NOTE(mdbooth): These values come from volume_glance_metadata"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_5074f59a","line":1170,"in_reply_to":"1a4dcd0f_f380bd8d","updated":"2015-08-10 16:14:08.000000000","message":"Done.\nBut i use copy.copy, because this metadata is a dictionary with string values only. As i understand, copy.copy is preffered in such case.","commit_id":"abcbd673abaa1ea6c87ea41adfc17b2ad72581f8"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"44e21629a77758214fc62c5bd43b61469b8f37bd","unresolved":false,"context_lines":[{"line_number":1167,"context_line":""},{"line_number":1168,"context_line":""},{"line_number":1169,"context_line":"def get_image_metadata_from_volume(volume):"},{"line_number":1170,"context_line":"    properties \u003d volume.get(\u0027volume_image_metadata\u0027, {})"},{"line_number":1171,"context_line":"    image_meta \u003d {\u0027properties\u0027: properties}"},{"line_number":1172,"context_line":"    # NOTE(yjiang5): restore the basic attributes"},{"line_number":1173,"context_line":"    # NOTE(mdbooth): These values come from volume_glance_metadata"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_5f7bb07b","line":1170,"in_reply_to":"1a4dcd0f_f380bd8d","updated":"2015-08-10 15:35:30.000000000","message":"good point","commit_id":"abcbd673abaa1ea6c87ea41adfc17b2ad72581f8"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"4aeac967b73d6f2336d02933fb260281e3254b41","unresolved":false,"context_lines":[{"line_number":1183,"context_line":"    # metadata here, we need to convert it."},{"line_number":1184,"context_line":"    image_meta[\u0027size\u0027] \u003d volume.get(\u0027size\u0027, 0) * units.Gi"},{"line_number":1185,"context_line":"    for attr in VIM_NOT_IMAGE_PROPERTIES:"},{"line_number":1186,"context_line":"        properties.pop(attr, None)"},{"line_number":1187,"context_line":"    # NOTE(yjiang5): Always set the image status as \u0027active\u0027"},{"line_number":1188,"context_line":"    # and depends on followed volume_api.check_attach() to"},{"line_number":1189,"context_line":"    # verify it. This hack should be harmless with that check."}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_538651ba","line":1186,"updated":"2015-08-10 11:59:21.000000000","message":"Nice. I think a loop over volume_image_metadata which consistently pulls out what we\u0027re interested in, and throws away what we\u0027re not would be better. That would also put size back to what it was originally, and I could throw away change I1c7917ae0ad3775659a70825e0edb1cf04f69d6f. Just a suggestion, though.","commit_id":"abcbd673abaa1ea6c87ea41adfc17b2ad72581f8"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"74e797d99adb07bb6022673776848d9b7f9c1e58","unresolved":false,"context_lines":[{"line_number":1183,"context_line":"    # metadata here, we need to convert it."},{"line_number":1184,"context_line":"    image_meta[\u0027size\u0027] \u003d volume.get(\u0027size\u0027, 0) * units.Gi"},{"line_number":1185,"context_line":"    for attr in VIM_NOT_IMAGE_PROPERTIES:"},{"line_number":1186,"context_line":"        properties.pop(attr, None)"},{"line_number":1187,"context_line":"    # NOTE(yjiang5): Always set the image status as \u0027active\u0027"},{"line_number":1188,"context_line":"    # and depends on followed volume_api.check_attach() to"},{"line_number":1189,"context_line":"    # verify it. This hack should be harmless with that check."}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_503715b0","line":1186,"in_reply_to":"1a4dcd0f_538651ba","updated":"2015-08-10 16:14:08.000000000","message":"Done partially","commit_id":"abcbd673abaa1ea6c87ea41adfc17b2ad72581f8"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"44e21629a77758214fc62c5bd43b61469b8f37bd","unresolved":false,"context_lines":[{"line_number":1183,"context_line":"    # metadata here, we need to convert it."},{"line_number":1184,"context_line":"    image_meta[\u0027size\u0027] \u003d volume.get(\u0027size\u0027, 0) * units.Gi"},{"line_number":1185,"context_line":"    for attr in VIM_NOT_IMAGE_PROPERTIES:"},{"line_number":1186,"context_line":"        properties.pop(attr, None)"},{"line_number":1187,"context_line":"    # NOTE(yjiang5): Always set the image status as \u0027active\u0027"},{"line_number":1188,"context_line":"    # and depends on followed volume_api.check_attach() to"},{"line_number":1189,"context_line":"    # verify it. This hack should be harmless with that check."}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_3fbc9a6b","line":1186,"in_reply_to":"1a4dcd0f_538651ba","updated":"2015-08-10 15:35:30.000000000","message":"Hmm... I think i can set image_meta root attributes in the loop. But i wouldn\u0027t like to change size attribute evaluation in this patch by some reasons.","commit_id":"abcbd673abaa1ea6c87ea41adfc17b2ad72581f8"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"7c2b6911df1e731f7e42569ca9a8328e9640e05f","unresolved":false,"context_lines":[{"line_number":1175,"context_line":"    # volumes in Gb increments, and stores size in Gb, whereas"},{"line_number":1176,"context_line":"    # glance reports size in bytes. As we\u0027re returning glance"},{"line_number":1177,"context_line":"    # metadata here, we need to convert it."},{"line_number":1178,"context_line":"    image_meta[\u0027size\u0027] \u003d volume.get(\u0027size\u0027, 0) * units.Gi"},{"line_number":1179,"context_line":"    # NOTE(yjiang5): restore the basic attributes"},{"line_number":1180,"context_line":"    # NOTE(mdbooth): These values come from volume_glance_metadata"},{"line_number":1181,"context_line":"    # in cinder. This is a simple key/value table, and all values"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_ef4980d1","line":1178,"updated":"2015-08-11 08:22:34.000000000","message":"Understood why you didn\u0027t want to change this in this patch. I\u0027d still like to change it back, though (in another patch). I\u0027ll rebase my change on top of this one.","commit_id":"466d918db920f3607209db37eb816725fdbc965d"}]}
