)]}'
{"devstack/plugin.sh":[{"author":{"_account_id":21224,"name":"jiaopengju","email":"jiaopengju_yewu@cmss.chinamobile.com","username":"jiaopengju"},"change_message_id":"e97eb1c891c11583b60e70455858736d2d90b539","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        cp $KARBOR_DIR/etc/api-paste.ini $KARBOR_CONF_DIR"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        if [[ -f $KARBOR_DIR/etc/policy.json ]]; then"},{"line_number":126,"context_line":"            cp $KARBOR_DIR/etc/policy.json $KARBOR_CONF_DIR"},{"line_number":127,"context_line":"        fi"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        cp -R $KARBOR_DIR/etc/providers.d $KARBOR_CONF_DIR"}],"source_content_type":"text/x-sh","patch_set":3,"id":"5f4e5783_df8423b4","line":126,"range":{"start_line":126,"start_character":15,"end_line":126,"end_character":42},"updated":"2017-10-10 06:22:41.000000000","message":"policy.json has been deleted. Maybe we don\u0027t need copy it to conf dir.","commit_id":"6c2d4fe66a624fc1274912f6167e9539e2394df4"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"61cb58528bd8afb274e818b960e8f65fc81cfca0","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        cp $KARBOR_DIR/etc/api-paste.ini $KARBOR_CONF_DIR"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        if [[ -f $KARBOR_DIR/etc/policy.json ]]; then"},{"line_number":126,"context_line":"            cp $KARBOR_DIR/etc/policy.json $KARBOR_CONF_DIR"},{"line_number":127,"context_line":"        fi"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        cp -R $KARBOR_DIR/etc/providers.d $KARBOR_CONF_DIR"}],"source_content_type":"text/x-sh","patch_set":3,"id":"5f4e5783_5a0961db","line":126,"range":{"start_line":126,"start_character":15,"end_line":126,"end_character":42},"in_reply_to":"5f4e5783_df8423b4","updated":"2017-10-10 06:38:06.000000000","message":"All the default policies in this file have been moved to code. So the policy.json is empty, it can be deleted. But if the admin want to change the default policy, he also need create this file here to write the new policy configurations.","commit_id":"6c2d4fe66a624fc1274912f6167e9539e2394df4"}],"etc/policy.json":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"9d59dd179d0b5433df04a5c664f067fda13de0ad","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"}"}],"source_content_type":"application/json","patch_set":1,"id":"7f515b1d_eb4ebe36","line":1,"updated":"2017-10-05 15:21:08.000000000","message":"Since this file is empty now - it can be deleted.","commit_id":"7793544c4fd590d8519ce0ac8b86f74688fb6d65"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"d39b543a8730779205b62416e823eba0f0e4cdeb","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"}"}],"source_content_type":"application/json","patch_set":1,"id":"7f515b1d_1968091b","line":1,"in_reply_to":"7f515b1d_eb4ebe36","updated":"2017-10-09 09:49:32.000000000","message":"I will delete it and do some tests about it. Thanks.","commit_id":"7793544c4fd590d8519ce0ac8b86f74688fb6d65"}],"karbor/policies/operation_logs.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"79a7f920735646dcb533d470e3128a192b8abf63","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":26,"context_line":"        name\u003dGET_POLICY,"},{"line_number":27,"context_line":"        check_str\u003dbase.RULE_ADMIN_OR_OWNER,"},{"line_number":28,"context_line":"        description\u003d\"\"\"Get a operation_log.\"\"\","},{"line_number":29,"context_line":"        operations\u003d["},{"line_number":30,"context_line":"            {"},{"line_number":31,"context_line":"                \u0027method\u0027: \u0027GET\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_5d8058f5","line":28,"range":{"start_line":28,"start_character":19,"end_line":28,"end_character":23},"updated":"2017-10-02 14:44:47.000000000","message":"This there a specific reason to use triple quotes here instead of:\n\n  description\u003d\u0027Get an operation log.\u0027\n\n?","commit_id":"7793544c4fd590d8519ce0ac8b86f74688fb6d65"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"d39b543a8730779205b62416e823eba0f0e4cdeb","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    policy.DocumentedRuleDefault("},{"line_number":26,"context_line":"        name\u003dGET_POLICY,"},{"line_number":27,"context_line":"        check_str\u003dbase.RULE_ADMIN_OR_OWNER,"},{"line_number":28,"context_line":"        description\u003d\"\"\"Get a operation_log.\"\"\","},{"line_number":29,"context_line":"        operations\u003d["},{"line_number":30,"context_line":"            {"},{"line_number":31,"context_line":"                \u0027method\u0027: \u0027GET\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_f97f6ddc","line":28,"range":{"start_line":28,"start_character":19,"end_line":28,"end_character":23},"in_reply_to":"7f515b1d_5d8058f5","updated":"2017-10-09 09:49:32.000000000","message":"No. The triple quotes here not a must. I will update it.","commit_id":"7793544c4fd590d8519ce0ac8b86f74688fb6d65"}],"karbor/tests/unit/api/v1/test_operation_logs.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"9d59dd179d0b5433df04a5c664f067fda13de0ad","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        super(OperationLogTest, self).setUp()"},{"line_number":29,"context_line":"        self.controller \u003d operation_logs.OperationLogsController()"},{"line_number":30,"context_line":"        self.ctxt \u003d context.RequestContext(\u0027demo\u0027, \u0027fakeproject\u0027, True)"},{"line_number":31,"context_line":"        self.mock_policy_check \u003d self.mock_object("},{"line_number":32,"context_line":"            context.RequestContext, \u0027can\u0027)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @mock.patch("},{"line_number":35,"context_line":"        \u0027karbor.api.v1.operation_logs.\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_2bf3b6e9","line":32,"range":{"start_line":31,"start_character":8,"end_line":32,"end_character":42},"updated":"2017-10-05 15:21:08.000000000","message":"Why mock these? Does this circumvent the actual testing of karbor policies?","commit_id":"7793544c4fd590d8519ce0ac8b86f74688fb6d65"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"d39b543a8730779205b62416e823eba0f0e4cdeb","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        super(OperationLogTest, self).setUp()"},{"line_number":29,"context_line":"        self.controller \u003d operation_logs.OperationLogsController()"},{"line_number":30,"context_line":"        self.ctxt \u003d context.RequestContext(\u0027demo\u0027, \u0027fakeproject\u0027, True)"},{"line_number":31,"context_line":"        self.mock_policy_check \u003d self.mock_object("},{"line_number":32,"context_line":"            context.RequestContext, \u0027can\u0027)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @mock.patch("},{"line_number":35,"context_line":"        \u0027karbor.api.v1.operation_logs.\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_eb6af0b0","line":32,"range":{"start_line":31,"start_character":8,"end_line":32,"end_character":42},"in_reply_to":"7f515b1d_2bf3b6e9","updated":"2017-10-09 09:49:32.000000000","message":"The default policies are not inited in these unit tests. So the policy checks will be mocked. The fixture class about policy module for unit tests may be introduced to karbor.","commit_id":"7793544c4fd590d8519ce0ac8b86f74688fb6d65"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"2b712c98d56f6bebb151c49628480ce5fc917cb7","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        super(OperationLogTest, self).setUp()"},{"line_number":29,"context_line":"        self.controller \u003d operation_logs.OperationLogsController()"},{"line_number":30,"context_line":"        self.ctxt \u003d context.RequestContext(\u0027demo\u0027, \u0027fakeproject\u0027, True)"},{"line_number":31,"context_line":"        self.mock_policy_check \u003d self.mock_object("},{"line_number":32,"context_line":"            context.RequestContext, \u0027can\u0027)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @mock.patch("},{"line_number":35,"context_line":"        \u0027karbor.api.v1.operation_logs.\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f4e5783_02d93282","line":32,"range":{"start_line":31,"start_character":8,"end_line":32,"end_character":42},"updated":"2017-10-10 14:20:25.000000000","message":"Is this used anywhere? Is the reason for this because there are no actual role assignments or permissions established in the unit tests because keystone isn\u0027t involved?","commit_id":"5f69bb846c667620733b3a87cd5c5e4299350fcc"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"3ed87a3acf5c85d3e520e3015982b0ff05f84bc0","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        super(OperationLogTest, self).setUp()"},{"line_number":29,"context_line":"        self.controller \u003d operation_logs.OperationLogsController()"},{"line_number":30,"context_line":"        self.ctxt \u003d context.RequestContext(\u0027demo\u0027, \u0027fakeproject\u0027, True)"},{"line_number":31,"context_line":"        self.mock_policy_check \u003d self.mock_object("},{"line_number":32,"context_line":"            context.RequestContext, \u0027can\u0027)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @mock.patch("},{"line_number":35,"context_line":"        \u0027karbor.api.v1.operation_logs.\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f4e5783_86cbdf51","line":32,"range":{"start_line":31,"start_character":8,"end_line":32,"end_character":42},"in_reply_to":"5f4e5783_02d93282","updated":"2017-10-11 07:07:04.000000000","message":"I will fix it in another patch. The mock about policy check isn\u0027t needed any more.","commit_id":"5f69bb846c667620733b3a87cd5c5e4299350fcc"}]}
