)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"fbfe8800d1e4b1e166757c702d7d3c21e80bdb37","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     nidhimittalhada \u003cnidhimittal19@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-05-13 13:11:11 +0530"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Manage Share: Anti REST way of reusing old info."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Lets say, we try to manage a share and share for some reason"},{"line_number":10,"context_line":"goes in \u0027manage_error\u0027 state. Now, if we try manage command again"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"dab17558_41a8d5db","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":48},"updated":"2016-05-13 11:57:00.000000000","message":"I\u0027d rewrite the title to something like: Remove retry logic from manage API","commit_id":"bc8abb0cf38259aacf6adbdf437df04903862948"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"fbfe8800d1e4b1e166757c702d7d3c21e80bdb37","unresolved":false,"context_lines":[{"line_number":17,"context_line":"delete the share before attempting to manage again."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Hence dropping the retry logic."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I0eee6e108fc263e0d2e092eeaa6d0cba47b53dc4"},{"line_number":22,"context_line":"Closes-Bug: #1566504"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"dab17558_46ebcb78","line":20,"updated":"2016-05-13 11:57:00.000000000","message":"Please add APIImpact flag","commit_id":"bc8abb0cf38259aacf6adbdf437df04903862948"}],"manila/share/api.py":[{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"fbfe8800d1e4b1e166757c702d7d3c21e80bdb37","unresolved":false,"context_lines":[{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        if len(shares) \u003d\u003d 0:"},{"line_number":538,"context_line":"            share \u003d self.db.share_create(context, share_data)"},{"line_number":539,"context_line":"        # NOTE(u_glide): Case when administrator have fixed some problems and"},{"line_number":540,"context_line":"        # tries to manage share again"},{"line_number":541,"context_line":"        elif len(shares) \u003d\u003d 1 and shares[0][\u0027status\u0027] in ("},{"line_number":542,"context_line":"                constants.STATUS_MANAGE_ERROR,):"},{"line_number":543,"context_line":"            msg \u003d _(\"Share is in \u0027manage_error\u0027 state.\""}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_86fdb33d","line":540,"range":{"start_line":539,"start_character":0,"end_line":540,"end_character":37},"updated":"2016-05-13 11:57:00.000000000","message":"This note does not make sense anymore. Please change it or remove.","commit_id":"bc8abb0cf38259aacf6adbdf437df04903862948"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"fbfe8800d1e4b1e166757c702d7d3c21e80bdb37","unresolved":false,"context_lines":[{"line_number":538,"context_line":"            share \u003d self.db.share_create(context, share_data)"},{"line_number":539,"context_line":"        # NOTE(u_glide): Case when administrator have fixed some problems and"},{"line_number":540,"context_line":"        # tries to manage share again"},{"line_number":541,"context_line":"        elif len(shares) \u003d\u003d 1 and shares[0][\u0027status\u0027] in ("},{"line_number":542,"context_line":"                constants.STATUS_MANAGE_ERROR,):"},{"line_number":543,"context_line":"            msg \u003d _(\"Share is in \u0027manage_error\u0027 state.\""},{"line_number":544,"context_line":"                    \"Delete share and retry.\")"},{"line_number":545,"context_line":"            raise exception.InvalidShare(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_e6063f1f","line":542,"range":{"start_line":541,"start_character":54,"end_line":542,"end_character":48},"updated":"2016-05-13 11:57:00.000000000","message":"You\u0027re only interested in MANAGE_ERROR status, no need to use a tuple here.","commit_id":"bc8abb0cf38259aacf6adbdf437df04903862948"},{"author":{"_account_id":17097,"name":"Tiago Pasqualini da Silva","email":"t.pasqualini@luizalabs.com","username":"tiago.pasqualini"},"change_message_id":"fbfe8800d1e4b1e166757c702d7d3c21e80bdb37","unresolved":false,"context_lines":[{"line_number":540,"context_line":"        # tries to manage share again"},{"line_number":541,"context_line":"        elif len(shares) \u003d\u003d 1 and shares[0][\u0027status\u0027] in ("},{"line_number":542,"context_line":"                constants.STATUS_MANAGE_ERROR,):"},{"line_number":543,"context_line":"            msg \u003d _(\"Share is in \u0027manage_error\u0027 state.\""},{"line_number":544,"context_line":"                    \"Delete share and retry.\")"},{"line_number":545,"context_line":"            raise exception.InvalidShare(reason\u003dmsg)"},{"line_number":546,"context_line":"        else:"},{"line_number":547,"context_line":"            msg \u003d _(\"Share already exists.\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"dab17558_0177ed9f","line":544,"range":{"start_line":543,"start_character":0,"end_line":544,"end_character":46},"updated":"2016-05-13 11:57:00.000000000","message":"You should probably use the constant here.\n\n            msg \u003d _(\"Share is in %s state. \"\n                    \"Delete share and try again.\")\n                  % constants.STATUS_MANAGE_ERROR","commit_id":"bc8abb0cf38259aacf6adbdf437df04903862948"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"2a31cdafe7302326d59d375faba2a3b6a2d10b3a","unresolved":false,"context_lines":[{"line_number":538,"context_line":"            share \u003d self.db.share_create(context, share_data)"},{"line_number":539,"context_line":"        elif len(shares) \u003d\u003d 1 and shares[0][\u0027status\u0027] \u003d\u003d ("},{"line_number":540,"context_line":"                constants.STATUS_MANAGE_ERROR):"},{"line_number":541,"context_line":"            msg \u003d _(\"Share is in %s state.\""},{"line_number":542,"context_line":"                    \" Delete share and try again.\""},{"line_number":543,"context_line":"                    % constants.STATUS_MANAGE_ERROR)"},{"line_number":544,"context_line":"            raise exception.InvalidShare(reason\u003dmsg)"},{"line_number":545,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_9b502034","line":542,"range":{"start_line":541,"start_character":20,"end_line":542,"end_character":50},"updated":"2016-05-16 12:11:44.000000000","message":"nit: unnecessary wrap here, if you happen to upload another patch, please unwrap these 2 lines.","commit_id":"1efabbdb50b3a7e7377754ae1131bb04d08c88a3"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"c9fb23bbe4ec7b706685faa74597f22a7526ef20","unresolved":false,"context_lines":[{"line_number":538,"context_line":"            share \u003d self.db.share_create(context, share_data)"},{"line_number":539,"context_line":"        elif len(shares) \u003d\u003d 1 and shares[0][\u0027status\u0027] \u003d\u003d ("},{"line_number":540,"context_line":"                constants.STATUS_MANAGE_ERROR):"},{"line_number":541,"context_line":"            msg \u003d _(\"Share is in %s state.\""},{"line_number":542,"context_line":"                    \" Delete share and try again.\""},{"line_number":543,"context_line":"                    % constants.STATUS_MANAGE_ERROR)"},{"line_number":544,"context_line":"            raise exception.InvalidShare(reason\u003dmsg)"},{"line_number":545,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_30877db6","line":542,"range":{"start_line":541,"start_character":20,"end_line":542,"end_character":50},"in_reply_to":"dab17558_9b502034","updated":"2016-05-16 17:25:30.000000000","message":"Put the closing parens at the end of this line: msg \u003d _(\"Share is in %s state. Delete share and try again.\") % (\n  constants.STATUS_MANAGE_ERROR)\n\nDon\u0027t know how this will show up, but there would be a newline and appropriate indent between \u0027(\u0027 and \u0027constants.STATUS_MANAGE_ERROR\u0027","commit_id":"1efabbdb50b3a7e7377754ae1131bb04d08c88a3"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"e0f82180480f34d2f97469a326092d0711c2864c","unresolved":false,"context_lines":[{"line_number":540,"context_line":"                constants.STATUS_MANAGE_ERROR):"},{"line_number":541,"context_line":"            msg \u003d _(\"Share is in %s state.\""},{"line_number":542,"context_line":"                    \" Delete share and try again.\""},{"line_number":543,"context_line":"                    % constants.STATUS_MANAGE_ERROR)"},{"line_number":544,"context_line":"            raise exception.InvalidShare(reason\u003dmsg)"},{"line_number":545,"context_line":"        else:"},{"line_number":546,"context_line":"            msg \u003d _(\"Share already exists.\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_2f098e31","line":543,"range":{"start_line":543,"start_character":20,"end_line":543,"end_character":51},"updated":"2016-05-17 21:55:29.000000000","message":"Even though it is a constant, the _() is for localizing the format string and the % param needs to be done after localization.","commit_id":"1efabbdb50b3a7e7377754ae1131bb04d08c88a3"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"2a31cdafe7302326d59d375faba2a3b6a2d10b3a","unresolved":false,"context_lines":[{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        if len(shares) \u003d\u003d 0:"},{"line_number":538,"context_line":"            share \u003d self.db.share_create(context, share_data)"},{"line_number":539,"context_line":"        elif len(shares) \u003d\u003d 1 and shares[0][\u0027status\u0027] \u003d\u003d ("},{"line_number":540,"context_line":"                constants.STATUS_MANAGE_ERROR):"},{"line_number":541,"context_line":"            msg \u003d _(\"Share is in %s state.\""},{"line_number":542,"context_line":"                    \" Delete share and try again.\""},{"line_number":543,"context_line":"                    % constants.STATUS_MANAGE_ERROR)"},{"line_number":544,"context_line":"            raise exception.InvalidShare(reason\u003dmsg)"},{"line_number":545,"context_line":"        else:"},{"line_number":546,"context_line":"            msg \u003d _(\"Share already exists.\")"},{"line_number":547,"context_line":"            raise exception.InvalidShare(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_ee1d2863","line":544,"range":{"start_line":539,"start_character":8,"end_line":544,"end_character":52},"updated":"2016-05-16 12:11:44.000000000","message":"you say you are dropping the retry logic, why don\u0027t you remove this \"elif\" entirely? Although it is a more friendly message, it is redundant with the \"else\" section.","commit_id":"1efabbdb50b3a7e7377754ae1131bb04d08c88a3"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"e0f82180480f34d2f97469a326092d0711c2864c","unresolved":false,"context_lines":[{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        if len(shares) \u003d\u003d 0:"},{"line_number":538,"context_line":"            share \u003d self.db.share_create(context, share_data)"},{"line_number":539,"context_line":"        elif len(shares) \u003d\u003d 1 and shares[0][\u0027status\u0027] \u003d\u003d ("},{"line_number":540,"context_line":"                constants.STATUS_MANAGE_ERROR):"},{"line_number":541,"context_line":"            msg \u003d _(\"Share is in %s state.\""},{"line_number":542,"context_line":"                    \" Delete share and try again.\""},{"line_number":543,"context_line":"                    % constants.STATUS_MANAGE_ERROR)"},{"line_number":544,"context_line":"            raise exception.InvalidShare(reason\u003dmsg)"},{"line_number":545,"context_line":"        else:"},{"line_number":546,"context_line":"            msg \u003d _(\"Share already exists.\")"},{"line_number":547,"context_line":"            raise exception.InvalidShare(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_62656dad","line":544,"range":{"start_line":539,"start_character":8,"end_line":544,"end_character":52},"in_reply_to":"dab17558_7fad4de8","updated":"2016-05-17 21:55:29.000000000","message":"Rodrigo makes a good point (cleaner code), but if Nidhi says the user experience is better with that elif then why not keep it?  Just fix the _() % parm","commit_id":"1efabbdb50b3a7e7377754ae1131bb04d08c88a3"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"afe4e0cb6659bb5ee4cadcd8f1a5478c8e0aee70","unresolved":false,"context_lines":[{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        if len(shares) \u003d\u003d 0:"},{"line_number":538,"context_line":"            share \u003d self.db.share_create(context, share_data)"},{"line_number":539,"context_line":"        elif len(shares) \u003d\u003d 1 and shares[0][\u0027status\u0027] \u003d\u003d ("},{"line_number":540,"context_line":"                constants.STATUS_MANAGE_ERROR):"},{"line_number":541,"context_line":"            msg \u003d _(\"Share is in %s state.\""},{"line_number":542,"context_line":"                    \" Delete share and try again.\""},{"line_number":543,"context_line":"                    % constants.STATUS_MANAGE_ERROR)"},{"line_number":544,"context_line":"            raise exception.InvalidShare(reason\u003dmsg)"},{"line_number":545,"context_line":"        else:"},{"line_number":546,"context_line":"            msg \u003d _(\"Share already exists.\")"},{"line_number":547,"context_line":"            raise exception.InvalidShare(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_7fad4de8","line":544,"range":{"start_line":539,"start_character":8,"end_line":544,"end_character":52},"in_reply_to":"dab17558_90d8e91f","updated":"2016-05-16 19:28:30.000000000","message":"I would say that share already exists. Admin would still need to delete and re-manage.","commit_id":"1efabbdb50b3a7e7377754ae1131bb04d08c88a3"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"c9fb23bbe4ec7b706685faa74597f22a7526ef20","unresolved":false,"context_lines":[{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        if len(shares) \u003d\u003d 0:"},{"line_number":538,"context_line":"            share \u003d self.db.share_create(context, share_data)"},{"line_number":539,"context_line":"        elif len(shares) \u003d\u003d 1 and shares[0][\u0027status\u0027] \u003d\u003d ("},{"line_number":540,"context_line":"                constants.STATUS_MANAGE_ERROR):"},{"line_number":541,"context_line":"            msg \u003d _(\"Share is in %s state.\""},{"line_number":542,"context_line":"                    \" Delete share and try again.\""},{"line_number":543,"context_line":"                    % constants.STATUS_MANAGE_ERROR)"},{"line_number":544,"context_line":"            raise exception.InvalidShare(reason\u003dmsg)"},{"line_number":545,"context_line":"        else:"},{"line_number":546,"context_line":"            msg \u003d _(\"Share already exists.\")"},{"line_number":547,"context_line":"            raise exception.InvalidShare(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_90d8e91f","line":544,"range":{"start_line":539,"start_character":8,"end_line":544,"end_character":52},"in_reply_to":"dab17558_ee1d2863","updated":"2016-05-16 17:25:30.000000000","message":"Rodrigo: if the elif is removed, which error message should be used?","commit_id":"1efabbdb50b3a7e7377754ae1131bb04d08c88a3"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"1383bdf003f843cf077fd55072d022a6787e834a","unresolved":false,"context_lines":[{"line_number":538,"context_line":"            share \u003d self.db.share_create(context, share_data)"},{"line_number":539,"context_line":"        elif len(shares) \u003d\u003d 1 and shares[0][\u0027status\u0027] \u003d\u003d ("},{"line_number":540,"context_line":"                constants.STATUS_MANAGE_ERROR):"},{"line_number":541,"context_line":"            msg \u003d _(\"Share is in %s state. Delete share and try again.\") % ("},{"line_number":542,"context_line":"                constants.STATUS_MANAGE_ERROR)"},{"line_number":543,"context_line":"            raise exception.InvalidShare(reason\u003dmsg)"},{"line_number":544,"context_line":"        else:"},{"line_number":545,"context_line":"            msg \u003d _(\"Share already exists.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"bab6814e_cf6f9929","line":542,"range":{"start_line":541,"start_character":12,"end_line":542,"end_character":46},"updated":"2016-05-20 01:43:46.000000000","message":"I think you should not worry about this.. please remove this elif clause altogether. Administrators will check the existing shares when they get a HTTP 400, and can see that their share is in manage_error.. Also, i think the feature was intended in such a way that the administrators always knew they were trying to manage a share with manage_error. \n\n\nThis \u0027feature\" was broken since Liberty... the bug report will tell you that the corrective action is to remove this behavior of checking for manage_error...","commit_id":"5788c1c9320a7297741e7a0c0a83e47635f08a4a"},{"author":{"_account_id":16305,"name":"NidhiMittalHada","email":"nidhimittal19@gmail.com","username":"nidhimittalhada"},"change_message_id":"8bdca9aaac1f5b9aa9d880cda33c0c6c1f1e687e","unresolved":false,"context_lines":[{"line_number":538,"context_line":"            share \u003d self.db.share_create(context, share_data)"},{"line_number":539,"context_line":"        elif len(shares) \u003d\u003d 1 and shares[0][\u0027status\u0027] \u003d\u003d ("},{"line_number":540,"context_line":"                constants.STATUS_MANAGE_ERROR):"},{"line_number":541,"context_line":"            msg \u003d _(\"Share is in %s state. Delete share and try again.\") % ("},{"line_number":542,"context_line":"                constants.STATUS_MANAGE_ERROR)"},{"line_number":543,"context_line":"            raise exception.InvalidShare(reason\u003dmsg)"},{"line_number":544,"context_line":"        else:"},{"line_number":545,"context_line":"            msg \u003d _(\"Share already exists.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"bab6814e_8457e4c8","line":542,"range":{"start_line":541,"start_character":12,"end_line":542,"end_character":46},"in_reply_to":"bab6814e_cf6f9929","updated":"2016-05-23 07:33:25.000000000","message":"msg  _(\"Share already exists or in %s state.\") % (\n                constants.STATUS_MANAGE_ERROR)\n\nShould i change error message to this ?","commit_id":"5788c1c9320a7297741e7a0c0a83e47635f08a4a"}],"manila/tests/share/test_api.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"1383bdf003f843cf077fd55072d022a6787e834a","unresolved":false,"context_lines":[{"line_number":854,"context_line":""},{"line_number":855,"context_line":"        self.mock_object(db_api, \u0027share_export_locations_update\u0027)"},{"line_number":856,"context_line":"        self.mock_object(self.api, \u0027get_all\u0027,"},{"line_number":857,"context_line":"                         mock.Mock(return_value\u003dshares))"},{"line_number":858,"context_line":""},{"line_number":859,"context_line":"        self.assertRaises(exception.InvalidShare, self.api.manage,"},{"line_number":860,"context_line":"                          self.context, copy.deepcopy(share_data),"}],"source_content_type":"text/x-python","patch_set":3,"id":"bab6814e_efd6ddef","line":857,"range":{"start_line":857,"start_character":48,"end_line":857,"end_character":54},"updated":"2016-05-20 01:43:46.000000000","message":"This does not contain the share you are requesting to manage.. this test is written wrong.","commit_id":"5788c1c9320a7297741e7a0c0a83e47635f08a4a"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"1383bdf003f843cf077fd55072d022a6787e834a","unresolved":false,"context_lines":[{"line_number":860,"context_line":"                          self.context, copy.deepcopy(share_data),"},{"line_number":861,"context_line":"                          driver_options)"},{"line_number":862,"context_line":""},{"line_number":863,"context_line":"    def test_manage_duplicate(self):"},{"line_number":864,"context_line":"        share_data \u003d {"},{"line_number":865,"context_line":"            \u0027host\u0027: \u0027fake\u0027,"},{"line_number":866,"context_line":"            \u0027export_location\u0027: \u0027fake\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bab6814e_8f33d161","line":863,"range":{"start_line":863,"start_character":4,"end_line":863,"end_character":36},"updated":"2016-05-20 01:43:46.000000000","message":"Can you delete the above test and reuse this test instead.. you can use ddt to specify what the status of the share that already exists on manila is.","commit_id":"5788c1c9320a7297741e7a0c0a83e47635f08a4a"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"e3afdbf472e85e4462f65f046493a320b956c96b","unresolved":false,"context_lines":[{"line_number":847,"context_line":"        self.mock_object(share_types, \u0027get_share_type\u0027,"},{"line_number":848,"context_line":"                         mock.Mock(return_value\u003dfake_type))"},{"line_number":849,"context_line":"        self.assertRaises(exception.InvalidShare, self.api.manage,"},{"line_number":850,"context_line":"                          self.context, share_data, driver_options)"},{"line_number":851,"context_line":""},{"line_number":852,"context_line":"    def _get_request_spec_dict(self, share, share_type, **kwargs):"},{"line_number":853,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_fa23b6a5","line":850,"updated":"2016-05-23 22:44:38.000000000","message":"I recommend doing assert_called_once_with() on the 2 mock objects created above to catch mock errors.  But I don\u0027t see any mock errors.","commit_id":"348fde021f3267ddec7ff77abc4c55fe5a166ffb"}]}
