)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"47d3c4a0c41b43d5f59bf4acd1b52cf409ec4a1a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix huawei driver username/password encoding bug"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"While huawei driver reads username/password configuration from"},{"line_number":10,"context_line":"configuration file, if the value is plain text, huawei driver\u0027ll"},{"line_number":11,"context_line":"encode this text and write back to configuration file."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a89bdaa_2ea185f8","line":9,"range":{"start_line":9,"start_character":6,"end_line":9,"end_character":13},"updated":"2016-09-08 09:21:20.000000000","message":"Huawei","commit_id":"9588b0c445db2aef4649a62d2534bf9babd10fcf"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"156771cf00facb13613a65daa596441281d597da","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix huawei driver username/password encoding bug"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"While huawei driver reads username/password configuration from"},{"line_number":10,"context_line":"configuration file, if the value is plain text, huawei driver\u0027ll"},{"line_number":11,"context_line":"encode this text and write back to configuration file."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a89bdaa_57954786","line":9,"range":{"start_line":9,"start_character":6,"end_line":9,"end_character":13},"in_reply_to":"9a89bdaa_2ea185f8","updated":"2016-09-09 02:33:56.000000000","message":"Done","commit_id":"9588b0c445db2aef4649a62d2534bf9babd10fcf"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"47d3c4a0c41b43d5f59bf4acd1b52cf409ec4a1a","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix huawei driver username/password encoding bug"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"While huawei driver reads username/password configuration from"},{"line_number":10,"context_line":"configuration file, if the value is plain text, huawei driver\u0027ll"},{"line_number":11,"context_line":"encode this text and write back to configuration file."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"huawei driver leverages base64.b64encode to implemant the encoding."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a89bdaa_8ec7f194","line":10,"range":{"start_line":10,"start_character":55,"end_line":10,"end_character":64},"updated":"2016-09-08 09:21:20.000000000","message":"?","commit_id":"9588b0c445db2aef4649a62d2534bf9babd10fcf"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"156771cf00facb13613a65daa596441281d597da","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix huawei driver username/password encoding bug"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"While huawei driver reads username/password configuration from"},{"line_number":10,"context_line":"configuration file, if the value is plain text, huawei driver\u0027ll"},{"line_number":11,"context_line":"encode this text and write back to configuration file."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"huawei driver leverages base64.b64encode to implemant the encoding."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a89bdaa_77924ba1","line":10,"range":{"start_line":10,"start_character":55,"end_line":10,"end_character":64},"in_reply_to":"9a89bdaa_8ec7f194","updated":"2016-09-09 02:33:56.000000000","message":"Done","commit_id":"9588b0c445db2aef4649a62d2534bf9babd10fcf"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"47d3c4a0c41b43d5f59bf4acd1b52cf409ec4a1a","unresolved":false,"context_lines":[{"line_number":10,"context_line":"configuration file, if the value is plain text, huawei driver\u0027ll"},{"line_number":11,"context_line":"encode this text and write back to configuration file."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"huawei driver leverages base64.b64encode to implemant the encoding."},{"line_number":14,"context_line":"The encoded result is a byte string, and then is converted to"},{"line_number":15,"context_line":"unicode string."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a89bdaa_6ea70d0b","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":6},"updated":"2016-09-08 09:21:20.000000000","message":"Huawei","commit_id":"9588b0c445db2aef4649a62d2534bf9babd10fcf"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"47d3c4a0c41b43d5f59bf4acd1b52cf409ec4a1a","unresolved":false,"context_lines":[{"line_number":10,"context_line":"configuration file, if the value is plain text, huawei driver\u0027ll"},{"line_number":11,"context_line":"encode this text and write back to configuration file."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"huawei driver leverages base64.b64encode to implemant the encoding."},{"line_number":14,"context_line":"The encoded result is a byte string, and then is converted to"},{"line_number":15,"context_line":"unicode string."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a89bdaa_ce61f9d4","line":13,"range":{"start_line":13,"start_character":44,"end_line":13,"end_character":53},"updated":"2016-09-08 09:21:20.000000000","message":"implement","commit_id":"9588b0c445db2aef4649a62d2534bf9babd10fcf"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"156771cf00facb13613a65daa596441281d597da","unresolved":false,"context_lines":[{"line_number":10,"context_line":"configuration file, if the value is plain text, huawei driver\u0027ll"},{"line_number":11,"context_line":"encode this text and write back to configuration file."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"huawei driver leverages base64.b64encode to implemant the encoding."},{"line_number":14,"context_line":"The encoded result is a byte string, and then is converted to"},{"line_number":15,"context_line":"unicode string."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a89bdaa_978fcf74","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":6},"in_reply_to":"9a89bdaa_6ea70d0b","updated":"2016-09-09 02:33:56.000000000","message":"Done","commit_id":"9588b0c445db2aef4649a62d2534bf9babd10fcf"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"156771cf00facb13613a65daa596441281d597da","unresolved":false,"context_lines":[{"line_number":10,"context_line":"configuration file, if the value is plain text, huawei driver\u0027ll"},{"line_number":11,"context_line":"encode this text and write back to configuration file."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"huawei driver leverages base64.b64encode to implemant the encoding."},{"line_number":14,"context_line":"The encoded result is a byte string, and then is converted to"},{"line_number":15,"context_line":"unicode string."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a89bdaa_b78cd380","line":13,"range":{"start_line":13,"start_character":44,"end_line":13,"end_character":53},"in_reply_to":"9a89bdaa_ce61f9d4","updated":"2016-09-09 02:33:56.000000000","message":"Done","commit_id":"9588b0c445db2aef4649a62d2534bf9babd10fcf"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"47d3c4a0c41b43d5f59bf4acd1b52cf409ec4a1a","unresolved":false,"context_lines":[{"line_number":15,"context_line":"unicode string."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"In py2, this works fine. However, in py3, the unicode string"},{"line_number":18,"context_line":"converted from byte string is like \"b\u0027***\u0027\", *** is the orginal"},{"line_number":19,"context_line":"string supposed to be."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"So the encoded string is broken, and exception occurs while decoding"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a89bdaa_2eefc51e","line":18,"range":{"start_line":18,"start_character":56,"end_line":18,"end_character":63},"updated":"2016-09-08 09:21:20.000000000","message":"original","commit_id":"9588b0c445db2aef4649a62d2534bf9babd10fcf"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"156771cf00facb13613a65daa596441281d597da","unresolved":false,"context_lines":[{"line_number":15,"context_line":"unicode string."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"In py2, this works fine. However, in py3, the unicode string"},{"line_number":18,"context_line":"converted from byte string is like \"b\u0027***\u0027\", *** is the orginal"},{"line_number":19,"context_line":"string supposed to be."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"So the encoded string is broken, and exception occurs while decoding"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a89bdaa_d7e79744","line":18,"range":{"start_line":18,"start_character":56,"end_line":18,"end_character":63},"in_reply_to":"9a89bdaa_2eefc51e","updated":"2016-09-09 02:33:56.000000000","message":"Done","commit_id":"9588b0c445db2aef4649a62d2534bf9babd10fcf"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"d7e93120e3dbcf91bd86a463c1ab298e699b2a88","unresolved":false,"context_lines":[{"line_number":10,"context_line":"configuration file, if the value is plain text, huawei driver\u0027ll"},{"line_number":11,"context_line":"encode this text and write back to configuration file."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"huawei driver leverages base64.b64encode to implemant the encoding."},{"line_number":14,"context_line":"The encoded result is a byte string, and then is converted to"},{"line_number":15,"context_line":"unicode string."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"5a8bc5a2_fa732e13","line":13,"range":{"start_line":13,"start_character":44,"end_line":13,"end_character":53},"updated":"2016-09-24 13:03:00.000000000","message":"implement","commit_id":"85d171261a68acc07346431211746970e66aafe7"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"082e6dffcc96b6318b804a8e2b756652d12ccdfa","unresolved":false,"context_lines":[{"line_number":10,"context_line":"configuration file, if the value is plain text, huawei driver\u0027ll"},{"line_number":11,"context_line":"encode this text and write back to configuration file."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"huawei driver leverages base64.b64encode to implemant the encoding."},{"line_number":14,"context_line":"The encoded result is a byte string, and then is converted to"},{"line_number":15,"context_line":"unicode string."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"5a8bc5a2_5a887dc5","line":13,"range":{"start_line":13,"start_character":44,"end_line":13,"end_character":53},"in_reply_to":"5a8bc5a2_fa732e13","updated":"2016-09-26 11:54:59.000000000","message":"Done","commit_id":"85d171261a68acc07346431211746970e66aafe7"}],"manila/share/drivers/huawei/v3/helper.py":[{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"d7e93120e3dbcf91bd86a463c1ab298e699b2a88","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        need_encode \u003d False"},{"line_number":191,"context_line":"        for key in [\u0027UserName\u0027, \u0027UserPassword\u0027]:"},{"line_number":192,"context_line":"            node \u003d root.find(\u0027Storage/%s\u0027 % key)"},{"line_number":193,"context_line":"            if node.text.find(prefix_name) \u003e -1:"},{"line_number":194,"context_line":"                logininfo[key] \u003d base64.b64decode("},{"line_number":195,"context_line":"                    six.b(node.text[4:])).decode()"},{"line_number":196,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a8bc5a2_ba69a627","line":193,"range":{"start_line":193,"start_character":12,"end_line":193,"end_character":48},"updated":"2016-09-24 13:03:00.000000000","message":"Why do you use find method here rather than explicitly comparing with a slice from the start of node.text?\n\nSuppose node.text is set to \u0027admin@!$$$$\u0027.  Your test will return True and a base64 decode will be attempted (and get a TypeError).  If instead you did:\n\n   if node.text[:4] \u003d\u003d prefix_name:\n\nthat would be False and you would do the endcode operation as intended.","commit_id":"85d171261a68acc07346431211746970e66aafe7"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"082e6dffcc96b6318b804a8e2b756652d12ccdfa","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        need_encode \u003d False"},{"line_number":191,"context_line":"        for key in [\u0027UserName\u0027, \u0027UserPassword\u0027]:"},{"line_number":192,"context_line":"            node \u003d root.find(\u0027Storage/%s\u0027 % key)"},{"line_number":193,"context_line":"            if node.text.find(prefix_name) \u003e -1:"},{"line_number":194,"context_line":"                logininfo[key] \u003d base64.b64decode("},{"line_number":195,"context_line":"                    six.b(node.text[4:])).decode()"},{"line_number":196,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a8bc5a2_5a5ddd45","line":193,"range":{"start_line":193,"start_character":12,"end_line":193,"end_character":48},"in_reply_to":"5a8bc5a2_ba69a627","updated":"2016-09-26 11:54:59.000000000","message":"Hi Tom, I think your advise makes sense.\nBut it\u0027s not what this patch concerning.\nI\u0027ll start another one to fix it.\nThanks.","commit_id":"85d171261a68acc07346431211746970e66aafe7"}],"manila/tests/share/drivers/huawei/test_huawei_nas.py":[{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"47d3c4a0c41b43d5f59bf4acd1b52cf409ec4a1a","unresolved":false,"context_lines":[{"line_number":4532,"context_line":""},{"line_number":4533,"context_line":"        # get login info again"},{"line_number":4534,"context_line":"        # will get the encoded username/password and decode them"},{"line_number":4535,"context_line":"        logininfo \u003d self.driver.plugin.helper._get_login_info()"},{"line_number":4536,"context_line":"        self.assertEqual(\u0027admin\u0027, logininfo[\u0027UserName\u0027])"},{"line_number":4537,"context_line":"        self.assertEqual(\u0027Admin@storage\u0027, logininfo[\u0027UserPassword\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a89bdaa_0203b5b8","line":4537,"range":{"start_line":4535,"start_character":8,"end_line":4537,"end_character":68},"updated":"2016-09-08 09:21:20.000000000","message":"The self.configuration.manila_huawei_conf_file has been set to self.fake_conf_file. It means the UserPassword value always be \u0027Admin@storage\u0027. If you get info again, it will as the same as the first time you get from self.fake_conf_file(\u0027Admin@storage\u0027). so it will not get the encoded username and password.  or did I missing something?\nPlease see code line 184:\nhttps://review.openstack.org/#/c/367103/1/manila/share/drivers/huawei/v3/helper.py","commit_id":"9588b0c445db2aef4649a62d2534bf9babd10fcf"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"156771cf00facb13613a65daa596441281d597da","unresolved":false,"context_lines":[{"line_number":4532,"context_line":""},{"line_number":4533,"context_line":"        # get login info again"},{"line_number":4534,"context_line":"        # will get the encoded username/password and decode them"},{"line_number":4535,"context_line":"        logininfo \u003d self.driver.plugin.helper._get_login_info()"},{"line_number":4536,"context_line":"        self.assertEqual(\u0027admin\u0027, logininfo[\u0027UserName\u0027])"},{"line_number":4537,"context_line":"        self.assertEqual(\u0027Admin@storage\u0027, logininfo[\u0027UserPassword\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a89bdaa_771c0b14","line":4537,"range":{"start_line":4535,"start_character":8,"end_line":4537,"end_character":68},"in_reply_to":"9a89bdaa_0203b5b8","updated":"2016-09-09 02:33:56.000000000","message":"Nah~. As you said, self.configuration.manila_huawei_conf_file is set to self.fake_conf_file, and self.configuration is also passed to the helper. The User/Password in fake_conf_file is indeed plain texts after it\u0027s created, but once _get_login_info is executed, User/Password will be encoded and wrote back to fake_conf_file, because the file that _get_login_info reads points to fake_conf_file. So the next time running _get_login_info, User/Password in fake_conf_file is actually encoded.","commit_id":"9588b0c445db2aef4649a62d2534bf9babd10fcf"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"6ea5c3d69a3ffce8e4a5eca7222fa99c17f75e11","unresolved":false,"context_lines":[{"line_number":4526,"context_line":"    def test_username_password_encode_decode(self):"},{"line_number":4527,"context_line":"        # get login info first time"},{"line_number":4528,"context_line":"        # will encode the username/password and write back to configuration"},{"line_number":4529,"context_line":"        logininfo \u003d self.driver.plugin.helper._get_login_info()"},{"line_number":4530,"context_line":"        self.assertEqual(\u0027admin\u0027, logininfo[\u0027UserName\u0027])"},{"line_number":4531,"context_line":"        self.assertEqual(\u0027Admin@storage\u0027, logininfo[\u0027UserPassword\u0027])"},{"line_number":4532,"context_line":""},{"line_number":4533,"context_line":"        # get login info again"},{"line_number":4534,"context_line":"        # will get the encoded username/password and decode them"},{"line_number":4535,"context_line":"        logininfo \u003d self.driver.plugin.helper._get_login_info()"},{"line_number":4536,"context_line":"        self.assertEqual(\u0027admin\u0027, logininfo[\u0027UserName\u0027])"},{"line_number":4537,"context_line":"        self.assertEqual(\u0027Admin@storage\u0027, logininfo[\u0027UserPassword\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a89bdaa_c4199524","line":4537,"range":{"start_line":4529,"start_character":8,"end_line":4537,"end_character":68},"updated":"2016-09-09 09:57:04.000000000","message":"for i in (1, 2):\n    logininfo \u003d self.driver.plugin.helper._get_login_info()\n    self.assertEqual(\u0027admin\u0027, logininfo[\u0027UserName\u0027])\n    self.assertEqual(\u0027Admin@storage\u0027, logininfo[\u0027UserPassword\u0027])","commit_id":"8e882ca59c3c3f0d43dd78904f22d2a335d0f5f9"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"ba3fa2d01d28d0bd5fcc1ff955b0e1a96e53e07a","unresolved":false,"context_lines":[{"line_number":4526,"context_line":"    def test_username_password_encode_decode(self):"},{"line_number":4527,"context_line":"        # get login info first time"},{"line_number":4528,"context_line":"        # will encode the username/password and write back to configuration"},{"line_number":4529,"context_line":"        logininfo \u003d self.driver.plugin.helper._get_login_info()"},{"line_number":4530,"context_line":"        self.assertEqual(\u0027admin\u0027, logininfo[\u0027UserName\u0027])"},{"line_number":4531,"context_line":"        self.assertEqual(\u0027Admin@storage\u0027, logininfo[\u0027UserPassword\u0027])"},{"line_number":4532,"context_line":""},{"line_number":4533,"context_line":"        # get login info again"},{"line_number":4534,"context_line":"        # will get the encoded username/password and decode them"},{"line_number":4535,"context_line":"        logininfo \u003d self.driver.plugin.helper._get_login_info()"},{"line_number":4536,"context_line":"        self.assertEqual(\u0027admin\u0027, logininfo[\u0027UserName\u0027])"},{"line_number":4537,"context_line":"        self.assertEqual(\u0027Admin@storage\u0027, logininfo[\u0027UserPassword\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a89bdaa_044e18c1","line":4537,"range":{"start_line":4529,"start_character":8,"end_line":4537,"end_character":68},"in_reply_to":"9a89bdaa_c4199524","updated":"2016-09-09 11:23:23.000000000","message":"+1","commit_id":"8e882ca59c3c3f0d43dd78904f22d2a335d0f5f9"}]}
