)]}'
{"nova/compute/api.py":[{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"5ca4a1be9dbc97ab9c3c504d8ebaea13e5196cc7","unresolved":false,"context_lines":[{"line_number":886,"context_line":"            \u0027instance_type_id\u0027: instance_type[\u0027id\u0027],"},{"line_number":887,"context_line":"            \u0027memory_mb\u0027: instance_type[\u0027memory_mb\u0027],"},{"line_number":888,"context_line":"            \u0027vcpus\u0027: instance_type[\u0027vcpus\u0027],"},{"line_number":889,"context_line":"            \u0027root_gb\u0027: root_gb,"},{"line_number":890,"context_line":"            \u0027ephemeral_gb\u0027: instance_type[\u0027ephemeral_gb\u0027],"},{"line_number":891,"context_line":"            \u0027display_name\u0027: display_name,"},{"line_number":892,"context_line":"            \u0027display_description\u0027: display_description or \u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_4cf6ae90","line":889,"updated":"2015-06-15 16:35:41.000000000","message":"There is very early stage to determine a type of the instance. It can be done by block_device_mapping structure after _check_and_transform_bdm call.\n\nThe reason is that the instance type depends of root device type. But it can be calculated after parsing and merging both image and specified bdms.","commit_id":"e8e48e7b3196fc14ac6a15a92f104b590707970b"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"ca010de1b255792335b831758afccb8ff5cac1e2","unresolved":false,"context_lines":[{"line_number":886,"context_line":"            \u0027instance_type_id\u0027: instance_type[\u0027id\u0027],"},{"line_number":887,"context_line":"            \u0027memory_mb\u0027: instance_type[\u0027memory_mb\u0027],"},{"line_number":888,"context_line":"            \u0027vcpus\u0027: instance_type[\u0027vcpus\u0027],"},{"line_number":889,"context_line":"            \u0027root_gb\u0027: root_gb,"},{"line_number":890,"context_line":"            \u0027ephemeral_gb\u0027: instance_type[\u0027ephemeral_gb\u0027],"},{"line_number":891,"context_line":"            \u0027display_name\u0027: display_name,"},{"line_number":892,"context_line":"            \u0027display_description\u0027: display_description or \u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_6c5a9285","line":889,"in_reply_to":"fa32b979_4cf6ae90","updated":"2015-06-15 16:37:41.000000000","message":"For example, you can set root_gb in _check_and_transform_bdm","commit_id":"e8e48e7b3196fc14ac6a15a92f104b590707970b"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"5ca4a1be9dbc97ab9c3c504d8ebaea13e5196cc7","unresolved":false,"context_lines":[{"line_number":2595,"context_line":"                current_instance_type.get(\u0027root_gb\u0027) !\u003d 0):"},{"line_number":2596,"context_line":"                reason \u003d _(\u0027Resize to zero disk flavor is not allowed.\u0027)"},{"line_number":2597,"context_line":"                raise exception.CannotResizeDisk(reason\u003dreason)"},{"line_number":2598,"context_line":"            elif (not instance.image_ref and instance.root_gb \u003d\u003d 0):"},{"line_number":2599,"context_line":"                new_instance_type[\u0027root_gb\u0027] \u003d 0"},{"line_number":2600,"context_line":""},{"line_number":2601,"context_line":"        if not new_instance_type:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_c174ca9d","line":2598,"updated":"2015-06-15 16:35:41.000000000","message":"If the instance is run from volume backed image, it has non empty image_ref. So you should use self.is_volume_backed_instance in this check.","commit_id":"e8e48e7b3196fc14ac6a15a92f104b590707970b"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"5ca4a1be9dbc97ab9c3c504d8ebaea13e5196cc7","unresolved":false,"context_lines":[{"line_number":2596,"context_line":"                reason \u003d _(\u0027Resize to zero disk flavor is not allowed.\u0027)"},{"line_number":2597,"context_line":"                raise exception.CannotResizeDisk(reason\u003dreason)"},{"line_number":2598,"context_line":"            elif (not instance.image_ref and instance.root_gb \u003d\u003d 0):"},{"line_number":2599,"context_line":"                new_instance_type[\u0027root_gb\u0027] \u003d 0"},{"line_number":2600,"context_line":""},{"line_number":2601,"context_line":"        if not new_instance_type:"},{"line_number":2602,"context_line":"            raise exception.FlavorNotFound(flavor_id\u003dflavor_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_6cddb241","line":2599,"updated":"2015-06-15 16:35:41.000000000","message":"It\u0027s not clearly enough, can not work with further changes, and perhaps can not work now with cells or other feature. I propose to do this in finish_resize directly, near instance.root_gb update. (Do not forget fix finish_revert_resize as well)\n\nAlso searching root_gb i\u0027ve found ResizeClaim object which get root_gb from the flavor. I think it (or resize_claim method) should be changed, but in a separate review obviously.","commit_id":"e8e48e7b3196fc14ac6a15a92f104b590707970b"}]}
