)]}'
{"nova/api/openstack/auth.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5e1bfbf4589eb54817867fe5694822953a4b7e3d","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    @webob.dec.wsgify(RequestClass\u003dwsgi.Request)"},{"line_number":97,"context_line":"    def __call__(self, req):"},{"line_number":98,"context_line":"        return self.base_call(req, False, always_admin\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_cf3b7cea","line":98,"updated":"2015-06-08 14:54:15.000000000","message":"why we need change this? This means ADMIN_API\u003dFalse is also use admin request?","commit_id":"4bb5e3a694429b34d1f18bc755cc775d0bfd6b16"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"92b667c67d698b5d37b6bd706787d63550c524c3","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    @webob.dec.wsgify(RequestClass\u003dwsgi.Request)"},{"line_number":97,"context_line":"    def __call__(self, req):"},{"line_number":98,"context_line":"        return self.base_call(req, False, always_admin\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_de4dc59a","line":98,"in_reply_to":"3afb71cf_cf3b7cea","updated":"2015-06-11 20:05:59.000000000","message":"Exactly what\u0027s happening. This class behaviour should be the same as  NoAuthMiddleware. \nWithout always_admin\u003dFalse parameter, admin is always on.","commit_id":"4bb5e3a694429b34d1f18bc755cc775d0bfd6b16"}],"nova/api/openstack/compute/plugins/v3/keypairs.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"75dc790d0be66adcc1363e016e8479f928367140","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":77,"context_line":"        # handle optional user-id for admin only"},{"line_number":78,"context_line":"        user_id \u003d body[\u0027keypair\u0027].get(\u0027user_id\u0027) or context.user_id"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        authorize(context, action\u003d\u0027create\u0027, target\u003d{\u0027user_id\u0027: user_id})"},{"line_number":81,"context_line":"        return self._create(req, body, type\u003dTrue, user_id\u003duser_id)"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_676fa8c4","line":79,"updated":"2015-05-30 15:28:30.000000000","message":"useless change","commit_id":"2f3bdafef472e7cc0951c9cc9a73422b02d500b6"}],"nova/tests/functional/api_samples_test_base.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5e1bfbf4589eb54817867fe5694822953a4b7e3d","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            \u0027compute_host\u0027: self.compute.host,"},{"line_number":305,"context_line":"            \u0027text\u0027: text,"},{"line_number":306,"context_line":"            \u0027int\u0027: \u0027[0-9]+\u0027,"},{"line_number":307,"context_line":"            \u0027user_id\u0027: text,"},{"line_number":308,"context_line":"        }"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def _get_response(self, url, method, body\u003dNone, strip_version\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_cfb6dc89","line":307,"updated":"2015-06-08 14:54:15.000000000","message":"we can add subs at https://github.com/openstack/nova/blob/master/nova/tests/functional/v3/test_keypairs.py#L44\n\nsubs.update(kwargs)\n\nThen we verify the result is our expected","commit_id":"4bb5e3a694429b34d1f18bc755cc775d0bfd6b16"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"e755039fdff61936835ffad206bcb4bc0a6a3da1","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            \u0027compute_host\u0027: self.compute.host,"},{"line_number":305,"context_line":"            \u0027text\u0027: text,"},{"line_number":306,"context_line":"            \u0027int\u0027: \u0027[0-9]+\u0027,"},{"line_number":307,"context_line":"            \u0027user_id\u0027: text,"},{"line_number":308,"context_line":"        }"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def _get_response(self, url, method, body\u003dNone, strip_version\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_1f034d0f","line":307,"in_reply_to":"3afb71cf_cfb6dc89","updated":"2015-06-11 20:23:06.000000000","message":"I\u0027m not sure why is it needed. These are just definitions here.. obviously doesn\u0027t harm anything.","commit_id":"4bb5e3a694429b34d1f18bc755cc775d0bfd6b16"}],"nova/tests/functional/v3/test_keypairs.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"75dc790d0be66adcc1363e016e8479f928367140","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            keypair_type\u003dkeypair_obj.KEYPAIR_TYPE_SSH,"},{"line_number":189,"context_line":"            user_id\u003d\"fake\")"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def test_keypairs_post_not_admin(self):"},{"line_number":192,"context_line":"        key_name \u003d \u0027keypair-\u0027 + str(uuid.uuid4())"},{"line_number":193,"context_line":"        subs \u003d dict(keypair_name\u003dkey_name,"},{"line_number":194,"context_line":"                    keypair_type\u003dkeypair_obj.KEYPAIR_TYPE_SSH,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_e7b27848","line":191,"updated":"2015-05-30 15:28:30.000000000","message":"we needn\u0027t negative test for api sample test. api sample test is used for generic api call sample file. and ensure the output of api is expected.","commit_id":"2f3bdafef472e7cc0951c9cc9a73422b02d500b6"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"794d5e5b285e29b5a440e157eae445a6156de0bb","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            keypair_type\u003dkeypair_obj.KEYPAIR_TYPE_SSH,"},{"line_number":189,"context_line":"            user_id\u003d\"fake\")"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def test_keypairs_post_not_admin(self):"},{"line_number":192,"context_line":"        key_name \u003d \u0027keypair-\u0027 + str(uuid.uuid4())"},{"line_number":193,"context_line":"        subs \u003d dict(keypair_name\u003dkey_name,"},{"line_number":194,"context_line":"                    keypair_type\u003dkeypair_obj.KEYPAIR_TYPE_SSH,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a016987_a77b47f4","line":191,"in_reply_to":"7a016987_e7b27848","updated":"2015-06-01 13:58:56.000000000","message":"This is not a negative test per se, but a functional test that verifies that a non-admin user will get a 403 error, when trying to execute this specific operation that requires admin permissions. \n\nIMO, this is important to validate in this feature.","commit_id":"2f3bdafef472e7cc0951c9cc9a73422b02d500b6"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5e1bfbf4589eb54817867fe5694822953a4b7e3d","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        subs \u003d {"},{"line_number":163,"context_line":"            \u0027keypair_type\u0027: keypair_obj.KEYPAIR_TYPE_SSH,"},{"line_number":164,"context_line":"            \u0027public_key\u0027: fake_crypto.get_ssh_public_key(),"},{"line_number":165,"context_line":"            \u0027user_id\u0027: \"fake\""},{"line_number":166,"context_line":"        }"},{"line_number":167,"context_line":"        self._check_keypairs_post(**subs)"},{"line_number":168,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_ef9e38b7","line":165,"updated":"2015-06-08 14:54:15.000000000","message":"we better to use uuid at here. Then the API document can show the real of api what looks like. We put some fake user name at here, that may confuse for the api user, he can put the user name into the request instead of user uuid.","commit_id":"4bb5e3a694429b34d1f18bc755cc775d0bfd6b16"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"92b667c67d698b5d37b6bd706787d63550c524c3","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        subs \u003d {"},{"line_number":163,"context_line":"            \u0027keypair_type\u0027: keypair_obj.KEYPAIR_TYPE_SSH,"},{"line_number":164,"context_line":"            \u0027public_key\u0027: fake_crypto.get_ssh_public_key(),"},{"line_number":165,"context_line":"            \u0027user_id\u0027: \"fake\""},{"line_number":166,"context_line":"        }"},{"line_number":167,"context_line":"        self._check_keypairs_post(**subs)"},{"line_number":168,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_39174956","line":165,"in_reply_to":"3afb71cf_ef9e38b7","updated":"2015-06-11 20:05:59.000000000","message":"I think the user fake is hard coded/used in many places in these tests..\nI think if we want to change that,  we  should do it in a separate patch.","commit_id":"4bb5e3a694429b34d1f18bc755cc775d0bfd6b16"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5e1bfbf4589eb54817867fe5694822953a4b7e3d","unresolved":false,"context_lines":[{"line_number":169,"context_line":"    def test_keypairs_post(self):"},{"line_number":170,"context_line":"        return self._check_keypairs_post("},{"line_number":171,"context_line":"            keypair_type\u003dkeypair_obj.KEYPAIR_TYPE_SSH,"},{"line_number":172,"context_line":"            user_id\u003d\"admin\")"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def test_keypairs_import_key_post(self):"},{"line_number":175,"context_line":"        # NOTE(claudiub): overrides the method with the same name in"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_cfa5bc04","line":172,"updated":"2015-06-08 14:54:15.000000000","message":"ditto","commit_id":"4bb5e3a694429b34d1f18bc755cc775d0bfd6b16"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5e1bfbf4589eb54817867fe5694822953a4b7e3d","unresolved":false,"context_lines":[{"line_number":177,"context_line":"        public_key \u003d fake_crypto.get_ssh_public_key()"},{"line_number":178,"context_line":"        self._check_keypairs_import_key_post("},{"line_number":179,"context_line":"            public_key, keypair_type\u003dkeypair_obj.KEYPAIR_TYPE_SSH,"},{"line_number":180,"context_line":"            user_id\u003d\"fake\")"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"class KeyPairsV24SampleJsonTestNotAdmin(KeyPairsV24SampleJsonTest):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_0f83d457","line":180,"updated":"2015-06-08 14:54:15.000000000","message":"ditto","commit_id":"4bb5e3a694429b34d1f18bc755cc775d0bfd6b16"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5e1bfbf4589eb54817867fe5694822953a4b7e3d","unresolved":false,"context_lines":[{"line_number":183,"context_line":"class KeyPairsV24SampleJsonTestNotAdmin(KeyPairsV24SampleJsonTest):"},{"line_number":184,"context_line":"    ADMIN_API \u003d False"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def test_keypairs_post(self):"},{"line_number":187,"context_line":"        return self._check_keypairs_post("},{"line_number":188,"context_line":"            keypair_type\u003dkeypair_obj.KEYPAIR_TYPE_SSH,"},{"line_number":189,"context_line":"            user_id\u003d\"fake\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_efe078ce","line":186,"updated":"2015-06-08 14:54:15.000000000","message":"All the cases in this class is for not admin. We should call this test \"test_keypairs_post_for own_keypair\". Just an example...you may have better name for this.","commit_id":"4bb5e3a694429b34d1f18bc755cc775d0bfd6b16"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"92b667c67d698b5d37b6bd706787d63550c524c3","unresolved":false,"context_lines":[{"line_number":183,"context_line":"class KeyPairsV24SampleJsonTestNotAdmin(KeyPairsV24SampleJsonTest):"},{"line_number":184,"context_line":"    ADMIN_API \u003d False"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def test_keypairs_post(self):"},{"line_number":187,"context_line":"        return self._check_keypairs_post("},{"line_number":188,"context_line":"            keypair_type\u003dkeypair_obj.KEYPAIR_TYPE_SSH,"},{"line_number":189,"context_line":"            user_id\u003d\"fake\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_794a6157","line":186,"in_reply_to":"3afb71cf_efe078ce","updated":"2015-06-11 20:05:59.000000000","message":"The method is called this way in order to override a method in KeyPairsV24SampleJsonTest, which tests the same for an admin.","commit_id":"4bb5e3a694429b34d1f18bc755cc775d0bfd6b16"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5e1bfbf4589eb54817867fe5694822953a4b7e3d","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            keypair_type\u003dkeypair_obj.KEYPAIR_TYPE_SSH,"},{"line_number":189,"context_line":"            user_id\u003d\"fake\")"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def test_keypairs_post_not_admin(self):"},{"line_number":192,"context_line":"        key_name \u003d \u0027keypair-\u0027 + str(uuid.uuid4())"},{"line_number":193,"context_line":"        subs \u003d dict(keypair_name\u003dkey_name,"},{"line_number":194,"context_line":"                    keypair_type\u003dkeypair_obj.KEYPAIR_TYPE_SSH,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_0f051479","line":191,"updated":"2015-06-08 14:54:15.000000000","message":"this should be \"test_keypairs_post_for_other_user\"","commit_id":"4bb5e3a694429b34d1f18bc755cc775d0bfd6b16"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"92b667c67d698b5d37b6bd706787d63550c524c3","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            keypair_type\u003dkeypair_obj.KEYPAIR_TYPE_SSH,"},{"line_number":189,"context_line":"            user_id\u003d\"fake\")"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def test_keypairs_post_not_admin(self):"},{"line_number":192,"context_line":"        key_name \u003d \u0027keypair-\u0027 + str(uuid.uuid4())"},{"line_number":193,"context_line":"        subs \u003d dict(keypair_name\u003dkey_name,"},{"line_number":194,"context_line":"                    keypair_type\u003dkeypair_obj.KEYPAIR_TYPE_SSH,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_993d1dbe","line":191,"in_reply_to":"3afb71cf_0f051479","updated":"2015-06-11 20:05:59.000000000","message":"ok..","commit_id":"4bb5e3a694429b34d1f18bc755cc775d0bfd6b16"}]}
