)]}'
{"quantum/policy.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"05b746d38981ff89db2a95f4805fd3ec2a6c852c","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    policies \u003d policy.Rules.load_json(data, default_rule)"},{"line_number":90,"context_line":"    for pol in policies.keys():"},{"line_number":91,"context_line":"        if any([pol.startswith(depr_prefix) for depr_prefix in"},{"line_number":92,"context_line":"                DEPRECATED_PREFIXES]):"},{"line_number":93,"context_line":"            LOG.warn(_(\"Found deprecated policy rule:%s. Please consider \""},{"line_number":94,"context_line":"                       \"upgrading your policy configuration file\"), pol)"},{"line_number":95,"context_line":"            pol_name, action \u003d pol.rsplit(\u0027:\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAO3%2F%2F%2F2M%3D","line":92,"updated":"2013-05-15 07:32:44.000000000","message":"How about this \u0027any([pol.startswith(depr_prefix) for depr_prefix in DEPRECATED_POLICY_MAP.keys()])\u0027 ? Looks like DEPRECATED_PREFIXES is needless","commit_id":"6cd60fec71bce053e49ce425f723752920ef2742"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":89,"context_line":"    policies \u003d policy.Rules.load_json(data, default_rule)"},{"line_number":90,"context_line":"    for pol in policies.keys():"},{"line_number":91,"context_line":"        if any([pol.startswith(depr_prefix) for depr_prefix in"},{"line_number":92,"context_line":"                DEPRECATED_PREFIXES]):"},{"line_number":93,"context_line":"            LOG.warn(_(\"Found deprecated policy rule:%s. Please consider \""},{"line_number":94,"context_line":"                       \"upgrading your policy configuration file\"), pol)"},{"line_number":95,"context_line":"            pol_name, action \u003d pol.rsplit(\u0027:\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAO3%2F%2F%2FqQ%3D","line":92,"in_reply_to":"AAAAO3%2F%2F%2F2M%3D","updated":"2013-05-15 09:51:41.000000000","message":"+1","commit_id":"6cd60fec71bce053e49ce425f723752920ef2742"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":89,"context_line":"    policies \u003d policy.Rules.load_json(data, default_rule)"},{"line_number":90,"context_line":"    for pol in policies.keys():"},{"line_number":91,"context_line":"        if any([pol.startswith(depr_prefix) for depr_prefix in"},{"line_number":92,"context_line":"                DEPRECATED_PREFIXES]):"},{"line_number":93,"context_line":"            LOG.warn(_(\"Found deprecated policy rule:%s. Please consider \""},{"line_number":94,"context_line":"                       \"upgrading your policy configuration file\"), pol)"},{"line_number":95,"context_line":"            pol_name, action \u003d pol.rsplit(\u0027:\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPH%2F%2F%2BV8%3D","line":92,"in_reply_to":"AAAAO3%2F%2F%2Fdk%3D","updated":"2013-05-17 13:43:01.000000000","message":"I see. First time I commented, I tried to avoid duplicated definitions, but the policy map is referenced whenever API is called. If there is performance penalty, let\u0027s define or generate a prefix list.","commit_id":"6cd60fec71bce053e49ce425f723752920ef2742"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":89,"context_line":"    policies \u003d policy.Rules.load_json(data, default_rule)"},{"line_number":90,"context_line":"    for pol in policies.keys():"},{"line_number":91,"context_line":"        if any([pol.startswith(depr_prefix) for depr_prefix in"},{"line_number":92,"context_line":"                DEPRECATED_PREFIXES]):"},{"line_number":93,"context_line":"            LOG.warn(_(\"Found deprecated policy rule:%s. Please consider \""},{"line_number":94,"context_line":"                       \"upgrading your policy configuration file\"), pol)"},{"line_number":95,"context_line":"            pol_name, action \u003d pol.rsplit(\u0027:\u0027, 1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAO3%2F%2F%2Fdk%3D","line":92,"in_reply_to":"AAAAO3%2F%2F%2FqQ%3D","updated":"2013-05-15 12:26:42.000000000","message":"That\u0027s slightly less computation efficient.\nBut we\u0027re talkin about nanoseconds I think, so I can do as you suggest.","commit_id":"6cd60fec71bce053e49ce425f723752920ef2742"}],"quantum/tests/unit/test_policy.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"unresolved":false,"context_lines":[{"line_number":373,"context_line":"        rules \u003d {\"extension:router:view\": \"rule:admin_or_owner\"}"},{"line_number":374,"context_line":"        policy._set_rules(json.dumps(rules))"},{"line_number":375,"context_line":"        self.assertNotIn(\u0027extension:router:view\u0027, common_policy._rules)"},{"line_number":376,"context_line":"        self.assertIn(\u0027get_network:router:external\u0027, common_policy._rules)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAO3%2F%2F%2Fps%3D","line":376,"updated":"2013-05-15 09:51:41.000000000","message":"It would be better to have a test for \"set\".","commit_id":"6cd60fec71bce053e49ce425f723752920ef2742"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":373,"context_line":"        rules \u003d {\"extension:router:view\": \"rule:admin_or_owner\"}"},{"line_number":374,"context_line":"        policy._set_rules(json.dumps(rules))"},{"line_number":375,"context_line":"        self.assertNotIn(\u0027extension:router:view\u0027, common_policy._rules)"},{"line_number":376,"context_line":"        self.assertIn(\u0027get_network:router:external\u0027, common_policy._rules)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAO3%2F%2F%2Fdc%3D","line":376,"in_reply_to":"AAAAO3%2F%2F%2Fps%3D","updated":"2013-05-15 12:26:42.000000000","message":"Sure.","commit_id":"6cd60fec71bce053e49ce425f723752920ef2742"}]}
