)]}'
{"zun/api/controllers/v1/containers.py":[{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"cbe6b1e6c740edea85d32349b934edf7c8ffa342","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        compute_api \u003d pecan.request.compute_api"},{"line_number":169,"context_line":"        container \u003d compute_api.container_show(context, container)"},{"line_number":170,"context_line":"        if not policy.check_is_admin(context):"},{"line_number":171,"context_line":"            container.host \u003d \u0027***\u0027"},{"line_number":172,"context_line":"        return view.format_container(pecan.request.host_url, container)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def _generate_name_for_container(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_8fdccfe4","line":171,"updated":"2017-11-25 14:51:35.000000000","message":"Will it be better to remove the host field from container object?","commit_id":"33eeb87ae68fcca5275945f253880764bfc168f0"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"7f0b3511c327f61ae910ba005580ff2d2467065c","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        compute_api \u003d pecan.request.compute_api"},{"line_number":169,"context_line":"        container \u003d compute_api.container_show(context, container)"},{"line_number":170,"context_line":"        if not policy.check_is_admin(context):"},{"line_number":171,"context_line":"            container.host \u003d \u0027***\u0027"},{"line_number":172,"context_line":"        return view.format_container(pecan.request.host_url, container)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def _generate_name_for_container(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_cffa70bb","line":171,"in_reply_to":"ff82abbf_8691c349","updated":"2017-11-30 05:41:26.000000000","message":"Thank you for the explanation. I agree with it.","commit_id":"33eeb87ae68fcca5275945f253880764bfc168f0"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"2a64f42d4d72bb8b728a9f5d1772b005c41d7393","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        compute_api \u003d pecan.request.compute_api"},{"line_number":169,"context_line":"        container \u003d compute_api.container_show(context, container)"},{"line_number":170,"context_line":"        if not policy.check_is_admin(context):"},{"line_number":171,"context_line":"            container.host \u003d \u0027***\u0027"},{"line_number":172,"context_line":"        return view.format_container(pecan.request.host_url, container)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def _generate_name_for_container(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_8691c349","line":171,"in_reply_to":"ff82abbf_8fdccfe4","updated":"2017-11-29 15:54:03.000000000","message":"Probably not. The requirement is to shadow some fields from container object if the context is non-admin. This is just like what nova does (nova hides hypervisor information from non-admin users).","commit_id":"33eeb87ae68fcca5275945f253880764bfc168f0"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"ea1d51a69b50cf8ca347cff7876501e3db96da2d","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        check_policy_on_container(container.as_dict(), \"container:get_one\")"},{"line_number":168,"context_line":"        compute_api \u003d pecan.request.compute_api"},{"line_number":169,"context_line":"        container \u003d compute_api.container_show(context, container)"},{"line_number":170,"context_line":"        if not context.is_admin:"},{"line_number":171,"context_line":"            del container.host"},{"line_number":172,"context_line":"        return view.format_container(pecan.request.host_url, container)"},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_7489bb72","line":170,"range":{"start_line":170,"start_character":15,"end_line":170,"end_character":31},"updated":"2017-11-30 04:19:19.000000000","message":"Hi @miaohb,\n\nI would recommend to leverage the policy-in-code framework to achieve this. Here is how nova did it: https://github.com/openstack/nova/blob/master/nova/policies/extended_server_attributes.py","commit_id":"59f8d9984027d11828cbf7c073a949d8075c381a"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"b3ce1ba8249b526dbce8e045ee0e6290ca46aeab","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        check_policy_on_container(container.as_dict(), \"container:get_one\")"},{"line_number":168,"context_line":"        compute_api \u003d pecan.request.compute_api"},{"line_number":169,"context_line":"        container \u003d compute_api.container_show(context, container)"},{"line_number":170,"context_line":"        if not context.is_admin:"},{"line_number":171,"context_line":"            del container.host"},{"line_number":172,"context_line":"        return view.format_container(pecan.request.host_url, container)"},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_32c4def4","line":170,"range":{"start_line":170,"start_character":23,"end_line":170,"end_character":31},"updated":"2017-12-09 23:20:56.000000000","message":"As I commented before, we should have a policy rule to control the visibility of the attributes as Nova did: https://github.com/openstack/nova/blob/master/nova/policies/extended_server_attributes.py . However, I think this is optional. We could open a new bug to track this issue and potentially have other contributor to propose a fix for it.","commit_id":"1bda47ca53e7fba9ec5c33d429810c0674a8d83f"},{"author":{"_account_id":23055,"name":"miaohb","email":"miao.hongbao@zte.com.cn","username":"miaohb"},"change_message_id":"c721de1752451570522f41c9911428b196b2bdff","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        check_policy_on_container(container.as_dict(), \"container:get_one\")"},{"line_number":168,"context_line":"        compute_api \u003d pecan.request.compute_api"},{"line_number":169,"context_line":"        container \u003d compute_api.container_show(context, container)"},{"line_number":170,"context_line":"        if not context.is_admin:"},{"line_number":171,"context_line":"            del container.host"},{"line_number":172,"context_line":"        return view.format_container(pecan.request.host_url, container)"},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_add5a845","line":170,"range":{"start_line":170,"start_character":23,"end_line":170,"end_character":31},"in_reply_to":"df87a7cf_32c4def4","updated":"2017-12-13 03:17:48.000000000","message":"ok, will do in another patch.","commit_id":"1bda47ca53e7fba9ec5c33d429810c0674a8d83f"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"b3ce1ba8249b526dbce8e045ee0e6290ca46aeab","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        compute_api \u003d pecan.request.compute_api"},{"line_number":169,"context_line":"        container \u003d compute_api.container_show(context, container)"},{"line_number":170,"context_line":"        if not context.is_admin:"},{"line_number":171,"context_line":"            del container.host"},{"line_number":172,"context_line":"        return view.format_container(pecan.request.host_url, container)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def _generate_name_for_container(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_92060a52","line":171,"range":{"start_line":171,"start_character":12,"end_line":171,"end_character":15},"updated":"2017-12-09 23:20:56.000000000","message":"We need to do the same in get_all as well.","commit_id":"1bda47ca53e7fba9ec5c33d429810c0674a8d83f"},{"author":{"_account_id":23055,"name":"miaohb","email":"miao.hongbao@zte.com.cn","username":"miaohb"},"change_message_id":"c721de1752451570522f41c9911428b196b2bdff","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        compute_api \u003d pecan.request.compute_api"},{"line_number":169,"context_line":"        container \u003d compute_api.container_show(context, container)"},{"line_number":170,"context_line":"        if not context.is_admin:"},{"line_number":171,"context_line":"            del container.host"},{"line_number":172,"context_line":"        return view.format_container(pecan.request.host_url, container)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def _generate_name_for_container(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_ede1702c","line":171,"range":{"start_line":171,"start_character":12,"end_line":171,"end_character":15},"in_reply_to":"df87a7cf_92060a52","updated":"2017-12-13 03:17:48.000000000","message":"Done","commit_id":"1bda47ca53e7fba9ec5c33d429810c0674a8d83f"}]}
