)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"916e4fb1d6508e6cb68eedb394fc2c43a47018bc","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix Boot From Volume size error"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Added logic to check whether the booted instance is boot from"},{"line_number":10,"context_line":"volume, as well as if it is a snapshot that was booted from volume."},{"line_number":11,"context_line":"If so set the min_disk differently."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I577c6f02e6a402ba4f8427bef382faa7e1e1af9c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a89bdaa_be7e82e1","line":10,"range":{"start_line":10,"start_character":30,"end_line":10,"end_character":38},"updated":"2016-09-08 17:19:33.000000000","message":"Shouldn\u0027t you be checking for snapshot in here somewhere then, like the bdm.snapshot_id value or bdm.source_type \u003d\u003d \u0027snapshot\u0027? See:\n\nhttp://docs.openstack.org/developer/nova/block_device_mapping.html#block-device-mapping-v2","commit_id":"d51938937ffe4cb17b69497610b7a5ae72237f17"}],"nova/compute/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"916e4fb1d6508e6cb68eedb394fc2c43a47018bc","unresolved":false,"context_lines":[{"line_number":1391,"context_line":"        # Check if the instance is Boot From Volume so we know"},{"line_number":1392,"context_line":"        # later how to set min_disk"},{"line_number":1393,"context_line":"        if block_device_mapping is not None:"},{"line_number":1394,"context_line":"            if block_device_mapping[0][\u0027source_type\u0027] \u003d\u003d \u0027volume\u0027:"},{"line_number":1395,"context_line":"                from_volume \u003d True"},{"line_number":1396,"context_line":"            elif block_device_mapping[0][\u0027destination_type\u0027] \u003d\u003d \u0027volume\u0027:"},{"line_number":1397,"context_line":"                from_volume \u003d True"},{"line_number":1398,"context_line":""},{"line_number":1399,"context_line":"        # Store image properties so we can use them later"},{"line_number":1400,"context_line":"        # (for notifications, etc).  Only store what we can."}],"source_content_type":"text/x-python","patch_set":2,"id":"9a89bdaa_9edffe0b","line":1397,"range":{"start_line":1394,"start_character":12,"end_line":1397,"end_character":34},"updated":"2016-09-08 17:19:33.000000000","message":"I\u0027m pretty sure this is wrong and bdm.is_volume is supposed to be used, see:\n\nhttps://github.com/openstack/nova/blob/master/nova/objects/block_device.py#L264\n\nAnd how it\u0027s used elsewhere in the compute api or nova/compute/manager.py.","commit_id":"d51938937ffe4cb17b69497610b7a5ae72237f17"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"769651afe837bddd4a040209d73ba14745d2a8b0","unresolved":false,"context_lines":[{"line_number":1391,"context_line":"        # Check if the instance is Boot From Volume so we know"},{"line_number":1392,"context_line":"        # later how to set min_disk"},{"line_number":1393,"context_line":"        if block_device_mapping is not None:"},{"line_number":1394,"context_line":"            if block_device_mapping[0][\u0027source_type\u0027] \u003d\u003d \u0027volume\u0027:"},{"line_number":1395,"context_line":"                from_volume \u003d True"},{"line_number":1396,"context_line":"            elif block_device_mapping[0][\u0027destination_type\u0027] \u003d\u003d \u0027volume\u0027:"},{"line_number":1397,"context_line":"                from_volume \u003d True"},{"line_number":1398,"context_line":""},{"line_number":1399,"context_line":"        # Store image properties so we can use them later"},{"line_number":1400,"context_line":"        # (for notifications, etc).  Only store what we can."}],"source_content_type":"text/x-python","patch_set":2,"id":"9a89bdaa_9e1a9e7b","line":1397,"range":{"start_line":1394,"start_character":12,"end_line":1397,"end_character":34},"in_reply_to":"9a89bdaa_9edffe0b","updated":"2016-09-08 17:29:47.000000000","message":"Yea I didn\u0027t know you could just call that, it definitely cleans up the code I\u0027ll do that.","commit_id":"d51938937ffe4cb17b69497610b7a5ae72237f17"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"916e4fb1d6508e6cb68eedb394fc2c43a47018bc","unresolved":false,"context_lines":[{"line_number":7726,"context_line":"                                1,"},{"line_number":7727,"context_line":"                                security_groups\u003dobjects.SecurityGroupList(),"},{"line_number":7728,"context_line":"                                instance_type\u003dinst_type,"},{"line_number":7729,"context_line":"                                block_device_mapping\u003dNone,"},{"line_number":7730,"context_line":"                                num_instances\u003dnum_instances,"},{"line_number":7731,"context_line":"                                shutdown_terminate\u003dFalse)"},{"line_number":7732,"context_line":"        self.assertEqual(str(base_options[\u0027image_ref\u0027]),"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a89bdaa_5eac968b","line":7729,"updated":"2016-09-08 17:19:33.000000000","message":"This doesn\u0027t test your from_volume\u003dTrue case.","commit_id":"d51938937ffe4cb17b69497610b7a5ae72237f17"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"769651afe837bddd4a040209d73ba14745d2a8b0","unresolved":false,"context_lines":[{"line_number":7726,"context_line":"                                1,"},{"line_number":7727,"context_line":"                                security_groups\u003dobjects.SecurityGroupList(),"},{"line_number":7728,"context_line":"                                instance_type\u003dinst_type,"},{"line_number":7729,"context_line":"                                block_device_mapping\u003dNone,"},{"line_number":7730,"context_line":"                                num_instances\u003dnum_instances,"},{"line_number":7731,"context_line":"                                shutdown_terminate\u003dFalse)"},{"line_number":7732,"context_line":"        self.assertEqual(str(base_options[\u0027image_ref\u0027]),"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a89bdaa_611c5f6a","line":7729,"in_reply_to":"9a89bdaa_5eac968b","updated":"2016-09-08 17:29:47.000000000","message":"I need to write unit tests still I know that, just wanted a review on the rest of the code first.","commit_id":"d51938937ffe4cb17b69497610b7a5ae72237f17"}],"nova/utils.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"916e4fb1d6508e6cb68eedb394fc2c43a47018bc","unresolved":false,"context_lines":[{"line_number":1134,"context_line":"                value \u003d flavor[\u0027root_gb\u0027]"},{"line_number":1135,"context_line":"            else:"},{"line_number":1136,"context_line":"                value \u003d max(value or 0, flavor[\u0027root_gb\u0027])"},{"line_number":1137,"context_line":"        elif key \u003d\u003d \u0027min_disk\u0027 and flavor and from_volume:"},{"line_number":1138,"context_line":"            if value is not None:"},{"line_number":1139,"context_line":"                value \u003d max(value, 0)"},{"line_number":1140,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a89bdaa_3ef6f28e","line":1137,"range":{"start_line":1137,"start_character":13,"end_line":1137,"end_character":41},"updated":"2016-09-08 17:19:33.000000000","message":"Rather than duplicate 2 of 3 conditions above, just add a condition in the if block above for the from_volume case.\n\nYou also don\u0027t have any unit test for this.","commit_id":"d51938937ffe4cb17b69497610b7a5ae72237f17"}]}
