)]}'
{"manila/api/openstack/wsgi.py":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"0b559ef3c1037193d1e5c1bd40968033607511d7","unresolved":false,"context_lines":[{"line_number":1122,"context_line":""},{"line_number":1123,"context_line":"        Can be used in any of the following forms"},{"line_number":1124,"context_line":"        @authorize"},{"line_number":1125,"context_line":"        @authorize()"},{"line_number":1126,"context_line":"        @authorize(\u0027my_action_name\u0027)"},{"line_number":1127,"context_line":""},{"line_number":1128,"context_line":"        :param arg: Can either be the function being decorated or a str"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_12687a86","line":1125,"updated":"2015-11-18 15:03:54.000000000","message":"Line 1125 will not work, \"TypeError\" will be raised. Also it is not covered with unit tests. Should be removed.","commit_id":"9626e0daaaa72ba556ff13b5e53552f1e7a3e566"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"6c4b2ee2fa93ab49f003e9545ed2ea548972d51c","unresolved":false,"context_lines":[{"line_number":1122,"context_line":""},{"line_number":1123,"context_line":"        Can be used in any of the following forms"},{"line_number":1124,"context_line":"        @authorize"},{"line_number":1125,"context_line":"        @authorize()"},{"line_number":1126,"context_line":"        @authorize(\u0027my_action_name\u0027)"},{"line_number":1127,"context_line":""},{"line_number":1128,"context_line":"        :param arg: Can either be the function being decorated or a str"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_cea551a2","line":1125,"in_reply_to":"ba8a016a_12687a86","updated":"2015-11-19 17:00:21.000000000","message":"Done","commit_id":"9626e0daaaa72ba556ff13b5e53552f1e7a3e566"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"0b559ef3c1037193d1e5c1bd40968033607511d7","unresolved":false,"context_lines":[{"line_number":1142,"context_line":"                return f(self, req, *args, **kwargs)"},{"line_number":1143,"context_line":"            return wrapper"},{"line_number":1144,"context_line":""},{"line_number":1145,"context_line":"        if callable(arg):"},{"line_number":1146,"context_line":"            return decorator(arg)"},{"line_number":1147,"context_line":"        else:"},{"line_number":1148,"context_line":"            action_name \u003d arg"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_9270eadd","line":1145,"updated":"2015-11-18 15:03:54.000000000","message":"I am not sure, that it is good idea to keep two ways of decorating. Policy names are admin-facing thing, but function names are not. So, if we remove dependency on function name and provide argument everywhere then we will be able to rename our functions as we want and change API routing for them where needed. In this case policies will not be affected and code for it too.","commit_id":"9626e0daaaa72ba556ff13b5e53552f1e7a3e566"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"6c4b2ee2fa93ab49f003e9545ed2ea548972d51c","unresolved":false,"context_lines":[{"line_number":1142,"context_line":"                return f(self, req, *args, **kwargs)"},{"line_number":1143,"context_line":"            return wrapper"},{"line_number":1144,"context_line":""},{"line_number":1145,"context_line":"        if callable(arg):"},{"line_number":1146,"context_line":"            return decorator(arg)"},{"line_number":1147,"context_line":"        else:"},{"line_number":1148,"context_line":"            action_name \u003d arg"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_6ec1c553","line":1145,"in_reply_to":"ba8a016a_9270eadd","updated":"2015-11-19 17:00:21.000000000","message":"We can still provide the policy name wherever necessary. I think it is a great feature to just match function names to policy names when we have standard methods such as \u0027create\u0027, \u0027delete\u0027, \u0027update\u0027, \u0027index\u0027, \u0027get\u0027 and \u0027action\u0027 among others. I feel the code will look cleaner and more readable...If these functions get renamed or policy names are changed, we can switch between one form of this decorator to the other.","commit_id":"9626e0daaaa72ba556ff13b5e53552f1e7a3e566"}],"manila/api/v1/router.py":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"0b559ef3c1037193d1e5c1bd40968033607511d7","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                        collection\u003d{\u0027detail\u0027: \u0027GET\u0027})"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        self.resources[\u0027share_networks\u0027] \u003d share_networks.create_resource()"},{"line_number":159,"context_line":"        mapper.resource(\u0027share-network\u0027,"},{"line_number":160,"context_line":"                        \u0027share-networks\u0027,"},{"line_number":161,"context_line":"                        controller\u003dself.resources[\u0027share_networks\u0027],"},{"line_number":162,"context_line":"                        collection\u003d{\u0027detail\u0027: \u0027GET\u0027},"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_91622b3d","line":159,"updated":"2015-11-18 15:03:54.000000000","message":"1) It is not consistent with change on line 166. Here dash, there underscore.\n\n2) Original name has underscore. See [1]\n\n3) File with share networks in not changed, and this change is not related to the goal of commit.\n\n[1] https://github.com/openstack/manila/blob/680fd50d/manila/api/v1/share_networks.py#L37","commit_id":"9626e0daaaa72ba556ff13b5e53552f1e7a3e566"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"6c4b2ee2fa93ab49f003e9545ed2ea548972d51c","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                        collection\u003d{\u0027detail\u0027: \u0027GET\u0027})"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        self.resources[\u0027share_networks\u0027] \u003d share_networks.create_resource()"},{"line_number":159,"context_line":"        mapper.resource(\u0027share-network\u0027,"},{"line_number":160,"context_line":"                        \u0027share-networks\u0027,"},{"line_number":161,"context_line":"                        controller\u003dself.resources[\u0027share_networks\u0027],"},{"line_number":162,"context_line":"                        collection\u003d{\u0027detail\u0027: \u0027GET\u0027},"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_ced31103","line":159,"in_reply_to":"ba8a016a_91622b3d","updated":"2015-11-19 17:00:21.000000000","message":"Sorry, an artifact I should\u0027ve gotten rid of. Done.","commit_id":"9626e0daaaa72ba556ff13b5e53552f1e7a3e566"}],"manila/tests/api/openstack/test_wsgi.py":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"0b559ef3c1037193d1e5c1bd40968033607511d7","unresolved":false,"context_lines":[{"line_number":879,"context_line":""},{"line_number":880,"context_line":"        @wsgi.Controller.authorize(\u0027fake_action\u0027)"},{"line_number":881,"context_line":"        def fake_action_2(self, req):"},{"line_number":882,"context_line":"            pass"},{"line_number":883,"context_line":""},{"line_number":884,"context_line":"    def setUp(self):"},{"line_number":885,"context_line":"        super(AuthorizeDecoratorTest, self).setUp()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_323d7ec4","line":882,"updated":"2015-11-18 15:03:54.000000000","message":"Case \"@authorize()\" not tested.","commit_id":"9626e0daaaa72ba556ff13b5e53552f1e7a3e566"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"6c4b2ee2fa93ab49f003e9545ed2ea548972d51c","unresolved":false,"context_lines":[{"line_number":879,"context_line":""},{"line_number":880,"context_line":"        @wsgi.Controller.authorize(\u0027fake_action\u0027)"},{"line_number":881,"context_line":"        def fake_action_2(self, req):"},{"line_number":882,"context_line":"            pass"},{"line_number":883,"context_line":""},{"line_number":884,"context_line":"    def setUp(self):"},{"line_number":885,"context_line":"        super(AuthorizeDecoratorTest, self).setUp()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_eef7f588","line":882,"in_reply_to":"ba8a016a_323d7ec4","updated":"2015-11-19 17:00:21.000000000","message":"Confusing usage, removed.","commit_id":"9626e0daaaa72ba556ff13b5e53552f1e7a3e566"}],"manila/tests/api/v1/test_quota_class_sets.py":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"0b559ef3c1037193d1e5c1bd40968033607511d7","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                \u0027share_networks\u0027: 10,"},{"line_number":113,"context_line":"            }"},{"line_number":114,"context_line":"        }"},{"line_number":115,"context_line":"        mock_policy_update_check_call \u003d mock.call("},{"line_number":116,"context_line":"            REQ.environ[\u0027manila.context\u0027], self.resource_name, \u0027update\u0027)"},{"line_number":117,"context_line":"        mock_policy_show_check_call \u003d mock.call("},{"line_number":118,"context_line":"            REQ.environ[\u0027manila.context\u0027], self.resource_name, \u0027show\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_756c50d0","line":115,"updated":"2015-11-18 15:03:54.000000000","message":"These are used only once, could be defined in place.","commit_id":"9626e0daaaa72ba556ff13b5e53552f1e7a3e566"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"6c4b2ee2fa93ab49f003e9545ed2ea548972d51c","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                \u0027share_networks\u0027: 10,"},{"line_number":113,"context_line":"            }"},{"line_number":114,"context_line":"        }"},{"line_number":115,"context_line":"        mock_policy_update_check_call \u003d mock.call("},{"line_number":116,"context_line":"            REQ.environ[\u0027manila.context\u0027], self.resource_name, \u0027update\u0027)"},{"line_number":117,"context_line":"        mock_policy_show_check_call \u003d mock.call("},{"line_number":118,"context_line":"            REQ.environ[\u0027manila.context\u0027], self.resource_name, \u0027show\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_4e2de1fc","line":115,"in_reply_to":"ba8a016a_756c50d0","updated":"2015-11-19 17:00:21.000000000","message":"Done","commit_id":"9626e0daaaa72ba556ff13b5e53552f1e7a3e566"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"0b559ef3c1037193d1e5c1bd40968033607511d7","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        expected[\u0027quota_class_set\u0027][\u0027id\u0027] \u003d self.class_name"},{"line_number":128,"context_line":"        self.assertEqual(expected, show_result)"},{"line_number":129,"context_line":"        self.mock_policy_check.assert_has_calls(["},{"line_number":130,"context_line":"            mock_policy_update_check_call, mock_policy_show_check_call])"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def test_update_quota_not_authorized(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_3599e8c4","line":129,"updated":"2015-11-18 15:03:54.000000000","message":"\"\"\"\n\nself.mock_policy_check.assert_has_calls([\n\n    mock.call(REQ.environ[\u0027manila.context\u0027], self.resource_name, action_name)\n\n    for action_name in (\u0027update\u0027, \u0027show\u0027)\n\n])\n\n\"\"\"\n\nSame in other places.","commit_id":"9626e0daaaa72ba556ff13b5e53552f1e7a3e566"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"6c4b2ee2fa93ab49f003e9545ed2ea548972d51c","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":"        expected[\u0027quota_class_set\u0027][\u0027id\u0027] \u003d self.class_name"},{"line_number":128,"context_line":"        self.assertEqual(expected, show_result)"},{"line_number":129,"context_line":"        self.mock_policy_check.assert_has_calls(["},{"line_number":130,"context_line":"            mock_policy_update_check_call, mock_policy_show_check_call])"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def test_update_quota_not_authorized(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_ae448db6","line":129,"in_reply_to":"ba8a016a_3599e8c4","updated":"2015-11-19 17:00:21.000000000","message":"Thanks, done.","commit_id":"9626e0daaaa72ba556ff13b5e53552f1e7a3e566"}]}
