)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"db3d1c2ec6639c79c25142da423e6225486dd4ae","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"26b4c03d_e529efbd","updated":"2022-01-11 14:36:22.000000000","message":"LGTM. thanks Brian.","commit_id":"de8b3b0b00421a01ed777880d2b5bf6fffc068d5"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"952b7904c0b2ce97094093ddea924a014bafd96c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"30e6c741_b61963ce","updated":"2022-01-11 15:10:29.000000000","message":"The rest of the code looks good to me and I think everyone\u0027s comments have been addressed.  Merging.","commit_id":"de8b3b0b00421a01ed777880d2b5bf6fffc068d5"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"42b668cd31a96bb3240d576854d44b7bed33aac6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"306df1ae_9919e8ac","updated":"2022-01-11 14:35:57.000000000","message":"Think this is ok but there is one improvement that could be made.","commit_id":"de8b3b0b00421a01ed777880d2b5bf6fffc068d5"}],"cinder/api/contrib/volume_actions.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"811be391effeedd4ea31038ce1ef4926b1282899","unresolved":true,"context_lines":[{"line_number":223,"context_line":"                msg \u003d _(\"An encrypted volume uploaded as an image must use \""},{"line_number":224,"context_line":"                        \"\u0027raw\u0027 disk_format and \u0027bare\u0027 container_format, \""},{"line_number":225,"context_line":"                        \"which are the defaults for these options.\")"},{"line_number":226,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"            # Clone volume encryption key: the current key cannot"},{"line_number":229,"context_line":"            # be reused because it will be deleted when the volume is"}],"source_content_type":"text/x-python","patch_set":2,"id":"48997e7d_14e1dec4","line":226,"range":{"start_line":226,"start_character":32,"end_line":226,"end_character":46},"updated":"2022-01-11 14:15:13.000000000","message":"I wonder whether HTTPConflict would be better here?  The request passes the validation schema, and the problem is that what the user is asking to do conflicts with the state of the resource.","commit_id":"de8b3b0b00421a01ed777880d2b5bf6fffc068d5"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"a74c453fe40faa0389b449b20a62ac58c22de5d9","unresolved":true,"context_lines":[{"line_number":223,"context_line":"                msg \u003d _(\"An encrypted volume uploaded as an image must use \""},{"line_number":224,"context_line":"                        \"\u0027raw\u0027 disk_format and \u0027bare\u0027 container_format, \""},{"line_number":225,"context_line":"                        \"which are the defaults for these options.\")"},{"line_number":226,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"            # Clone volume encryption key: the current key cannot"},{"line_number":229,"context_line":"            # be reused because it will be deleted when the volume is"}],"source_content_type":"text/x-python","patch_set":2,"id":"64f1b84e_15af1a6b","line":226,"range":{"start_line":226,"start_character":32,"end_line":226,"end_character":46},"in_reply_to":"284be336_6d0eb2e0","updated":"2022-01-11 15:03:36.000000000","message":"OK, let\u0027s split the difference here and go with 400 for consistency, and then we can think about using 409s appropriately in API v4.","commit_id":"de8b3b0b00421a01ed777880d2b5bf6fffc068d5"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"42b668cd31a96bb3240d576854d44b7bed33aac6","unresolved":true,"context_lines":[{"line_number":223,"context_line":"                msg \u003d _(\"An encrypted volume uploaded as an image must use \""},{"line_number":224,"context_line":"                        \"\u0027raw\u0027 disk_format and \u0027bare\u0027 container_format, \""},{"line_number":225,"context_line":"                        \"which are the defaults for these options.\")"},{"line_number":226,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"            # Clone volume encryption key: the current key cannot"},{"line_number":229,"context_line":"            # be reused because it will be deleted when the volume is"}],"source_content_type":"text/x-python","patch_set":2,"id":"e9de01a2_e7ba6c87","line":226,"range":{"start_line":226,"start_character":32,"end_line":226,"end_character":46},"in_reply_to":"48997e7d_14e1dec4","updated":"2022-01-11 14:35:57.000000000","message":"I know that there are a lot of different places in the Cinder code where HTTPBadRequest is used.  After reading the definition of 400 (https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400) vs 409 (https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409) I think that Brian\u0027s concern is correct.  So, I think using HTTPConflict would be better.  I think there are also other places in the code that we may want to look closer and see if the exception type should be changed.","commit_id":"de8b3b0b00421a01ed777880d2b5bf6fffc068d5"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"db3d1c2ec6639c79c25142da423e6225486dd4ae","unresolved":true,"context_lines":[{"line_number":223,"context_line":"                msg \u003d _(\"An encrypted volume uploaded as an image must use \""},{"line_number":224,"context_line":"                        \"\u0027raw\u0027 disk_format and \u0027bare\u0027 container_format, \""},{"line_number":225,"context_line":"                        \"which are the defaults for these options.\")"},{"line_number":226,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"            # Clone volume encryption key: the current key cannot"},{"line_number":229,"context_line":"            # be reused because it will be deleted when the volume is"}],"source_content_type":"text/x-python","patch_set":2,"id":"284be336_6d0eb2e0","line":226,"range":{"start_line":226,"start_character":32,"end_line":226,"end_character":46},"in_reply_to":"48997e7d_14e1dec4","updated":"2022-01-11 14:36:22.000000000","message":"The request passed schema because we don\u0027t know at that time if the volume is encrypted or not, the user know they are performing the operation on encrypted volume and should be aware about the parameters to pass with this request. I see it similar to trying to do an attachment create request on a non-available volume and we raise BadRequest in this case even though the state of resource conflicts with the user request.","commit_id":"de8b3b0b00421a01ed777880d2b5bf6fffc068d5"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"952b7904c0b2ce97094093ddea924a014bafd96c","unresolved":true,"context_lines":[{"line_number":223,"context_line":"                msg \u003d _(\"An encrypted volume uploaded as an image must use \""},{"line_number":224,"context_line":"                        \"\u0027raw\u0027 disk_format and \u0027bare\u0027 container_format, \""},{"line_number":225,"context_line":"                        \"which are the defaults for these options.\")"},{"line_number":226,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"            # Clone volume encryption key: the current key cannot"},{"line_number":229,"context_line":"            # be reused because it will be deleted when the volume is"}],"source_content_type":"text/x-python","patch_set":2,"id":"6ef99ea5_24bbf7c9","line":226,"range":{"start_line":226,"start_character":32,"end_line":226,"end_character":46},"in_reply_to":"64f1b84e_15af1a6b","updated":"2022-01-11 15:10:29.000000000","message":"I am ok with this approach.  Sounds like a good topic for a future team meeting.","commit_id":"de8b3b0b00421a01ed777880d2b5bf6fffc068d5"}]}
