)]}'
{"nova/api/openstack/compute/volumes.py":[{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"b55930809c50f2dc542fdcaa5cf565298154669e","unresolved":false,"context_lines":[{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    @extensions.expected_errors((400, 404, 409))"},{"line_number":270,"context_line":"    @validation.schema(volumes_schema.create_volume_attachment)"},{"line_number":271,"context_line":"    def create(self, req, server_id, body):"},{"line_number":272,"context_line":"        \"\"\"Attach a volume to an instance.\"\"\""},{"line_number":273,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":274,"context_line":"        authorize(context)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_b1b498d1","line":271,"updated":"2015-12-22 15:46:37.000000000","message":"also, spec describes changes in \u0027create\u0027 method","commit_id":"dcdc7f76245fdeab5a34737ae477b26761be4ec7"},{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"b98e25af271972d534316acd23e2a4c776d08b7b","unresolved":false,"context_lines":[{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    @extensions.expected_errors((400, 404, 409))"},{"line_number":270,"context_line":"    @validation.schema(volumes_schema.create_volume_attachment)"},{"line_number":271,"context_line":"    def create(self, req, server_id, body):"},{"line_number":272,"context_line":"        \"\"\"Attach a volume to an instance.\"\"\""},{"line_number":273,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":274,"context_line":"        authorize(context)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_2a810a90","line":271,"in_reply_to":"1a7b0d38_2576223f","updated":"2015-12-22 18:56:24.000000000","message":"yes, it can be divided. but I think that it\u0027s better to do it in one patch.","commit_id":"dcdc7f76245fdeab5a34737ae477b26761be4ec7"},{"author":{"_account_id":13562,"name":"Samuel Matzek","email":"smatzek@us.ibm.com","username":"smatzek"},"change_message_id":"112add28e0f6eae2163366dadf11c8fa946e02f7","unresolved":false,"context_lines":[{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    @extensions.expected_errors((400, 404, 409))"},{"line_number":270,"context_line":"    @validation.schema(volumes_schema.create_volume_attachment)"},{"line_number":271,"context_line":"    def create(self, req, server_id, body):"},{"line_number":272,"context_line":"        \"\"\"Attach a volume to an instance.\"\"\""},{"line_number":273,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":274,"context_line":"        authorize(context)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_2a147c42","line":271,"in_reply_to":"1a7b0d38_2a810a90","updated":"2015-12-23 16:56:24.000000000","message":"Since this change set / spec is allocating a new microversion, I agree that the create changes should be included in the final patch and they should not merge separately.","commit_id":"dcdc7f76245fdeab5a34737ae477b26761be4ec7"},{"author":{"_account_id":13562,"name":"Samuel Matzek","email":"smatzek@us.ibm.com","username":"smatzek"},"change_message_id":"f3a1466e44e761ed966e3d5ad093983c1520181d","unresolved":false,"context_lines":[{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    @extensions.expected_errors((400, 404, 409))"},{"line_number":270,"context_line":"    @validation.schema(volumes_schema.create_volume_attachment)"},{"line_number":271,"context_line":"    def create(self, req, server_id, body):"},{"line_number":272,"context_line":"        \"\"\"Attach a volume to an instance.\"\"\""},{"line_number":273,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":274,"context_line":"        authorize(context)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_2576223f","line":271,"in_reply_to":"1a7b0d38_b1b498d1","updated":"2015-12-22 16:43:21.000000000","message":"I agree the spec describes changes to the create path.  This patch set is only addressing the update path, which could land independently of the create path.","commit_id":"dcdc7f76245fdeab5a34737ae477b26761be4ec7"},{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"b55930809c50f2dc542fdcaa5cf565298154669e","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":321,"context_line":"        authorize(context)"},{"line_number":322,"context_line":"        authorize_attach(context, action\u003d\u0027update\u0027)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        old_volume_id \u003d id"},{"line_number":325,"context_line":"        instance \u003d common.get_instance(self.compute_api, context, server_id)"},{"line_number":326,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_f48c4e37","line":323,"updated":"2015-12-22 15:46:37.000000000","message":"and I would prefer a different algorithm...\nat fisrt I would find a volume by id and then do all things.\n\nbecause right now you have a problem with this algorithm - you change delete_on_termination on old volume if request contains new volume and delete_on_termination flag","commit_id":"dcdc7f76245fdeab5a34737ae477b26761be4ec7"},{"author":{"_account_id":13562,"name":"Samuel Matzek","email":"smatzek@us.ibm.com","username":"smatzek"},"change_message_id":"112add28e0f6eae2163366dadf11c8fa946e02f7","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":321,"context_line":"        authorize(context)"},{"line_number":322,"context_line":"        authorize_attach(context, action\u003d\u0027update\u0027)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        old_volume_id \u003d id"},{"line_number":325,"context_line":"        instance \u003d common.get_instance(self.compute_api, context, server_id)"},{"line_number":326,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_ea3434df","line":323,"in_reply_to":"1a7b0d38_a83742e2","updated":"2015-12-23 16:56:24.000000000","message":"Done","commit_id":"dcdc7f76245fdeab5a34737ae477b26761be4ec7"},{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"b98e25af271972d534316acd23e2a4c776d08b7b","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":321,"context_line":"        authorize(context)"},{"line_number":322,"context_line":"        authorize_attach(context, action\u003d\u0027update\u0027)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        old_volume_id \u003d id"},{"line_number":325,"context_line":"        instance \u003d common.get_instance(self.compute_api, context, server_id)"},{"line_number":326,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_a83742e2","line":323,"in_reply_to":"1a7b0d38_e511fab0","updated":"2015-12-22 18:56:24.000000000","message":"Ok, I understood you.\n\nAbout algorithm I meant that it can be divided into three parts:\n- find volume in bdm\n- change delete_on_termination if needed\n- swap volumes if they differ","commit_id":"dcdc7f76245fdeab5a34737ae477b26761be4ec7"},{"author":{"_account_id":13562,"name":"Samuel Matzek","email":"smatzek@us.ibm.com","username":"smatzek"},"change_message_id":"f3a1466e44e761ed966e3d5ad093983c1520181d","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":321,"context_line":"        authorize(context)"},{"line_number":322,"context_line":"        authorize_attach(context, action\u003d\u0027update\u0027)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        old_volume_id \u003d id"},{"line_number":325,"context_line":"        instance \u003d common.get_instance(self.compute_api, context, server_id)"},{"line_number":326,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_e511fab0","line":323,"in_reply_to":"1a7b0d38_f48c4e37","updated":"2015-12-22 16:43:21.000000000","message":"Can you be more specific?  The current algorithm updates the delete_on_termination value on the volume attachment / block device mapping whether or not you specify a new volume ID.  The way it is currently written it avoids unnecessary calls to Cinder API if you are only updating the delete_on_termination value and not updating the volume.\n\nIf you change both volume ID and delete_on_termination this still works because swap_volume does not create a new block device mapping, it updates the volume_id on the existing block_device mapping, which is the same object / DB row as is updated by the delete_on_termination update code below.","commit_id":"dcdc7f76245fdeab5a34737ae477b26761be4ec7"},{"author":{"_account_id":10234,"name":"Andrey Pavlov","email":"andrey.mp@gmail.com","username":"andrey-mp"},"change_message_id":"b98e25af271972d534316acd23e2a4c776d08b7b","unresolved":false,"context_lines":[{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        found \u003d False"},{"line_number":357,"context_line":"        try:"},{"line_number":358,"context_line":"            for bdm in bdms:"},{"line_number":359,"context_line":"                if bdm.volume_id !\u003d old_volume_id:"},{"line_number":360,"context_line":"                    continue"},{"line_number":361,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_28791294","line":358,"updated":"2015-12-22 18:56:24.000000000","message":"second enumeration here is not needed.","commit_id":"dcdc7f76245fdeab5a34737ae477b26761be4ec7"},{"author":{"_account_id":13562,"name":"Samuel Matzek","email":"smatzek@us.ibm.com","username":"smatzek"},"change_message_id":"112add28e0f6eae2163366dadf11c8fa946e02f7","unresolved":false,"context_lines":[{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        found \u003d False"},{"line_number":357,"context_line":"        try:"},{"line_number":358,"context_line":"            for bdm in bdms:"},{"line_number":359,"context_line":"                if bdm.volume_id !\u003d old_volume_id:"},{"line_number":360,"context_line":"                    continue"},{"line_number":361,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a7b0d38_6a20449c","line":358,"in_reply_to":"1a7b0d38_28791294","updated":"2015-12-23 16:56:24.000000000","message":"Done","commit_id":"dcdc7f76245fdeab5a34737ae477b26761be4ec7"}]}
