)]}'
{"nova/compute/api.py":[{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"4e734566dc912b8e4ea5af1c6048e088dccf7eda","unresolved":false,"context_lines":[{"line_number":1322,"context_line":"                instance[\"vm_state\"], old_task_state, instance[\"task_state\"],"},{"line_number":1323,"context_line":"                service\u003d\"api\", verify_states\u003dTrue)"},{"line_number":1324,"context_line":""},{"line_number":1325,"context_line":"        if image_id:"},{"line_number":1326,"context_line":"            # NOTE(comstud): Short circuit image creation if it\u0027s already"},{"line_number":1327,"context_line":"            # been created by the API cell."},{"line_number":1328,"context_line":"            recv_meta \u003d self.image_service.show(context, image_id)"}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAAM3%2F%2Fo3o%3D","line":1325,"updated":"2013-01-11 17:18:12.000000000","message":"You could simplify this a little bit:\n\nif not image_id:\n  # image not created in api cell\n  self._prep_and_create_image()  # do lines 1334-1380\n\nself.compute_rpcapi.snapshot_instance(...)\n\nreturn recv_meta","commit_id":"8a901473aba2220bc5574fcfd3a14c96c23bb52d"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"dcd9ac1f66d3a2c73296a36e43b32b3ff6bf10f8","unresolved":false,"context_lines":[{"line_number":1331,"context_line":"            self.compute_rpcapi.snapshot_instance(context, instance\u003dinstance,"},{"line_number":1332,"context_line":"                    image_id\u003dimage_id, image_type\u003dimage_type,"},{"line_number":1333,"context_line":"                    backup_type\u003dbackup_type, rotation\u003drotation)"},{"line_number":1334,"context_line":"            return recv_meta"},{"line_number":1335,"context_line":""},{"line_number":1336,"context_line":"        properties \u003d {"},{"line_number":1337,"context_line":"            \u0027instance_uuid\u0027: instance_uuid,"}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAM3%2F%2Fntk%3D","line":1334,"updated":"2013-01-12 15:29:26.000000000","message":"I think this could be DRYed up a bit so you only call snapshot_instance in one place.  I would try factoring out the rest of this function with a new function that does the image create if not image_id.  So ...\n\n    if image_id:\n        # NOTE(comstud): Short circuit image creation if it\u0027s already\n        # been created by the API cell.\n        recv_meta \u003d self.image_service.show(context, image_id)\n    else:\n        # (new function)\n        recv_meta \u003d self._create_image(...)\n\n    self.compute_rpcapi.snapshot_instance(...)","commit_id":"d06c8f01b833830940bf3838ff145cf9c17374f5"},{"author":{"_account_id":4419,"name":"Matthew Sherborne","email":"msherborne+openstack@gmail.com","username":"msherborne+openstack"},"change_message_id":"4cbcb20ac3d1d4f77cfac25f002956d8ce5db356","unresolved":false,"context_lines":[{"line_number":1273,"context_line":"        :param rotation: int representing how many backups to keep around;"},{"line_number":1274,"context_line":"            None if rotation shouldn\u0027t be used (as in the case of snapshots)"},{"line_number":1275,"context_line":"        :param extra_properties: dict of extra image properties to include"},{"line_number":1276,"context_line":"        \"\"\""},{"line_number":1277,"context_line":"        instance \u003d self.update(context, instance,"},{"line_number":1278,"context_line":"                               task_state\u003dtask_states.IMAGE_BACKUP,"},{"line_number":1279,"context_line":"                               expected_task_state\u003dNone)"}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAM3%2F%2Flaw%3D","line":1276,"updated":"2013-01-15 00:40:55.000000000","message":":param image_id: if not None, it means the image entry in the DB has already been created","commit_id":"7b2510f401eb54743f5f6fa3a0c8a286cf575c24"},{"author":{"_account_id":4419,"name":"Matthew Sherborne","email":"msherborne+openstack@gmail.com","username":"msherborne+openstack"},"change_message_id":"4cbcb20ac3d1d4f77cfac25f002956d8ce5db356","unresolved":false,"context_lines":[{"line_number":1299,"context_line":"        :param instance: nova.db.sqlalchemy.models.Instance"},{"line_number":1300,"context_line":"        :param name: name of the backup or snapshot"},{"line_number":1301,"context_line":"        :param extra_properties: dict of extra image properties to include"},{"line_number":1302,"context_line":""},{"line_number":1303,"context_line":"        :returns: A dict containing image metadata"},{"line_number":1304,"context_line":"        \"\"\""},{"line_number":1305,"context_line":"        instance \u003d self.update(context, instance,"}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAM3%2F%2Fla0%3D","line":1302,"updated":"2013-01-15 00:40:55.000000000","message":":param image_id: if passed, it means the image entry in the DB has already been created","commit_id":"7b2510f401eb54743f5f6fa3a0c8a286cf575c24"}],"nova/compute/cells_api.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"1474420b6997ed357141f89b90b4807c23ff85d7","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        recv_meta \u003d super(ComputeCellsAPI, self)._create_image("},{"line_number":130,"context_line":"                          context, instance, name, image_type, backup_type,"},{"line_number":131,"context_line":"                          rotation, extra_properties, image_id)"},{"line_number":132,"context_line":"        image_id \u003d recv_meta[\u0027id\u0027]"},{"line_number":133,"context_line":"        if backup_type:"},{"line_number":134,"context_line":"            self._cast_to_cells(context, instance, \u0027backup\u0027, name,"},{"line_number":135,"context_line":"                backup_type\u003dbackup_type, rotation\u003drotation, image_id\u003dimage_id,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAALn%2F%2F0lI%3D","line":132,"updated":"2012-11-03 07:21:12.000000000","message":"This assumes that glance is not per cell correct? Since if it was the id\u0027s might not even make sense right?","commit_id":"f82b2fbc367e1a64d647258024c53aa02faf6e41"}],"nova/tests/compute/test_compute.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"19ae848bb705d6ecee3ebbdd5fd5d7ce380e042d","unresolved":false,"context_lines":[{"line_number":3628,"context_line":"        name \u003d \u0027snap1\u0027"},{"line_number":3629,"context_line":"        extra_properties \u003d {\u0027extra_param\u0027: \u0027value1\u0027}"},{"line_number":3630,"context_line":"        recv_meta \u003d self.compute_api.snapshot(self.context, instance, name,"},{"line_number":3631,"context_line":"                                          extra_properties)"},{"line_number":3632,"context_line":"        image_id \u003d recv_meta[\u0027id\u0027]"},{"line_number":3633,"context_line":""},{"line_number":3634,"context_line":"        def fake_show(meh, context, id):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALn%2F%2F1zU%3D","line":3631,"updated":"2012-11-01 22:33:22.000000000","message":"Since you aligned lots of untouched code in the rest of the file, I suppose I\u0027ll make you align this code that you added :)","commit_id":"51744f5bd2169c23f42f1c20c3c5b4888de01048"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"fddde78e1af1d6286fb8f77ad3285f8dda996e8d","unresolved":false,"context_lines":[{"line_number":3628,"context_line":"        name \u003d \u0027snap1\u0027"},{"line_number":3629,"context_line":"        extra_properties \u003d {\u0027extra_param\u0027: \u0027value1\u0027}"},{"line_number":3630,"context_line":"        recv_meta \u003d self.compute_api.snapshot(self.context, instance, name,"},{"line_number":3631,"context_line":"                                          extra_properties)"},{"line_number":3632,"context_line":"        image_id \u003d recv_meta[\u0027id\u0027]"},{"line_number":3633,"context_line":""},{"line_number":3634,"context_line":"        def fake_show(meh, context, id):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALn%2F%2F1y8%3D","line":3631,"in_reply_to":"AAAALn%2F%2F1zU%3D","updated":"2012-11-01 23:06:13.000000000","message":"I was not the author of this one, despite the appearance that I was. :)  But yes, this should be fixed!   I\u0027m moving most of these to their own review and will rebase Cells reviews on it.","commit_id":"51744f5bd2169c23f42f1c20c3c5b4888de01048"}],"nova/tests/compute/test_compute_cells.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"c2df43b72ac474d67cd7bcc794ed013402c8138e","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    @wrap_create_instance"},{"line_number":135,"context_line":"    def test_snapshot(self):"},{"line_number":136,"context_line":"        return super(CellsComputeAPITestCase, self).test_snapshot()"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    @wrap_create_instance"},{"line_number":139,"context_line":"    def test_snapshot_image_metadata_inheritance(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAMH%2F%2FwsA%3D","line":136,"updated":"2012-11-26 21:53:43.000000000","message":"I\u0027d suggest leaving a comment explaining that you\u0027re doing this because of the decorator; it took me a moment to figure it out.","commit_id":"087544b31eb6d53450c178efb2c0cc7a142c92f1"}]}
