)]}'
{"patrole_tempest_plugin/config.py":[{"author":{"_account_id":8911,"name":"Sergey Vilgelm","email":"sergey@vilgelm.info","username":"sergey.vilgelm"},"change_message_id":"1e31e3aa72b78cd6833f9b3f91e12c0690b973a6","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                    \"\u0027enable_reporting\u0027 is logged. This is combined with\""},{"line_number":112,"context_line":"                    \"report_log_name to generate the full path.\"),"},{"line_number":113,"context_line":"    cfg.StrOpt(\u0027report_log_format\u0027,"},{"line_number":114,"context_line":"               default\u003d\u0027text\u0027,"},{"line_number":115,"context_line":"               help\u003d\"Configures how the log messages are written. This can be \""},{"line_number":116,"context_line":"               \"either \u0027text\u0027 (the default), or json, which logs the results \""},{"line_number":117,"context_line":"               \"as JSON objects\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_4f35e7d2","line":114,"updated":"2018-11-13 20:25:15.000000000","message":"Add `choices\u003d[\u0027text\u0027, \u0027json\u0027]`","commit_id":"09510307d237a0aa2093fb63d18c5c256996cac2"},{"author":{"_account_id":8911,"name":"Sergey Vilgelm","email":"sergey@vilgelm.info","username":"sergey.vilgelm"},"change_message_id":"1e31e3aa72b78cd6833f9b3f91e12c0690b973a6","unresolved":false,"context_lines":[{"line_number":115,"context_line":"               help\u003d\"Configures how the log messages are written. This can be \""},{"line_number":116,"context_line":"               \"either \u0027text\u0027 (the default), or json, which logs the results \""},{"line_number":117,"context_line":"               \"as JSON objects\"),"},{"line_number":118,"context_line":"    cfg.BoolOpt(\u0027remove_log_on_run\u0027,"},{"line_number":119,"context_line":"                default\u003dTrue,"},{"line_number":120,"context_line":"                help\u003d\"Controls whether or not to remove the log on a new \""},{"line_number":121,"context_line":"                \"tempest run.\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_cf7257b0","line":118,"updated":"2018-11-13 20:25:15.000000000","message":"+1, Thanks I like this","commit_id":"09510307d237a0aa2093fb63d18c5c256996cac2"}],"patrole_tempest_plugin/rbac_rule_validation.py":[{"author":{"_account_id":8911,"name":"Sergey Vilgelm","email":"sergey@vilgelm.info","username":"sergey.vilgelm"},"change_message_id":"1e31e3aa72b78cd6833f9b3f91e12c0690b973a6","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from oslo_log import versionutils"},{"line_number":22,"context_line":"from oslo_utils import excutils"},{"line_number":23,"context_line":"from collections import OrderedDict"},{"line_number":24,"context_line":"import six"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from tempest import config"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_cfced7b5","line":23,"updated":"2018-11-13 20:25:15.000000000","message":"I don\u0027t see any need for the OrderedDict. If you are using script to parse and analyze this logs, then it the order of values doesn\u0027t matter.\n\nAnd according to OpenStack style guide - don not import objects, import module:\n\n    import collections\n\n    ...\n    \n    collections.OrderedDict(...)","commit_id":"09510307d237a0aa2093fb63d18c5c256996cac2"},{"author":{"_account_id":8911,"name":"Sergey Vilgelm","email":"sergey@vilgelm.info","username":"sergey.vilgelm"},"change_message_id":"1e31e3aa72b78cd6833f9b3f91e12c0690b973a6","unresolved":false,"context_lines":[{"line_number":250,"context_line":"                    raise rbac_exceptions.RbacOverPermissionException(msg)"},{"line_number":251,"context_line":"            finally:"},{"line_number":252,"context_line":"                if CONF.patrole_log.enable_reporting:"},{"line_number":253,"context_line":"                    rbac_test_info \u003d OrderedDict("},{"line_number":254,"context_line":"                        [(\"role\", role),"},{"line_number":255,"context_line":"                         (\"service\", service),"},{"line_number":256,"context_line":"                         (\"test\", test_func.__name__),"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_0fb4cf1c","line":253,"updated":"2018-11-13 20:25:15.000000000","message":"I would prefer `dict(role\u003drole, service\u003dservice,...)` or `OrderedDict(dict(...))`, not tuple","commit_id":"09510307d237a0aa2093fb63d18c5c256996cac2"},{"author":{"_account_id":8911,"name":"Sergey Vilgelm","email":"sergey@vilgelm.info","username":"sergey.vilgelm"},"change_message_id":"1e31e3aa72b78cd6833f9b3f91e12c0690b973a6","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                         (\"actual\", test_status)]"},{"line_number":260,"context_line":"                    )"},{"line_number":261,"context_line":"                    if CONF.patrole_log.report_log_format.lower() \u003d\u003d \"json\":"},{"line_number":262,"context_line":"                        RBACLOG.info(json.dumps(rbac_test_info))"},{"line_number":263,"context_line":"                    else:"},{"line_number":264,"context_line":"                        RBACLOG.info("},{"line_number":265,"context_line":"                            \u0027, \u0027.join([\u0027[\u0027 + key.capitalize() + \u0027]: \u0027 +"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_afca7b78","line":262,"updated":"2018-11-13 20:25:15.000000000","message":"Please read this article: https://reinout.vanrees.org/weblog/2015/06/05/logging-formatting.html\n\nIMO, the best way is to implement something like this:\n\n    class JsonFormatter(object):\n        def __init__(self, data):\n            self.data \u003d data\n    \n        def __str__(self):\n            return json.dumps(self.data)\n\nand use it:\n\n    RBACLOG.info(\u0027%s\u0027, JsonFormatter(rbac_test_info))","commit_id":"09510307d237a0aa2093fb63d18c5c256996cac2"},{"author":{"_account_id":8911,"name":"Sergey Vilgelm","email":"sergey@vilgelm.info","username":"sergey.vilgelm"},"change_message_id":"1e31e3aa72b78cd6833f9b3f91e12c0690b973a6","unresolved":false,"context_lines":[{"line_number":261,"context_line":"                    if CONF.patrole_log.report_log_format.lower() \u003d\u003d \"json\":"},{"line_number":262,"context_line":"                        RBACLOG.info(json.dumps(rbac_test_info))"},{"line_number":263,"context_line":"                    else:"},{"line_number":264,"context_line":"                        RBACLOG.info("},{"line_number":265,"context_line":"                            \u0027, \u0027.join([\u0027[\u0027 + key.capitalize() + \u0027]: \u0027 +"},{"line_number":266,"context_line":"                                       value for key, value in"},{"line_number":267,"context_line":"                                       rbac_test_info.items()]))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_4fc40762","line":264,"updated":"2018-11-13 20:25:15.000000000","message":"I would prefer to keep a string message like it was before and pass the rbac_test_info variable to logger:\n\n    RBACLOG.info(\u0027[Service]: %(service)s, [Test]: %(test)s, ...\u0027, rbac_test_info)\n\nthis way we can control how it will look","commit_id":"09510307d237a0aa2093fb63d18c5c256996cac2"}]}
