)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"cab6929a035c8a1fb34838ba4dd2be84fee3ce75","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Show encrypted info in cinder type-list"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"A non-admin user have no authority to run \u0027encryption-type-show\u0027 by default."},{"line_number":10,"context_line":"As a result, he can\u0027t know whether a volume-type is encrypted or not."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"The patch is to add encrypted field in type-list to show whether"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"da20952f_d1e45aad","line":9,"updated":"2015-09-10 15:20:44.000000000","message":"have -\u003e has","commit_id":"19dc7e3473f58c47223afdae7505195727099eab"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"aca93be218a123555a1e73c73355565c0d168872","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Show encrypted info in cinder type-list"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"A non-admin user have no authority to run \u0027encryption-type-show\u0027 by default."},{"line_number":10,"context_line":"As a result, he can\u0027t know whether a volume-type is encrypted or not."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"The patch is to add encrypted field in type-list to show whether"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"da20952f_abf8384b","line":9,"in_reply_to":"da20952f_d1e45aad","updated":"2015-09-11 05:15:42.000000000","message":"Done","commit_id":"19dc7e3473f58c47223afdae7505195727099eab"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"cab6929a035c8a1fb34838ba4dd2be84fee3ce75","unresolved":false,"context_lines":[{"line_number":9,"context_line":"A non-admin user have no authority to run \u0027encryption-type-show\u0027 by default."},{"line_number":10,"context_line":"As a result, he can\u0027t know whether a volume-type is encrypted or not."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"The patch is to add encrypted field in type-list to show whether"},{"line_number":13,"context_line":"a volume type is encrypted."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"APIImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"da20952f_1102d23e","line":12,"updated":"2015-09-10 15:20:44.000000000","message":"Suggest: \"...add an encrypted field...\"","commit_id":"19dc7e3473f58c47223afdae7505195727099eab"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"aca93be218a123555a1e73c73355565c0d168872","unresolved":false,"context_lines":[{"line_number":9,"context_line":"A non-admin user have no authority to run \u0027encryption-type-show\u0027 by default."},{"line_number":10,"context_line":"As a result, he can\u0027t know whether a volume-type is encrypted or not."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"The patch is to add encrypted field in type-list to show whether"},{"line_number":13,"context_line":"a volume type is encrypted."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"APIImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"da20952f_8b9a1413","line":12,"in_reply_to":"da20952f_1102d23e","updated":"2015-09-11 05:15:42.000000000","message":"Done","commit_id":"19dc7e3473f58c47223afdae7505195727099eab"}],"cinder/tests/unit/objects/test_volume_type.py":[{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"afc4f1cce2ca112c630a9f0c9e5923f6ec7a8d8f","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @staticmethod"},{"line_number":33,"context_line":"    def _compare(test, db, obj, except_fields\u003dNone):"},{"line_number":34,"context_line":"        for field, value in db.items():"},{"line_number":35,"context_line":"            if except_fields and field not in except_fields:"},{"line_number":36,"context_line":"                test.assertEqual(db[field], obj[field])"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a29b11f_84ba67bf","line":34,"updated":"2015-10-26 13:24:07.000000000","message":"Do we need to add the \"except_fields\" for encryption?  I get that encryption won\u0027t be in the db fields returned, but if we\u0027re just iterating over the db fields, won\u0027t we already be skipping the encryption field?","commit_id":"a4a7aa6c089cca8c11b803e4876033b5faec6ac9"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e5f9320d2073b3e7e709686ef6dc96381dfac561","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @staticmethod"},{"line_number":33,"context_line":"    def _compare(test, db, obj, except_fields\u003dNone):"},{"line_number":34,"context_line":"        for field, value in db.items():"},{"line_number":35,"context_line":"            if except_fields and field not in except_fields:"},{"line_number":36,"context_line":"                test.assertEqual(db[field], obj[field])"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba8a016a_d4e8da18","line":34,"in_reply_to":"3a29b11f_84ba67bf","updated":"2015-11-23 14:21:33.000000000","message":"-1: I have to agree with Ryan, and besides the if condition is wrong, since it will not compare anything if except_fields is not provided or if it is an empty iterator like [].","commit_id":"a4a7aa6c089cca8c11b803e4876033b5faec6ac9"}],"cinder/tests/unit/test_volume_types.py":[{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"7d479ffc0282d680e656cdf508581245d1a651be","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        self.vol_type1_description \u003d self.vol_type1_name + \u0027_desc\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def _test_build_encrypted_field(self, vol_type):"},{"line_number":48,"context_line":"        self.assertTrue(\u0027encrypted\u0027 in vol_type.keys())"},{"line_number":49,"context_line":"        expect_encrypted \u003d volume_types.is_encrypted(self.ctxt,"},{"line_number":50,"context_line":"                                                     vol_type[\u0027id\u0027])"},{"line_number":51,"context_line":"        self.assertEqual(expect_encrypted, vol_type[\u0027encrypted\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_51004401","line":48,"updated":"2015-08-11 13:57:54.000000000","message":"L48 is not necessary because you are accessing the key below in L51.  There would be a KeyError if the key is missing.","commit_id":"c10e5b51a9e1376da78755a838459c2d91beb8b6"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"99ed1b75087e4dcaae398a0c304a1d65c51bc981","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        self.vol_type1_description \u003d self.vol_type1_name + \u0027_desc\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def _test_build_encrypted_field(self, vol_type):"},{"line_number":48,"context_line":"        self.assertTrue(\u0027encrypted\u0027 in vol_type.keys())"},{"line_number":49,"context_line":"        expect_encrypted \u003d volume_types.is_encrypted(self.ctxt,"},{"line_number":50,"context_line":"                                                     vol_type[\u0027id\u0027])"},{"line_number":51,"context_line":"        self.assertEqual(expect_encrypted, vol_type[\u0027encrypted\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_a818f51e","line":48,"in_reply_to":"1a4dcd0f_51004401","updated":"2015-09-07 03:13:10.000000000","message":"Done","commit_id":"c10e5b51a9e1376da78755a838459c2d91beb8b6"}],"cinder/volume/volume_types.py":[{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"43ec96aa7b8ab7d1b0db346df90cc90bb78e6236","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def _build_extra_fields(context, vol_type):"},{"line_number":86,"context_line":"    \u0027\u0027\u0027Add encrypted field to the type dic\u0027\u0027\u0027"},{"line_number":87,"context_line":"    vol_type[\u0027encrypted\u0027] \u003d is_encrypted(context,"},{"line_number":88,"context_line":"                                         vol_type[\u0027id\u0027])"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_e3adcf84","line":86,"updated":"2015-08-06 13:49:56.000000000","message":"s/dic/dict/\n\ns/\u0027\u0027\u0027/\"\"\"/","commit_id":"79fb6f6b0e6a7d734cd6a453ac842ff0f21107a3"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"43ec96aa7b8ab7d1b0db346df90cc90bb78e6236","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        vol_types \u003d result"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    for type_name, type_args in vol_types.items():"},{"line_number":135,"context_line":"        _build_extra_fields(context, type_args)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    return vol_types"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_c3a21399","line":135,"updated":"2015-08-06 13:49:56.000000000","message":"Why not get the encrypted value directly?\n\ntype_args[\u0027encrypted\u0027] \u003d is_encrypted(context, type_args[\u0027id\u0027)\n\nI am not seeing a value is having _build_extra_fields, unless you are doing more in it than just assigning the value of \u0027encrypted\u0027.","commit_id":"79fb6f6b0e6a7d734cd6a453ac842ff0f21107a3"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"dba06d90d7b64abdb492b9a43eb0d5df105db45a","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        vol_types \u003d result"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    for type_name, type_args in vol_types.items():"},{"line_number":135,"context_line":"        _build_extra_fields(context, type_args)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    return vol_types"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_e75616cd","line":135,"in_reply_to":"1a4dcd0f_c3a21399","updated":"2015-08-07 06:41:23.000000000","message":"Hi Thang,\nAs it does same thing in several places, and for later extension I could like to put it in a sub function.","commit_id":"79fb6f6b0e6a7d734cd6a453ac842ff0f21107a3"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"694b796c7b765fd6a14fdeca01a154fbfcc5317f","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        vol_types \u003d result"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    for type_name, type_args in vol_types.items():"},{"line_number":135,"context_line":"        _build_extra_fields(context, type_args)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    return vol_types"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_26c0fc29","line":135,"in_reply_to":"1a4dcd0f_d9c91bae","updated":"2015-08-11 06:14:49.000000000","message":"OK, I updated.","commit_id":"79fb6f6b0e6a7d734cd6a453ac842ff0f21107a3"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"c0b59d915eeb8cc80274ba965ac63a0545f21a0f","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        vol_types \u003d result"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    for type_name, type_args in vol_types.items():"},{"line_number":135,"context_line":"        _build_extra_fields(context, type_args)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    return vol_types"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_d9c91bae","line":135,"in_reply_to":"1a4dcd0f_e75616cd","updated":"2015-08-10 13:44:00.000000000","message":"The private method does not do much more than assign the value.  Unless, there is something more done in that method, I do not see a reason for it.  By putting the change I suggested above, you are accomplishing the same thing with one line and reducing the methods in this code.","commit_id":"79fb6f6b0e6a7d734cd6a453ac842ff0f21107a3"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"7d479ffc0282d680e656cdf508581245d1a651be","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        raise exception.InvalidVolumeType(reason\u003dmsg)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    vol_type \u003d db.volume_type_get_by_name(context, name)"},{"line_number":158,"context_line":"    if vol_type:"},{"line_number":159,"context_line":"        vol_type[\u0027encrypted\u0027] \u003d is_encrypted(context, vol_type[\u0027id\u0027])"},{"line_number":160,"context_line":"    return vol_type"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_11c71c99","line":158,"updated":"2015-08-11 13:57:54.000000000","message":"I believe there is always a vol_type returned, otherwise an exception is thrown - see https://github.com/openstack/cinder/blob/master/cinder/db/sqlalchemy/api.py#L2426\n\nIt is not necessary to add the if statement here and above.","commit_id":"c10e5b51a9e1376da78755a838459c2d91beb8b6"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"99ed1b75087e4dcaae398a0c304a1d65c51bc981","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        raise exception.InvalidVolumeType(reason\u003dmsg)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    vol_type \u003d db.volume_type_get_by_name(context, name)"},{"line_number":158,"context_line":"    if vol_type:"},{"line_number":159,"context_line":"        vol_type[\u0027encrypted\u0027] \u003d is_encrypted(context, vol_type[\u0027id\u0027])"},{"line_number":160,"context_line":"    return vol_type"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_28db8550","line":158,"in_reply_to":"1a4dcd0f_11c71c99","updated":"2015-09-07 03:13:10.000000000","message":"Done","commit_id":"c10e5b51a9e1376da78755a838459c2d91beb8b6"},{"author":{"_account_id":10439,"name":"Xi Yang","email":"yang.xi@99cloud.net","username":"phenom"},"change_message_id":"b342169c9e9b1369e4acf82bdf79dc8dc9ab7518","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                        break"},{"line_number":127,"context_line":"        vol_types \u003d result"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    for type_name, type_args in vol_types.items():"},{"line_number":130,"context_line":"        type_args[\u0027encrypted\u0027] \u003d is_encrypted(context, type_args[\u0027id\u0027])"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    return vol_types"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_190a9579","line":129,"updated":"2015-09-07 05:20:49.000000000","message":"Is vol_types a dict? If it is, why not directly use vol_types.values() here? Seems you don\u0027t use type_name..","commit_id":"19dc7e3473f58c47223afdae7505195727099eab"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"aca93be218a123555a1e73c73355565c0d168872","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                        break"},{"line_number":127,"context_line":"        vol_types \u003d result"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    for type_name, type_args in vol_types.items():"},{"line_number":130,"context_line":"        type_args[\u0027encrypted\u0027] \u003d is_encrypted(context, type_args[\u0027id\u0027])"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    return vol_types"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_2be428a6","line":129,"in_reply_to":"da20952f_190a9579","updated":"2015-09-11 05:15:42.000000000","message":"Done","commit_id":"19dc7e3473f58c47223afdae7505195727099eab"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e5f9320d2073b3e7e709686ef6dc96381dfac561","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        vol_types \u003d result"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    for type_args in vol_types.values():"},{"line_number":130,"context_line":"        type_args[\u0027encrypted\u0027] \u003d is_encrypted(context, type_args[\u0027id\u0027])"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    return vol_types"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba8a016a_ee067184","line":130,"updated":"2015-11-23 14:21:33.000000000","message":"-1: No need to loop again, you can do this in L125","commit_id":"a4a7aa6c089cca8c11b803e4876033b5faec6ac9"}]}
