)]}'
{"nova/api/openstack/compute/keypairs.py":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"59cf2429e8402d6b97e09aba6bc3f8a3b3b65244","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                keypair[\u0027private_key\u0027] \u003d private_key"},{"line_number":122,"context_line":"                return_priv_key \u003d True"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"            return self._view_builder.create(keypair,"},{"line_number":125,"context_line":"                                             private_key\u003dreturn_priv_key,"},{"line_number":126,"context_line":"                                             key_type\u003dkey_type)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        except exception.KeypairLimitExceeded:"},{"line_number":129,"context_line":"            msg \u003d _(\"Quota exceeded, too many key pairs.\")"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_cbc5950b","line":126,"range":{"start_line":124,"start_character":0,"end_line":126,"end_character":63},"updated":"2018-07-10 00:38:36.000000000","message":"nit: We can move this lines to outside of this try-except block because the create() should/does not raise the following exceptions.","commit_id":"3d5dc6b8beff1225ae8bf87be7c1e7e633f2bc84"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"05d06c6897e6cee102c5bba3df594cba631c15da","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                keypair[\u0027private_key\u0027] \u003d private_key"},{"line_number":122,"context_line":"                return_priv_key \u003d True"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"            return self._view_builder.create(keypair,"},{"line_number":125,"context_line":"                                             private_key\u003dreturn_priv_key,"},{"line_number":126,"context_line":"                                             key_type\u003dkey_type)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        except exception.KeypairLimitExceeded:"},{"line_number":129,"context_line":"            msg \u003d _(\"Quota exceeded, too many key pairs.\")"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_0d26c068","line":126,"range":{"start_line":124,"start_character":0,"end_line":126,"end_character":63},"in_reply_to":"5f7c97a3_cbc5950b","updated":"2018-07-26 10:18:54.000000000","message":"Done","commit_id":"3d5dc6b8beff1225ae8bf87be7c1e7e633f2bc84"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"59cf2429e8402d6b97e09aba6bc3f8a3b3b65244","unresolved":false,"context_lines":[{"line_number":194,"context_line":"    def show(self, req, id):"},{"line_number":195,"context_line":"        return self._show(req, id)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def _show(self, req, id, user_id\u003dNone, key_type\u003dFalse):"},{"line_number":198,"context_line":"        \"\"\"Return data for the given key name.\"\"\""},{"line_number":199,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":200,"context_line":"        user_id \u003d user_id or context.user_id"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_2bf3e96e","line":197,"range":{"start_line":197,"start_character":43,"end_line":197,"end_character":57},"updated":"2018-07-10 00:38:36.000000000","message":"nit: better to put this key_type argument before user_id for fitting to the line 183 which is only used both arguments.","commit_id":"3d5dc6b8beff1225ae8bf87be7c1e7e633f2bc84"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"05d06c6897e6cee102c5bba3df594cba631c15da","unresolved":false,"context_lines":[{"line_number":194,"context_line":"    def show(self, req, id):"},{"line_number":195,"context_line":"        return self._show(req, id)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def _show(self, req, id, user_id\u003dNone, key_type\u003dFalse):"},{"line_number":198,"context_line":"        \"\"\"Return data for the given key name.\"\"\""},{"line_number":199,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":200,"context_line":"        user_id \u003d user_id or context.user_id"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_0db480f0","line":197,"range":{"start_line":197,"start_character":43,"end_line":197,"end_character":57},"in_reply_to":"5f7c97a3_2bf3e96e","updated":"2018-07-26 10:18:54.000000000","message":"Done","commit_id":"3d5dc6b8beff1225ae8bf87be7c1e7e633f2bc84"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"59cf2429e8402d6b97e09aba6bc3f8a3b3b65244","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                            \u0027project_id\u0027: context.project_id})"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        try:"},{"line_number":206,"context_line":"            # The return object needs to be a dict in order to pop the \u0027type\u0027"},{"line_number":207,"context_line":"            # field, if the api_version \u003c 2.2."},{"line_number":208,"context_line":"            keypair \u003d self.api.get_key_pair(context, user_id, id)"},{"line_number":209,"context_line":"        except exception.KeypairNotFound as exc:"},{"line_number":210,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexc.format_message())"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_e629a888","line":207,"range":{"start_line":206,"start_character":0,"end_line":207,"end_character":46},"updated":"2018-07-10 00:38:36.000000000","message":"This comment should be removed because that is handled in a new viewer.","commit_id":"3d5dc6b8beff1225ae8bf87be7c1e7e633f2bc84"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"05d06c6897e6cee102c5bba3df594cba631c15da","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                            \u0027project_id\u0027: context.project_id})"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        try:"},{"line_number":206,"context_line":"            # The return object needs to be a dict in order to pop the \u0027type\u0027"},{"line_number":207,"context_line":"            # field, if the api_version \u003c 2.2."},{"line_number":208,"context_line":"            keypair \u003d self.api.get_key_pair(context, user_id, id)"},{"line_number":209,"context_line":"        except exception.KeypairNotFound as exc:"},{"line_number":210,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexc.format_message())"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_cdc5285f","line":207,"range":{"start_line":206,"start_character":0,"end_line":207,"end_character":46},"in_reply_to":"5f7c97a3_e629a888","updated":"2018-07-26 10:18:54.000000000","message":"Done","commit_id":"3d5dc6b8beff1225ae8bf87be7c1e7e633f2bc84"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"59cf2429e8402d6b97e09aba6bc3f8a3b3b65244","unresolved":false,"context_lines":[{"line_number":237,"context_line":"    def index(self, req):"},{"line_number":238,"context_line":"        return self._index(req)"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def _index(self, req, user_id\u003dNone, key_type\u003dFalse, links\u003dFalse):"},{"line_number":241,"context_line":"        \"\"\"List of keypairs for a user.\"\"\""},{"line_number":242,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":243,"context_line":"        user_id \u003d user_id or context.user_id"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_cb9355ff","line":240,"range":{"start_line":240,"start_character":40,"end_line":240,"end_character":54},"updated":"2018-07-10 00:38:36.000000000","message":"ditto","commit_id":"3d5dc6b8beff1225ae8bf87be7c1e7e633f2bc84"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"05d06c6897e6cee102c5bba3df594cba631c15da","unresolved":false,"context_lines":[{"line_number":237,"context_line":"    def index(self, req):"},{"line_number":238,"context_line":"        return self._index(req)"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def _index(self, req, user_id\u003dNone, key_type\u003dFalse, links\u003dFalse):"},{"line_number":241,"context_line":"        \"\"\"List of keypairs for a user.\"\"\""},{"line_number":242,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":243,"context_line":"        user_id \u003d user_id or context.user_id"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_4d9fd863","line":240,"range":{"start_line":240,"start_character":40,"end_line":240,"end_character":54},"in_reply_to":"5f7c97a3_cb9355ff","updated":"2018-07-26 10:18:54.000000000","message":"Done","commit_id":"3d5dc6b8beff1225ae8bf87be7c1e7e633f2bc84"}],"nova/api/openstack/compute/views/keypairs.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"b83851763f3a6b8687ed4abe2b448683179cf6fb","unresolved":false,"context_lines":[{"line_number":24,"context_line":"        return self._get_collection_links(request, keypairs,"},{"line_number":25,"context_line":"                                          self._collection_name, \u0027name\u0027)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def _filter_keypair(self, keypair, **attrs):"},{"line_number":28,"context_line":"        # TODO(claudiub): After v2 and v2.1 is no longer supported,"},{"line_number":29,"context_line":"        # keypair.type can be added to the clean dict below"},{"line_number":30,"context_line":"        clean \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_561a9a6f","line":27,"updated":"2016-08-08 10:15:36.000000000","message":"nit: as `self` argument is not used in the code below, you could probably apply @staticmethod decorator to this method to denote the fact it does not use or change the instance state in any way","commit_id":"6f237ebe7a9ac875053134dc22c5c56fd7fbc8d2"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"b5a15634859fb9b56e4de043b122c4eb58c6442c","unresolved":false,"context_lines":[{"line_number":24,"context_line":"        return self._get_collection_links(request, keypairs,"},{"line_number":25,"context_line":"                                          self._collection_name, \u0027name\u0027)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def _filter_keypair(self, keypair, **attrs):"},{"line_number":28,"context_line":"        # TODO(claudiub): After v2 and v2.1 is no longer supported,"},{"line_number":29,"context_line":"        # keypair.type can be added to the clean dict below"},{"line_number":30,"context_line":"        clean \u003d {"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_7ce7bd40","line":27,"in_reply_to":"9ad45d7e_561a9a6f","updated":"2016-08-08 11:01:32.000000000","message":"yes we can, I also thought about it) thanks!","commit_id":"6f237ebe7a9ac875053134dc22c5c56fd7fbc8d2"},{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"864f4bece770e4acdae24410a2b0637a3d85bad1","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            params.append(\u0027private_key\u0027)"},{"line_number":49,"context_line":"        # TODO(takashin): After v2 and v2.1 is no longer supported,"},{"line_number":50,"context_line":"        # \u0027type\u0027 can always be included in the response."},{"line_number":51,"context_line":"        if type:"},{"line_number":52,"context_line":"            params.append(\u0027type\u0027)"},{"line_number":53,"context_line":"        params.extend(self._create_params)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"5f7c97a3_7d80d4f5","line":51,"range":{"start_line":51,"start_character":11,"end_line":51,"end_character":15},"updated":"2018-05-15 09:47:27.000000000","message":"type is a reserved class, do not override this","commit_id":"ffaf9b8c289cdb8dc0bc1f9f199428f027c5f535"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"3cf350a28dfc3d8c649a9c668b3252196e91702f","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            params.append(\u0027private_key\u0027)"},{"line_number":49,"context_line":"        # TODO(takashin): After v2 and v2.1 is no longer supported,"},{"line_number":50,"context_line":"        # \u0027type\u0027 can always be included in the response."},{"line_number":51,"context_line":"        if type:"},{"line_number":52,"context_line":"            params.append(\u0027type\u0027)"},{"line_number":53,"context_line":"        params.extend(self._create_params)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"5f7c97a3_6f030dc0","line":51,"range":{"start_line":51,"start_character":11,"end_line":51,"end_character":15},"in_reply_to":"5f7c97a3_7d80d4f5","updated":"2018-05-17 00:37:09.000000000","message":"Done","commit_id":"ffaf9b8c289cdb8dc0bc1f9f199428f027c5f535"},{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"d1812603f36e894265f1e5133b09e4a57fa8128a","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        keypairs_list \u003d ["},{"line_number":59,"context_line":"            {\u0027keypair\u0027: self._build_keypair("},{"line_number":60,"context_line":"                key_pair,"},{"line_number":61,"context_line":"                self._index_params_v2_2 if key_type else self._index_params)}"},{"line_number":62,"context_line":"                for key_pair in key_pairs]"},{"line_number":63,"context_line":"        keypairs_dict \u003d {\u0027keypairs\u0027: keypairs_list}"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        if links:"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_8fc1c9e7","line":62,"range":{"start_line":61,"start_character":15,"end_line":62,"end_character":41},"updated":"2018-05-17 01:12:24.000000000","message":"do not over-use inline style here","commit_id":"a863a03009ccd474dbdd77c33e3cf1f07f935e72"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"59cf2429e8402d6b97e09aba6bc3f8a3b3b65244","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    # TODO(takashin): After v2 and v2.1 is no longer supported,"},{"line_number":23,"context_line":"    # \u0027type\u0027 can always be included in the response."},{"line_number":24,"context_line":"    _index_params \u003d (\u0027name\u0027, \u0027public_key\u0027, \u0027fingerprint\u0027)"},{"line_number":25,"context_line":"    _index_params_v2_2 \u003d _index_params + (\u0027type\u0027,)"},{"line_number":26,"context_line":"    _create_params \u003d _index_params + (\u0027user_id\u0027,)"},{"line_number":27,"context_line":"    _show_params \u003d _create_params + (\u0027created_at\u0027, \u0027deleted\u0027, \u0027deleted_at\u0027,"},{"line_number":28,"context_line":"                                     \u0027id\u0027, \u0027updated_at\u0027)"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_eb641123","line":25,"updated":"2018-07-10 00:38:36.000000000","message":"nit: better to put this line 25 to line 29 because it is easy to understand \u0027type\u0027 has been added on v2.2 and that matches to the comment of line 22.","commit_id":"3d5dc6b8beff1225ae8bf87be7c1e7e633f2bc84"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"05d06c6897e6cee102c5bba3df594cba631c15da","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    # TODO(takashin): After v2 and v2.1 is no longer supported,"},{"line_number":23,"context_line":"    # \u0027type\u0027 can always be included in the response."},{"line_number":24,"context_line":"    _index_params \u003d (\u0027name\u0027, \u0027public_key\u0027, \u0027fingerprint\u0027)"},{"line_number":25,"context_line":"    _index_params_v2_2 \u003d _index_params + (\u0027type\u0027,)"},{"line_number":26,"context_line":"    _create_params \u003d _index_params + (\u0027user_id\u0027,)"},{"line_number":27,"context_line":"    _show_params \u003d _create_params + (\u0027created_at\u0027, \u0027deleted\u0027, \u0027deleted_at\u0027,"},{"line_number":28,"context_line":"                                     \u0027id\u0027, \u0027updated_at\u0027)"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_cd40c807","line":25,"in_reply_to":"5f7c97a3_eb641123","updated":"2018-07-26 10:18:54.000000000","message":"Done","commit_id":"3d5dc6b8beff1225ae8bf87be7c1e7e633f2bc84"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6f45d0a85716fdbe2e23375d2c74e71f49584d4","unresolved":false,"context_lines":[{"line_number":19,"context_line":"class ViewBuilder(common.ViewBuilder):"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    _collection_name \u003d \"keypairs\""},{"line_number":22,"context_line":"    # TODO(takashin): After v2 and v2.1 is no longer supported,"},{"line_number":23,"context_line":"    # \u0027type\u0027 can always be included in the response."},{"line_number":24,"context_line":"    _index_params \u003d (\u0027name\u0027, \u0027public_key\u0027, \u0027fingerprint\u0027)"},{"line_number":25,"context_line":"    _create_params \u003d _index_params + (\u0027user_id\u0027,)"}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_d56146d5","line":22,"updated":"2019-10-22 18:02:40.000000000","message":"I know this is copied from the existing code (with a new name for the note) but this isn\u0027t very useful to me since I don\u0027t see us dropping 2.1 compat support ever.","commit_id":"e5afc20afec5d6b2f98a37c23d6362354f1a467f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c6f45d0a85716fdbe2e23375d2c74e71f49584d4","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        params \u003d []"},{"line_number":47,"context_line":"        if private_key:"},{"line_number":48,"context_line":"            params.append(\u0027private_key\u0027)"},{"line_number":49,"context_line":"        # TODO(takashin): After v2 and v2.1 is no longer supported,"},{"line_number":50,"context_line":"        # \u0027type\u0027 can always be included in the response."},{"line_number":51,"context_line":"        if key_type:"},{"line_number":52,"context_line":"            params.append(\u0027type\u0027)"}],"source_content_type":"text/x-python","patch_set":37,"id":"3fa7e38b_b59ccabf","line":49,"updated":"2019-10-22 18:02:40.000000000","message":"same","commit_id":"e5afc20afec5d6b2f98a37c23d6362354f1a467f"}]}
