)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a33cb83ad4aaa9d081b0f65177f8bd6d8397be2d","unresolved":false,"context_lines":[{"line_number":13,"context_line":"    * called by get_by_host_and_nodename which is used by nove(it\u0027s admin"},{"line_number":14,"context_line":"context)"},{"line_number":15,"context_line":"    * called by build_and_run_instance if user require a specify node, they"},{"line_number":16,"context_line":"should be an admin."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"2. compute_node_get_by_host_and_nodename:"},{"line_number":19,"context_line":"    same with compute_nodes_get_by_service_id."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"dac4157f_91c155e7","line":16,"updated":"2015-04-21 07:04:06.000000000","message":"looks like we fixed a bug at here, without the admin context, how that code works...","commit_id":"b22e953d580300e6300fece43c15125fd5057480"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"72407f1347e46cd2c6ae64571ccf498a279f8b97","unresolved":false,"context_lines":[{"line_number":10,"context_line":"remove them because of:"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"1. compute_nodes_get_by_service_id:"},{"line_number":13,"context_line":"    * called by get_by_host_and_nodename which is used by nove(it\u0027s admin"},{"line_number":14,"context_line":"context)"},{"line_number":15,"context_line":"    * called by build_and_run_instance if user require a specify node, they"},{"line_number":16,"context_line":"should be an admin."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"dac4157f_395b8289","line":13,"updated":"2015-04-21 13:23:47.000000000","message":"s/nove/node/?","commit_id":"8b7bf8929ef7e6be6d0130fd8e9df5a5dc330de3"}],"nova/api/openstack/compute/contrib/hosts.py":[{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"72407f1347e46cd2c6ae64571ccf498a279f8b97","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        \"\"\""},{"line_number":277,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"        # NOTE(eliqiao): back-compatible with db layer hard-code admin"},{"line_number":280,"context_line":"        # permission checks"},{"line_number":281,"context_line":"        nova_context.require_admin_context(context)"},{"line_number":282,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"dac4157f_39d262d3","line":279,"updated":"2015-04-21 13:23:47.000000000","message":"s/back/backwards/","commit_id":"8b7bf8929ef7e6be6d0130fd8e9df5a5dc330de3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"3445d43f68391f87fa9a5a95178c71ac48327f70","unresolved":false,"context_lines":[{"line_number":278,"context_line":""},{"line_number":279,"context_line":"        # NOTE(eliqiao): back-compatible with db layer hard-code admin"},{"line_number":280,"context_line":"        # permission checks"},{"line_number":281,"context_line":"        nova_context.require_admin_context(context)"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        host_name \u003d id"},{"line_number":284,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab921fb_cdaef497","line":281,"updated":"2015-04-24 10:24:05.000000000","message":"looks like this added early, see the comment at line 293","commit_id":"77b6bc9790e8a51a4227efb5f198a6fa7e9c4854"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"18f70a738395c20116be78858c7c91003fbcff1f","unresolved":false,"context_lines":[{"line_number":278,"context_line":""},{"line_number":279,"context_line":"        # NOTE(eliqiao): back-compatible with db layer hard-code admin"},{"line_number":280,"context_line":"        # permission checks"},{"line_number":281,"context_line":"        nova_context.require_admin_context(context)"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        host_name \u003d id"},{"line_number":284,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab921fb_c259bd36","line":281,"in_reply_to":"bab921fb_cdaef497","updated":"2015-04-27 07:42:35.000000000","message":"understood.","commit_id":"77b6bc9790e8a51a4227efb5f198a6fa7e9c4854"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"3445d43f68391f87fa9a5a95178c71ac48327f70","unresolved":false,"context_lines":[{"line_number":289,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":290,"context_line":"        except exception.AdminRequired:"},{"line_number":291,"context_line":"            msg \u003d _(\"Describe-resource is admin only functionality\")"},{"line_number":292,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":293,"context_line":"        instances \u003d self.api.instance_get_all_by_host(context, host_name)"},{"line_number":294,"context_line":"        resources \u003d [self._get_total_resources(host_name, compute_node)]"},{"line_number":295,"context_line":"        resources.append(self._get_used_now_resources(host_name,"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab921fb_2da210af","line":292,"updated":"2015-04-24 10:24:05.000000000","message":"oops, this is db call with admin hard-code permission checks...\n\nhope about address a patch remove this hard-code permisson checks first.","commit_id":"77b6bc9790e8a51a4227efb5f198a6fa7e9c4854"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"18f70a738395c20116be78858c7c91003fbcff1f","unresolved":false,"context_lines":[{"line_number":289,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":290,"context_line":"        except exception.AdminRequired:"},{"line_number":291,"context_line":"            msg \u003d _(\"Describe-resource is admin only functionality\")"},{"line_number":292,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":293,"context_line":"        instances \u003d self.api.instance_get_all_by_host(context, host_name)"},{"line_number":294,"context_line":"        resources \u003d [self._get_total_resources(host_name, compute_node)]"},{"line_number":295,"context_line":"        resources.append(self._get_used_now_resources(host_name,"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab921fb_e254c1fe","line":292,"in_reply_to":"bab921fb_2da210af","updated":"2015-04-27 07:42:35.000000000","message":"Done","commit_id":"77b6bc9790e8a51a4227efb5f198a6fa7e9c4854"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1f4f4c186796352e62c69108142592689174d50d","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                    context, host_name))"},{"line_number":288,"context_line":"        except exception.NotFound as e:"},{"line_number":289,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":290,"context_line":"        except exception.AdminRequired:"},{"line_number":291,"context_line":"            msg \u003d _(\"Describe-resource is admin only functionality\")"},{"line_number":292,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":293,"context_line":"        instances \u003d self.api.instance_get_all_by_host(context, host_name)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7ad32947_c693a3f9","line":290,"updated":"2015-04-28 14:30:24.000000000","message":"sorry, I miss from previous review. This exception can be removed.","commit_id":"f608d488ed3bc823ba2b0702234d57712711ef4c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"9b32f91b63dfaee0b95247c9ac87c7580cfe9473","unresolved":false,"context_lines":[{"line_number":294,"context_line":"                    context, host_name))"},{"line_number":295,"context_line":"        except exception.NotFound as e:"},{"line_number":296,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.format_message())"},{"line_number":297,"context_line":"        except exception.AdminRequired:"},{"line_number":298,"context_line":"            msg \u003d _(\"Describe-resource is admin only functionality\")"},{"line_number":299,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":300,"context_line":"        instances \u003d self.api.instance_get_all_by_host(context, host_name)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3acd31a7_80cd29b9","side":"PARENT","line":297,"updated":"2015-05-05 13:14:22.000000000","message":"there is same exception catching should be removed for v2.1 api https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/plugins/v3/hosts.py#L271","commit_id":"5dbc14ea59ac921bbc940d193fda482fed1d9fa1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5e3acc74052f2fbfb3b105d9d77bb5a20a929f6b","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        # permission checks. This has to be left only for API v2.0 because"},{"line_number":293,"context_line":"        # this version has to be stable even if it means that only admins"},{"line_number":294,"context_line":"        # can call this method while the policy could be changed."},{"line_number":295,"context_line":"        nova_context.require_admin_context(context)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"        host_name \u003d id"},{"line_number":298,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a016987_65c12054","line":295,"updated":"2015-05-19 08:02:17.000000000","message":"I don\u0027t like this but fair enough, we need a stable API","commit_id":"9f15a00c9881b71b1a023142d3c780a7b9aad971"}],"nova/api/openstack/compute/plugins/v3/hosts.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"db2da38cc08bc3878855cfbfda011ea9949e5a0a","unresolved":false,"context_lines":[{"line_number":246,"context_line":"            resource[\u0027disk_gb\u0027] +\u003d (instance[\u0027root_gb\u0027] +"},{"line_number":247,"context_line":"                                    instance[\u0027ephemeral_gb\u0027])"},{"line_number":248,"context_line":"        return project_map"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    @extensions.expected_errors((403, 404))"},{"line_number":251,"context_line":"    def show(self, req, id):"},{"line_number":252,"context_line":"        \"\"\"Shows the physical/usage resource given by hosts."}],"source_content_type":"text/x-python","patch_set":14,"id":"1aca2d91_5648922d","line":249,"updated":"2015-05-06 01:33:22.000000000","message":"403 should be deleted","commit_id":"e425c42c905e2a19a40d1188742e31b6032717f5"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"aebb3be9e76f63a9c9a994becb9525e55914ce7b","unresolved":false,"context_lines":[{"line_number":246,"context_line":"            resource[\u0027disk_gb\u0027] +\u003d (instance[\u0027root_gb\u0027] +"},{"line_number":247,"context_line":"                                    instance[\u0027ephemeral_gb\u0027])"},{"line_number":248,"context_line":"        return project_map"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    @extensions.expected_errors((403, 404))"},{"line_number":251,"context_line":"    def show(self, req, id):"},{"line_number":252,"context_line":"        \"\"\"Shows the physical/usage resource given by hosts."}],"source_content_type":"text/x-python","patch_set":14,"id":"1aca2d91_8b65d8e2","line":249,"in_reply_to":"1aca2d91_5648922d","updated":"2015-05-06 09:30:43.000000000","message":"thanks, my bad.","commit_id":"e425c42c905e2a19a40d1188742e31b6032717f5"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"eae72c98d936e36c622009e1642cb001498b5496","unresolved":false,"context_lines":[{"line_number":2367,"context_line":"    return uuids"},{"line_number":2368,"context_line":""},{"line_number":2369,"context_line":""},{"line_number":2370,"context_line":"def instance_get_all_by_host_and_node(context, host, node,"},{"line_number":2371,"context_line":"                                      columns_to_join\u003dNone):"},{"line_number":2372,"context_line":"    if columns_to_join is None:"},{"line_number":2373,"context_line":"        manual_joins \u003d []"}],"source_content_type":"text/x-python","patch_set":11,"id":"3acd31a7_15a0608f","line":2370,"updated":"2015-05-04 13:09:28.000000000","message":"Emm...this should be cleanup at https://review.openstack.org/#/c/177673/9, as the commit message, this patch only related to compute_node.","commit_id":"3c84cb5e4b1af0398425fcd115a808bef8d435a7"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"4eaeae29146d71cc0731f9e474d27a9f2b7edd3f","unresolved":false,"context_lines":[{"line_number":2367,"context_line":"    return uuids"},{"line_number":2368,"context_line":""},{"line_number":2369,"context_line":""},{"line_number":2370,"context_line":"def instance_get_all_by_host_and_node(context, host, node,"},{"line_number":2371,"context_line":"                                      columns_to_join\u003dNone):"},{"line_number":2372,"context_line":"    if columns_to_join is None:"},{"line_number":2373,"context_line":"        manual_joins \u003d []"}],"source_content_type":"text/x-python","patch_set":11,"id":"3acd31a7_994497b7","line":2370,"in_reply_to":"3acd31a7_15a0608f","updated":"2015-05-05 00:19:50.000000000","message":"I really hate rebase.","commit_id":"3c84cb5e4b1af0398425fcd115a808bef8d435a7"}],"nova/tests/unit/api/openstack/compute/contrib/test_hosts.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"93737c78c562d71357462cf3d243a1881a73774b","unresolved":false,"context_lines":[{"line_number":392,"context_line":"        self.assertRaises(exception.AdminRequired,"},{"line_number":393,"context_line":"                          self.controller.index, fakes.HTTPRequest.blank(\u0027\u0027))"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"    def test_show_forbidden(self):"},{"line_number":396,"context_line":"        self.assertRaises(exception.AdminRequired,"},{"line_number":397,"context_line":"                          self.controller.show,"},{"line_number":398,"context_line":"                          fakes.HTTPRequest.blank(\u0027\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"dac4157f_11cf8557","line":395,"updated":"2015-04-21 06:51:54.000000000","message":"nit, how about call this as test_show_with_non_admin?","commit_id":"b22e953d580300e6300fece43c15125fd5057480"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"16d27b4f6fc2307c8c4fc200a64f80dddd5895ce","unresolved":false,"context_lines":[{"line_number":392,"context_line":"        self.assertRaises(exception.AdminRequired,"},{"line_number":393,"context_line":"                          self.controller.index, fakes.HTTPRequest.blank(\u0027\u0027))"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"    def test_show_forbidden(self):"},{"line_number":396,"context_line":"        self.assertRaises(exception.AdminRequired,"},{"line_number":397,"context_line":"                          self.controller.show,"},{"line_number":398,"context_line":"                          fakes.HTTPRequest.blank(\u0027\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"dac4157f_e15b1ef5","line":395,"in_reply_to":"dac4157f_11cf8557","updated":"2015-04-21 07:24:37.000000000","message":"alex, the name is from HostTestCaseV21, I overwrite it in v20 test case.\ndo you still need to add a new name with non_admin?\nlike this:\ntest_show_forbidden()\n    pass\n\ntest_show_non_admin()\n    pass?\n\nor I change test_show_forbidden in HostTestCaseV21 ?","commit_id":"b22e953d580300e6300fece43c15125fd5057480"}]}
