)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0a1692859c3cf03472577a3b35551878dbdd0d53","unresolved":false,"context_lines":[{"line_number":10,"context_line":"with the help of new optional parameters \u0027limit\u0027 and \u0027marker\u0027"},{"line_number":11,"context_line":"which were added to GET /os-keypairs request."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1599904"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Implements blueprint: keypairs-pagination"},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":23,"id":"1aa78d24_e4c28052","line":13,"updated":"2016-07-11 18:16:45.000000000","message":"I\u0027m not sure I consider this bug closed since we don\u0027t test the v2.1 API, but that could be addressed separately. Change to Partial-Bug if you have to respin this.","commit_id":"28c51c9cf633129546da31ae28a974e2339eda38"}],"api-ref/source/os-keypairs.inc":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8018ffa647ae810a0781fd2bb73a3e5fe8a646eb","unresolved":false,"context_lines":[{"line_number":20,"context_line":"Request"},{"line_number":21,"context_line":"-------"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":".. rest_parameters:: parameters.yaml"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"  - limit: keypair_limit"},{"line_number":26,"context_line":"  - marker: keypair_marker"}],"source_content_type":"text/x-c++src","patch_set":21,"id":"1aa78d24_ca9282f5","line":23,"updated":"2016-07-07 15:58:15.000000000","message":"This really falls within the api-ref cleanup work probably, but user_id is an optional parameter for listing keypairs, but it\u0027s not listed here. Looks like that was missed with:\n\nhttps://review.openstack.org/#/c/325308\n\nI can open a bug to fix that separately.","commit_id":"db4e1117cbf793fda5f75e99013aef31a5fb8712"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"085fcfdf75679302abc2d863bbc3ebad38e1e987","unresolved":false,"context_lines":[{"line_number":20,"context_line":"Request"},{"line_number":21,"context_line":"-------"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":".. rest_parameters:: parameters.yaml"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"  - limit: keypair_limit"},{"line_number":26,"context_line":"  - marker: keypair_marker"}],"source_content_type":"text/x-c++src","patch_set":21,"id":"1aa78d24_e61cb16c","line":23,"in_reply_to":"1aa78d24_ca9282f5","updated":"2016-07-08 09:32:28.000000000","message":"Yes, I think this should be in other doc-bug-fix","commit_id":"db4e1117cbf793fda5f75e99013aef31a5fb8712"}],"api-ref/source/parameters.yaml":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"948c9a9785a698f97322ee8e75a8fd294e8d0157","unresolved":false,"context_lines":[{"line_number":489,"context_line":"  min_version: 2.35"},{"line_number":490,"context_line":"keypair_marker:"},{"line_number":491,"context_line":"  description: |"},{"line_number":492,"context_line":"    The NAME of the last-seen item. Use the ``limit`` parameter to make an initial limited"},{"line_number":493,"context_line":"    request and use the NAME of the last-seen item from the response as the ``marker``"},{"line_number":494,"context_line":"    parameter value in a subsequent limited request."},{"line_number":495,"context_line":"  in: query"}],"source_content_type":"text/x-yaml","patch_set":27,"id":"1aa78d24_866b8e1d","line":492,"updated":"2016-07-12 15:03:52.000000000","message":"This follows the example we\u0027ve set in other descriptions about specifying what is used for the marker. However I users should treat the marker as opaque and shouldn\u0027t need to know what specifically is used, because we could want to change it in the future.\n\nWhat I would say instead is that the marker is provided in the link returned when making a paginated call.\n\nBut since this matches what we do elsewhere I\u0027m not -1 on it.","commit_id":"d32af5ef2495429be4920bed35ffb8a278482e94"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c47c47b0fd4c635ef0d50ea8fe6a833b24f34742","unresolved":false,"context_lines":[{"line_number":489,"context_line":"  min_version: 2.35"},{"line_number":490,"context_line":"keypair_marker:"},{"line_number":491,"context_line":"  description: |"},{"line_number":492,"context_line":"    The NAME of the last-seen item. Use the ``limit`` parameter to make an initial limited"},{"line_number":493,"context_line":"    request and use the NAME of the last-seen item from the response as the ``marker``"},{"line_number":494,"context_line":"    parameter value in a subsequent limited request."},{"line_number":495,"context_line":"  in: query"}],"source_content_type":"text/x-yaml","patch_set":27,"id":"1aa78d24_1d38889f","line":492,"in_reply_to":"1aa78d24_866b8e1d","updated":"2016-07-12 15:31:04.000000000","message":"Good point. I think this is worth addressing given the debate over the marker in this review.\n\nI don\u0027t think we need to say what it is just because we\u0027ve said the marker was an ID in other APIs/resources, it was probably just an oversight and not something we ever talked about potentially changing.","commit_id":"d32af5ef2495429be4920bed35ffb8a278482e94"}],"doc/api_samples/keypairs/v2.31/keypairs-get-resp.json":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"55c28b8424fabdc90ee9c6bc6e11314a491956da","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"keypair\": {"},{"line_number":3,"context_line":"        \"fingerprint\": \"44:fe:29:6e:23:14:b9:53:5b:65:82:58:1c:fe:5a:c3\","},{"line_number":4,"context_line":"        \"name\": \"keypair-6638abdb-c4e8-407c-ba88-c8dd7cc3c4f1\","}],"source_content_type":"application/json","patch_set":9,"id":"3aaa91ec_315158d9","line":1,"updated":"2016-06-23 19:03:02.000000000","message":"As discussed in this ML thread:\n\nhttp://lists.openstack.org/pipermail/openstack-dev/2016-June/097657.html\n\nWe don\u0027t need API samples tests which are redundant for this microversion if the REST method isn\u0027t changing, so we really only need to be testing listing of keypairs with limit/marker.","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"fe92a206acc248646394a884ea0cfadb311b70d4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"keypair\": {"},{"line_number":3,"context_line":"        \"fingerprint\": \"44:fe:29:6e:23:14:b9:53:5b:65:82:58:1c:fe:5a:c3\","},{"line_number":4,"context_line":"        \"name\": \"keypair-6638abdb-c4e8-407c-ba88-c8dd7cc3c4f1\","}],"source_content_type":"application/json","patch_set":9,"id":"3aaa91ec_ed950c33","line":1,"in_reply_to":"3aaa91ec_315158d9","updated":"2016-06-24 14:11:18.000000000","message":"remained","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"}],"doc/api_samples/keypairs/v2.31/keypairs-import-post-req.json":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"55c28b8424fabdc90ee9c6bc6e11314a491956da","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"keypair\": {"},{"line_number":3,"context_line":"        \"name\": \"keypair-d20a3d59-9433-4b79-8726-20b431d89c78\","},{"line_number":4,"context_line":"        \"type\": \"ssh\","}],"source_content_type":"application/json","patch_set":9,"id":"3aaa91ec_91076cc9","line":1,"updated":"2016-06-23 19:03:02.000000000","message":"Shouldn\u0027t need this.","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"fe92a206acc248646394a884ea0cfadb311b70d4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"keypair\": {"},{"line_number":3,"context_line":"        \"name\": \"keypair-d20a3d59-9433-4b79-8726-20b431d89c78\","},{"line_number":4,"context_line":"        \"type\": \"ssh\","}],"source_content_type":"application/json","patch_set":9,"id":"3aaa91ec_6da2bc9a","line":1,"in_reply_to":"3aaa91ec_91076cc9","updated":"2016-06-24 14:11:18.000000000","message":"removed","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"}],"doc/api_samples/keypairs/v2.31/keypairs-import-post-resp.json":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"55c28b8424fabdc90ee9c6bc6e11314a491956da","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"keypair\": {"},{"line_number":3,"context_line":"        \"fingerprint\": \"1e:2c:9b:56:79:4b:45:77:f9:ca:7a:98:2c:b0:d5:3c\","},{"line_number":4,"context_line":"        \"name\": \"keypair-803a1926-af78-4b05-902a-1d6f7a8d9d3e\","}],"source_content_type":"application/json","patch_set":9,"id":"3aaa91ec_d10d74e9","line":1,"updated":"2016-06-23 19:03:02.000000000","message":"Or this.","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"fe92a206acc248646394a884ea0cfadb311b70d4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"keypair\": {"},{"line_number":3,"context_line":"        \"fingerprint\": \"1e:2c:9b:56:79:4b:45:77:f9:ca:7a:98:2c:b0:d5:3c\","},{"line_number":4,"context_line":"        \"name\": \"keypair-803a1926-af78-4b05-902a-1d6f7a8d9d3e\","}],"source_content_type":"application/json","patch_set":9,"id":"3aaa91ec_edbcecbc","line":1,"in_reply_to":"3aaa91ec_d10d74e9","updated":"2016-06-24 14:11:18.000000000","message":"removed","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"}],"doc/api_samples/keypairs/v2.31/keypairs-post-req.json":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"55c28b8424fabdc90ee9c6bc6e11314a491956da","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"keypair\": {"},{"line_number":3,"context_line":"        \"name\": \"keypair-ab9ff2e6-a6d7-4915-a241-044c369c07f9\","},{"line_number":4,"context_line":"        \"type\": \"ssh\","}],"source_content_type":"application/json","patch_set":9,"id":"3aaa91ec_b1126807","line":1,"updated":"2016-06-23 19:03:02.000000000","message":"Or this.","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"fe92a206acc248646394a884ea0cfadb311b70d4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"keypair\": {"},{"line_number":3,"context_line":"        \"name\": \"keypair-ab9ff2e6-a6d7-4915-a241-044c369c07f9\","},{"line_number":4,"context_line":"        \"type\": \"ssh\","}],"source_content_type":"application/json","patch_set":9,"id":"3aaa91ec_0ddfb80d","line":1,"in_reply_to":"3aaa91ec_b1126807","updated":"2016-06-24 14:11:18.000000000","message":"remained (for post), ok?","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"}],"doc/api_samples/keypairs/v2.31/keypairs-post-resp.json":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"55c28b8424fabdc90ee9c6bc6e11314a491956da","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"keypair\": {"},{"line_number":3,"context_line":"        \"fingerprint\": \"7e:eb:ab:24:ba:d1:e1:88:ae:9a:fb:66:53:df:d3:bd\","},{"line_number":4,"context_line":"        \"name\": \"keypair-ab9ff2e6-a6d7-4915-a241-044c369c07f9\","}],"source_content_type":"application/json","patch_set":9,"id":"3aaa91ec_f1f870c5","line":1,"updated":"2016-06-23 19:03:02.000000000","message":"Or this.","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"fe92a206acc248646394a884ea0cfadb311b70d4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"keypair\": {"},{"line_number":3,"context_line":"        \"fingerprint\": \"7e:eb:ab:24:ba:d1:e1:88:ae:9a:fb:66:53:df:d3:bd\","},{"line_number":4,"context_line":"        \"name\": \"keypair-ab9ff2e6-a6d7-4915-a241-044c369c07f9\","}],"source_content_type":"application/json","patch_set":9,"id":"3aaa91ec_cdd93024","line":1,"in_reply_to":"3aaa91ec_f1f870c5","updated":"2016-06-24 14:11:18.000000000","message":"remained (for post), ok?","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"}],"nova/api/openstack/compute/keypairs.py":[{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"f033a2fc7d59093a478b3cdc54a14cde459974f9","unresolved":false,"context_lines":[{"line_number":247,"context_line":"                           target\u003d{\u0027user_id\u0027: user_id,"},{"line_number":248,"context_line":"                                   \u0027project_id\u0027: context.project_id})"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        limit, marker \u003d common.get_limit_and_marker(req)"},{"line_number":251,"context_line":"        key_pairs \u003d self.api.get_key_pairs("},{"line_number":252,"context_line":"            context, user_id, limit\u003dlimit, marker\u003dmarker)"},{"line_number":253,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_d679f4c9","line":250,"updated":"2016-06-23 15:58:22.000000000","message":"here should be \"if this microversion is supported\"","commit_id":"9dd40717f826db4c350f85cf4fd958b8e07e8653"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"74a3b98c11148d0fdce683945a30d4b060feca82","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        return {\u0027keypair\u0027: keypair}"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    @wsgi.Controller.api_version(\"2.10\")"},{"line_number":227,"context_line":"    @extensions.expected_errors((400))"},{"line_number":228,"context_line":"    def index(self, req):"},{"line_number":229,"context_line":"        # handle optional user-id for admin only"},{"line_number":230,"context_line":"        user_id \u003d self._get_user_id(req)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_3792eff6","line":227,"updated":"2016-06-23 17:32:03.000000000","message":"shouldn\u0027t we copy this to new \u0027index\u0027 function with version \u00272.31\u0027 because of this change?","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"55c28b8424fabdc90ee9c6bc6e11314a491956da","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        return {\u0027keypair\u0027: keypair}"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    @wsgi.Controller.api_version(\"2.10\")"},{"line_number":227,"context_line":"    @extensions.expected_errors((400))"},{"line_number":228,"context_line":"    def index(self, req):"},{"line_number":229,"context_line":"        # handle optional user-id for admin only"},{"line_number":230,"context_line":"        user_id \u003d self._get_user_id(req)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_d17a9476","line":227,"in_reply_to":"3aaa91ec_3792eff6","updated":"2016-06-23 19:03:02.000000000","message":"Hmm, that\u0027s a good point, I didn\u0027t think about that in the hypervisors pagination change.","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"4c63de13874f8efa8c2adc24cd857596c8c2a076","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        return {\u0027keypair\u0027: keypair}"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    @wsgi.Controller.api_version(\"2.10\")"},{"line_number":227,"context_line":"    @extensions.expected_errors((400))"},{"line_number":228,"context_line":"    def index(self, req):"},{"line_number":229,"context_line":"        # handle optional user-id for admin only"},{"line_number":230,"context_line":"        user_id \u003d self._get_user_id(req)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_d1dbb44d","line":227,"in_reply_to":"3aaa91ec_3792eff6","updated":"2016-06-23 19:02:06.000000000","message":"good catch","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"fe92a206acc248646394a884ea0cfadb311b70d4","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        return {\u0027keypair\u0027: keypair}"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    @wsgi.Controller.api_version(\"2.10\")"},{"line_number":227,"context_line":"    @extensions.expected_errors((400))"},{"line_number":228,"context_line":"    def index(self, req):"},{"line_number":229,"context_line":"        # handle optional user-id for admin only"},{"line_number":230,"context_line":"        user_id \u003d self._get_user_id(req)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_2d01d46a","line":227,"in_reply_to":"3aaa91ec_d17a9476","updated":"2016-06-24 14:11:18.000000000","message":"Done","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"187637117ef151d429d3bb9c91976dc677a4135f","unresolved":false,"context_lines":[{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        try:"},{"line_number":264,"context_line":"            key_pairs \u003d self.api.get_key_pairs("},{"line_number":265,"context_line":"                context, user_id, limit\u003dlimit, marker\u003dmarker)"},{"line_number":266,"context_line":"        except exception.MarkerNotFound:"},{"line_number":267,"context_line":"            msg \u003d _(\u0027marker [%s] not found\u0027) % marker"},{"line_number":268,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_44404707","line":265,"updated":"2016-06-27 05:33:29.000000000","message":"This change the order of records, i think we should keep same order for the api version before 2.32","commit_id":"3c79bea37320a3771f20e5326df9ea0cef7504fb"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"95a1fa85e7c0053ac652fdbdbada0777dd8920e7","unresolved":false,"context_lines":[{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        try:"},{"line_number":264,"context_line":"            key_pairs \u003d self.api.get_key_pairs("},{"line_number":265,"context_line":"                context, user_id, limit\u003dlimit, marker\u003dmarker)"},{"line_number":266,"context_line":"        except exception.MarkerNotFound:"},{"line_number":267,"context_line":"            msg \u003d _(\u0027marker [%s] not found\u0027) % marker"},{"line_number":268,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_1943416d","line":265,"in_reply_to":"3aaa91ec_44404707","updated":"2016-06-27 08:53:53.000000000","message":"hmm interesting, need to think","commit_id":"3c79bea37320a3771f20e5326df9ea0cef7504fb"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"187637117ef151d429d3bb9c91976dc677a4135f","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            key_pairs \u003d self.api.get_key_pairs("},{"line_number":265,"context_line":"                context, user_id, limit\u003dlimit, marker\u003dmarker)"},{"line_number":266,"context_line":"        except exception.MarkerNotFound:"},{"line_number":267,"context_line":"            msg \u003d _(\u0027marker [%s] not found\u0027) % marker"},{"line_number":268,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        rval \u003d []"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_4457a7c9","line":267,"updated":"2016-06-27 05:33:29.000000000","message":"The exception MarkerNotFound already include a same error message, you just need use that message. You can write next line as below:\n\nraise webob.exc.HTTPBadRequest(explanation\u003de.format_message())","commit_id":"3c79bea37320a3771f20e5326df9ea0cef7504fb"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"95a1fa85e7c0053ac652fdbdbada0777dd8920e7","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            key_pairs \u003d self.api.get_key_pairs("},{"line_number":265,"context_line":"                context, user_id, limit\u003dlimit, marker\u003dmarker)"},{"line_number":266,"context_line":"        except exception.MarkerNotFound:"},{"line_number":267,"context_line":"            msg \u003d _(\u0027marker [%s] not found\u0027) % marker"},{"line_number":268,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        rval \u003d []"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_d94c19a0","line":267,"in_reply_to":"3aaa91ec_4457a7c9","updated":"2016-06-27 08:53:53.000000000","message":"I think I found this code from flavors, hmm ok","commit_id":"3c79bea37320a3771f20e5326df9ea0cef7504fb"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"29ea8fd59f34f8e5afc78566bd639843b5190ea1","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            key_pairs \u003d self.api.get_key_pairs("},{"line_number":265,"context_line":"                context, user_id, limit\u003dlimit, marker\u003dmarker)"},{"line_number":266,"context_line":"        except exception.MarkerNotFound:"},{"line_number":267,"context_line":"            msg \u003d _(\u0027marker [%s] not found\u0027) % marker"},{"line_number":268,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        rval \u003d []"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_12f5ccca","line":267,"in_reply_to":"3aaa91ec_d94c19a0","updated":"2016-06-27 12:32:54.000000000","message":"Done","commit_id":"3c79bea37320a3771f20e5326df9ea0cef7504fb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"50bf677f66595cd06831e505cf1dd9337742bcea","unresolved":false,"context_lines":[{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        rval \u003d []"},{"line_number":270,"context_line":"        for key_pair in key_pairs:"},{"line_number":271,"context_line":"            rval.append({\u0027keypair\u0027: self._filter_keypair(key_pair,"},{"line_number":272,"context_line":"                                                         **keypair_filters)})"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        return {\u0027keypairs\u0027: rval}"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_3e807c46","line":271,"range":{"start_line":271,"start_character":41,"end_line":271,"end_character":56},"updated":"2016-06-27 19:03:50.000000000","message":"Alex Xu brought this up in the change to add paging support for hypervisors, but for servers/images/flavors today we have a next link in the response for paging:\n\nhttps://github.com/openstack/nova/blob/6e8c84d0cd7651b465cf9bb7ad68a9b24b3658c9/nova/api/openstack/common.py#L448\n\nThat\u0027s not being used here, and I\u0027m not sure if it should or not - I\u0027m thinking it should.  sdague isn\u0027t around for me to confirm though, so I might just post to the dev list.","commit_id":"d9945ad18b65030ab16250dc9b5859165ca04540"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6d09d2aacf7e74c288bec8e30ce13e4af4de91bc","unresolved":false,"context_lines":[{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        rval \u003d []"},{"line_number":270,"context_line":"        for key_pair in key_pairs:"},{"line_number":271,"context_line":"            rval.append({\u0027keypair\u0027: self._filter_keypair(key_pair,"},{"line_number":272,"context_line":"                                                         **keypair_filters)})"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        return {\u0027keypairs\u0027: rval}"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_8f717c7a","line":271,"range":{"start_line":271,"start_character":41,"end_line":271,"end_character":56},"in_reply_to":"3aaa91ec_3e807c46","updated":"2016-06-27 20:50:40.000000000","message":"http://lists.openstack.org/pipermail/openstack-dev/2016-June/098263.html","commit_id":"d9945ad18b65030ab16250dc9b5859165ca04540"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"aab5281a21e618d625a5c077aae3f689aa63a7ca","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                            \u0027project_id\u0027: context.project_id})"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.34\u0027):"},{"line_number":262,"context_line":"            limit, marker \u003d common.get_limit_and_marker(req)"},{"line_number":263,"context_line":"        else:"},{"line_number":264,"context_line":"            limit \u003d marker \u003d None"},{"line_number":265,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_762b3083","line":262,"range":{"start_line":262,"start_character":12,"end_line":262,"end_character":25},"updated":"2016-07-04 14:27:52.000000000","message":"why not to make these as method params, than method, that supports 2.34 will pass it, while older one won\u0027t","commit_id":"e5f9fdf274121b82777e13bb115a104e4688600b"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"d0c38eda459618d0080091719f663be1b36c622c","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                            \u0027project_id\u0027: context.project_id})"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.34\u0027):"},{"line_number":262,"context_line":"            limit, marker \u003d common.get_limit_and_marker(req)"},{"line_number":263,"context_line":"        else:"},{"line_number":264,"context_line":"            limit \u003d marker \u003d None"},{"line_number":265,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_8a7950ff","line":262,"range":{"start_line":262,"start_character":12,"end_line":262,"end_character":25},"in_reply_to":"1aa78d24_762b3083","updated":"2016-07-04 14:54:48.000000000","message":"I think this doesn\u0027t really matter, I saw this approach in other places.","commit_id":"e5f9fdf274121b82777e13bb115a104e4688600b"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"aab5281a21e618d625a5c077aae3f689aa63a7ca","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"        try:"},{"line_number":267,"context_line":"            key_pairs \u003d self.api.get_key_pairs("},{"line_number":268,"context_line":"                context, user_id, limit\u003dlimit, marker\u003dmarker)"},{"line_number":269,"context_line":"        except exception.MarkerNotFound as e:"},{"line_number":270,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":271,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_766330b2","line":268,"range":{"start_line":268,"start_character":33,"end_line":268,"end_character":60},"updated":"2016-07-04 14:27:52.000000000","message":"as long as you pass them explicitly anyway","commit_id":"e5f9fdf274121b82777e13bb115a104e4688600b"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"aab5281a21e618d625a5c077aae3f689aa63a7ca","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        except exception.MarkerNotFound as e:"},{"line_number":270,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"        key_pairs \u003d [self._filter_keypair(key_pair, **keypair_filters)"},{"line_number":273,"context_line":"                     for key_pair in key_pairs]"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        keypairs_list \u003d [{\u0027keypair\u0027: key_pair} for key_pair in key_pairs]"},{"line_number":276,"context_line":"        keypairs_dict \u003d {\u0027keypairs\u0027: keypairs_list}"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        if links:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_76ee9023","line":275,"range":{"start_line":272,"start_character":8,"end_line":275,"end_character":73},"updated":"2016-07-04 14:27:52.000000000","message":"this could be done in one iteration","commit_id":"e5f9fdf274121b82777e13bb115a104e4688600b"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"d0c38eda459618d0080091719f663be1b36c622c","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        except exception.MarkerNotFound as e:"},{"line_number":270,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.format_message())"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"        key_pairs \u003d [self._filter_keypair(key_pair, **keypair_filters)"},{"line_number":273,"context_line":"                     for key_pair in key_pairs]"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        keypairs_list \u003d [{\u0027keypair\u0027: key_pair} for key_pair in key_pairs]"},{"line_number":276,"context_line":"        keypairs_dict \u003d {\u0027keypairs\u0027: keypairs_list}"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        if links:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_aad6ccc2","line":275,"range":{"start_line":272,"start_character":8,"end_line":275,"end_character":73},"in_reply_to":"1aa78d24_76ee9023","updated":"2016-07-04 14:54:48.000000000","message":"\u0027key_pairs\u0027 are needed for links in line 279, but the result should be returned as it is in \u0027keypairs_list\u0027 (line 276)","commit_id":"e5f9fdf274121b82777e13bb115a104e4688600b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8018ffa647ae810a0781fd2bb73a3e5fe8a646eb","unresolved":false,"context_lines":[{"line_number":258,"context_line":"                    target\u003d{\u0027user_id\u0027: user_id,"},{"line_number":259,"context_line":"                            \u0027project_id\u0027: context.project_id})"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.34\u0027):"},{"line_number":262,"context_line":"            limit, marker \u003d common.get_limit_and_marker(req)"},{"line_number":263,"context_line":"        else:"},{"line_number":264,"context_line":"            limit \u003d marker \u003d None"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aa78d24_493fbfb3","line":261,"range":{"start_line":261,"start_character":8,"end_line":261,"end_character":69},"updated":"2016-07-07 15:58:15.000000000","message":"nit: this is arguably more clear, but you could just check if links is True.","commit_id":"db4e1117cbf793fda5f75e99013aef31a5fb8712"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"085fcfdf75679302abc2d863bbc3ebad38e1e987","unresolved":false,"context_lines":[{"line_number":258,"context_line":"                    target\u003d{\u0027user_id\u0027: user_id,"},{"line_number":259,"context_line":"                            \u0027project_id\u0027: context.project_id})"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        if api_version_request.is_supported(req, min_version\u003d\u00272.34\u0027):"},{"line_number":262,"context_line":"            limit, marker \u003d common.get_limit_and_marker(req)"},{"line_number":263,"context_line":"        else:"},{"line_number":264,"context_line":"            limit \u003d marker \u003d None"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aa78d24_267359b6","line":261,"range":{"start_line":261,"start_character":8,"end_line":261,"end_character":69},"in_reply_to":"1aa78d24_493fbfb3","updated":"2016-07-08 09:32:28.000000000","message":"yes, but as for me I like this )","commit_id":"db4e1117cbf793fda5f75e99013aef31a5fb8712"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8018ffa647ae810a0781fd2bb73a3e5fe8a646eb","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        keypairs_dict \u003d {\u0027keypairs\u0027: keypairs_list}"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        if links:"},{"line_number":279,"context_line":"            keypairs_links \u003d self._view_builder.get_links(req, key_pairs)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"            if keypairs_links:"},{"line_number":282,"context_line":"                keypairs_dict[\u0027keypairs_links\u0027] \u003d keypairs_links"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aa78d24_e9d2eb5a","line":279,"updated":"2016-07-07 15:58:15.000000000","message":"If a user_id was passed in on the request, then we filtered by the user_id in the DB API and we\u0027re going to get the initial page back for another user_id, but the link won\u0027t have that user_id. So if you make another request with the next link for the next page, it\u0027s not going to have the user_id and then we\u0027ll get context.user_id by default, which is a different user (the admin keypairs in this case since only admins can list keypairs for another user).","commit_id":"db4e1117cbf793fda5f75e99013aef31a5fb8712"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"085fcfdf75679302abc2d863bbc3ebad38e1e987","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        keypairs_dict \u003d {\u0027keypairs\u0027: keypairs_list}"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        if links:"},{"line_number":279,"context_line":"            keypairs_links \u003d self._view_builder.get_links(req, key_pairs)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"            if keypairs_links:"},{"line_number":282,"context_line":"                keypairs_dict[\u0027keypairs_links\u0027] \u003d keypairs_links"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aa78d24_46a945df","line":279,"in_reply_to":"1aa78d24_09d3f7d5","updated":"2016-07-08 09:32:28.000000000","message":"is the code correct now?\nI will add the test","commit_id":"db4e1117cbf793fda5f75e99013aef31a5fb8712"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6f90a4a58550284d8ea7ec19ac4fc7d18b8b6d5b","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        keypairs_dict \u003d {\u0027keypairs\u0027: keypairs_list}"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        if links:"},{"line_number":279,"context_line":"            keypairs_links \u003d self._view_builder.get_links(req, key_pairs)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"            if keypairs_links:"},{"line_number":282,"context_line":"                keypairs_dict[\u0027keypairs_links\u0027] \u003d keypairs_links"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aa78d24_09d3f7d5","line":279,"in_reply_to":"1aa78d24_e9d2eb5a","updated":"2016-07-07 16:04:23.000000000","message":"Alex pointed out that building the next link will copy the query parameters:\n\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/common.py#L423\n\nAnd user_id is a query parameter:\n\nDEBUG (connectionpool:395) \"GET /v2.1/os-keypairs?user_id\u003d7f245aee48a74b62a974a015567f2efb HTTP/1.1\" 200 16\n\nSo we\u0027re probably OK.\n\nI\u0027d probably feel better about this if we actually had a functional test for this scenario, i.e. fixed bug 1599904.","commit_id":"db4e1117cbf793fda5f75e99013aef31a5fb8712"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0a1692859c3cf03472577a3b35551878dbdd0d53","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    \"\"\"Keypair API controller for the OpenStack API.\"\"\""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    _view_builder_class \u003d keypairs_view.ViewBuilder"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __init__(self):"},{"line_number":45,"context_line":"        self.api \u003d compute_api.KeypairAPI()"}],"source_content_type":"text/x-python","patch_set":23,"id":"1aa78d24_2453e818","line":42,"updated":"2016-07-11 18:16:45.000000000","message":"I\u0027ve never realized this is needed by the parent class to init the viewbuilder for this instance of the controller, that\u0027s pretty terrible, but it\u0027s a pattern I guess. I wouldn\u0027t mind removing that later on though in some mass cleanup change.","commit_id":"28c51c9cf633129546da31ae28a974e2339eda38"}],"nova/api/openstack/rest_api_version_history.rst":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"187637117ef151d429d3bb9c91976dc677a4135f","unresolved":false,"context_lines":[{"line_number":331,"context_line":"  Added pagination support for keypairs."},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"  Optional parameters \u0027limit\u0027 and \u0027marker\u0027 were added to GET /os-keypairs"},{"line_number":334,"context_line":"  request, the generic request format is::"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    GET /os-keypairs?limit\u003d{limit}\u0026marker\u003d{kp_name}"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3aaa91ec_84750f65","line":334,"updated":"2016-06-27 05:33:29.000000000","message":"We should note the default sort key is changed, it changed to name, and as ASC order.","commit_id":"3c79bea37320a3771f20e5326df9ea0cef7504fb"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"29ea8fd59f34f8e5afc78566bd639843b5190ea1","unresolved":false,"context_lines":[{"line_number":331,"context_line":"  Added pagination support for keypairs."},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"  Optional parameters \u0027limit\u0027 and \u0027marker\u0027 were added to GET /os-keypairs"},{"line_number":334,"context_line":"  request, the generic request format is::"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    GET /os-keypairs?limit\u003d{limit}\u0026marker\u003d{kp_name}"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3aaa91ec_32f8c8c4","line":334,"in_reply_to":"3aaa91ec_39239dbe","updated":"2016-06-27 12:32:54.000000000","message":"Done","commit_id":"3c79bea37320a3771f20e5326df9ea0cef7504fb"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"95a1fa85e7c0053ac652fdbdbada0777dd8920e7","unresolved":false,"context_lines":[{"line_number":331,"context_line":"  Added pagination support for keypairs."},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"  Optional parameters \u0027limit\u0027 and \u0027marker\u0027 were added to GET /os-keypairs"},{"line_number":334,"context_line":"  request, the generic request format is::"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    GET /os-keypairs?limit\u003d{limit}\u0026marker\u003d{kp_name}"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3aaa91ec_39239dbe","line":334,"in_reply_to":"3aaa91ec_84750f65","updated":"2016-06-27 08:53:53.000000000","message":"ok, will write some more here","commit_id":"3c79bea37320a3771f20e5326df9ea0cef7504fb"}],"nova/compute/api.py":[{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"aab5281a21e618d625a5c077aae3f689aa63a7ca","unresolved":false,"context_lines":[{"line_number":3981,"context_line":"        objects.KeyPair.destroy_by_name(context, user_id, key_name)"},{"line_number":3982,"context_line":"        self._notify(context, \u0027delete.end\u0027, key_name)"},{"line_number":3983,"context_line":""},{"line_number":3984,"context_line":"    def get_key_pairs(self, context, user_id, limit\u003dNone, marker\u003dNone):"},{"line_number":3985,"context_line":"        \"\"\"List key pairs.\"\"\""},{"line_number":3986,"context_line":"        return objects.KeyPairList.get_by_user("},{"line_number":3987,"context_line":"            context, user_id, limit\u003dlimit, marker\u003dmarker)"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_b65d98eb","line":3984,"range":{"start_line":3984,"start_character":46,"end_line":3984,"end_character":69},"updated":"2016-07-04 14:27:52.000000000","message":"could we not doing them optional? or there are upgrade story impact in this case?","commit_id":"e5f9fdf274121b82777e13bb115a104e4688600b"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"3950f7c08788d611237ab581850b18a7670299f7","unresolved":false,"context_lines":[{"line_number":3981,"context_line":"        objects.KeyPair.destroy_by_name(context, user_id, key_name)"},{"line_number":3982,"context_line":"        self._notify(context, \u0027delete.end\u0027, key_name)"},{"line_number":3983,"context_line":""},{"line_number":3984,"context_line":"    def get_key_pairs(self, context, user_id, limit\u003dNone, marker\u003dNone):"},{"line_number":3985,"context_line":"        \"\"\"List key pairs.\"\"\""},{"line_number":3986,"context_line":"        return objects.KeyPairList.get_by_user("},{"line_number":3987,"context_line":"            context, user_id, limit\u003dlimit, marker\u003dmarker)"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_cd6ed2c8","line":3984,"range":{"start_line":3984,"start_character":46,"end_line":3984,"end_character":69},"in_reply_to":"1aa78d24_2afadc42","updated":"2016-07-04 15:06:58.000000000","message":"I thought it\u0027s required once we are removing parameter, but not introducing new ones.","commit_id":"e5f9fdf274121b82777e13bb115a104e4688600b"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"d0c38eda459618d0080091719f663be1b36c622c","unresolved":false,"context_lines":[{"line_number":3981,"context_line":"        objects.KeyPair.destroy_by_name(context, user_id, key_name)"},{"line_number":3982,"context_line":"        self._notify(context, \u0027delete.end\u0027, key_name)"},{"line_number":3983,"context_line":""},{"line_number":3984,"context_line":"    def get_key_pairs(self, context, user_id, limit\u003dNone, marker\u003dNone):"},{"line_number":3985,"context_line":"        \"\"\"List key pairs.\"\"\""},{"line_number":3986,"context_line":"        return objects.KeyPairList.get_by_user("},{"line_number":3987,"context_line":"            context, user_id, limit\u003dlimit, marker\u003dmarker)"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_2afadc42","line":3984,"range":{"start_line":3984,"start_character":46,"end_line":3984,"end_character":69},"in_reply_to":"1aa78d24_b65d98eb","updated":"2016-07-04 14:54:48.000000000","message":"my understanding is that making these params NOT optional should cause some upgrade issues (but I don\u0027t know for sure), saw this approach somewhere else","commit_id":"e5f9fdf274121b82777e13bb115a104e4688600b"}],"nova/db/api.py":[{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"aab5281a21e618d625a5c077aae3f689aa63a7ca","unresolved":false,"context_lines":[{"line_number":964,"context_line":"    return IMPL.key_pair_get(context, user_id, name)"},{"line_number":965,"context_line":""},{"line_number":966,"context_line":""},{"line_number":967,"context_line":"def key_pair_get_all_by_user(context, user_id, limit\u003dNone, marker\u003dNone):"},{"line_number":968,"context_line":"    \"\"\"Get all key_pairs by user.\"\"\""},{"line_number":969,"context_line":"    return IMPL.key_pair_get_all_by_user("},{"line_number":970,"context_line":"        context, user_id, limit\u003dlimit, marker\u003dmarker)"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_f66f2090","line":967,"range":{"start_line":967,"start_character":47,"end_line":967,"end_character":70},"updated":"2016-07-04 14:27:52.000000000","message":"same question","commit_id":"e5f9fdf274121b82777e13bb115a104e4688600b"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a467fbba22302868f68f1feab5027ac381fe935e","unresolved":false,"context_lines":[{"line_number":2915,"context_line":"        filter_by(user_id\u003duser_id)"},{"line_number":2916,"context_line":""},{"line_number":2917,"context_line":"    query \u003d sqlalchemyutils.paginate_query("},{"line_number":2918,"context_line":"        query, models.KeyPair, limit, [\u0027name\u0027, \u0027id\u0027], marker\u003dmarker_row)"},{"line_number":2919,"context_line":""},{"line_number":2920,"context_line":"    return query.all()"},{"line_number":2921,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_37d788ee","line":2918,"range":{"start_line":2918,"start_character":38,"end_line":2918,"end_character":52},"updated":"2016-06-23 20:05:53.000000000","message":"The spec said we\u0027d order by user_id:\n\nhttps://review.openstack.org/#/c/239663/6/specs/newton/approved/keypairs-pagination.rst@36\n\nBut if the marker is the name, then that probably doesn\u0027t make sense, especially since we already filter on user_id so that will be the same in the results.\n\nAlso, \u0027name\u0027 is unique within the user_id, \n\nhttps://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/models.py#L717\n\nso why would we also need to sort by \u0027id\u0027 here? Shouldn\u0027t sorting by \u0027name\u0027 be enough?","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"fe92a206acc248646394a884ea0cfadb311b70d4","unresolved":false,"context_lines":[{"line_number":2915,"context_line":"        filter_by(user_id\u003duser_id)"},{"line_number":2916,"context_line":""},{"line_number":2917,"context_line":"    query \u003d sqlalchemyutils.paginate_query("},{"line_number":2918,"context_line":"        query, models.KeyPair, limit, [\u0027name\u0027, \u0027id\u0027], marker\u003dmarker_row)"},{"line_number":2919,"context_line":""},{"line_number":2920,"context_line":"    return query.all()"},{"line_number":2921,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_4d81c0c2","line":2918,"range":{"start_line":2918,"start_character":38,"end_line":2918,"end_character":52},"in_reply_to":"3aaa91ec_37d788ee","updated":"2016-06-24 14:11:18.000000000","message":"So yes, keypairs are already filtered by user_id so there is no need to order by on them (as it was in spec). \n\nAs for \u0027id\u0027 I am not very sure, maybe just \u0027name\u0027 is ok, but \u0027id\u0027 is just the second extra field, I think we can leave it here, too (I found it in flavors\u0027 code https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L4978)","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"aab5281a21e618d625a5c077aae3f689aa63a7ca","unresolved":false,"context_lines":[{"line_number":2929,"context_line":""},{"line_number":2930,"context_line":"@require_context"},{"line_number":2931,"context_line":"@main_context_manager.reader"},{"line_number":2932,"context_line":"def key_pair_get_all_by_user(context, user_id, limit\u003dNone, marker\u003dNone):"},{"line_number":2933,"context_line":"    marker_row \u003d None"},{"line_number":2934,"context_line":"    if marker is not None:"},{"line_number":2935,"context_line":"        marker_row \u003d model_query(context, models.KeyPair, read_deleted\u003d\"no\").\\"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_366a4881","line":2932,"range":{"start_line":2932,"start_character":47,"end_line":2932,"end_character":70},"updated":"2016-07-04 14:27:52.000000000","message":"ditto","commit_id":"e5f9fdf274121b82777e13bb115a104e4688600b"}],"nova/objects/keypair.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"aa48c844e0a26fbd3e01b2ed62e691ac1cebf367","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        return _get_count_from_db(context, user_id)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    @base.remotable_classmethod"},{"line_number":209,"context_line":"    def get_by_user(cls, context, user_id, limit\u003dNone, marker\u003dNone):"},{"line_number":210,"context_line":"        try:"},{"line_number":211,"context_line":"            api_db_keypairs \u003d cls._get_from_db("},{"line_number":212,"context_line":"                context, user_id, limit\u003dlimit, marker\u003dmarker)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_5544b019","line":209,"updated":"2016-06-24 10:07:39.000000000","message":"here, that\u0027s where you change the signature, so you need a version bump.","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"fe92a206acc248646394a884ea0cfadb311b70d4","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        return _get_count_from_db(context, user_id)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    @base.remotable_classmethod"},{"line_number":209,"context_line":"    def get_by_user(cls, context, user_id, limit\u003dNone, marker\u003dNone):"},{"line_number":210,"context_line":"        try:"},{"line_number":211,"context_line":"            api_db_keypairs \u003d cls._get_from_db("},{"line_number":212,"context_line":"                context, user_id, limit\u003dlimit, marker\u003dmarker)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_cd75b0fa","line":209,"in_reply_to":"3aaa91ec_5544b019","updated":"2016-06-24 14:11:18.000000000","message":"Done","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"18b8f856f9eb3f5301d1002d82a89149a7b06fa2","unresolved":false,"context_lines":[{"line_number":191,"context_line":"    #              KeyPair \u003c\u003d version 1.1"},{"line_number":192,"context_line":"    # Version 1.1: KeyPair \u003c\u003d version 1.2"},{"line_number":193,"context_line":"    # Version 1.2: KeyPair \u003c\u003d version 1.3"},{"line_number":194,"context_line":"    # Version 1.3: KeyPair \u003c\u003d version 1.4"},{"line_number":195,"context_line":"    VERSION \u003d \u00271.3\u0027"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":10,"id":"3aaa91ec_e83dfa8f","line":194,"range":{"start_line":194,"start_character":19,"end_line":194,"end_character":41},"updated":"2016-06-24 14:17:58.000000000","message":"is it correct?","commit_id":"538246d66857054d6785771207a5afa5e28ef540"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"187637117ef151d429d3bb9c91976dc677a4135f","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            main_db_keypairs \u003d []"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        return base.obj_make_list(context, cls(context), objects.KeyPair,"},{"line_number":233,"context_line":"                                  api_db_keypairs + main_db_keypairs)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    @base.remotable_classmethod"},{"line_number":236,"context_line":"    def get_count_by_user(cls, context, user_id):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_04bd9fd7","line":233,"range":{"start_line":233,"start_character":34,"end_line":233,"end_character":68},"updated":"2016-06-27 05:33:29.000000000","message":"Look at this line, so there is chance, part of keypairs in the api db, and another part of keypairs in the main db. So you return 2*limit keypairs back to user.\n\nLooks like we can\u0027t implement keypair pagination before we migrate all the keypairs db record to api db.","commit_id":"3c79bea37320a3771f20e5326df9ea0cef7504fb"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"95a1fa85e7c0053ac652fdbdbada0777dd8920e7","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            main_db_keypairs \u003d []"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        return base.obj_make_list(context, cls(context), objects.KeyPair,"},{"line_number":233,"context_line":"                                  api_db_keypairs + main_db_keypairs)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    @base.remotable_classmethod"},{"line_number":236,"context_line":"    def get_count_by_user(cls, context, user_id):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_d9f09969","line":233,"range":{"start_line":233,"start_character":34,"end_line":233,"end_character":68},"in_reply_to":"3aaa91ec_04bd9fd7","updated":"2016-06-27 08:53:53.000000000","message":"No, we can\u0027t return 2*limit keypairs, because we subtract the number of api keypairs and then we find only the rest, please look at the line 222","commit_id":"3c79bea37320a3771f20e5326df9ea0cef7504fb"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"3c9f5ceee7a1047bec1da110972b5f6a57e85248","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            main_db_keypairs \u003d []"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        return base.obj_make_list(context, cls(context), objects.KeyPair,"},{"line_number":233,"context_line":"                                  api_db_keypairs + main_db_keypairs)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    @base.remotable_classmethod"},{"line_number":236,"context_line":"    def get_count_by_user(cls, context, user_id):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_8f1b5980","line":233,"range":{"start_line":233,"start_character":34,"end_line":233,"end_character":68},"in_reply_to":"3aaa91ec_11083527","updated":"2016-06-27 12:27:23.000000000","message":"I\u0027m not sure if we want to sort them in the result (e.g. to add \u0027sort_by_name\u0027 here), maybe this is ok?","commit_id":"3c79bea37320a3771f20e5326df9ea0cef7504fb"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"5a3aa8d6860a81b4dcb0252e4037903f761ffe36","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            main_db_keypairs \u003d []"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        return base.obj_make_list(context, cls(context), objects.KeyPair,"},{"line_number":233,"context_line":"                                  api_db_keypairs + main_db_keypairs)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    @base.remotable_classmethod"},{"line_number":236,"context_line":"    def get_count_by_user(cls, context, user_id):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_11083527","line":233,"range":{"start_line":233,"start_character":34,"end_line":233,"end_character":68},"in_reply_to":"3aaa91ec_44e5e006","updated":"2016-06-27 09:33:12.000000000","message":"but there sort_key is id","commit_id":"3c79bea37320a3771f20e5326df9ea0cef7504fb"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"d5ec23d8ae955ec203e872e94473e00cccf1c9a4","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            main_db_keypairs \u003d []"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        return base.obj_make_list(context, cls(context), objects.KeyPair,"},{"line_number":233,"context_line":"                                  api_db_keypairs + main_db_keypairs)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    @base.remotable_classmethod"},{"line_number":236,"context_line":"    def get_count_by_user(cls, context, user_id):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_1078fd8e","line":233,"range":{"start_line":233,"start_character":34,"end_line":233,"end_character":68},"in_reply_to":"3aaa91ec_6130bce9","updated":"2016-06-28 02:59:50.000000000","message":"We don\u0027t have document for this. I thought the API response should be stable. But yes, as you said, it only happened during the migration, that should be acceptable. So I\u0027m ok with this.","commit_id":"3c79bea37320a3771f20e5326df9ea0cef7504fb"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"99720d049a5778473b25fd85db38cbe63b91dad7","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            main_db_keypairs \u003d []"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        return base.obj_make_list(context, cls(context), objects.KeyPair,"},{"line_number":233,"context_line":"                                  api_db_keypairs + main_db_keypairs)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    @base.remotable_classmethod"},{"line_number":236,"context_line":"    def get_count_by_user(cls, context, user_id):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_44e5e006","line":233,"range":{"start_line":233,"start_character":34,"end_line":233,"end_character":68},"in_reply_to":"3aaa91ec_84b86812","updated":"2016-06-27 09:02:24.000000000","message":"seems like as for flavors https://github.com/openstack/nova/blob/master/nova/objects/flavor.py#L681","commit_id":"3c79bea37320a3771f20e5326df9ea0cef7504fb"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"3368790dee566f3aa83fa9470d8d6410183b9e16","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            main_db_keypairs \u003d []"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        return base.obj_make_list(context, cls(context), objects.KeyPair,"},{"line_number":233,"context_line":"                                  api_db_keypairs + main_db_keypairs)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    @base.remotable_classmethod"},{"line_number":236,"context_line":"    def get_count_by_user(cls, context, user_id):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_6130bce9","line":233,"range":{"start_line":233,"start_character":34,"end_line":233,"end_character":68},"in_reply_to":"3aaa91ec_8f1b5980","updated":"2016-06-27 13:46:26.000000000","message":"Do we have any documentation that suggests that this is a sorted result? If not then I think it\u0027s okay to have an unsorted result during the migration. I understand that users have perhaps come to expect that it\u0027s sorted because it always was, but that was implicit and was never guaranteed to be the case afaik.\n\nI don\u0027t believe it\u0027s worth the effort to keep the order consistent for the short migration period unless that\u0027s an explicit contract we\u0027ve made already.","commit_id":"3c79bea37320a3771f20e5326df9ea0cef7504fb"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"f21f076114255811ba2f665b6fdf3210f6f1dc13","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            main_db_keypairs \u003d []"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        return base.obj_make_list(context, cls(context), objects.KeyPair,"},{"line_number":233,"context_line":"                                  api_db_keypairs + main_db_keypairs)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    @base.remotable_classmethod"},{"line_number":236,"context_line":"    def get_count_by_user(cls, context, user_id):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_84b86812","line":233,"range":{"start_line":233,"start_character":34,"end_line":233,"end_character":68},"in_reply_to":"3aaa91ec_d9f09969","updated":"2016-06-27 08:59:21.000000000","message":"But they still have sort problem. api_db_keypairs are sorted by name, main_db_keyapirs are sorted by name. But api_db_keypairs + main_db_keypairs may not.","commit_id":"3c79bea37320a3771f20e5326df9ea0cef7504fb"}],"nova/tests/functional/api_sample_tests/test_keypairs.py":[{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"f033a2fc7d59093a478b3cdc54a14cde459974f9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"3aaa91ec_f1187a77","line":225,"updated":"2016-06-23 15:58:22.000000000","message":"I check nova code and understand that pagination is not tested by api_sample functional tests. But maybe it will be better to use some trivial e.g. limit\u003d1 here?","commit_id":"9dd40717f826db4c350f85cf4fd958b8e07e8653"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a467fbba22302868f68f1feab5027ac381fe935e","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        self.assertEqual(403, response.status_code)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"class KeyPairsV231SampleJsonTest(KeyPairsV210SampleJsonTest):"},{"line_number":216,"context_line":"    ADMIN_API \u003d True"},{"line_number":217,"context_line":"    microversion \u003d \u00272.31\u0027"},{"line_number":218,"context_line":"    scenarios \u003d [(\u0027v2_31\u0027, {\u0027api_major_version\u0027: \u0027v2.1\u0027})]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_c27ac476","line":215,"updated":"2016-06-23 20:05:53.000000000","message":"As noted in http://lists.openstack.org/pipermail/openstack-dev/2016-June/097657.html we don\u0027t want to subclass all of these redundant tests since they aren\u0027t going to test limit/marker anyway, see how it\u0027s being done in the hypervisors paging change. You should just subclass api_sample_base.ApiSampleTestBaseV21 and then test test_keypairs_list.\n\nThat still doesn\u0027t test limit/marker but at least it doesn\u0027t duplicate everything else that isn\u0027t affected by this microversion change.","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"fe92a206acc248646394a884ea0cfadb311b70d4","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        self.assertEqual(403, response.status_code)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"class KeyPairsV231SampleJsonTest(KeyPairsV210SampleJsonTest):"},{"line_number":216,"context_line":"    ADMIN_API \u003d True"},{"line_number":217,"context_line":"    microversion \u003d \u00272.31\u0027"},{"line_number":218,"context_line":"    scenarios \u003d [(\u0027v2_31\u0027, {\u0027api_major_version\u0027: \u0027v2.1\u0027})]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_6d011c38","line":215,"in_reply_to":"3aaa91ec_c27ac476","updated":"2016-06-24 14:11:18.000000000","message":"I looked at hypervisor change and made something similar","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"74a3b98c11148d0fdce683945a30d4b060feca82","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"3aaa91ec_d7da8be7","line":225,"updated":"2016-06-23 17:32:03.000000000","message":"no pagination checks here (but it is the same as for flavors or servers)","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"18b8f856f9eb3f5301d1002d82a89149a7b06fa2","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        super(KeyPairsV231SampleJsonTest, self).setUp()"},{"line_number":224,"context_line":"        self.api.microversion \u003d self.microversion"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    # TODO(pkholkin): this is only needed because we randomly choose the"},{"line_number":227,"context_line":"    # uuid each time."},{"line_number":228,"context_line":"    def generalize_subs(self, subs, vanilla_regexes):"},{"line_number":229,"context_line":"        subs[\u0027keypair_name\u0027] \u003d \u0027keypair-[0-9a-f-]+\u0027"},{"line_number":230,"context_line":"        return subs"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def test_keypairs_post(self):"},{"line_number":233,"context_line":"        return self._check_keypairs_post("},{"line_number":234,"context_line":"            keypair_type\u003dkeypair_obj.KEYPAIR_TYPE_SSH,"},{"line_number":235,"context_line":"            user_id\u003d\"admin\")"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"    def _check_keypairs_post(self, **kwargs):"},{"line_number":238,"context_line":"        \"\"\"Get api sample of key pairs post request.\"\"\""},{"line_number":239,"context_line":"        key_name \u003d \u0027keypair-\u0027 + str(uuid.uuid4())"},{"line_number":240,"context_line":"        subs \u003d dict(keypair_name\u003dkey_name, **kwargs)"},{"line_number":241,"context_line":"        response \u003d self._do_post(\u0027os-keypairs\u0027, \u0027keypairs-post-req\u0027, subs)"},{"line_number":242,"context_line":"        subs \u003d {\u0027keypair_name\u0027: key_name}"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        self._verify_response(\u0027keypairs-post-resp\u0027, subs, response,"},{"line_number":245,"context_line":"                              self.expected_post_status_code)"},{"line_number":246,"context_line":"        return key_name"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def test_keypairs_list(self):"},{"line_number":249,"context_line":"        # Get api sample of key pairs list request."}],"source_content_type":"text/x-python","patch_set":10,"id":"3aaa91ec_c860fed1","line":246,"range":{"start_line":226,"start_character":0,"end_line":246,"end_character":23},"updated":"2016-06-24 14:17:58.000000000","message":"I decided to copy it here, because post is needed in \u0027test_keypairs_list\u0027 for creating three keypairs, ok?","commit_id":"538246d66857054d6785771207a5afa5e28ef540"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fb6d52aa19ed34f1203c3c4e7695f1e4a1994204","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                              self.expected_post_status_code)"},{"line_number":246,"context_line":"        return key_name"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def test_keypairs_list(self):"},{"line_number":249,"context_line":"        # Get api sample of key pairs list request."},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # sort key_pairs by name before paging"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aa78d24_2c088127","line":248,"updated":"2016-07-07 16:08:29.000000000","message":"This doesn\u0027t test the case of listing keypairs for another user, which I opened bug 1599904 for that, it would be nice to see that tested in here also given my concerns about the next link having the user_id from the query parameter. I think you could do this pretty easily with the admin and non-admin API clients that are used in the functional tests.","commit_id":"db4e1117cbf793fda5f75e99013aef31a5fb8712"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"085fcfdf75679302abc2d863bbc3ebad38e1e987","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                              self.expected_post_status_code)"},{"line_number":246,"context_line":"        return key_name"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def test_keypairs_list(self):"},{"line_number":249,"context_line":"        # Get api sample of key pairs list request."},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # sort key_pairs by name before paging"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aa78d24_46802547","line":248,"in_reply_to":"1aa78d24_2c088127","updated":"2016-07-08 09:32:28.000000000","message":"ok, agree","commit_id":"db4e1117cbf793fda5f75e99013aef31a5fb8712"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"804adceba6c33fbcb77f842b2b12e5ea97404bfe","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                              self.expected_post_status_code)"},{"line_number":246,"context_line":"        return key_name"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def test_keypairs_list(self):"},{"line_number":249,"context_line":"        # Get api sample of key pairs list request."},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # sort key_pairs by name before paging"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aa78d24_44865066","line":248,"in_reply_to":"1aa78d24_46802547","updated":"2016-07-08 14:04:29.000000000","message":"not sure about added test, it should be checked","commit_id":"db4e1117cbf793fda5f75e99013aef31a5fb8712"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"a97d53b228555487a52232a6e566fc97802a1124","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        # Get api sample of key pairs list request."},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        # sort key_pairs by name before paging"},{"line_number":262,"context_line":"        keypairs \u003d sorted([self.test_keypairs_post(user\u003d\"user1\")"},{"line_number":263,"context_line":"                           for i in range(3)])"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"        response \u003d self._do_get(\u0027os-keypairs?user_id\u003duser1\u0026marker\u003d%s\u0026limit\u003d1\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"1aa78d24_9bc6d247","line":262,"updated":"2016-07-08 14:39:18.000000000","message":"This test would be better if there were some other keypairs in the database that did not belong to \u0027user1\u0027.","commit_id":"935bdfd85ed19e72c93aed034493297500674eab"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"ddb93b18b26246f333fecaf5d49a7c8bfcf5f232","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        # Get api sample of key pairs list request."},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        # sort key_pairs by name before paging"},{"line_number":262,"context_line":"        keypairs \u003d sorted([self.test_keypairs_post(user\u003d\"user1\")"},{"line_number":263,"context_line":"                           for i in range(3)])"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"        response \u003d self._do_get(\u0027os-keypairs?user_id\u003duser1\u0026marker\u003d%s\u0026limit\u003d1\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"1aa78d24_bbaf4e2a","line":262,"in_reply_to":"1aa78d24_9bc6d247","updated":"2016-07-08 14:44:01.000000000","message":"other kps in DB become redundant when we use limit and marker here, but without them we will have no \u0027links; in response, I don\u0027t find the best variant for this test. And the question if it really cover this bug https://bugs.launchpad.net/nova/+bug/1599904 ?","commit_id":"935bdfd85ed19e72c93aed034493297500674eab"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"aae415274a83bf2e3de8a2028e8f7a7c3a0df872","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        # Get api sample of key pairs list request."},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        # sort key_pairs by name before paging"},{"line_number":262,"context_line":"        keypairs \u003d sorted([self.test_keypairs_post(user\u003d\"user1\")"},{"line_number":263,"context_line":"                           for i in range(3)])"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"        response \u003d self._do_get(\u0027os-keypairs?user_id\u003duser1\u0026marker\u003d%s\u0026limit\u003d1\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"1aa78d24_2e2b1e35","line":262,"in_reply_to":"1aa78d24_bbaf4e2a","updated":"2016-07-08 14:52:40.000000000","message":"My concern with this test is that it checks limit and marker but doesn\u0027t fully check the user_id restriction because all keypairs already belong to user1. What I would like to see is keypairs in the db like:\n\n{user: user1, name\u003dfoo}\n{user: user1, name\u003dbar}\n{user: user2, name\u003dfoo}\n(user: user2, name\u003dbar}\n\nand then verify that you can use the user_id query parameter to pull the correct keypair(s).","commit_id":"935bdfd85ed19e72c93aed034493297500674eab"}],"nova/tests/functional/db/test_keypair.py":[{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"f033a2fc7d59093a478b3cdc54a14cde459974f9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"3aaa91ec_f15d1a16","line":228,"updated":"2016-06-23 15:58:22.000000000","message":"need test with unknown marker here and in other places","commit_id":"9dd40717f826db4c350f85cf4fd958b8e07e8653"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"220df3ff3149daae8bd0129dfbe3ed5190060a82","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        self.assertEqual(0, total)"},{"line_number":181,"context_line":"        self.assertEqual(0, done)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def test_get_by_user_limit_and_marker(self):"},{"line_number":184,"context_line":"        self._api_kp(name\u003d\u0027apikey1\u0027)"},{"line_number":185,"context_line":"        self._api_kp(name\u003d\u0027apikey2\u0027)"},{"line_number":186,"context_line":"        self._main_kp(name\u003d\u0027mainkey1\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1aa78d24_56b86fe5","line":183,"updated":"2016-07-05 20:43:19.000000000","message":"This would be much easier to understand if it was broken into a different test method for each case here. Or at least comment each case with what it\u0027s intending to test.","commit_id":"b8ce7b7944105c5a2232a723ffc5ec675c9aa80a"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"6a698eaea88c756d9a75d1bce81e8cb4633e4fa6","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        self.assertEqual(0, total)"},{"line_number":181,"context_line":"        self.assertEqual(0, done)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    def test_get_by_user_limit_and_marker(self):"},{"line_number":184,"context_line":"        self._api_kp(name\u003d\u0027apikey1\u0027)"},{"line_number":185,"context_line":"        self._api_kp(name\u003d\u0027apikey2\u0027)"},{"line_number":186,"context_line":"        self._main_kp(name\u003d\u0027mainkey1\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1aa78d24_1f8097f6","line":183,"in_reply_to":"1aa78d24_56b86fe5","updated":"2016-07-06 12:41:02.000000000","message":"Ok, I\u0027ve added comments to the test (and in one other file)","commit_id":"b8ce7b7944105c5a2232a723ffc5ec675c9aa80a"}],"nova/tests/unit/api/openstack/compute/test_keypairs.py":[{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"8c395374350d170353ddb51432dde0575c14702b","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                          req, body\u003dbody)"},{"line_number":566,"context_line":""},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"class KeypairsTestV228(KeypairsTestV210):"},{"line_number":569,"context_line":"    wsgi_api_version \u003d \u00272.28\u0027"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_63d2015e","line":568,"updated":"2016-06-23 16:09:40.000000000","message":"seems that these tests are not ok and we should update \u0027fake_get_all_method\u0027","commit_id":"9dd40717f826db4c350f85cf4fd958b8e07e8653"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"74a3b98c11148d0fdce683945a30d4b060feca82","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                name\u003dname, **keypair_data)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"def db_key_pair_get_all_by_user(self, user_id, limit, marker):"},{"line_number":52,"context_line":"    return [fake_keypair(\u0027FAKE\u0027)]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_174a53ac","line":51,"range":{"start_line":51,"start_character":4,"end_line":51,"end_character":31},"updated":"2016-06-23 17:32:03.000000000","message":"tests below seemed to be incorrect (too mocked), should we extend this function regarding to limit and marker?","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a467fbba22302868f68f1feab5027ac381fe935e","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                          req, body\u003dbody)"},{"line_number":566,"context_line":""},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"class KeypairsTestV228(KeypairsTestV210):"},{"line_number":569,"context_line":"    wsgi_api_version \u003d \u00272.28\u0027"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_62d7904b","line":568,"range":{"start_line":568,"start_character":23,"end_line":568,"end_character":39},"updated":"2016-06-23 20:05:53.000000000","message":"Can we not subclass this? It will run a bunch of duplicates tests for things that aren\u0027t affected by this microversion change. We really only care about the list method changing with this microversion.","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"fe92a206acc248646394a884ea0cfadb311b70d4","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                          req, body\u003dbody)"},{"line_number":566,"context_line":""},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"class KeypairsTestV228(KeypairsTestV210):"},{"line_number":569,"context_line":"    wsgi_api_version \u003d \u00272.28\u0027"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_6d247cc4","line":568,"range":{"start_line":568,"start_character":23,"end_line":568,"end_character":39},"in_reply_to":"3aaa91ec_62d7904b","updated":"2016-06-24 14:11:18.000000000","message":"yes, done","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a467fbba22302868f68f1feab5027ac381fe935e","unresolved":false,"context_lines":[{"line_number":566,"context_line":""},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"class KeypairsTestV228(KeypairsTestV210):"},{"line_number":569,"context_line":"    wsgi_api_version \u003d \u00272.28\u0027"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"    @staticmethod"},{"line_number":572,"context_line":"    def _fake_keypair(id):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_02c7ac96","line":569,"range":{"start_line":569,"start_character":24,"end_line":569,"end_character":28},"updated":"2016-06-23 20:05:53.000000000","message":"This is the wrong microversion - so how is any of this passing?","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"fe92a206acc248646394a884ea0cfadb311b70d4","unresolved":false,"context_lines":[{"line_number":566,"context_line":""},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"class KeypairsTestV228(KeypairsTestV210):"},{"line_number":569,"context_line":"    wsgi_api_version \u003d \u00272.28\u0027"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"    @staticmethod"},{"line_number":572,"context_line":"    def _fake_keypair(id):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_cd2db0a9","line":569,"range":{"start_line":569,"start_character":24,"end_line":569,"end_character":28},"in_reply_to":"3aaa91ec_02c7ac96","updated":"2016-06-24 14:11:18.000000000","message":"I knew that this code is incorrect) I even made a mistake in version :) \nI fixed it, please look","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"74a3b98c11148d0fdce683945a30d4b060feca82","unresolved":false,"context_lines":[{"line_number":655,"context_line":"            self.base_url + \u0027/os-keypairs?limit\u003d3\u0026marker\u003dunknown_kp\u0027,"},{"line_number":656,"context_line":"            version\u003dself.wsgi_api_version, use_admin_context\u003dTrue)"},{"line_number":657,"context_line":""},{"line_number":658,"context_line":"        self.assertRaises(webob.exc.HTTPInternalServerError,"},{"line_number":659,"context_line":"                          self.controller.index, req)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_17737316","line":658,"range":{"start_line":658,"start_character":36,"end_line":658,"end_character":59},"updated":"2016-06-23 17:32:03.000000000","message":"is it ok?","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"18b8f856f9eb3f5301d1002d82a89149a7b06fa2","unresolved":false,"context_lines":[{"line_number":600,"context_line":"        }"},{"line_number":601,"context_line":""},{"line_number":602,"context_line":"    @staticmethod"},{"line_number":603,"context_line":"    def _get_key_pairs(keypairs, limit, marker, api_db\u003dFalse):"},{"line_number":604,"context_line":"        if marker in [\u0027unknown_kp\u0027]:"},{"line_number":605,"context_line":"            raise exception.MarkerNotFound(marker)"},{"line_number":606,"context_line":"        marker_found \u003d True if marker is None else False"}],"source_content_type":"text/x-python","patch_set":10,"id":"3aaa91ec_68958a85","line":603,"range":{"start_line":603,"start_character":8,"end_line":603,"end_character":22},"updated":"2016-06-24 14:17:58.000000000","message":"all tests below were fixed because of these fake_get_functions","commit_id":"538246d66857054d6785771207a5afa5e28ef540"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"245e6b57998f9d888640222f76ec6370ed1954f2","unresolved":false,"context_lines":[{"line_number":601,"context_line":""},{"line_number":602,"context_line":"    @staticmethod"},{"line_number":603,"context_line":"    def _get_key_pairs(keypairs, limit, marker, api_db\u003dFalse):"},{"line_number":604,"context_line":"        if marker in [\u0027unknown_kp\u0027]:"},{"line_number":605,"context_line":"            raise exception.MarkerNotFound(marker)"},{"line_number":606,"context_line":"        marker_found \u003d True if marker is None else False"},{"line_number":607,"context_line":"        output \u003d []"},{"line_number":608,"context_line":"        for kp in keypairs:"},{"line_number":609,"context_line":"            if not marker_found and marker \u003d\u003d kp[\u0027name\u0027]:"},{"line_number":610,"context_line":"                marker_found \u003d True"},{"line_number":611,"context_line":"            elif marker_found:"},{"line_number":612,"context_line":"                if limit is None or len(output) \u003c int(limit):"},{"line_number":613,"context_line":"                    output.append(kp)"},{"line_number":614,"context_line":"        # api_db call raises exception if marker wasn\u0027t found"},{"line_number":615,"context_line":"        if api_db and marker is not None and not marker_found:"},{"line_number":616,"context_line":"            raise exception.MarkerNotFound(marker\u003dmarker)"},{"line_number":617,"context_line":"        return output"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    def _db_key_pair_get_all_by_user(self, context, user_id, limit, marker):"},{"line_number":620,"context_line":"        main_keypairs \u003d [self._fake_keypair(i) for i in range(4, 7)]"}],"source_content_type":"text/x-python","patch_set":23,"id":"1aa78d24_af117154","line":617,"range":{"start_line":604,"start_character":8,"end_line":617,"end_character":21},"updated":"2016-07-11 18:22:25.000000000","message":"This is overly complicated. I think all we really want to test is when we get a MarkerNotFound and when we don\u0027t, which we can do by simply mocking the compute_api that the REST API is calling. While it\u0027s a nice test, we already have coverage for these parts elsewhere and testing this level here makes it more brittle.","commit_id":"28c51c9cf633129546da31ae28a974e2339eda38"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"245e6b57998f9d888640222f76ec6370ed1954f2","unresolved":false,"context_lines":[{"line_number":616,"context_line":"            raise exception.MarkerNotFound(marker\u003dmarker)"},{"line_number":617,"context_line":"        return output"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"    def _db_key_pair_get_all_by_user(self, context, user_id, limit, marker):"},{"line_number":620,"context_line":"        main_keypairs \u003d [self._fake_keypair(i) for i in range(4, 7)]"},{"line_number":621,"context_line":"        return self._get_key_pairs(main_keypairs, limit, marker)"},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"    def _keypairlist_get_from_db(self, context, user_id, limit, marker):"},{"line_number":624,"context_line":"        api_keypairs \u003d [self._fake_keypair(i) for i in range(1, 4)]"},{"line_number":625,"context_line":"        return self._get_key_pairs(api_keypairs, limit, marker, api_db\u003dTrue)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    @mock.patch(\u0027nova.db.key_pair_get_all_by_user\u0027)"},{"line_number":628,"context_line":"    @mock.patch(\u0027nova.objects.KeyPairList._get_from_db\u0027)"}],"source_content_type":"text/x-python","patch_set":23,"id":"1aa78d24_4f272db6","line":625,"range":{"start_line":619,"start_character":4,"end_line":625,"end_character":76},"updated":"2016-07-11 18:22:25.000000000","message":"Similar issue, the REST API shouldn\u0027t need to care about API vs main/cell DB paging, that\u0027s handled in the dependent change.","commit_id":"28c51c9cf633129546da31ae28a974e2339eda38"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0a1692859c3cf03472577a3b35551878dbdd0d53","unresolved":false,"context_lines":[{"line_number":624,"context_line":"        api_keypairs \u003d [self._fake_keypair(i) for i in range(1, 4)]"},{"line_number":625,"context_line":"        return self._get_key_pairs(api_keypairs, limit, marker, api_db\u003dTrue)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    @mock.patch(\u0027nova.db.key_pair_get_all_by_user\u0027)"},{"line_number":628,"context_line":"    @mock.patch(\u0027nova.objects.KeyPairList._get_from_db\u0027)"},{"line_number":629,"context_line":"    def test_keypair_list(self, mock_api_get, mock_kp_get):"},{"line_number":630,"context_line":"        mock_api_get.side_effect \u003d self._keypairlist_get_from_db"},{"line_number":631,"context_line":"        mock_kp_get.side_effect \u003d self._db_key_pair_get_all_by_user"}],"source_content_type":"text/x-python","patch_set":23,"id":"1aa78d24_c47824c7","line":628,"range":{"start_line":627,"start_character":4,"end_line":628,"end_character":56},"updated":"2016-07-11 18:16:45.000000000","message":"This is mocking a bit deep for my tastes, we\u0027re already testing the api/db paging split in the tests for the object change in the dependent patch, I don\u0027t think we really need to be testing this level of code in the compute API tests. The compute API tests should really just be testing the top-level interface in the compute API, not down into the object code.","commit_id":"28c51c9cf633129546da31ae28a974e2339eda38"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36f7aa260bc50042309a595006eb379d5fce6205","unresolved":false,"context_lines":[{"line_number":624,"context_line":"        api_keypairs \u003d [self._fake_keypair(i) for i in range(1, 4)]"},{"line_number":625,"context_line":"        return self._get_key_pairs(api_keypairs, limit, marker, api_db\u003dTrue)"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":"    @mock.patch(\u0027nova.db.key_pair_get_all_by_user\u0027)"},{"line_number":628,"context_line":"    @mock.patch(\u0027nova.objects.KeyPairList._get_from_db\u0027)"},{"line_number":629,"context_line":"    def test_keypair_list(self, mock_api_get, mock_kp_get):"},{"line_number":630,"context_line":"        mock_api_get.side_effect \u003d self._keypairlist_get_from_db"},{"line_number":631,"context_line":"        mock_kp_get.side_effect \u003d self._db_key_pair_get_all_by_user"}],"source_content_type":"text/x-python","patch_set":23,"id":"1aa78d24_6414d04c","line":628,"range":{"start_line":627,"start_character":4,"end_line":628,"end_character":56},"in_reply_to":"1aa78d24_c47824c7","updated":"2016-07-11 18:19:36.000000000","message":"Furthermore, when we remove the the main DB paging from the KeyPairList object in Ocata then these tests have to be tweaked again.","commit_id":"28c51c9cf633129546da31ae28a974e2339eda38"}],"nova/tests/unit/objects/test_objects.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a467fbba22302868f68f1feab5027ac381fe935e","unresolved":false,"context_lines":[{"line_number":1153,"context_line":"    \u0027LibvirtLiveMigrateBDMInfo\u0027: \u00271.0-252aabb723ca79d5469fa56f64b57811\u0027,"},{"line_number":1154,"context_line":"    \u0027LibvirtLiveMigrateData\u0027: \u00271.2-c489f63478d13eace828128ea3dfa57c\u0027,"},{"line_number":1155,"context_line":"    \u0027KeyPair\u0027: \u00271.4-1244e8d1b103cc69d038ed78ab3a8cc6\u0027,"},{"line_number":1156,"context_line":"    \u0027KeyPairList\u0027: \u00271.2-94aad3ac5c938eef4b5e83da0212f506\u0027,"},{"line_number":1157,"context_line":"    \u0027Migration\u0027: \u00271.4-17979b9f2ae7f28d97043a220b2a8350\u0027,"},{"line_number":1158,"context_line":"    \u0027MigrationContext\u0027: \u00271.1-9fb17b0b521370957a884636499df52d\u0027,"},{"line_number":1159,"context_line":"    \u0027MigrationList\u0027: \u00271.3-55595bfc1a299a5962614d0821a3567e\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_a25b38f5","line":1156,"updated":"2016-06-23 20:05:53.000000000","message":"You changed the signature on a remotable method so we\u0027re going to need a version bump in the object (or a new get_by_pagination method like the hypervisors paging change).","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"fe92a206acc248646394a884ea0cfadb311b70d4","unresolved":false,"context_lines":[{"line_number":1153,"context_line":"    \u0027LibvirtLiveMigrateBDMInfo\u0027: \u00271.0-252aabb723ca79d5469fa56f64b57811\u0027,"},{"line_number":1154,"context_line":"    \u0027LibvirtLiveMigrateData\u0027: \u00271.2-c489f63478d13eace828128ea3dfa57c\u0027,"},{"line_number":1155,"context_line":"    \u0027KeyPair\u0027: \u00271.4-1244e8d1b103cc69d038ed78ab3a8cc6\u0027,"},{"line_number":1156,"context_line":"    \u0027KeyPairList\u0027: \u00271.2-94aad3ac5c938eef4b5e83da0212f506\u0027,"},{"line_number":1157,"context_line":"    \u0027Migration\u0027: \u00271.4-17979b9f2ae7f28d97043a220b2a8350\u0027,"},{"line_number":1158,"context_line":"    \u0027MigrationContext\u0027: \u00271.1-9fb17b0b521370957a884636499df52d\u0027,"},{"line_number":1159,"context_line":"    \u0027MigrationList\u0027: \u00271.3-55595bfc1a299a5962614d0821a3567e\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3aaa91ec_8d0e0839","line":1156,"in_reply_to":"3aaa91ec_a25b38f5","updated":"2016-06-24 14:11:18.000000000","message":"Done","commit_id":"37a3994ae5add81efaa088be570f68dc20c8b5a1"}],"releasenotes/notes/bp-keypairs-pagination-634c46aaa1058161.yaml":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"541079cee583d33e6cffea8385aa94961f801e6f","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Added microversion v2.34 that adds pagination support for keypairs with"},{"line_number":4,"context_line":"    the help of new optional parameters \u0027limit\u0027 and \u0027marker\u0027 which were added"},{"line_number":5,"context_line":"    to GET /os-keypairs request."}],"source_content_type":"text/x-yaml","patch_set":23,"id":"1aa78d24_db6643ba","line":5,"updated":"2016-07-11 16:59:02.000000000","message":"nit: maybe we should comment on the \u0027next\u0027 ref now existing for helping to use the marker ?","commit_id":"28c51c9cf633129546da31ae28a974e2339eda38"}]}
