)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"307cc5e5255d81f36ddc8416e34d17169eeea452","unresolved":false,"context_lines":[{"line_number":9,"context_line":"enforcer for policy can be loaded from a single file or from multiple"},{"line_number":10,"context_line":"files (policy_dir). so checking for policy_file is not good enough."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"If a policy is loaded it will have some rules, if not oslo_policy"},{"line_number":13,"context_line":"rejects all acccess, but it is not saved to the _ENFORCER object."},{"line_number":14,"context_line":"So checking for existance of rules is a better check."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Some refactoring for better logging"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3f79a3b5_0758e186","line":13,"range":{"start_line":12,"start_character":47,"end_line":13,"end_character":20},"updated":"2018-11-20 08:44:29.000000000","message":"I cannot understand this clause.... could you rephrase it?","commit_id":"72c63e0be69fae05355c79eb11d10f8ea12ac3f8"},{"author":{"_account_id":23735,"name":"sumitjami","email":"sjamgade@suse.com","username":"nthforloop"},"change_message_id":"e9952143e839e8becbddaa2418afc57c137a6e34","unresolved":false,"context_lines":[{"line_number":9,"context_line":"enforcer for policy can be loaded from a single file or from multiple"},{"line_number":10,"context_line":"files (policy_dir). so checking for policy_file is not good enough."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"If a policy is loaded it will have some rules, if not oslo_policy"},{"line_number":13,"context_line":"rejects all acccess, but it is not saved to the _ENFORCER object."},{"line_number":14,"context_line":"So checking for existance of rules is a better check."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Some refactoring for better logging"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3f79a3b5_aaf1b4e1","line":13,"range":{"start_line":12,"start_character":47,"end_line":13,"end_character":20},"in_reply_to":"3f79a3b5_0758e186","updated":"2018-11-20 12:21:13.000000000","message":"Done","commit_id":"72c63e0be69fae05355c79eb11d10f8ea12ac3f8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"307cc5e5255d81f36ddc8416e34d17169eeea452","unresolved":false,"context_lines":[{"line_number":14,"context_line":"So checking for existance of rules is a better check."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Some refactoring for better logging"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Id1f65058014ef5b14449b502d6741da9d34767b3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3f79a3b5_c760a93b","line":17,"updated":"2018-11-20 08:44:29.000000000","message":"Could you file a bug on this?","commit_id":"72c63e0be69fae05355c79eb11d10f8ea12ac3f8"},{"author":{"_account_id":23735,"name":"sumitjami","email":"sjamgade@suse.com","username":"nthforloop"},"change_message_id":"e9952143e839e8becbddaa2418afc57c137a6e34","unresolved":false,"context_lines":[{"line_number":14,"context_line":"So checking for existance of rules is a better check."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Some refactoring for better logging"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Id1f65058014ef5b14449b502d6741da9d34767b3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3f79a3b5_caec3007","line":17,"in_reply_to":"3f79a3b5_c760a93b","updated":"2018-11-20 12:21:13.000000000","message":"Done","commit_id":"72c63e0be69fae05355c79eb11d10f8ea12ac3f8"}],"openstack_auth/policy.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"307cc5e5255d81f36ddc8416e34d17169eeea452","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        policy_dirs \u003d []"},{"line_number":46,"context_line":"    policy_dirs \u003d [os.path.join(_BASE_PATH, policy_dir)"},{"line_number":47,"context_line":"                   for policy_dir in policy_dirs]"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    conf.set_default(\u0027policy_dirs\u0027, policy_dirs, \u0027oslo_policy\u0027)"},{"line_number":50,"context_line":"    return conf"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_c74989b9","line":48,"updated":"2018-11-20 08:44:29.000000000","message":"This line looks unnecessary. Please remove it.","commit_id":"72c63e0be69fae05355c79eb11d10f8ea12ac3f8"},{"author":{"_account_id":23735,"name":"sumitjami","email":"sjamgade@suse.com","username":"nthforloop"},"change_message_id":"e9952143e839e8becbddaa2418afc57c137a6e34","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        policy_dirs \u003d []"},{"line_number":46,"context_line":"    policy_dirs \u003d [os.path.join(_BASE_PATH, policy_dir)"},{"line_number":47,"context_line":"                   for policy_dir in policy_dirs]"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    conf.set_default(\u0027policy_dirs\u0027, policy_dirs, \u0027oslo_policy\u0027)"},{"line_number":50,"context_line":"    return conf"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_6afb9cbe","line":48,"in_reply_to":"3f79a3b5_c74989b9","updated":"2018-11-20 12:21:13.000000000","message":"Done","commit_id":"72c63e0be69fae05355c79eb11d10f8ea12ac3f8"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"307cc5e5255d81f36ddc8416e34d17169eeea452","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                _ENFORCER[service] \u003d enforcer"},{"line_number":69,"context_line":"            else:"},{"line_number":70,"context_line":"                LOG.warning(\"no policy rules for service: %s at %s and %s\","},{"line_number":71,"context_line":"                            (service, enforcer.policy_path, svc_policy_dirs))"},{"line_number":72,"context_line":"    return _ENFORCER"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_e7c92524","line":71,"updated":"2018-11-20 08:44:29.000000000","message":"The new message sometimes looks confusing. If policy_dirs is an empty dict, the message would be: \"no policy rules for service: /etc/...../neutron_policy.json and {}\".","commit_id":"72c63e0be69fae05355c79eb11d10f8ea12ac3f8"},{"author":{"_account_id":23735,"name":"sumitjami","email":"sjamgade@suse.com","username":"nthforloop"},"change_message_id":"e9952143e839e8becbddaa2418afc57c137a6e34","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                _ENFORCER[service] \u003d enforcer"},{"line_number":69,"context_line":"            else:"},{"line_number":70,"context_line":"                LOG.warning(\"no policy rules for service: %s at %s and %s\","},{"line_number":71,"context_line":"                            (service, enforcer.policy_path, svc_policy_dirs))"},{"line_number":72,"context_line":"    return _ENFORCER"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_8af638d5","line":71,"in_reply_to":"3f79a3b5_e7c92524","updated":"2018-11-20 12:21:13.000000000","message":"Done","commit_id":"72c63e0be69fae05355c79eb11d10f8ea12ac3f8"},{"author":{"_account_id":5623,"name":"David Lyle","email":"dklyle0@gmail.com","username":"david-lyle"},"change_message_id":"551965c5e1753070e6ae2795137ac545583a7a47","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            conf \u003d _get_policy_conf(policy_file\u003dpolicy_files[service],"},{"line_number":61,"context_line":"                                    policy_dirs\u003dsvc_policy_dirs)"},{"line_number":62,"context_line":"            enforcer \u003d policy.Enforcer(conf)"},{"line_number":63,"context_line":"            # Ensure enforcer.policy_path is populated."},{"line_number":64,"context_line":"            enforcer.load_rules()"},{"line_number":65,"context_line":"            if enforcer.rules:"},{"line_number":66,"context_line":"                LOG.debug(\"adding enforcer for service: %s\", service)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_0a170ba0","line":63,"updated":"2018-12-10 21:45:46.000000000","message":"this comment is no longer accurate, you are switching to check that rules in non-empty","commit_id":"b10e7e3b121753bfc21a2f599a99c85cfe582a9d"},{"author":{"_account_id":5623,"name":"David Lyle","email":"dklyle0@gmail.com","username":"david-lyle"},"change_message_id":"551965c5e1753070e6ae2795137ac545583a7a47","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                LOG.debug(\"adding enforcer for service: %s\", service)"},{"line_number":67,"context_line":"                _ENFORCER[service] \u003d enforcer"},{"line_number":68,"context_line":"            else:"},{"line_number":69,"context_line":"                locs \u003d [policy_files[service]] + svc_policy_dirs"},{"line_number":70,"context_line":"                LOG.warning(\"no policy rules for service: %s at %s\","},{"line_number":71,"context_line":"                            (service, \u0027 or \u0027.join(locs)))"},{"line_number":72,"context_line":"    return _ENFORCER"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_aa337710","line":69,"updated":"2018-12-10 21:45:46.000000000","message":"adding the directories to the file name in this manner doesn\u0027t seem to make sense. I think something more like:\nlocs \u003d [os.path.join(loc, policy_files[service]) for loc in svc_policy_dirs]","commit_id":"b10e7e3b121753bfc21a2f599a99c85cfe582a9d"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"1c64455784abd705a7ddaa3110768aa5d5058211","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                LOG.debug(\"adding enforcer for service: %s\", service)"},{"line_number":67,"context_line":"                _ENFORCER[service] \u003d enforcer"},{"line_number":68,"context_line":"            else:"},{"line_number":69,"context_line":"                locs \u003d [policy_files[service]] + svc_policy_dirs"},{"line_number":70,"context_line":"                LOG.warning(\"no policy rules for service: %s at %s\","},{"line_number":71,"context_line":"                            (service, \u0027 or \u0027.join(locs)))"},{"line_number":72,"context_line":"    return _ENFORCER"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f769fc5_fc935da2","line":69,"in_reply_to":"3f79a3b5_8ec0a5fa","updated":"2018-12-22 13:39:51.000000000","message":"David, how about the following?\n\n no policy rules for service \u0027compute\u0027 in /opt/stack/horizon/openstack_dashboard/conf/nova_policy.json \n and files under [\u0027/opt/stack/horizon/openstack_dashboard/conf/nova_policy.d\u0027]\n\nNote:\n\n- polcy_file and policy_dirs can be different paths, so we cannot merge both of them\n- policy_dirs is a list","commit_id":"b10e7e3b121753bfc21a2f599a99c85cfe582a9d"},{"author":{"_account_id":23735,"name":"sumitjami","email":"sjamgade@suse.com","username":"nthforloop"},"change_message_id":"79a17cab338084885b8e8b870a924d3397db5449","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                LOG.debug(\"adding enforcer for service: %s\", service)"},{"line_number":67,"context_line":"                _ENFORCER[service] \u003d enforcer"},{"line_number":68,"context_line":"            else:"},{"line_number":69,"context_line":"                locs \u003d [policy_files[service]] + svc_policy_dirs"},{"line_number":70,"context_line":"                LOG.warning(\"no policy rules for service: %s at %s\","},{"line_number":71,"context_line":"                            (service, \u0027 or \u0027.join(locs)))"},{"line_number":72,"context_line":"    return _ENFORCER"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_f6fd780a","line":69,"in_reply_to":"3f79a3b5_aa337710","updated":"2018-12-14 13:12:54.000000000","message":"I think you are misunderstanding the line:\n\n[] + [] is for list addition (concat) in python\n[policy_fules[service]] is [path to file] + [polilcy dirs]\n\nthis is done this way to keep filepath at 0th location in the log","commit_id":"b10e7e3b121753bfc21a2f599a99c85cfe582a9d"},{"author":{"_account_id":5623,"name":"David Lyle","email":"dklyle0@gmail.com","username":"david-lyle"},"change_message_id":"78f44850918bfcb0297339ade7f72b45c34e47ab","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                LOG.debug(\"adding enforcer for service: %s\", service)"},{"line_number":67,"context_line":"                _ENFORCER[service] \u003d enforcer"},{"line_number":68,"context_line":"            else:"},{"line_number":69,"context_line":"                locs \u003d [policy_files[service]] + svc_policy_dirs"},{"line_number":70,"context_line":"                LOG.warning(\"no policy rules for service: %s at %s\","},{"line_number":71,"context_line":"                            (service, \u0027 or \u0027.join(locs)))"},{"line_number":72,"context_line":"    return _ENFORCER"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_8ec0a5fa","line":69,"in_reply_to":"3f79a3b5_f6fd780a","updated":"2018-12-14 21:39:06.000000000","message":"so you\u0027re outputting e.g., \"nova.json or /etc/horizon/policy or /opt/horizon/policy\" my suggestion was to ouput: \"/opt/horizon/policy/nova.json or /opt/horizon/policy/nova.json\"\n\naren\u0027t we looking the same file name in both locations? maybe I\u0027m missing something","commit_id":"b10e7e3b121753bfc21a2f599a99c85cfe582a9d"}]}
