)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"ed8e3aaed27dfa8e2bd5f0649d04838e7de4b76b","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We should check if a type is public and do not allow public share type"},{"line_number":14,"context_line":"to modify project access."},{"line_number":15,"context_line":"APIImpact"},{"line_number":16,"context_line":"When modifying access for public share type, API will return 400 and message:"},{"line_number":17,"context_line":"\"Invalid share type: Type access modification is not applicable to public"},{"line_number":18,"context_line":"share type.\""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"ba8a016a_40082128","line":15,"updated":"2015-11-19 18:08:00.000000000","message":"s/APIImpact/API Impact","commit_id":"255ea85af7603b7c6e1ae81e637ce69483a40890"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"693fb95b5ee77d498056c0761dc2911cfe288a83","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We should check if a type is public and do not allow public share type"},{"line_number":14,"context_line":"to modify project access."},{"line_number":15,"context_line":"APIImpact"},{"line_number":16,"context_line":"When modifying access for public share type, API will return 400 and message:"},{"line_number":17,"context_line":"\"Invalid share type: Type access modification is not applicable to public"},{"line_number":18,"context_line":"share type.\""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"9a8ffd7b_632465c4","line":15,"in_reply_to":"9a8ffd7b_8ced08b9","updated":"2015-11-27 18:56:07.000000000","message":"Valeriy: APIImpact is not DocImpact. We\u0027re not creating bugs as of yet. (We should be, eventually). \n\nThis flag is encouraged on any patch that touches the API layer. However, it is *required* on every patch that modifies any existing API. Guidelines are still being framed across OpenStack projects and it\u0027s a good way to get some external reviewer attention to Manila. \n\nThis commit message clearly documents the choice of response code, well within the purview of the API WG. Also, this is a \"change such that a request which was successful before now results in an error response.\"\n\nhttps://wiki.openstack.org/wiki/API_Working_Group","commit_id":"255ea85af7603b7c6e1ae81e637ce69483a40890"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"aec80f38a4ff4b5b766983a99fed1903c877a7fc","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We should check if a type is public and do not allow public share type"},{"line_number":14,"context_line":"to modify project access."},{"line_number":15,"context_line":"APIImpact"},{"line_number":16,"context_line":"When modifying access for public share type, API will return 400 and message:"},{"line_number":17,"context_line":"\"Invalid share type: Type access modification is not applicable to public"},{"line_number":18,"context_line":"share type.\""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"9a8ffd7b_8ced08b9","line":15,"in_reply_to":"ba8a016a_3bd6644f","updated":"2015-11-27 12:16:29.000000000","message":"It should be removed. Nothing to address in docs because of such change.\n\nSo, we can left it here, but then we will get redirected bug from API project in Launchpad.","commit_id":"255ea85af7603b7c6e1ae81e637ce69483a40890"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"73d94c44f2e8043eb0a6f565e5e321703082a7a0","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We should check if a type is public and do not allow public share type"},{"line_number":14,"context_line":"to modify project access."},{"line_number":15,"context_line":"APIImpact"},{"line_number":16,"context_line":"When modifying access for public share type, API will return 400 and message:"},{"line_number":17,"context_line":"\"Invalid share type: Type access modification is not applicable to public"},{"line_number":18,"context_line":"share type.\""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"ba8a016a_3bd6644f","line":15,"in_reply_to":"ba8a016a_40082128","updated":"2015-11-19 22:16:33.000000000","message":"Rodrigo, it is APIImpact..\n\nhttps://wiki.openstack.org/wiki/API_Working_Group","commit_id":"255ea85af7603b7c6e1ae81e637ce69483a40890"},{"author":{"_account_id":16707,"name":"Mohankumar","email":"nmohankumar1011@gmail.com","username":"mohankumar_n"},"change_message_id":"18adce478030c92c40c6cedfa05c5df7b6aad0fa","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now public share type can be removed project access, but when"},{"line_number":10,"context_line":"listing access, manila returns \u0027Access list not available for public"},{"line_number":11,"context_line":"share types.\u0027 It\u0027s weird for users experience."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We should check if a type is public and do not allow public share type"},{"line_number":14,"context_line":"to modify project access."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"7a740942_b346304d","line":11,"updated":"2015-12-08 06:26:54.000000000","message":"minor nit : \u0027Access list not available for public\tshare types.\u0027 \u003d\u003e \u0027Access list not available for public\tshare types\u0027.","commit_id":"459827a080a1671c0c40e41da03cf574111ab92d"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"64145dfcc78730143be262d2a346e11d71c8cd9d","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now public share type can be removed project access, but when"},{"line_number":10,"context_line":"listing access, manila returns \u0027Access list not available for public"},{"line_number":11,"context_line":"share types.\u0027 It\u0027s weird for users experience."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We should check if a type is public and do not allow public share type"},{"line_number":14,"context_line":"to modify project access."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"7a740942_99a8f521","line":11,"in_reply_to":"7a740942_b346304d","updated":"2015-12-08 07:44:55.000000000","message":"Done","commit_id":"459827a080a1671c0c40e41da03cf574111ab92d"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b914858e369cdbc5f42144a3a204ac394ce3ba17","unresolved":false,"context_lines":[{"line_number":11,"context_line":"share types.\u0027 It\u0027s weird for users experience."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We should check if a type is public and do not allow public share type"},{"line_number":14,"context_line":"to modify project access."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I94f580eeb7eef4263c631227cc3710eeae2b9706"},{"line_number":17,"context_line":"Closes-Bug: #1490912"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"7a740942_13a8678c","line":14,"updated":"2015-12-08 05:22:02.000000000","message":"Please add the APIImpact flag","commit_id":"459827a080a1671c0c40e41da03cf574111ab92d"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"64145dfcc78730143be262d2a346e11d71c8cd9d","unresolved":false,"context_lines":[{"line_number":11,"context_line":"share types.\u0027 It\u0027s weird for users experience."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We should check if a type is public and do not allow public share type"},{"line_number":14,"context_line":"to modify project access."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I94f580eeb7eef4263c631227cc3710eeae2b9706"},{"line_number":17,"context_line":"Closes-Bug: #1490912"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"7a740942_b9a5b147","line":14,"in_reply_to":"7a740942_13a8678c","updated":"2015-12-08 07:44:55.000000000","message":"Done","commit_id":"459827a080a1671c0c40e41da03cf574111ab92d"}],"manila/api/contrib/share_type_access.py":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"e676a0138a817192868879417a1c4acc791b558c","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        project \u003d body[\u0027removeProjectAccess\u0027][\u0027project\u0027]"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        try:"},{"line_number":137,"context_line":"            share_type \u003d share_types.get_share_type(context, id)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"            if share_type[\u0027is_public\u0027]:"},{"line_number":140,"context_line":"                msg \u003d _(\"You cannot remove project from public share_type.\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"da85f559_9651e010","line":137,"updated":"2015-11-10 13:56:34.000000000","message":"This new code completely the same as in \"_addProjectAccess\". Better to make this part common for both.","commit_id":"69c694b641f102800b2b934dfd44518aa1501652"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"1f967be0638fa927563f27c9770f66674cc36502","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        project \u003d body[\u0027removeProjectAccess\u0027][\u0027project\u0027]"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        try:"},{"line_number":137,"context_line":"            share_type \u003d share_types.get_share_type(context, id)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"            if share_type[\u0027is_public\u0027]:"},{"line_number":140,"context_line":"                msg \u003d _(\"You cannot remove project from public share_type.\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"da85f559_64e6deb1","line":137,"in_reply_to":"da85f559_9651e010","updated":"2015-11-11 06:48:57.000000000","message":"Done","commit_id":"69c694b641f102800b2b934dfd44518aa1501652"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"e311341cd0cb3afca206ac2f629493c170ac94f4","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        self._check_body(body, \u0027addProjectAccess\u0027)"},{"line_number":110,"context_line":"        project \u003d body[\u0027addProjectAccess\u0027][\u0027project\u0027]"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        self._check_share_type_allowed_for_public(context, id)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        try:"},{"line_number":115,"context_line":"            share_types.add_share_type_access(context, id, project)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da85f559_e3c82daa","line":112,"updated":"2015-11-12 14:43:37.000000000","message":"see comment below","commit_id":"22fa3f1c5be05857bfecc0b80b47626a63167582"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"e10480ac890381f4bb3ecfc32b630981d3ed9dae","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        self._check_body(body, \u0027addProjectAccess\u0027)"},{"line_number":110,"context_line":"        project \u003d body[\u0027addProjectAccess\u0027][\u0027project\u0027]"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        self._check_share_type_allowed_for_public(context, id)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        try:"},{"line_number":115,"context_line":"            share_types.add_share_type_access(context, id, project)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba8a016a_a82a3d8e","line":112,"in_reply_to":"da85f559_e3c82daa","updated":"2015-11-19 07:38:15.000000000","message":"Done","commit_id":"22fa3f1c5be05857bfecc0b80b47626a63167582"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"e311341cd0cb3afca206ac2f629493c170ac94f4","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        self._check_body(body, \u0027removeProjectAccess\u0027)"},{"line_number":126,"context_line":"        project \u003d body[\u0027removeProjectAccess\u0027][\u0027project\u0027]"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        self._check_share_type_allowed_for_public(context, id)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            share_types.remove_share_type_access(context, id, project)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da85f559_23d39561","line":128,"updated":"2015-11-12 14:43:37.000000000","message":"See comment below","commit_id":"22fa3f1c5be05857bfecc0b80b47626a63167582"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"e10480ac890381f4bb3ecfc32b630981d3ed9dae","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        self._check_body(body, \u0027removeProjectAccess\u0027)"},{"line_number":126,"context_line":"        project \u003d body[\u0027removeProjectAccess\u0027][\u0027project\u0027]"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        self._check_share_type_allowed_for_public(context, id)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            share_types.remove_share_type_access(context, id, project)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba8a016a_882df9a9","line":128,"in_reply_to":"da85f559_23d39561","updated":"2015-11-19 07:38:15.000000000","message":"Done","commit_id":"22fa3f1c5be05857bfecc0b80b47626a63167582"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"e311341cd0cb3afca206ac2f629493c170ac94f4","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dsix.text_type(err))"},{"line_number":135,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def _check_share_type_allowed_for_public(self, context, share_type_id):"},{"line_number":138,"context_line":"        try:"},{"line_number":139,"context_line":"            share_type \u003d share_types.get_share_type(context, share_type_id)"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"da85f559_430b39d6","line":137,"updated":"2015-11-12 14:43:37.000000000","message":"I find this name very confusing. I suggest changing this method name to:\n\n    _verify_if_non_public_share_type(self, context, share_type_id)\n\nor\n\n    _disallow_access_change_on_public_share_type(self, context, share_type_id)\n\nbecause this isn\u0027t necessarily a check that returns True or False... You are allowing or disallowing changes.","commit_id":"22fa3f1c5be05857bfecc0b80b47626a63167582"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"e10480ac890381f4bb3ecfc32b630981d3ed9dae","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dsix.text_type(err))"},{"line_number":135,"context_line":"        return webob.Response(status_int\u003d202)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def _check_share_type_allowed_for_public(self, context, share_type_id):"},{"line_number":138,"context_line":"        try:"},{"line_number":139,"context_line":"            share_type \u003d share_types.get_share_type(context, share_type_id)"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"ba8a016a_e824c5c5","line":137,"in_reply_to":"da85f559_430b39d6","updated":"2015-11-19 07:38:15.000000000","message":"Done","commit_id":"22fa3f1c5be05857bfecc0b80b47626a63167582"}],"manila/api/v2/share_types.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b914858e369cdbc5f42144a3a204ac394ce3ba17","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        try:"},{"line_number":263,"context_line":"            share_types.remove_share_type_access(context, id, project)"},{"line_number":264,"context_line":"        except (exception.ShareTypeNotFound,"},{"line_number":265,"context_line":"                exception.ShareTypeAccessNotFound) as err:"},{"line_number":266,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dsix.text_type(err))"},{"line_number":267,"context_line":"        return webob.Response(status_int\u003d202)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a740942_d3a17f47","line":264,"updated":"2015-12-08 05:22:02.000000000","message":"It would be safe to assume that exception.ShareTypeNotFound will not be raised by share_types.remove_share_type_access.. \n\nYou\u0027re already making the check on line 270 and handling that exception on 278","commit_id":"459827a080a1671c0c40e41da03cf574111ab92d"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b914858e369cdbc5f42144a3a204ac394ce3ba17","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            if share_type[\u0027is_public\u0027]:"},{"line_number":274,"context_line":"                msg \u003d _(\"Type access modification is not applicable to \""},{"line_number":275,"context_line":"                        \"public share type.\")"},{"line_number":276,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        except exception.ShareTypeNotFound as err:"},{"line_number":279,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dsix.text_type(err))"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a740942_93c9b75b","line":276,"updated":"2015-12-08 05:22:02.000000000","message":"This should be HTTPConflict since HTTPForbidden may give the notion that this action may be permissible under an elevated context (admin access). \n\nIn the message you\u0027ve specified, not applicable !\u003d forbidden...","commit_id":"459827a080a1671c0c40e41da03cf574111ab92d"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"64145dfcc78730143be262d2a346e11d71c8cd9d","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            if share_type[\u0027is_public\u0027]:"},{"line_number":274,"context_line":"                msg \u003d _(\"Type access modification is not applicable to \""},{"line_number":275,"context_line":"                        \"public share type.\")"},{"line_number":276,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        except exception.ShareTypeNotFound as err:"},{"line_number":279,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dsix.text_type(err))"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a740942_3970e1db","line":276,"in_reply_to":"7a740942_93c9b75b","updated":"2015-12-08 07:44:55.000000000","message":"Done","commit_id":"459827a080a1671c0c40e41da03cf574111ab92d"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"f79f274082a2b9dc66c9833b4d6ec8e5eb06527a","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        try:"},{"line_number":263,"context_line":"            share_types.remove_share_type_access(context, id, project)"},{"line_number":264,"context_line":"        except (exception.ShareTypeNotFound,"},{"line_number":265,"context_line":"                 exception.ShareTypeAccessNotFound) as err:"},{"line_number":266,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dsix.text_type(err))"},{"line_number":267,"context_line":"        return webob.Response(status_int\u003d202)"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a740942_df53bd69","line":264,"updated":"2015-12-08 08:18:36.000000000","message":"still think this exception needn\u0027t be expected/handled because you\u0027re handling it on #278...","commit_id":"d25c960cfbe87a50ced0ec27c408e4d412a6c8a9"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"59c1735401323d82f114c7ddbaaf2cbdef2b994d","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        try:"},{"line_number":263,"context_line":"            share_types.remove_share_type_access(context, id, project)"},{"line_number":264,"context_line":"        except (exception.ShareTypeNotFound,"},{"line_number":265,"context_line":"                 exception.ShareTypeAccessNotFound) as err:"},{"line_number":266,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dsix.text_type(err))"},{"line_number":267,"context_line":"        return webob.Response(status_int\u003d202)"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a740942_d71f2106","line":264,"in_reply_to":"7a740942_df53bd69","updated":"2015-12-08 09:10:56.000000000","message":"Done","commit_id":"d25c960cfbe87a50ced0ec27c408e4d412a6c8a9"}],"manila/share/share_types.py":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"1adc8cd92a173be2a47b8a5b8f08d90f20d1e4ca","unresolved":false,"context_lines":[{"line_number":263,"context_line":"    if share_type_id is None:"},{"line_number":264,"context_line":"        msg \u003d _(\"share_type_id cannot be None\")"},{"line_number":265,"context_line":"        raise exception.InvalidShareType(reason\u003dmsg)"},{"line_number":266,"context_line":"    if is_public_share_type(context, share_type_id):"},{"line_number":267,"context_line":"        msg \u003d _(\"Type access modification is not applicable to public share \""},{"line_number":268,"context_line":"                \"type.\")"},{"line_number":269,"context_line":"        raise exception.InvalidShareType(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a1a9d01_02e890e1","line":266,"updated":"2015-09-25 09:29:26.000000000","message":"This","commit_id":"ed2645b7e5fc35d0cee5c650d5eb0ccbe19ff38b"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"861a76a4d74311b6cd399be397e518df0309e05b","unresolved":false,"context_lines":[{"line_number":263,"context_line":"    if share_type_id is None:"},{"line_number":264,"context_line":"        msg \u003d _(\"share_type_id cannot be None\")"},{"line_number":265,"context_line":"        raise exception.InvalidShareType(reason\u003dmsg)"},{"line_number":266,"context_line":"    if is_public_share_type(context, share_type_id):"},{"line_number":267,"context_line":"        msg \u003d _(\"Type access modification is not applicable to public share \""},{"line_number":268,"context_line":"                \"type.\")"},{"line_number":269,"context_line":"        raise exception.InvalidShareType(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a1a9d01_7aba1e0c","line":266,"in_reply_to":"9a1a9d01_02e890e1","updated":"2015-09-28 03:50:56.000000000","message":"Done","commit_id":"ed2645b7e5fc35d0cee5c650d5eb0ccbe19ff38b"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"1adc8cd92a173be2a47b8a5b8f08d90f20d1e4ca","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        msg \u003d _(\"share_type_id cannot be None\")"},{"line_number":277,"context_line":"        raise exception.InvalidShareType(reason\u003dmsg)"},{"line_number":278,"context_line":"    if is_public_share_type(context, share_type_id):"},{"line_number":279,"context_line":"        msg \u003d _(\"Type access modification is not applicable to public share \""},{"line_number":280,"context_line":"                \"type.\")"},{"line_number":281,"context_line":"        raise exception.InvalidShareType(reason\u003dmsg)"},{"line_number":282,"context_line":"    return db.share_type_access_remove(context, share_type_id, project_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a1a9d01_c2c85877","line":279,"updated":"2015-09-25 09:29:26.000000000","message":"And this is code duplication. Should be separated to one method and use only call of this method in these two places.","commit_id":"ed2645b7e5fc35d0cee5c650d5eb0ccbe19ff38b"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"861a76a4d74311b6cd399be397e518df0309e05b","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        msg \u003d _(\"share_type_id cannot be None\")"},{"line_number":277,"context_line":"        raise exception.InvalidShareType(reason\u003dmsg)"},{"line_number":278,"context_line":"    if is_public_share_type(context, share_type_id):"},{"line_number":279,"context_line":"        msg \u003d _(\"Type access modification is not applicable to public share \""},{"line_number":280,"context_line":"                \"type.\")"},{"line_number":281,"context_line":"        raise exception.InvalidShareType(reason\u003dmsg)"},{"line_number":282,"context_line":"    return db.share_type_access_remove(context, share_type_id, project_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a1a9d01_3a3b469e","line":279,"in_reply_to":"9a1a9d01_c2c85877","updated":"2015-09-28 03:50:56.000000000","message":"Done","commit_id":"ed2645b7e5fc35d0cee5c650d5eb0ccbe19ff38b"},{"author":{"_account_id":7102,"name":"Thomas Bechtold","email":"thomas.bechtold@chainguard.dev","username":"toabctl"},"change_message_id":"2e5f35d0e4d5767d822a8f6a6e33216d07a4c2f6","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    return required_extra_specs"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"def is_public_share_type(context, share_type_id):"},{"line_number":260,"context_line":"    \"\"\"Return is_public boolean value of share type.\"\"\""},{"line_number":261,"context_line":"    share_type \u003d get_share_type(context, share_type_id)"},{"line_number":262,"context_line":"    if share_type[\u0027is_public\u0027]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_52af9a7c","line":259,"updated":"2015-09-30 06:29:49.000000000","message":"The name sounds like the method returns a bool, but it doesn\u0027t. it\u0027s imo missleading. \nWhat about naming it \"check_share_type_allowed_for_public\" or something?","commit_id":"ba3ce0aa52bd9838604a77334d8e80ecbd016005"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"3bff70d1a7da2aa406c221f5120c2b7f688aaecb","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    return required_extra_specs"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"def is_public_share_type(context, share_type_id):"},{"line_number":260,"context_line":"    \"\"\"Return is_public boolean value of share type.\"\"\""},{"line_number":261,"context_line":"    share_type \u003d get_share_type(context, share_type_id)"},{"line_number":262,"context_line":"    if share_type[\u0027is_public\u0027]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_586c9434","line":259,"in_reply_to":"9a1a9d01_52af9a7c","updated":"2015-09-30 09:54:56.000000000","message":"Done","commit_id":"ba3ce0aa52bd9838604a77334d8e80ecbd016005"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"1b3d09ee8eb1aa00f95d8669a9c027c59affb601","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        raise exception.InvalidShareType(reason\u003dmsg)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"def add_share_type_access(context, share_type_id, project_id):"},{"line_number":269,"context_line":"    \"\"\"Add access to share type for project_id.\"\"\""},{"line_number":270,"context_line":"    if share_type_id is None:"},{"line_number":271,"context_line":"        msg \u003d _(\"share_type_id cannot be None\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"da85f559_be4d1b74","line":268,"updated":"2015-11-09 13:02:57.000000000","message":"This one is called at [1], but, prior to it, same verification already performed - [2].\n\n[1] https://github.com/openstack/manila/blob/a2682481/manila/api/contrib/share_type_access.py#L123\n\n[2] https://github.com/openstack/manila/blob/a2682481/manila/api/contrib/share_type_access.py#L115\n\nSo, looks like your fix does not change behavior, it adds checks that will never be failed as same checks are performed earlier.","commit_id":"4a6b952fd0639f8ce1bb276fad8bfc24bf29eccf"}],"manila/tests/api/contrib/test_share_type_access.py":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"e676a0138a817192868879417a1c4acc791b558c","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        share_types_api.get_share_type.assert_called_once_with("},{"line_number":296,"context_line":"            mock.ANY, share_type_id)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def test_remove_project_access_from_public_share_type(self):"},{"line_number":299,"context_line":"        share_type_id \u003d \u00273\u0027"},{"line_number":300,"context_line":"        body \u003d {\u0027removeProjectAccess\u0027: {\u0027project\u0027: PROJ2_UUID}}"},{"line_number":301,"context_line":"        self.mock_object(share_types_api, \u0027get_share_type\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"da85f559_13098231","line":298,"updated":"2015-11-10 13:56:34.000000000","message":"Case with \"NotFound\" exception is not covered.","commit_id":"69c694b641f102800b2b934dfd44518aa1501652"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"1f967be0638fa927563f27c9770f66674cc36502","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        share_types_api.get_share_type.assert_called_once_with("},{"line_number":296,"context_line":"            mock.ANY, share_type_id)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def test_remove_project_access_from_public_share_type(self):"},{"line_number":299,"context_line":"        share_type_id \u003d \u00273\u0027"},{"line_number":300,"context_line":"        body \u003d {\u0027removeProjectAccess\u0027: {\u0027project\u0027: PROJ2_UUID}}"},{"line_number":301,"context_line":"        self.mock_object(share_types_api, \u0027get_share_type\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"da85f559_24053645","line":298,"in_reply_to":"da85f559_13098231","updated":"2015-11-11 06:48:57.000000000","message":"Done","commit_id":"69c694b641f102800b2b934dfd44518aa1501652"}],"manila/tests/api/v2/test_share_types.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b914858e369cdbc5f42144a3a204ac394ce3ba17","unresolved":false,"context_lines":[{"line_number":623,"context_line":"                         mock.Mock(return_value\u003d{\"is_public\": True}))"},{"line_number":624,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/types/2/action\u0027,"},{"line_number":625,"context_line":"                                      use_admin_context\u003dTrue)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"        self.assertRaises(webob.exc.HTTPForbidden,"},{"line_number":628,"context_line":"                          self.controller._add_project_access,"},{"line_number":629,"context_line":"                          req, share_type_id, body)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a740942_133867ee","line":626,"updated":"2015-12-08 05:22:02.000000000","message":"Please remember to update this as well when you switch to HTTPConflict","commit_id":"459827a080a1671c0c40e41da03cf574111ab92d"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"64145dfcc78730143be262d2a346e11d71c8cd9d","unresolved":false,"context_lines":[{"line_number":623,"context_line":"                         mock.Mock(return_value\u003d{\"is_public\": True}))"},{"line_number":624,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/types/2/action\u0027,"},{"line_number":625,"context_line":"                                      use_admin_context\u003dTrue)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"        self.assertRaises(webob.exc.HTTPForbidden,"},{"line_number":628,"context_line":"                          self.controller._add_project_access,"},{"line_number":629,"context_line":"                          req, share_type_id, body)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a740942_d04172aa","line":626,"in_reply_to":"7a740942_133867ee","updated":"2015-12-08 07:44:55.000000000","message":"Done","commit_id":"459827a080a1671c0c40e41da03cf574111ab92d"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b914858e369cdbc5f42144a3a204ac394ce3ba17","unresolved":false,"context_lines":[{"line_number":663,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/types/2/action\u0027,"},{"line_number":664,"context_line":"                                      use_admin_context\u003dTrue)"},{"line_number":665,"context_line":""},{"line_number":666,"context_line":"        self.assertRaises(webob.exc.HTTPForbidden,"},{"line_number":667,"context_line":"                          self.controller._remove_project_access,"},{"line_number":668,"context_line":"                          req, share_type_id, body)"},{"line_number":669,"context_line":"        share_types.get_share_type.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":19,"id":"7a740942_73276bca","line":666,"updated":"2015-12-08 05:22:02.000000000","message":"Please remember to update this when you switch to HTTPConflict.","commit_id":"459827a080a1671c0c40e41da03cf574111ab92d"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"64145dfcc78730143be262d2a346e11d71c8cd9d","unresolved":false,"context_lines":[{"line_number":663,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/types/2/action\u0027,"},{"line_number":664,"context_line":"                                      use_admin_context\u003dTrue)"},{"line_number":665,"context_line":""},{"line_number":666,"context_line":"        self.assertRaises(webob.exc.HTTPForbidden,"},{"line_number":667,"context_line":"                          self.controller._remove_project_access,"},{"line_number":668,"context_line":"                          req, share_type_id, body)"},{"line_number":669,"context_line":"        share_types.get_share_type.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":19,"id":"7a740942_f03eee26","line":666,"in_reply_to":"7a740942_73276bca","updated":"2015-12-08 07:44:55.000000000","message":"Done","commit_id":"459827a080a1671c0c40e41da03cf574111ab92d"}],"manila/tests/share/test_share_types.py":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"76519323f97fbea06322a1c7b48ec5cf0bb6aad7","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        self.assertRaises(exception.InvalidShareType,"},{"line_number":271,"context_line":"                          share_types.add_share_type_access,"},{"line_number":272,"context_line":"                          self.context, share_type_id, project_id)"},{"line_number":273,"context_line":"        self.assertRaises(exception.InvalidShareType,"},{"line_number":274,"context_line":"                          share_types.remove_share_type_access,"},{"line_number":275,"context_line":"                          self.context, share_type_id, project_id)"},{"line_number":276,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a2fa921_a3a0c4f5","line":273,"updated":"2015-10-06 08:27:22.000000000","message":"These two should be two different test cases.","commit_id":"330012027c357bd3352ce31724ae0624cae72d13"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"4f34a149df64683b37cab5dbde945690af9f2056","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        self.assertRaises(exception.InvalidShareType,"},{"line_number":271,"context_line":"                          share_types.add_share_type_access,"},{"line_number":272,"context_line":"                          self.context, share_type_id, project_id)"},{"line_number":273,"context_line":"        self.assertRaises(exception.InvalidShareType,"},{"line_number":274,"context_line":"                          share_types.remove_share_type_access,"},{"line_number":275,"context_line":"                          self.context, share_type_id, project_id)"},{"line_number":276,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a2fa921_6e118c5c","line":273,"in_reply_to":"7a2fa921_a3a0c4f5","updated":"2015-10-09 09:32:00.000000000","message":"Done","commit_id":"330012027c357bd3352ce31724ae0624cae72d13"}],"manila_tempest_tests/tests/api/admin/test_share_types_negative.py":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"e676a0138a817192868879417a1c4acc791b558c","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                          self.create_share_type,"},{"line_number":69,"context_line":"                          st[\"share_type\"][\"name\"],"},{"line_number":70,"context_line":"                          extra_specs\u003dself.add_required_extra_specs_to_dict())"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @test.attr(type\u003d[\"gate\", \"smoke\", ])"},{"line_number":73,"context_line":"    def test_add_share_type_allowed_for_public(self):"},{"line_number":74,"context_line":"        st \u003d self._create_share_type()"}],"source_content_type":"text/x-python","patch_set":10,"id":"da85f559_962a407d","line":71,"updated":"2015-11-10 13:56:34.000000000","message":"Same here, case of \"NotFound\" is not covered.","commit_id":"69c694b641f102800b2b934dfd44518aa1501652"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"1f967be0638fa927563f27c9770f66674cc36502","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                          self.create_share_type,"},{"line_number":69,"context_line":"                          st[\"share_type\"][\"name\"],"},{"line_number":70,"context_line":"                          extra_specs\u003dself.add_required_extra_specs_to_dict())"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @test.attr(type\u003d[\"gate\", \"smoke\", ])"},{"line_number":73,"context_line":"    def test_add_share_type_allowed_for_public(self):"},{"line_number":74,"context_line":"        st \u003d self._create_share_type()"}],"source_content_type":"text/x-python","patch_set":10,"id":"da85f559_840c223c","line":71,"in_reply_to":"da85f559_962a407d","updated":"2015-11-11 06:48:57.000000000","message":"Done","commit_id":"69c694b641f102800b2b934dfd44518aa1501652"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b914858e369cdbc5f42144a3a204ac394ce3ba17","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    @test.attr(type\u003d[\"gate\", \"smoke\", ])"},{"line_number":73,"context_line":"    def test_add_share_type_allowed_for_public(self):"},{"line_number":74,"context_line":"        st \u003d self._create_share_type()"},{"line_number":75,"context_line":"        self.assertRaises(lib_exc.Forbidden,"},{"line_number":76,"context_line":"                          self.shares_client.add_access_to_share_type,"},{"line_number":77,"context_line":"                          st[\"share_type\"][\"id\"],"},{"line_number":78,"context_line":"                          self.shares_client.tenant_id)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a740942_53010f05","line":75,"updated":"2015-12-08 05:22:02.000000000","message":"lib_exc.Conflict","commit_id":"459827a080a1671c0c40e41da03cf574111ab92d"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"64145dfcc78730143be262d2a346e11d71c8cd9d","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    @test.attr(type\u003d[\"gate\", \"smoke\", ])"},{"line_number":73,"context_line":"    def test_add_share_type_allowed_for_public(self):"},{"line_number":74,"context_line":"        st \u003d self._create_share_type()"},{"line_number":75,"context_line":"        self.assertRaises(lib_exc.Forbidden,"},{"line_number":76,"context_line":"                          self.shares_client.add_access_to_share_type,"},{"line_number":77,"context_line":"                          st[\"share_type\"][\"id\"],"},{"line_number":78,"context_line":"                          self.shares_client.tenant_id)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a740942_d06f3229","line":75,"in_reply_to":"7a740942_53010f05","updated":"2015-12-08 07:44:55.000000000","message":"Done","commit_id":"459827a080a1671c0c40e41da03cf574111ab92d"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"b914858e369cdbc5f42144a3a204ac394ce3ba17","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    @test.attr(type\u003d[\"gate\", \"smoke\", ])"},{"line_number":81,"context_line":"    def test_remove_share_type_allowed_for_public(self):"},{"line_number":82,"context_line":"        st \u003d self._create_share_type()"},{"line_number":83,"context_line":"        self.assertRaises(lib_exc.Forbidden,"},{"line_number":84,"context_line":"                          self.shares_client.remove_access_from_share_type,"},{"line_number":85,"context_line":"                          st[\"share_type\"][\"id\"],"},{"line_number":86,"context_line":"                          self.shares_client.tenant_id)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a740942_ce0b1423","line":83,"updated":"2015-12-08 05:22:02.000000000","message":"lib_exc.Conflict","commit_id":"459827a080a1671c0c40e41da03cf574111ab92d"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"64145dfcc78730143be262d2a346e11d71c8cd9d","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    @test.attr(type\u003d[\"gate\", \"smoke\", ])"},{"line_number":81,"context_line":"    def test_remove_share_type_allowed_for_public(self):"},{"line_number":82,"context_line":"        st \u003d self._create_share_type()"},{"line_number":83,"context_line":"        self.assertRaises(lib_exc.Forbidden,"},{"line_number":84,"context_line":"                          self.shares_client.remove_access_from_share_type,"},{"line_number":85,"context_line":"                          st[\"share_type\"][\"id\"],"},{"line_number":86,"context_line":"                          self.shares_client.tenant_id)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7a740942_3086b6db","line":83,"in_reply_to":"7a740942_ce0b1423","updated":"2015-12-08 07:44:55.000000000","message":"Done","commit_id":"459827a080a1671c0c40e41da03cf574111ab92d"}]}
