)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"491f626a051cf261dd39332c8f3094aedbca5a34","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Enhance FC zone support for Huawei driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When using FC switch, there need some manual operation"},{"line_number":10,"context_line":"before Huawei driver can work. Now there need no manual"},{"line_number":11,"context_line":"operation any more, Huawei driver can choose the appropriate"},{"line_number":12,"context_line":"FC ports and manage FC zone automatically."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"fa1b9901_1febe4b1","line":9,"updated":"2015-08-18 16:21:13.000000000","message":"Suggest: \"Currently, when using FC switch, there are manual operations necessary to enable the Huawei driver to work. This change makes it so those manual operations are no longer required; the Huawei driver..\"","commit_id":"79b535225ada16258b67cd226fc05a8371b14675"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"8447899a46910e5107788969c013fcb1538fd19a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Enhance FC zone support for Huawei driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When using FC switch, there need some manual operation"},{"line_number":10,"context_line":"before Huawei driver can work. Now there need no manual"},{"line_number":11,"context_line":"operation any more, Huawei driver can choose the appropriate"},{"line_number":12,"context_line":"FC ports and manage FC zone automatically."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"fa1b9901_c2cfcf7d","line":9,"in_reply_to":"fa1b9901_1febe4b1","updated":"2015-08-18 16:36:05.000000000","message":"Thanks for your suggestion, have changed the commit message now.","commit_id":"79b535225ada16258b67cd226fc05a8371b14675"}],"cinder/tests/unit/test_huawei_drivers.py":[{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"830b07dec9c6ce4c8390b2d2516c6e7d269cbcd4","unresolved":false,"context_lines":[{"line_number":754,"context_line":"        \"ISFREE\":\"true\""},{"line_number":755,"context_line":"    }]"},{"line_number":756,"context_line":"}"},{"line_number":757,"context_line":"\"\"\""},{"line_number":758,"context_line":"FAKE_QOS_INFO_RESPONSE \u003d \"\"\""},{"line_number":759,"context_line":"{"},{"line_number":760,"context_line":"    \"error\":{"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa1b9901_1df44cf0","line":757,"updated":"2015-08-18 16:55:10.000000000","message":"There should be a blank line for consistency.","commit_id":"9cc214eeebabecc7e2a57c3efcb02dac75a205f9"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"a3a54d78fe6f53d9bb998d248fa040133ab6df9c","unresolved":false,"context_lines":[{"line_number":754,"context_line":"        \"ISFREE\":\"true\""},{"line_number":755,"context_line":"    }]"},{"line_number":756,"context_line":"}"},{"line_number":757,"context_line":"\"\"\""},{"line_number":758,"context_line":"FAKE_QOS_INFO_RESPONSE \u003d \"\"\""},{"line_number":759,"context_line":"{"},{"line_number":760,"context_line":"    \"error\":{"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa1b9901_bc999070","line":757,"in_reply_to":"fa1b9901_1df44cf0","updated":"2015-08-19 01:57:55.000000000","message":"Done, thanks!","commit_id":"9cc214eeebabecc7e2a57c3efcb02dac75a205f9"}],"cinder/volume/drivers/huawei/constants.py":[{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":22,"context_line":"QOS_NAME_PREFIX \u003d \u0027OpenStack_\u0027"},{"line_number":23,"context_line":"ARRAY_VERSION \u003d \u0027V300R003C00\u0027"},{"line_number":24,"context_line":"FC_PORT_CONNECTED \u003d \u002710\u0027"},{"line_number":25,"context_line":"FC_ZONE_HELPER \u003d \u0027cinder.volume.drivers.huawei.fc_zone_helper.FC_zone_helper\u0027"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"DEFAULT_WAIT_TIMEOUT \u003d 3600 * 24 * 30"},{"line_number":28,"context_line":"DEFAULT_WAIT_INTERVAL \u003d 5"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_9fa9a126","line":25,"updated":"2015-07-15 19:16:39.000000000","message":"Why not just import this module when you need it?","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"599db2565f7cfab53de5e3fdceed05d0827dd88b","unresolved":false,"context_lines":[{"line_number":39,"context_line":"           \u0027Mac OS X\u0027: \u00276\u0027,"},{"line_number":40,"context_line":"           \u0027VMware ESX\u0027: \u00277\u0027}"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"controller_list \u003d [\u0027A\u0027, \u0027B\u0027, \u0027C\u0027, \u0027D\u0027]"},{"line_number":43,"context_line":"HUAWEI_VALID_KEYS \u003d [\u0027maxIOPS\u0027, \u0027minIOPS\u0027, \u0027minBandWidth\u0027,"},{"line_number":44,"context_line":"                     \u0027maxBandWidth\u0027, \u0027latency\u0027, \u0027IOType\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_ff3d62dd","line":42,"updated":"2015-07-22 19:57:55.000000000","message":"s/controller_list/CONTROLLER_LIST","commit_id":"a68865e55f2d1ada9ed34c451895e77cc436c0ab"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"c8d6fa58739964a96853c56591b0d3cd7dc2f26f","unresolved":false,"context_lines":[{"line_number":39,"context_line":"           \u0027Mac OS X\u0027: \u00276\u0027,"},{"line_number":40,"context_line":"           \u0027VMware ESX\u0027: \u00277\u0027}"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"controller_list \u003d [\u0027A\u0027, \u0027B\u0027, \u0027C\u0027, \u0027D\u0027]"},{"line_number":43,"context_line":"HUAWEI_VALID_KEYS \u003d [\u0027maxIOPS\u0027, \u0027minIOPS\u0027, \u0027minBandWidth\u0027,"},{"line_number":44,"context_line":"                     \u0027maxBandWidth\u0027, \u0027latency\u0027, \u0027IOType\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_eef12896","line":42,"in_reply_to":"3a50d1a3_ff3d62dd","updated":"2015-07-23 02:27:20.000000000","message":"Done","commit_id":"a68865e55f2d1ada9ed34c451895e77cc436c0ab"}],"cinder/volume/drivers/huawei/fc_zone_helper.py":[{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"95a3462c0962d8e5e8983fae79b6562d6943140c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 Huawei Technologies Co., Ltd.\r"},{"line_number":2,"context_line":"# All Rights Reserved.\r"},{"line_number":3,"context_line":"#\r"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_854182ab","line":1,"updated":"2015-07-15 04:24:09.000000000","message":"looks like this file has carriage returns (\\r), I suspect since it stands out so much in gerrit usually source files will only have \\n (unix style) endings.","commit_id":"f60432517439a2fab0423c14e33344f716d971d1"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"4f0ad86afab66b77ac9a60f35d56dd8450df93e9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 Huawei Technologies Co., Ltd.\r"},{"line_number":2,"context_line":"# All Rights Reserved.\r"},{"line_number":3,"context_line":"#\r"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_0a2d7aa7","line":1,"in_reply_to":"9a41bdd9_854182ab","updated":"2015-07-15 07:20:20.000000000","message":"Done","commit_id":"f60432517439a2fab0423c14e33344f716d971d1"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"95a3462c0962d8e5e8983fae79b6562d6943140c","unresolved":false,"context_lines":[{"line_number":31,"context_line":"\r"},{"line_number":32,"context_line":"    def _check_fc_port_and_init(self, wwns, hostid):\r"},{"line_number":33,"context_line":"        \"\"\"Check FC port on array and wwn on host is connected to switch.\r"},{"line_number":34,"context_line":"           If no FC port on array is connected to switch, raise a error.\r"},{"line_number":35,"context_line":"        \"\"\"\r"},{"line_number":36,"context_line":"        port_lists \u003d []\r"},{"line_number":37,"context_line":"        port_lists \u003d self.restclient._get_all_fc_ports_from_array()\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_c580eac1","line":34,"updated":"2015-07-15 04:24:09.000000000","message":"Usually there is an to be an empty line after the first line of these doc strings, check out http://docs.openstack.org/developer/hacking/#docstrings for more info","commit_id":"f60432517439a2fab0423c14e33344f716d971d1"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"4f0ad86afab66b77ac9a60f35d56dd8450df93e9","unresolved":false,"context_lines":[{"line_number":31,"context_line":"\r"},{"line_number":32,"context_line":"    def _check_fc_port_and_init(self, wwns, hostid):\r"},{"line_number":33,"context_line":"        \"\"\"Check FC port on array and wwn on host is connected to switch.\r"},{"line_number":34,"context_line":"           If no FC port on array is connected to switch, raise a error.\r"},{"line_number":35,"context_line":"        \"\"\"\r"},{"line_number":36,"context_line":"        port_lists \u003d []\r"},{"line_number":37,"context_line":"        port_lists \u003d self.restclient._get_all_fc_ports_from_array()\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_ed32b0a6","line":34,"in_reply_to":"9a41bdd9_c580eac1","updated":"2015-07-15 07:20:20.000000000","message":"Done","commit_id":"f60432517439a2fab0423c14e33344f716d971d1"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"95a3462c0962d8e5e8983fae79b6562d6943140c","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        LOG.debug(\"fabric_map for all FC ports on array: %s\", fabric_map)\r"},{"line_number":40,"context_line":"        if not fabric_map:\r"},{"line_number":41,"context_line":"            msg \u003d (_(\u0027No FC port on array is connected to switch.\u0027))\r"},{"line_number":42,"context_line":"            LOG.error(msg)\r"},{"line_number":43,"context_line":"            raise exception.CinderException(msg)\r"},{"line_number":44,"context_line":"\r"},{"line_number":45,"context_line":"        no_wwn_connected_to_switch \u003d True\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_651b1ecb","line":42,"updated":"2015-07-15 04:24:09.000000000","message":"I think this should be LOG.exception()","commit_id":"f60432517439a2fab0423c14e33344f716d971d1"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"4f0ad86afab66b77ac9a60f35d56dd8450df93e9","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        LOG.debug(\"fabric_map for all FC ports on array: %s\", fabric_map)\r"},{"line_number":40,"context_line":"        if not fabric_map:\r"},{"line_number":41,"context_line":"            msg \u003d (_(\u0027No FC port on array is connected to switch.\u0027))\r"},{"line_number":42,"context_line":"            LOG.error(msg)\r"},{"line_number":43,"context_line":"            raise exception.CinderException(msg)\r"},{"line_number":44,"context_line":"\r"},{"line_number":45,"context_line":"        no_wwn_connected_to_switch \u003d True\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_cda24cae","line":42,"in_reply_to":"9a41bdd9_651b1ecb","updated":"2015-07-15 07:20:20.000000000","message":"I\u0027m not used to LOG.exception(), what\u0027s the difference between LOG.error and LOG.exception?","commit_id":"f60432517439a2fab0423c14e33344f716d971d1"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"31278f9cf93707e8d0180507ced0372b75116c05","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        LOG.debug(\"fabric_map for all FC ports on array: %s\", fabric_map)\r"},{"line_number":40,"context_line":"        if not fabric_map:\r"},{"line_number":41,"context_line":"            msg \u003d (_(\u0027No FC port on array is connected to switch.\u0027))\r"},{"line_number":42,"context_line":"            LOG.error(msg)\r"},{"line_number":43,"context_line":"            raise exception.CinderException(msg)\r"},{"line_number":44,"context_line":"\r"},{"line_number":45,"context_line":"        no_wwn_connected_to_switch \u003d True\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_07a79eaa","line":42,"in_reply_to":"9a41bdd9_cda24cae","updated":"2015-07-15 13:41:36.000000000","message":"As far as logging level is concerned they are the same. The difference is that if there is an exception currently in scope, LOG.exception will format that exception and log all of its details (message, stacktrace, etc.) to the log along with the message you provide.\n\nSo these two are roughly equivalent:\n\nLOG.error(_LE(\"Problem: %s\"), ex)\n\nLOG.exception(LE(\"Problem:\"))\n\nThe latter (LOG.exception) is my preference if you wish to log exception information.\n\nIn this case, I don\u0027t see an exception currently in scope, so I think LOG.error is probably the right choice in this case.","commit_id":"f60432517439a2fab0423c14e33344f716d971d1"},{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"95a3462c0962d8e5e8983fae79b6562d6943140c","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                        self.restclient._ensure_fc_initiator_added(wwn, hostid)\r"},{"line_number":61,"context_line":"        if no_wwn_connected_to_switch:\r"},{"line_number":62,"context_line":"            msg \u003d (_(\u0027No wwn on host is connected to switch.\u0027))\r"},{"line_number":63,"context_line":"            LOG.error(msg)\r"},{"line_number":64,"context_line":"            raise exception.CinderException(msg)\r"},{"line_number":65,"context_line":"\r"},{"line_number":66,"context_line":"    def _get_one_fc_port_for_zone(self, initiator, contr):\r"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_a56cc635","line":63,"updated":"2015-07-15 04:24:09.000000000","message":"also should be LOG.exception()","commit_id":"f60432517439a2fab0423c14e33344f716d971d1"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class FC_zone_helper(object):"},{"line_number":26,"context_line":"    \"\"\"FC zone helper for Huawei driver.\"\"\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def __init__(self, zone_manager, restclient):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_f02ee9a3","line":25,"updated":"2015-07-15 19:16:39.000000000","message":"Should be named FCZoneHelper.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class FC_zone_helper(object):"},{"line_number":26,"context_line":"    \"\"\"FC zone helper for Huawei driver.\"\"\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def __init__(self, zone_manager, restclient):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_4c1fe2b6","line":25,"in_reply_to":"9a41bdd9_f02ee9a3","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    \"\"\"FC zone helper for Huawei driver.\"\"\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def __init__(self, zone_manager, restclient):"},{"line_number":29,"context_line":"        self.zm \u003d zone_manager"},{"line_number":30,"context_line":"        self.restclient \u003d restclient"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def _check_fc_port_and_init(self, wwns, hostid):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_73f2e307","line":29,"updated":"2015-07-15 19:16:39.000000000","message":"Unless \"zm\" is the nomenclature used in your product, change this variable name to self.zone_manager. zm is needlessly cryptic.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    \"\"\"FC zone helper for Huawei driver.\"\"\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def __init__(self, zone_manager, restclient):"},{"line_number":29,"context_line":"        self.zm \u003d zone_manager"},{"line_number":30,"context_line":"        self.restclient \u003d restclient"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def _check_fc_port_and_init(self, wwns, hostid):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_cccf7227","line":29,"in_reply_to":"9a41bdd9_73f2e307","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        self.restclient \u003d restclient"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def _check_fc_port_and_init(self, wwns, hostid):"},{"line_number":33,"context_line":"        port_lists \u003d []"},{"line_number":34,"context_line":"        port_lists \u003d self.restclient._get_all_fc_ports_from_array()"},{"line_number":35,"context_line":"        fabric_map \u003d self.zm.get_san_context(port_lists)"},{"line_number":36,"context_line":"        LOG.debug(\"fabric_map for all FC ports on array: %s\", fabric_map)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_7398a36a","line":33,"updated":"2015-07-15 19:16:39.000000000","message":"This line does not do anything. Remove it.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        self.restclient \u003d restclient"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def _check_fc_port_and_init(self, wwns, hostid):"},{"line_number":33,"context_line":"        port_lists \u003d []"},{"line_number":34,"context_line":"        port_lists \u003d self.restclient._get_all_fc_ports_from_array()"},{"line_number":35,"context_line":"        fabric_map \u003d self.zm.get_san_context(port_lists)"},{"line_number":36,"context_line":"        LOG.debug(\"fabric_map for all FC ports on array: %s\", fabric_map)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_ecd276d0","line":33,"in_reply_to":"9a41bdd9_7398a36a","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def _check_fc_port_and_init(self, wwns, hostid):"},{"line_number":33,"context_line":"        port_lists \u003d []"},{"line_number":34,"context_line":"        port_lists \u003d self.restclient._get_all_fc_ports_from_array()"},{"line_number":35,"context_line":"        fabric_map \u003d self.zm.get_san_context(port_lists)"},{"line_number":36,"context_line":"        LOG.debug(\"fabric_map for all FC ports on array: %s\", fabric_map)"},{"line_number":37,"context_line":"        if not fabric_map:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_b37cebec","line":34,"updated":"2015-07-15 19:16:39.000000000","message":"An underscore in front of a method means it is protected. You should not be accessing protected methods from other classes.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def _check_fc_port_and_init(self, wwns, hostid):"},{"line_number":33,"context_line":"        port_lists \u003d []"},{"line_number":34,"context_line":"        port_lists \u003d self.restclient._get_all_fc_ports_from_array()"},{"line_number":35,"context_line":"        fabric_map \u003d self.zm.get_san_context(port_lists)"},{"line_number":36,"context_line":"        LOG.debug(\"fabric_map for all FC ports on array: %s\", fabric_map)"},{"line_number":37,"context_line":"        if not fabric_map:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_cc6bf2ef","line":34,"in_reply_to":"9a41bdd9_b37cebec","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        if not fabric_map:"},{"line_number":38,"context_line":"            msg \u003d (_(\u0027No FC port on array is connected to switch.\u0027))"},{"line_number":39,"context_line":"            LOG.error(msg)"},{"line_number":40,"context_line":"            raise exception.CinderException(msg)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        no_wwn_connected_to_switch \u003d True"},{"line_number":43,"context_line":"        for wwn in wwns:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_a6bfcb5f","line":40,"updated":"2015-07-15 19:16:39.000000000","message":"Could you use a more specific exception?","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        if not fabric_map:"},{"line_number":38,"context_line":"            msg \u003d (_(\u0027No FC port on array is connected to switch.\u0027))"},{"line_number":39,"context_line":"            LOG.error(msg)"},{"line_number":40,"context_line":"            raise exception.CinderException(msg)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        no_wwn_connected_to_switch \u003d True"},{"line_number":43,"context_line":"        for wwn in wwns:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_ec135663","line":40,"in_reply_to":"9a41bdd9_a6bfcb5f","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            LOG.error(msg)"},{"line_number":40,"context_line":"            raise exception.CinderException(msg)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        no_wwn_connected_to_switch \u003d True"},{"line_number":43,"context_line":"        for wwn in wwns:"},{"line_number":44,"context_line":"            have_init_added \u003d False"},{"line_number":45,"context_line":"            for fabric in fabric_map.keys():"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_c9d9c058","line":42,"updated":"2015-07-15 19:16:39.000000000","message":"Switch to wwn_connect_to_switch or has_wwn_connect_to_switch. This avoids double negatives.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            LOG.error(msg)"},{"line_number":40,"context_line":"            raise exception.CinderException(msg)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        no_wwn_connected_to_switch \u003d True"},{"line_number":43,"context_line":"        for wwn in wwns:"},{"line_number":44,"context_line":"            have_init_added \u003d False"},{"line_number":45,"context_line":"            for fabric in fabric_map.keys():"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_0f29cc89","line":42,"in_reply_to":"9a41bdd9_c9d9c058","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        no_wwn_connected_to_switch \u003d True"},{"line_number":43,"context_line":"        for wwn in wwns:"},{"line_number":44,"context_line":"            have_init_added \u003d False"},{"line_number":45,"context_line":"            for fabric in fabric_map.keys():"},{"line_number":46,"context_line":"                if have_init_added:"},{"line_number":47,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_4417d747","line":44,"updated":"2015-07-15 19:16:39.000000000","message":"Get rid of this variable, see below.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        no_wwn_connected_to_switch \u003d True"},{"line_number":43,"context_line":"        for wwn in wwns:"},{"line_number":44,"context_line":"            have_init_added \u003d False"},{"line_number":45,"context_line":"            for fabric in fabric_map.keys():"},{"line_number":46,"context_line":"                if have_init_added:"},{"line_number":47,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_2f505031","line":44,"in_reply_to":"9a41bdd9_4417d747","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        for wwn in wwns:"},{"line_number":44,"context_line":"            have_init_added \u003d False"},{"line_number":45,"context_line":"            for fabric in fabric_map.keys():"},{"line_number":46,"context_line":"                if have_init_added:"},{"line_number":47,"context_line":"                    continue"},{"line_number":48,"context_line":"                # Maybe can change to call self.zm.get_formatted_wwn(initiator)"},{"line_number":49,"context_line":"                formatted_initiator \u003d self.zm.driver.get_formatted_wwn(wwn)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_841f1f5a","line":46,"updated":"2015-07-15 19:16:39.000000000","message":"Get rid of this statement, see below.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        for wwn in wwns:"},{"line_number":44,"context_line":"            have_init_added \u003d False"},{"line_number":45,"context_line":"            for fabric in fabric_map.keys():"},{"line_number":46,"context_line":"                if have_init_added:"},{"line_number":47,"context_line":"                    continue"},{"line_number":48,"context_line":"                # Maybe can change to call self.zm.get_formatted_wwn(initiator)"},{"line_number":49,"context_line":"                formatted_initiator \u003d self.zm.driver.get_formatted_wwn(wwn)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_cf420468","line":46,"in_reply_to":"9a41bdd9_841f1f5a","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                    continue"},{"line_number":48,"context_line":"                # Maybe can change to call self.zm.get_formatted_wwn(initiator)"},{"line_number":49,"context_line":"                formatted_initiator \u003d self.zm.driver.get_formatted_wwn(wwn)"},{"line_number":50,"context_line":"                conn \u003d self.zm.driver._get_cli_client(fabric)"},{"line_number":51,"context_line":"                nsinfo \u003d conn.get_nameserver_info()"},{"line_number":52,"context_line":"                conn.cleanup()"},{"line_number":53,"context_line":"                if formatted_initiator in nsinfo:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_0953283a","line":50,"updated":"2015-07-15 19:16:39.000000000","message":"Instead of making this connections inside this nested loop, collect all of the nsinfos in a single loop over fabric_map.keys(). Right now there is a lot of redundant network activity here.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                    continue"},{"line_number":48,"context_line":"                # Maybe can change to call self.zm.get_formatted_wwn(initiator)"},{"line_number":49,"context_line":"                formatted_initiator \u003d self.zm.driver.get_formatted_wwn(wwn)"},{"line_number":50,"context_line":"                conn \u003d self.zm.driver._get_cli_client(fabric)"},{"line_number":51,"context_line":"                nsinfo \u003d conn.get_nameserver_info()"},{"line_number":52,"context_line":"                conn.cleanup()"},{"line_number":53,"context_line":"                if formatted_initiator in nsinfo:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_c2c89baa","line":50,"in_reply_to":"9a41bdd9_0953283a","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                conn.cleanup()"},{"line_number":53,"context_line":"                if formatted_initiator in nsinfo:"},{"line_number":54,"context_line":"                    no_wwn_connected_to_switch \u003d False"},{"line_number":55,"context_line":"                    if not have_init_added:"},{"line_number":56,"context_line":"                        have_init_added \u003d True"},{"line_number":57,"context_line":"                        self.restclient._ensure_fc_initiator_added(wwn, hostid)"},{"line_number":58,"context_line":"        if no_wwn_connected_to_switch:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_84a4ff07","line":55,"updated":"2015-07-15 19:16:39.000000000","message":"instead of this if statement, you can just break out of the loop after using the restclient.\n\n self.restclient._ensure_fc_initiator_added(wwn, hostid)\n break","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                conn.cleanup()"},{"line_number":53,"context_line":"                if formatted_initiator in nsinfo:"},{"line_number":54,"context_line":"                    no_wwn_connected_to_switch \u003d False"},{"line_number":55,"context_line":"                    if not have_init_added:"},{"line_number":56,"context_line":"                        have_init_added \u003d True"},{"line_number":57,"context_line":"                        self.restclient._ensure_fc_initiator_added(wwn, hostid)"},{"line_number":58,"context_line":"        if no_wwn_connected_to_switch:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_8f615c07","line":55,"in_reply_to":"9a41bdd9_84a4ff07","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        if no_wwn_connected_to_switch:"},{"line_number":59,"context_line":"            msg \u003d (_(\u0027No wwn on host is connected to switch.\u0027))"},{"line_number":60,"context_line":"            LOG.error(msg)"},{"line_number":61,"context_line":"            raise exception.CinderException(msg)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _get_one_fc_port_for_zone(self, initiator, contr):"},{"line_number":64,"context_line":"        LOG.debug(\"Get in function _get_one_fc_port_for_zone\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_09a80876","line":61,"updated":"2015-07-15 19:16:39.000000000","message":"Exception too generic.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        if no_wwn_connected_to_switch:"},{"line_number":59,"context_line":"            msg \u003d (_(\u0027No wwn on host is connected to switch.\u0027))"},{"line_number":60,"context_line":"            LOG.error(msg)"},{"line_number":61,"context_line":"            raise exception.CinderException(msg)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _get_one_fc_port_for_zone(self, initiator, contr):"},{"line_number":64,"context_line":"        LOG.debug(\"Get in function _get_one_fc_port_for_zone\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_e2cb5fa2","line":61,"in_reply_to":"9a41bdd9_09a80876","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            LOG.error(msg)"},{"line_number":61,"context_line":"            raise exception.CinderException(msg)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _get_one_fc_port_for_zone(self, initiator, contr):"},{"line_number":64,"context_line":"        LOG.debug(\"Get in function _get_one_fc_port_for_zone\")"},{"line_number":65,"context_line":"        LOG.debug(\"initiator: %s\", initiator)"},{"line_number":66,"context_line":"        LOG.debug(\"contr: %s\", contr)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_4471170e","line":63,"updated":"2015-07-15 19:16:39.000000000","message":"This function needs some major rework. The four return points makes the logic hard to follow. It is unclear why this is returning a boolean value as part of a tuple with the port. Comments mention some use cases, but it is impossible to divine what they mean from reading the code.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        LOG.debug(\"Get in function _get_one_fc_port_for_zone\")"},{"line_number":65,"context_line":"        LOG.debug(\"initiator: %s\", initiator)"},{"line_number":66,"context_line":"        LOG.debug(\"contr: %s\", contr)"},{"line_number":67,"context_line":"        port_list_from_contr \u003d []"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        formatted_initiator \u003d self.zm.driver.get_formatted_wwn(initiator)"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_bf8a6562","line":67,"updated":"2015-07-15 19:16:39.000000000","message":"No need to assign here, just assign it later.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        LOG.debug(\"Get in function _get_one_fc_port_for_zone\")"},{"line_number":65,"context_line":"        LOG.debug(\"initiator: %s\", initiator)"},{"line_number":66,"context_line":"        LOG.debug(\"contr: %s\", contr)"},{"line_number":67,"context_line":"        port_list_from_contr \u003d []"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        formatted_initiator \u003d self.zm.driver.get_formatted_wwn(initiator)"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_2264e7b6","line":67,"in_reply_to":"9a41bdd9_bf8a6562","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        LOG.debug(\"formatted_initiator: %s\", formatted_initiator)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        port_list_from_contr \u003d self.restclient._get_fc_ports_from_contr(contr)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        if port_list_from_contr \u003d\u003d []:"},{"line_number":76,"context_line":"            LOG.debug(\"No available port found on controller %s.\", contr)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_84c95fae","line":73,"updated":"2015-07-15 19:16:39.000000000","message":"Do not access protected method (make it public, or do something else here).","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        LOG.debug(\"formatted_initiator: %s\", formatted_initiator)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        port_list_from_contr \u003d self.restclient._get_fc_ports_from_contr(contr)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        if port_list_from_contr \u003d\u003d []:"},{"line_number":76,"context_line":"            LOG.debug(\"No available port found on controller %s.\", contr)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_42024bb5","line":73,"in_reply_to":"9a41bdd9_84c95fae","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        port_list_from_contr \u003d self.restclient._get_fc_ports_from_contr(contr)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        if port_list_from_contr \u003d\u003d []:"},{"line_number":76,"context_line":"            LOG.debug(\"No available port found on controller %s.\", contr)"},{"line_number":77,"context_line":"            return (None, False)"},{"line_number":78,"context_line":"        LOG.debug(\"port_list_from_contr: %s\", port_list_from_contr)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_7f885d71","line":75,"updated":"2015-07-15 19:16:39.000000000","message":"Don\u0027t depend on it being a list, there is need to be that specific. Instead:\n\n if not port_list_from_contr:","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        port_list_from_contr \u003d self.restclient._get_fc_ports_from_contr(contr)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        if port_list_from_contr \u003d\u003d []:"},{"line_number":76,"context_line":"            LOG.debug(\"No available port found on controller %s.\", contr)"},{"line_number":77,"context_line":"            return (None, False)"},{"line_number":78,"context_line":"        LOG.debug(\"port_list_from_contr: %s\", port_list_from_contr)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_a2a1d795","line":75,"in_reply_to":"9a41bdd9_7f885d71","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        fabric_map \u003d self.zm.get_san_context(port_list_from_contr)"},{"line_number":81,"context_line":"        LOG.debug(\"fabric_map: %s\", fabric_map)"},{"line_number":82,"context_line":"        if fabric_map \u003d\u003d {}:"},{"line_number":83,"context_line":"            LOG.debug(\"No port is connected to FC switch on controller %s.\","},{"line_number":84,"context_line":"                      contr)"},{"line_number":85,"context_line":"            return (None, False)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_bfe1052c","line":82,"updated":"2015-07-15 19:16:39.000000000","message":"Same as above:\n\n if not fabric_map:","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        fabric_map \u003d self.zm.get_san_context(port_list_from_contr)"},{"line_number":81,"context_line":"        LOG.debug(\"fabric_map: %s\", fabric_map)"},{"line_number":82,"context_line":"        if fabric_map \u003d\u003d {}:"},{"line_number":83,"context_line":"            LOG.debug(\"No port is connected to FC switch on controller %s.\","},{"line_number":84,"context_line":"                      contr)"},{"line_number":85,"context_line":"            return (None, False)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_42ac8b8b","line":82,"in_reply_to":"9a41bdd9_bfe1052c","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            conn \u003d self.zm.driver._get_cli_client(fabric)"},{"line_number":94,"context_line":"            nsinfo \u003d conn.get_nameserver_info()"},{"line_number":95,"context_line":"            if formatted_initiator not in nsinfo:"},{"line_number":96,"context_line":"                conn.cleanup()"},{"line_number":97,"context_line":"                continue"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"            final_port_list_per_fabric \u003d fabric_map[fabric]"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_7f661d52","line":96,"updated":"2015-07-15 19:16:39.000000000","message":"Move both cleanup() calls to above this if statement so that it does not need to be duplicated.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            conn \u003d self.zm.driver._get_cli_client(fabric)"},{"line_number":94,"context_line":"            nsinfo \u003d conn.get_nameserver_info()"},{"line_number":95,"context_line":"            if formatted_initiator not in nsinfo:"},{"line_number":96,"context_line":"                conn.cleanup()"},{"line_number":97,"context_line":"                continue"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"            final_port_list_per_fabric \u003d fabric_map[fabric]"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_a28797b3","line":96,"in_reply_to":"9a41bdd9_7f661d52","updated":"2015-07-16 09:06:17.000000000","message":"Line 100 still need this connection, if I move cleanup() to above, should I re-get the connection?","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                continue"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"            final_port_list_per_fabric \u003d fabric_map[fabric]"},{"line_number":100,"context_line":"            cfgmap_from_fabric \u003d self.zm.driver._get_active_zone_set(conn)"},{"line_number":101,"context_line":"            conn.cleanup()"},{"line_number":102,"context_line":"            LOG.debug(\"cfgmap_from_fabric: %s\", cfgmap_from_fabric)"},{"line_number":103,"context_line":"            zones_members \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_5f77999f","line":100,"updated":"2015-07-15 19:16:39.000000000","message":"Do not access protected method (make it public, or do something else here).","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                continue"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"            final_port_list_per_fabric \u003d fabric_map[fabric]"},{"line_number":100,"context_line":"            cfgmap_from_fabric \u003d self.zm.driver._get_active_zone_set(conn)"},{"line_number":101,"context_line":"            conn.cleanup()"},{"line_number":102,"context_line":"            LOG.debug(\"cfgmap_from_fabric: %s\", cfgmap_from_fabric)"},{"line_number":103,"context_line":"            zones_members \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_42480bcc","line":100,"in_reply_to":"9a41bdd9_5f77999f","updated":"2015-07-16 09:06:17.000000000","message":"Do you have any suggestion to get the active zone set? I really need the info of active zone set here.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            cfgmap_from_fabric \u003d self.zm.driver._get_active_zone_set(conn)"},{"line_number":101,"context_line":"            conn.cleanup()"},{"line_number":102,"context_line":"            LOG.debug(\"cfgmap_from_fabric: %s\", cfgmap_from_fabric)"},{"line_number":103,"context_line":"            zones_members \u003d []"},{"line_number":104,"context_line":"            zones_members \u003d cfgmap_from_fabric[\u0027zones\u0027].values()"},{"line_number":105,"context_line":"            LOG.debug(\"zones_members: %s\", zones_members)"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_7f64ddb7","line":103,"updated":"2015-07-15 19:16:39.000000000","message":"Delete this line.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            cfgmap_from_fabric \u003d self.zm.driver._get_active_zone_set(conn)"},{"line_number":101,"context_line":"            conn.cleanup()"},{"line_number":102,"context_line":"            LOG.debug(\"cfgmap_from_fabric: %s\", cfgmap_from_fabric)"},{"line_number":103,"context_line":"            zones_members \u003d []"},{"line_number":104,"context_line":"            zones_members \u003d cfgmap_from_fabric[\u0027zones\u0027].values()"},{"line_number":105,"context_line":"            LOG.debug(\"zones_members: %s\", zones_members)"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_62a42f4a","line":103,"in_reply_to":"9a41bdd9_7f64ddb7","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                formatted_port \u003d self.zm.driver.get_formatted_wwn(port)"},{"line_number":113,"context_line":"                LOG.debug(\"formatted_port: %s\", formatted_port)"},{"line_number":114,"context_line":"                for zones_member in zones_members:"},{"line_number":115,"context_line":"                    if (formatted_port in zones_member):"},{"line_number":116,"context_line":"                        # For the second case use."},{"line_number":117,"context_line":"                        if formatted_initiator in zones_member:"},{"line_number":118,"context_line":"                            # First case: Found a port in the same zone with"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_9f0201b3","line":115,"updated":"2015-07-15 19:16:39.000000000","message":"No need for parenthesis in if statement.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                formatted_port \u003d self.zm.driver.get_formatted_wwn(port)"},{"line_number":113,"context_line":"                LOG.debug(\"formatted_port: %s\", formatted_port)"},{"line_number":114,"context_line":"                for zones_member in zones_members:"},{"line_number":115,"context_line":"                    if (formatted_port in zones_member):"},{"line_number":116,"context_line":"                        # For the second case use."},{"line_number":117,"context_line":"                        if formatted_initiator in zones_member:"},{"line_number":118,"context_line":"                            # First case: Found a port in the same zone with"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_e26efffe","line":115,"in_reply_to":"9a41bdd9_9f0201b3","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                        # For the third case use."},{"line_number":123,"context_line":"                        port_zone_number_map[port] +\u003d 1"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        if port_zone_number_map \u003d\u003d {}:"},{"line_number":126,"context_line":"            return (None, False)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        temp_list \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_bf702541","line":125,"updated":"2015-07-15 19:16:39.000000000","message":"if not port_zone_number_map:","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                        # For the third case use."},{"line_number":123,"context_line":"                        port_zone_number_map[port] +\u003d 1"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        if port_zone_number_map \u003d\u003d {}:"},{"line_number":126,"context_line":"            return (None, False)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        temp_list \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_42800b8b","line":125,"in_reply_to":"9a41bdd9_bf702541","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        if port_zone_number_map \u003d\u003d {}:"},{"line_number":126,"context_line":"            return (None, False)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        temp_list \u003d []"},{"line_number":129,"context_line":"        LOG.debug(\"port_zone_number_map: %s\", port_zone_number_map)"},{"line_number":130,"context_line":"        temp_list \u003d sorted(port_zone_number_map.items(), key\u003dlambda d: d[1])"},{"line_number":131,"context_line":"        # Third case: find a port referenced in fewest zone."}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_5fca391c","line":128,"updated":"2015-07-15 19:16:39.000000000","message":"Delete","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        if port_zone_number_map \u003d\u003d {}:"},{"line_number":126,"context_line":"            return (None, False)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        temp_list \u003d []"},{"line_number":129,"context_line":"        LOG.debug(\"port_zone_number_map: %s\", port_zone_number_map)"},{"line_number":130,"context_line":"        temp_list \u003d sorted(port_zone_number_map.items(), key\u003dlambda d: d[1])"},{"line_number":131,"context_line":"        # Third case: find a port referenced in fewest zone."}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_627bcfbe","line":128,"in_reply_to":"9a41bdd9_5fca391c","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        temp_list \u003d []"},{"line_number":129,"context_line":"        LOG.debug(\"port_zone_number_map: %s\", port_zone_number_map)"},{"line_number":130,"context_line":"        temp_list \u003d sorted(port_zone_number_map.items(), key\u003dlambda d: d[1])"},{"line_number":131,"context_line":"        # Third case: find a port referenced in fewest zone."},{"line_number":132,"context_line":"        LOG.debug(\"temp_list[0][0]: %s\", temp_list[0][0])"},{"line_number":133,"context_line":"        return (temp_list[0][0], True)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_7ff4dd59","line":130,"updated":"2015-07-15 19:16:39.000000000","message":"Give this variable a more meaningful name.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        temp_list \u003d []"},{"line_number":129,"context_line":"        LOG.debug(\"port_zone_number_map: %s\", port_zone_number_map)"},{"line_number":130,"context_line":"        temp_list \u003d sorted(port_zone_number_map.items(), key\u003dlambda d: d[1])"},{"line_number":131,"context_line":"        # Third case: find a port referenced in fewest zone."},{"line_number":132,"context_line":"        LOG.debug(\"temp_list[0][0]: %s\", temp_list[0][0])"},{"line_number":133,"context_line":"        return (temp_list[0][0], True)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_8544dd49","line":130,"in_reply_to":"9a41bdd9_7ff4dd59","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        LOG.debug(\"temp_list[0][0]: %s\", temp_list[0][0])"},{"line_number":133,"context_line":"        return (temp_list[0][0], True)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def _get_init_targ_map_and_tgt_port_wwns(self, wwns, need_add_con):"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        tgt_port_wwns \u003d []"},{"line_number":138,"context_line":"        init_targ_map_total \u003d {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_df2c0e9b","line":135,"updated":"2015-07-15 19:16:39.000000000","message":"Split this into two methods. The \"and\" indicates that this method is doing too much. These two methods should be public (no leading underscore), not protected. If there is repeated code in the two methods, factor that out into some protected methods (with a leading underscore).","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        init_targ_map_total \u003d {}"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        for wwn in wwns:"},{"line_number":141,"context_line":"            init_targ_map \u003d {}"},{"line_number":142,"context_line":"            tmp_port_list \u003d []"},{"line_number":143,"context_line":"            tgt_port_for_map \u003d []"},{"line_number":144,"context_line":"            tmp_flag \u003d False"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_7f406207","line":141,"updated":"2015-07-15 19:16:39.000000000","message":"There is no need to assign this here, all you do is reassign it later.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        init_targ_map_total \u003d {}"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        for wwn in wwns:"},{"line_number":141,"context_line":"            init_targ_map \u003d {}"},{"line_number":142,"context_line":"            tmp_port_list \u003d []"},{"line_number":143,"context_line":"            tgt_port_for_map \u003d []"},{"line_number":144,"context_line":"            tmp_flag \u003d False"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_85e05d2a","line":141,"in_reply_to":"9a41bdd9_7f406207","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        for wwn in wwns:"},{"line_number":141,"context_line":"            init_targ_map \u003d {}"},{"line_number":142,"context_line":"            tmp_port_list \u003d []"},{"line_number":143,"context_line":"            tgt_port_for_map \u003d []"},{"line_number":144,"context_line":"            tmp_flag \u003d False"},{"line_number":145,"context_line":"            need_new_zone \u003d False"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_9f37664c","line":142,"updated":"2015-07-15 19:16:39.000000000","message":"Rename this variable to something more meaningful. Try to avoid names that included tmp because the name doesn\u0027t tell me anything about your intent.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        for wwn in wwns:"},{"line_number":141,"context_line":"            init_targ_map \u003d {}"},{"line_number":142,"context_line":"            tmp_port_list \u003d []"},{"line_number":143,"context_line":"            tgt_port_for_map \u003d []"},{"line_number":144,"context_line":"            tmp_flag \u003d False"},{"line_number":145,"context_line":"            need_new_zone \u003d False"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_85fb7d78","line":142,"in_reply_to":"9a41bdd9_9f37664c","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            init_targ_map \u003d {}"},{"line_number":142,"context_line":"            tmp_port_list \u003d []"},{"line_number":143,"context_line":"            tgt_port_for_map \u003d []"},{"line_number":144,"context_line":"            tmp_flag \u003d False"},{"line_number":145,"context_line":"            need_new_zone \u003d False"},{"line_number":146,"context_line":"            for contr in constants.controller_list:"},{"line_number":147,"context_line":"                (fc_port_for_zone,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_244973b7","line":144,"updated":"2015-07-15 19:16:39.000000000","message":"Get rid of tmp_flag, see comment about not returning a tuple.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                          {\"tmp_flag\": tmp_flag,"},{"line_number":152,"context_line":"                           \"contr\": contr,"},{"line_number":153,"context_line":"                           \"fc_ini\": wwn})"},{"line_number":154,"context_line":"                if tmp_flag:"},{"line_number":155,"context_line":"                    need_new_zone \u003d True"},{"line_number":156,"context_line":"                if fc_port_for_zone:"},{"line_number":157,"context_line":"                    LOG.debug(\"Get fc port %(fc_port_for_zone)s for \""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_84e71fab","line":154,"updated":"2015-07-15 19:16:39.000000000","message":"Check if fc_port_for_zone is None instead of tmp_flag.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                               \"contr\": contr,"},{"line_number":161,"context_line":"                               \"tmp_flag\": tmp_flag})"},{"line_number":162,"context_line":"                    tgt_port_wwns.append(fc_port_for_zone)"},{"line_number":163,"context_line":"                    if not tmp_flag:"},{"line_number":164,"context_line":"                        tgt_port_for_map.append(fc_port_for_zone)"},{"line_number":165,"context_line":"                    if tmp_flag:"},{"line_number":166,"context_line":"                        tmp_port_list.append(fc_port_for_zone)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_24f7335a","line":163,"updated":"2015-07-15 19:16:39.000000000","message":"Check if fc_port_for_zone is None instead of tmp_flag.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                               \"contr\": contr,"},{"line_number":161,"context_line":"                               \"tmp_flag\": tmp_flag})"},{"line_number":162,"context_line":"                    tgt_port_wwns.append(fc_port_for_zone)"},{"line_number":163,"context_line":"                    if not tmp_flag:"},{"line_number":164,"context_line":"                        tgt_port_for_map.append(fc_port_for_zone)"},{"line_number":165,"context_line":"                    if tmp_flag:"},{"line_number":166,"context_line":"                        tmp_port_list.append(fc_port_for_zone)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_a0b22f4a","line":163,"in_reply_to":"9a41bdd9_24f7335a","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                    tgt_port_wwns.append(fc_port_for_zone)"},{"line_number":163,"context_line":"                    if not tmp_flag:"},{"line_number":164,"context_line":"                        tgt_port_for_map.append(fc_port_for_zone)"},{"line_number":165,"context_line":"                    if tmp_flag:"},{"line_number":166,"context_line":"                        tmp_port_list.append(fc_port_for_zone)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"            init_targ_map[wwn] \u003d tmp_port_list"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_c498c71e","line":165,"updated":"2015-07-15 19:16:39.000000000","message":"Use else statement.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                    tgt_port_wwns.append(fc_port_for_zone)"},{"line_number":163,"context_line":"                    if not tmp_flag:"},{"line_number":164,"context_line":"                        tgt_port_for_map.append(fc_port_for_zone)"},{"line_number":165,"context_line":"                    if tmp_flag:"},{"line_number":166,"context_line":"                        tmp_port_list.append(fc_port_for_zone)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"            init_targ_map[wwn] \u003d tmp_port_list"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_e5360950","line":165,"in_reply_to":"9a41bdd9_c498c71e","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":165,"context_line":"                    if tmp_flag:"},{"line_number":166,"context_line":"                        tmp_port_list.append(fc_port_for_zone)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"            init_targ_map[wwn] \u003d tmp_port_list"},{"line_number":169,"context_line":"            LOG.debug(\"tmp_port_list: %s\", tmp_port_list)"},{"line_number":170,"context_line":"            init_targ_map_total[wwn] \u003d tgt_port_for_map"},{"line_number":171,"context_line":"            if need_new_zone and need_add_con:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_5f71de74","line":168,"updated":"2015-07-15 19:16:39.000000000","message":"Only assign this in:\n\n if need_new_zone and need_add_con:\n\nIt is not used anywhere else and just gives the reader more variables to worry about.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":165,"context_line":"                    if tmp_flag:"},{"line_number":166,"context_line":"                        tmp_port_list.append(fc_port_for_zone)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"            init_targ_map[wwn] \u003d tmp_port_list"},{"line_number":169,"context_line":"            LOG.debug(\"tmp_port_list: %s\", tmp_port_list)"},{"line_number":170,"context_line":"            init_targ_map_total[wwn] \u003d tgt_port_for_map"},{"line_number":171,"context_line":"            if need_new_zone and need_add_con:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_45e495aa","line":168,"in_reply_to":"9a41bdd9_5f71de74","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"0afa674b6589b9f5d28f1dcba466a3cebfb9828e","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def __init__(self, zone_manager, restclient):"},{"line_number":29,"context_line":"        self.zone_manager \u003d zone_manager"},{"line_number":30,"context_line":"        self.restclient \u003d restclient"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def _check_fc_port_and_init(self, wwns, hostid):"},{"line_number":33,"context_line":"        port_lists \u003d self.restclient.get_all_fc_ports_from_array()"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_c9016e3b","line":30,"updated":"2015-07-17 01:54:10.000000000","message":"s/restclient/rest_client","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"bb3fee908fd216f4a1531fe6c002fdabd7d549f1","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        self.zone_manager \u003d zone_manager"},{"line_number":30,"context_line":"        self.restclient \u003d restclient"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def _check_fc_port_and_init(self, wwns, hostid):"},{"line_number":33,"context_line":"        port_lists \u003d self.restclient.get_all_fc_ports_from_array()"},{"line_number":34,"context_line":"        fabric_map \u003d self.zone_manager.get_san_context(port_lists)"},{"line_number":35,"context_line":"        LOG.debug(\"fabric_map for all FC ports on array: %s\", fabric_map)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_571662a8","line":32,"updated":"2015-07-16 20:26:10.000000000","message":"Make method public.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        self.zone_manager \u003d zone_manager"},{"line_number":30,"context_line":"        self.restclient \u003d restclient"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def _check_fc_port_and_init(self, wwns, hostid):"},{"line_number":33,"context_line":"        port_lists \u003d self.restclient.get_all_fc_ports_from_array()"},{"line_number":34,"context_line":"        fabric_map \u003d self.zone_manager.get_san_context(port_lists)"},{"line_number":35,"context_line":"        LOG.debug(\"fabric_map for all FC ports on array: %s\", fabric_map)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_5f30ac9e","line":32,"in_reply_to":"9a41bdd9_571662a8","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"bb3fee908fd216f4a1531fe6c002fdabd7d549f1","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        if not fabric_map:"},{"line_number":37,"context_line":"            msg \u003d (_(\u0027No FC port on array is connected to switch.\u0027))"},{"line_number":38,"context_line":"            LOG.error(msg)"},{"line_number":39,"context_line":"            raise exception.CinderException(msg)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        wwn_connect_to_switch \u003d False"},{"line_number":42,"context_line":"        # Get all fabrics nameserver info."}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_da693727","line":39,"updated":"2015-07-16 20:26:10.000000000","message":"I think this should be a more specific exception. CinderException is pretty generic.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        if not fabric_map:"},{"line_number":37,"context_line":"            msg \u003d (_(\u0027No FC port on array is connected to switch.\u0027))"},{"line_number":38,"context_line":"            LOG.error(msg)"},{"line_number":39,"context_line":"            raise exception.CinderException(msg)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        wwn_connect_to_switch \u003d False"},{"line_number":42,"context_line":"        # Get all fabrics nameserver info."}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_ff33c060","line":39,"in_reply_to":"9a41bdd9_da693727","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"0afa674b6589b9f5d28f1dcba466a3cebfb9828e","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        wwn_connect_to_switch \u003d False"},{"line_number":42,"context_line":"        # Get all fabrics nameserver info."},{"line_number":43,"context_line":"        nsinfos \u003d {}"},{"line_number":44,"context_line":"        for fabric in fabric_map.keys():"},{"line_number":45,"context_line":"            conn \u003d self.zone_manager.driver._get_cli_client(fabric)"},{"line_number":46,"context_line":"            nsinfo \u003d conn.get_nameserver_info()"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_29a33a51","line":43,"updated":"2015-07-17 01:54:10.000000000","message":"what is nsinfos? It\u0027s not clear. The name of the parameter should be more clear.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        wwn_connect_to_switch \u003d False"},{"line_number":42,"context_line":"        # Get all fabrics nameserver info."},{"line_number":43,"context_line":"        nsinfos \u003d {}"},{"line_number":44,"context_line":"        for fabric in fabric_map.keys():"},{"line_number":45,"context_line":"            conn \u003d self.zone_manager.driver._get_cli_client(fabric)"},{"line_number":46,"context_line":"            nsinfo \u003d conn.get_nameserver_info()"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_1fd544b8","line":43,"in_reply_to":"9a41bdd9_29a33a51","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"bb3fee908fd216f4a1531fe6c002fdabd7d549f1","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        if not wwn_connect_to_switch:"},{"line_number":58,"context_line":"            msg \u003d (_(\u0027No wwn on host is connected to switch.\u0027))"},{"line_number":59,"context_line":"            LOG.error(msg)"},{"line_number":60,"context_line":"            raise exception.CinderException(msg)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _get_one_fc_port_for_zone(self, initiator, contr):"},{"line_number":63,"context_line":"        false_ret \u003d (None, False)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_17ec5a8e","line":60,"updated":"2015-07-16 20:26:10.000000000","message":"Same as above.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        if not wwn_connect_to_switch:"},{"line_number":58,"context_line":"            msg \u003d (_(\u0027No wwn on host is connected to switch.\u0027))"},{"line_number":59,"context_line":"            LOG.error(msg)"},{"line_number":60,"context_line":"            raise exception.CinderException(msg)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _get_one_fc_port_for_zone(self, initiator, contr):"},{"line_number":63,"context_line":"        false_ret \u003d (None, False)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_dfd7dcbd","line":60,"in_reply_to":"9a41bdd9_17ec5a8e","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"bb3fee908fd216f4a1531fe6c002fdabd7d549f1","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        sorted_ports \u003d sorted(port_zone_number_map.items(), key\u003dlambda d: d[1])"},{"line_number":121,"context_line":"        return (sorted_ports[0][0], True)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _get_init_targ_map_and_tgt_port_wwns(self, wwns, need_add_con):"},{"line_number":124,"context_line":"        tgt_port_wwns \u003d []"},{"line_number":125,"context_line":"        init_targ_map_total \u003d {}"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_b7256e0b","line":123,"updated":"2015-07-16 20:26:10.000000000","message":"Make method public.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        sorted_ports \u003d sorted(port_zone_number_map.items(), key\u003dlambda d: d[1])"},{"line_number":121,"context_line":"        return (sorted_ports[0][0], True)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def _get_init_targ_map_and_tgt_port_wwns(self, wwns, need_add_con):"},{"line_number":124,"context_line":"        tgt_port_wwns \u003d []"},{"line_number":125,"context_line":"        init_targ_map_total \u003d {}"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_3feda88e","line":123,"in_reply_to":"9a41bdd9_b7256e0b","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"bb3fee908fd216f4a1531fe6c002fdabd7d549f1","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        for wwn in wwns:"},{"line_number":128,"context_line":"            port_list_for_zone \u003d []"},{"line_number":129,"context_line":"            tgt_port_for_map \u003d []"},{"line_number":130,"context_line":"            need_new_zone \u003d False"},{"line_number":131,"context_line":"            for contr in constants.controller_list:"},{"line_number":132,"context_line":"                (fc_port_for_zone,"},{"line_number":133,"context_line":"                 need_new_zone) \u003d self._get_one_fc_port_for_zone(wwn, contr)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_9aee4fb3","line":130,"updated":"2015-07-16 20:26:10.000000000","message":"Do not initialize this variable here. It is just reassigned later.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        for wwn in wwns:"},{"line_number":128,"context_line":"            port_list_for_zone \u003d []"},{"line_number":129,"context_line":"            tgt_port_for_map \u003d []"},{"line_number":130,"context_line":"            need_new_zone \u003d False"},{"line_number":131,"context_line":"            for contr in constants.controller_list:"},{"line_number":132,"context_line":"                (fc_port_for_zone,"},{"line_number":133,"context_line":"                 need_new_zone) \u003d self._get_one_fc_port_for_zone(wwn, contr)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_5f998c1e","line":130,"in_reply_to":"9a41bdd9_9aee4fb3","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"4ae35ea991b0a970f58d0399cc8c79d6090244ce","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            LOG.error(msg)"},{"line_number":39,"context_line":"            raise exception.VolumeBackendAPIException(data\u003dmsg)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        wwn_connect_to_switch \u003d False"},{"line_number":42,"context_line":"        # Get all fabrics nameserver info."},{"line_number":43,"context_line":"        nsinfo_for_all_fabrics \u003d {}"},{"line_number":44,"context_line":"        for fabric in fabric_map.keys():"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_43c0b8e0","line":41,"updated":"2015-07-21 17:39:50.000000000","message":"Change wwn_connect_to_switch to wwn_connected_to_switch. Also move this closer to where it is used. It should be defined just before the for loop:\n\n for wwn in wwns:","commit_id":"a7d9d1e2e6fdb98ed9803ccee5376ea4db091d28"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"7a91eed3e0abb36c2cb2e88306609d30b60d0052","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            LOG.error(msg)"},{"line_number":39,"context_line":"            raise exception.VolumeBackendAPIException(data\u003dmsg)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        wwn_connect_to_switch \u003d False"},{"line_number":42,"context_line":"        # Get all fabrics nameserver info."},{"line_number":43,"context_line":"        nsinfo_for_all_fabrics \u003d {}"},{"line_number":44,"context_line":"        for fabric in fabric_map.keys():"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_76be8d66","line":41,"in_reply_to":"3a50d1a3_43c0b8e0","updated":"2015-07-22 03:20:00.000000000","message":"Done","commit_id":"a7d9d1e2e6fdb98ed9803ccee5376ea4db091d28"},{"author":{"_account_id":17444,"name":"Jay.Shen","email":"shenhong09@huawei.com","username":"Jay.Shen"},"change_message_id":"a7af3d0565669edd60980338e8b62f5d0a04bc98","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            conn \u003d self.zone_manager.driver._get_cli_client(fabric)"},{"line_number":46,"context_line":"            nsinfo \u003d conn.get_nameserver_info()"},{"line_number":47,"context_line":"            nsinfo_for_all_fabrics[fabric] \u003d nsinfo"},{"line_number":48,"context_line":"            conn.cleanup()"},{"line_number":49,"context_line":"        for wwn in wwns:"},{"line_number":50,"context_line":"            for fabric in fabric_map.keys():"},{"line_number":51,"context_line":"                formatted_initiator \u003d \\"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_09204e47","line":48,"updated":"2015-07-22 03:20:18.000000000","message":"should have a black line for the\" for fabric in fabric_map.keys()\"  end","commit_id":"a7d9d1e2e6fdb98ed9803ccee5376ea4db091d28"},{"author":{"_account_id":17444,"name":"Jay.Shen","email":"shenhong09@huawei.com","username":"Jay.Shen"},"change_message_id":"a7af3d0565669edd60980338e8b62f5d0a04bc98","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        port_list_from_contr \u003d self.restclient.get_fc_ports_from_contr(contr)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        if not port_list_from_contr:"},{"line_number":69,"context_line":"            LOG.debug(\"No available port found on controller %s.\", contr)"},{"line_number":70,"context_line":"            return false_ret"},{"line_number":71,"context_line":"        LOG.debug(\"port_list_from_contr: %s\", port_list_from_contr)"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_e9d08221","line":69,"updated":"2015-07-22 03:20:18.000000000","message":"\"No available port found on controller\"  --\u003eNo available port is found on controller  ?","commit_id":"a7d9d1e2e6fdb98ed9803ccee5376ea4db091d28"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"4ae35ea991b0a970f58d0399cc8c79d6090244ce","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                self.zone_manager.driver._get_active_zone_set(conn)"},{"line_number":95,"context_line":"            conn.cleanup()"},{"line_number":96,"context_line":"            LOG.debug(\"cfgmap_from_fabric: %s\", cfgmap_from_fabric)"},{"line_number":97,"context_line":"            zones_members \u003d cfgmap_from_fabric[\u0027zones\u0027].values()"},{"line_number":98,"context_line":"            LOG.debug(\"zones_members: %s\", zones_members)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"            LOG.debug(\"final_port_list_per_fabric: %s\","}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_8e3027ea","line":97,"updated":"2015-07-21 17:39:50.000000000","message":"Should \"zones_members\" just be called \"zones\"?","commit_id":"a7d9d1e2e6fdb98ed9803ccee5376ea4db091d28"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"7a91eed3e0abb36c2cb2e88306609d30b60d0052","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                self.zone_manager.driver._get_active_zone_set(conn)"},{"line_number":95,"context_line":"            conn.cleanup()"},{"line_number":96,"context_line":"            LOG.debug(\"cfgmap_from_fabric: %s\", cfgmap_from_fabric)"},{"line_number":97,"context_line":"            zones_members \u003d cfgmap_from_fabric[\u0027zones\u0027].values()"},{"line_number":98,"context_line":"            LOG.debug(\"zones_members: %s\", zones_members)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"            LOG.debug(\"final_port_list_per_fabric: %s\","}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_9651d938","line":97,"in_reply_to":"3a50d1a3_8e3027ea","updated":"2015-07-22 03:20:00.000000000","message":"Done","commit_id":"a7d9d1e2e6fdb98ed9803ccee5376ea4db091d28"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"4ae35ea991b0a970f58d0399cc8c79d6090244ce","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                port_zone_number_map[port] \u003d 0"},{"line_number":105,"context_line":"                formatted_port \u003d \\"},{"line_number":106,"context_line":"                    self.zone_manager.driver.get_formatted_wwn(port)"},{"line_number":107,"context_line":"                for zones_member in zones_members:"},{"line_number":108,"context_line":"                    if formatted_port in zones_member:"},{"line_number":109,"context_line":"                        if formatted_initiator in zones_member:"},{"line_number":110,"context_line":"                            # Find a port in the same zone with the"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_0e5bb72f","line":107,"updated":"2015-07-21 17:39:50.000000000","message":"If you change zones_members to zones, then this should be:\n\n for zone in zones:","commit_id":"a7d9d1e2e6fdb98ed9803ccee5376ea4db091d28"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"7a91eed3e0abb36c2cb2e88306609d30b60d0052","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                port_zone_number_map[port] \u003d 0"},{"line_number":105,"context_line":"                formatted_port \u003d \\"},{"line_number":106,"context_line":"                    self.zone_manager.driver.get_formatted_wwn(port)"},{"line_number":107,"context_line":"                for zones_member in zones_members:"},{"line_number":108,"context_line":"                    if formatted_port in zones_member:"},{"line_number":109,"context_line":"                        if formatted_initiator in zones_member:"},{"line_number":110,"context_line":"                            # Find a port in the same zone with the"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_5647d176","line":107,"in_reply_to":"3a50d1a3_0e5bb72f","updated":"2015-07-22 03:20:00.000000000","message":"Done","commit_id":"a7d9d1e2e6fdb98ed9803ccee5376ea4db091d28"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"4ae35ea991b0a970f58d0399cc8c79d6090244ce","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                for zones_member in zones_members:"},{"line_number":108,"context_line":"                    if formatted_port in zones_member:"},{"line_number":109,"context_line":"                        if formatted_initiator in zones_member:"},{"line_number":110,"context_line":"                            # Find a port in the same zone with the"},{"line_number":111,"context_line":"                            # given initiator, needn\u0027t create new zone."},{"line_number":112,"context_line":"                            return (port, False)"},{"line_number":113,"context_line":"                        port_zone_number_map[port] +\u003d 1"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_ce0f0f2d","line":110,"updated":"2015-07-21 17:39:50.000000000","message":"s/Find/Found/","commit_id":"a7d9d1e2e6fdb98ed9803ccee5376ea4db091d28"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"7a91eed3e0abb36c2cb2e88306609d30b60d0052","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                for zones_member in zones_members:"},{"line_number":108,"context_line":"                    if formatted_port in zones_member:"},{"line_number":109,"context_line":"                        if formatted_initiator in zones_member:"},{"line_number":110,"context_line":"                            # Find a port in the same zone with the"},{"line_number":111,"context_line":"                            # given initiator, needn\u0027t create new zone."},{"line_number":112,"context_line":"                            return (port, False)"},{"line_number":113,"context_line":"                        port_zone_number_map[port] +\u003d 1"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_160ce93f","line":110,"in_reply_to":"3a50d1a3_ce0f0f2d","updated":"2015-07-22 03:20:00.000000000","message":"Done","commit_id":"a7d9d1e2e6fdb98ed9803ccee5376ea4db091d28"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"4ae35ea991b0a970f58d0399cc8c79d6090244ce","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        if not port_zone_number_map:"},{"line_number":116,"context_line":"            return false_ret"},{"line_number":117,"context_line":"        LOG.debug(\"port_zone_number_map: %s\", port_zone_number_map)"},{"line_number":118,"context_line":"        # Find a port not connected to the initiator and"},{"line_number":119,"context_line":"        # owned by fewest zones, need create new zone."},{"line_number":120,"context_line":"        sorted_ports \u003d sorted(port_zone_number_map.items(), key\u003dlambda d: d[1])"},{"line_number":121,"context_line":"        return (sorted_ports[0][0], True)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_5e0dbf35","line":118,"updated":"2015-07-21 17:39:50.000000000","message":"Perhaps s/Find/Select","commit_id":"a7d9d1e2e6fdb98ed9803ccee5376ea4db091d28"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"7a91eed3e0abb36c2cb2e88306609d30b60d0052","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        if not port_zone_number_map:"},{"line_number":116,"context_line":"            return false_ret"},{"line_number":117,"context_line":"        LOG.debug(\"port_zone_number_map: %s\", port_zone_number_map)"},{"line_number":118,"context_line":"        # Find a port not connected to the initiator and"},{"line_number":119,"context_line":"        # owned by fewest zones, need create new zone."},{"line_number":120,"context_line":"        sorted_ports \u003d sorted(port_zone_number_map.items(), key\u003dlambda d: d[1])"},{"line_number":121,"context_line":"        return (sorted_ports[0][0], True)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_29074a19","line":118,"in_reply_to":"3a50d1a3_5e0dbf35","updated":"2015-07-22 03:20:00.000000000","message":"Done","commit_id":"a7d9d1e2e6fdb98ed9803ccee5376ea4db091d28"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"4ae35ea991b0a970f58d0399cc8c79d6090244ce","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        sorted_ports \u003d sorted(port_zone_number_map.items(), key\u003dlambda d: d[1])"},{"line_number":121,"context_line":"        return (sorted_ports[0][0], True)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def get_init_targ_map_and_tgt_port_wwns(self, wwns, need_add_con):"},{"line_number":124,"context_line":"        tgt_port_wwns \u003d []"},{"line_number":125,"context_line":"        init_targ_map_total \u003d {}"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_cecdcf5e","line":123,"updated":"2015-07-21 17:39:50.000000000","message":"This function appears to be doing three things:\n\n1) get_init_targ_map\n\n2) get_tgt_port_wwns\n\n3) Adding some connections if new zones are needed\n\nIt would be better if this were broken into multiple functions that each did one thing. Furthermore, it is critical that the function not have unexpected side effects not implied by its name (3).\n\nLet me know if I am incorrect in any of the three things I think this code is doing.","commit_id":"a7d9d1e2e6fdb98ed9803ccee5376ea4db091d28"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"7a91eed3e0abb36c2cb2e88306609d30b60d0052","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        sorted_ports \u003d sorted(port_zone_number_map.items(), key\u003dlambda d: d[1])"},{"line_number":121,"context_line":"        return (sorted_ports[0][0], True)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def get_init_targ_map_and_tgt_port_wwns(self, wwns, need_add_con):"},{"line_number":124,"context_line":"        tgt_port_wwns \u003d []"},{"line_number":125,"context_line":"        init_targ_map_total \u003d {}"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_89969e3d","line":123,"in_reply_to":"3a50d1a3_cecdcf5e","updated":"2015-07-22 03:20:00.000000000","message":"The difficulty to broken this function is that function \"_get_one_fc_port_for_zone\" called in this function does lots of switch connections and really takes some time. If I broken this function into two functions, the times function \"_get_one_fc_port_for_zone\" will be called will double. This is the only reason I did not broken this function.","commit_id":"a7d9d1e2e6fdb98ed9803ccee5376ea4db091d28"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"599db2565f7cfab53de5e3fdceed05d0827dd88b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        # Get all fabrics nameserver info."},{"line_number":42,"context_line":"        nsinfo_for_all_fabrics \u003d {}"},{"line_number":43,"context_line":"        for fabric in fabric_map.keys():"},{"line_number":44,"context_line":"            conn \u003d self.zone_manager.driver._get_cli_client(fabric)"},{"line_number":45,"context_line":"            nsinfo \u003d conn.get_nameserver_info()"},{"line_number":46,"context_line":"            nsinfo_for_all_fabrics[fabric] \u003d nsinfo"},{"line_number":47,"context_line":"            conn.cleanup()"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_29287c85","line":44,"updated":"2015-07-22 19:57:55.000000000","message":"There is still a use of a protected method here.","commit_id":"a68865e55f2d1ada9ed34c451895e77cc436c0ab"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"c8d6fa58739964a96853c56591b0d3cd7dc2f26f","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        # Get all fabrics nameserver info."},{"line_number":42,"context_line":"        nsinfo_for_all_fabrics \u003d {}"},{"line_number":43,"context_line":"        for fabric in fabric_map.keys():"},{"line_number":44,"context_line":"            conn \u003d self.zone_manager.driver._get_cli_client(fabric)"},{"line_number":45,"context_line":"            nsinfo \u003d conn.get_nameserver_info()"},{"line_number":46,"context_line":"            nsinfo_for_all_fabrics[fabric] \u003d nsinfo"},{"line_number":47,"context_line":"            conn.cleanup()"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_ee1fe8b4","line":44,"in_reply_to":"3a50d1a3_29287c85","updated":"2015-07-23 02:27:20.000000000","message":"Skyler Berg, I need the _get_cli_client here but I have no other way to get the client except for call this method directly. So do you have any better suggestion?","commit_id":"a68865e55f2d1ada9ed34c451895e77cc436c0ab"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"599db2565f7cfab53de5e3fdceed05d0827dd88b","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                    self.zone_manager.driver.get_formatted_wwn(wwn)"},{"line_number":54,"context_line":"                if formatted_initiator in nsinfo_for_all_fabrics[fabric]:"},{"line_number":55,"context_line":"                    wwn_connected_to_switch \u003d True"},{"line_number":56,"context_line":"                    self.restclient._ensure_fc_initiator_added(wwn, hostid)"},{"line_number":57,"context_line":"                    break"},{"line_number":58,"context_line":"        if not wwn_connected_to_switch:"},{"line_number":59,"context_line":"            msg \u003d (_(\u0027No wwn on host is connected to switch.\u0027))"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_e2b14902","line":56,"updated":"2015-07-22 19:57:55.000000000","message":"There is still a use of a protected method here.","commit_id":"a68865e55f2d1ada9ed34c451895e77cc436c0ab"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"c8d6fa58739964a96853c56591b0d3cd7dc2f26f","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                    self.zone_manager.driver.get_formatted_wwn(wwn)"},{"line_number":54,"context_line":"                if formatted_initiator in nsinfo_for_all_fabrics[fabric]:"},{"line_number":55,"context_line":"                    wwn_connected_to_switch \u003d True"},{"line_number":56,"context_line":"                    self.restclient._ensure_fc_initiator_added(wwn, hostid)"},{"line_number":57,"context_line":"                    break"},{"line_number":58,"context_line":"        if not wwn_connected_to_switch:"},{"line_number":59,"context_line":"            msg \u003d (_(\u0027No wwn on host is connected to switch.\u0027))"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_ee57e823","line":56,"in_reply_to":"3a50d1a3_e2b14902","updated":"2015-07-23 02:27:20.000000000","message":"Done","commit_id":"a68865e55f2d1ada9ed34c451895e77cc436c0ab"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"599db2565f7cfab53de5e3fdceed05d0827dd88b","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        for fabric in fabric_map.keys():"},{"line_number":85,"context_line":"            LOG.debug(\"Dealing with fabric: %s.\", fabric)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            conn \u003d self.zone_manager.driver._get_cli_client(fabric)"},{"line_number":88,"context_line":"            nsinfo \u003d conn.get_nameserver_info()"},{"line_number":89,"context_line":"            if formatted_initiator not in nsinfo:"},{"line_number":90,"context_line":"                conn.cleanup()"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_4954e8fd","line":87,"updated":"2015-07-22 19:57:55.000000000","message":"There is still a use of a protected method here.","commit_id":"a68865e55f2d1ada9ed34c451895e77cc436c0ab"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"599db2565f7cfab53de5e3fdceed05d0827dd88b","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"            final_port_list_per_fabric \u003d fabric_map[fabric]"},{"line_number":94,"context_line":"            cfgmap_from_fabric \u003d \\"},{"line_number":95,"context_line":"                self.zone_manager.driver._get_active_zone_set(conn)"},{"line_number":96,"context_line":"            conn.cleanup()"},{"line_number":97,"context_line":"            LOG.debug(\"cfgmap_from_fabric: %s\", cfgmap_from_fabric)"},{"line_number":98,"context_line":"            zones \u003d cfgmap_from_fabric[\u0027zones\u0027].values()"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a50d1a3_e255c9c1","line":95,"updated":"2015-07-22 19:57:55.000000000","message":"There is still a use of a protected method here.","commit_id":"a68865e55f2d1ada9ed34c451895e77cc436c0ab"},{"author":{"_account_id":8757,"name":"Angela Smith","email":"angela.smith@broadcom.com","username":"asmith_brcd"},"change_message_id":"5b649eddff8153ca52345a21dc4cea2ccfbfc551","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        # Get all fabrics nameserver info."},{"line_number":42,"context_line":"        nsinfo_for_all_fabrics \u003d {}"},{"line_number":43,"context_line":"        for fabric in fabric_map.keys():"},{"line_number":44,"context_line":"            conn \u003d self.zone_manager.driver._get_cli_client(fabric)"},{"line_number":45,"context_line":"            nsinfo \u003d conn.get_nameserver_info()"},{"line_number":46,"context_line":"            nsinfo_for_all_fabrics[fabric] \u003d nsinfo"},{"line_number":47,"context_line":"            conn.cleanup()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_4b4c7c76","line":44,"updated":"2015-07-24 09:19:50.000000000","message":"Do not access a protected method of a driver.  There is no need to verify if ports on the host are connected to the switch.  This is taken care of by the FCZM.","commit_id":"dfe70ba4710f6321f288c9e8f5fa66b6c00cb477"},{"author":{"_account_id":8757,"name":"Angela Smith","email":"angela.smith@broadcom.com","username":"asmith_brcd"},"change_message_id":"5b649eddff8153ca52345a21dc4cea2ccfbfc551","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        for fabric in fabric_map.keys():"},{"line_number":85,"context_line":"            LOG.debug(\"Dealing with fabric: %s.\", fabric)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            conn \u003d self.zone_manager.driver._get_cli_client(fabric)"},{"line_number":88,"context_line":"            nsinfo \u003d conn.get_nameserver_info()"},{"line_number":89,"context_line":"            if formatted_initiator not in nsinfo:"},{"line_number":90,"context_line":"                conn.cleanup()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_cb672ce9","line":87,"updated":"2015-07-24 09:19:50.000000000","message":"Do not access a protected method of a driver.","commit_id":"dfe70ba4710f6321f288c9e8f5fa66b6c00cb477"},{"author":{"_account_id":8757,"name":"Angela Smith","email":"angela.smith@broadcom.com","username":"asmith_brcd"},"change_message_id":"5b649eddff8153ca52345a21dc4cea2ccfbfc551","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"            final_port_list_per_fabric \u003d fabric_map[fabric]"},{"line_number":94,"context_line":"            cfgmap_from_fabric \u003d \\"},{"line_number":95,"context_line":"                self.zone_manager.driver._get_active_zone_set(conn)"},{"line_number":96,"context_line":"            conn.cleanup()"},{"line_number":97,"context_line":"            LOG.debug(\"cfgmap_from_fabric: %s.\", cfgmap_from_fabric)"},{"line_number":98,"context_line":"            zones \u003d cfgmap_from_fabric[\u0027zones\u0027].values()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_cb7bac28","line":95,"updated":"2015-07-24 09:19:50.000000000","message":"By using driver specific methods, the volume driver will be limited to use by only those vendor FC switches.  Volume drivers should only use common code to ensure compatibility with all drivers.  If someone connects a Huawei storage to a non-Brocade switch and uses OpenStack, the Huawei volume driver will break here.","commit_id":"dfe70ba4710f6321f288c9e8f5fa66b6c00cb477"},{"author":{"_account_id":8757,"name":"Angela Smith","email":"angela.smith@broadcom.com","username":"asmith_brcd"},"change_message_id":"5b649eddff8153ca52345a21dc4cea2ccfbfc551","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                    if formatted_port in zone:"},{"line_number":110,"context_line":"                        if formatted_initiator in zone:"},{"line_number":111,"context_line":"                            # Found a port in the same zone with the"},{"line_number":112,"context_line":"                            # given initiator, needn\u0027t create new zone."},{"line_number":113,"context_line":"                            return (port, False)"},{"line_number":114,"context_line":"                        port_zone_number_map[port] +\u003d 1"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_4b81dc4c","line":112,"updated":"2015-07-24 09:19:50.000000000","message":"There is no need for any of this above logic as this is all handled in the FCZM.  Volume drivers should not be concerned with if a zone already exists.  Leave that up to the FCZM to handle","commit_id":"dfe70ba4710f6321f288c9e8f5fa66b6c00cb477"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"0b472c0c664b0160b169521a5982f8ef20907358","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    \"\"\"FC zone helper for Huawei driver.\"\"\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def __init__(self, zone_manager, restclient):"},{"line_number":28,"context_line":"        self.zone_manager \u003d zone_manager"},{"line_number":29,"context_line":"        self.restclient \u003d restclient"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def _get_fc_port_contr_map(self):"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa1b9901_76e802e3","line":28,"updated":"2015-08-18 19:14:22.000000000","message":"this isn\u0027t even used.","commit_id":"9cc214eeebabecc7e2a57c3efcb02dac75a205f9"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"a3a54d78fe6f53d9bb998d248fa040133ab6df9c","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    \"\"\"FC zone helper for Huawei driver.\"\"\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def __init__(self, zone_manager, restclient):"},{"line_number":28,"context_line":"        self.zone_manager \u003d zone_manager"},{"line_number":29,"context_line":"        self.restclient \u003d restclient"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def _get_fc_port_contr_map(self):"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa1b9901_1ce19cd0","line":28,"in_reply_to":"fa1b9901_76e802e3","updated":"2015-08-19 01:57:55.000000000","message":"Done, thanks!","commit_id":"9cc214eeebabecc7e2a57c3efcb02dac75a205f9"}],"cinder/volume/drivers/huawei/huawei_driver.py":[{"author":{"_account_id":12924,"name":"Patrick East","email":"east.patrick@gmail.com","username":"patrick.east"},"change_message_id":"95a3462c0962d8e5e8983fae79b6562d6943140c","unresolved":false,"context_lines":[{"line_number":308,"context_line":"                    is_ini_in_free_wwns \u003d True"},{"line_number":309,"context_line":"            if not is_ini_in_free_wwns:"},{"line_number":310,"context_line":"                msg \u003d (_(\u0027FC is not connected from host to array directly.\u0027))"},{"line_number":311,"context_line":"                LOG.error(msg)"},{"line_number":312,"context_line":"                raise exception.CinderException(msg)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"            # Create host if not exist."}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_c5e54aa4","line":311,"updated":"2015-07-15 04:24:09.000000000","message":"should be LOG.exception(), check out http://docs.openstack.org/developer/oslo.i18n/guidelines.html#choosing-a-marker-function for more info","commit_id":"f60432517439a2fab0423c14e33344f716d971d1"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from oslo_config import cfg"},{"line_number":19,"context_line":"from oslo_log import log as logging"},{"line_number":20,"context_line":"from oslo_utils import excutils"},{"line_number":21,"context_line":"from oslo_utils import importutils"},{"line_number":22,"context_line":"from oslo_utils import units"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from cinder import exception"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_9f9201f5","line":21,"updated":"2015-07-15 19:16:39.000000000","message":"Why not just import your module?","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from oslo_config import cfg"},{"line_number":19,"context_line":"from oslo_log import log as logging"},{"line_number":20,"context_line":"from oslo_utils import excutils"},{"line_number":21,"context_line":"from oslo_utils import importutils"},{"line_number":22,"context_line":"from oslo_utils import units"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from cinder import exception"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_3b7f2ee1","line":21,"in_reply_to":"9a41bdd9_9f9201f5","updated":"2015-07-16 09:06:17.000000000","message":"We want to import the specific module only if the user really need it.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"aaad1222b446a42ee88a245b16744d20ca7e3f50","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":48,"context_line":"        super(HuaweiBaseDriver, self).__init__(*args, **kwargs)"},{"line_number":49,"context_line":"        self.configuration \u003d kwargs.get(\u0027configuration\u0027, None)"},{"line_number":50,"context_line":"        self.zm \u003d None  # zone manager"},{"line_number":51,"context_line":"        if not self.configuration:"},{"line_number":52,"context_line":"            msg \u003d (_(\u0027_instantiate_driver: configuration not found.\u0027))"},{"line_number":53,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_9343e712","line":50,"updated":"2015-07-15 19:16:39.000000000","message":"Unless \"zm\" is the nomenclature used in your product, change this variable name to self.zone_manager. zm is needlessly cryptic. The comment should be removed after this change.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":48,"context_line":"        super(HuaweiBaseDriver, self).__init__(*args, **kwargs)"},{"line_number":49,"context_line":"        self.configuration \u003d kwargs.get(\u0027configuration\u0027, None)"},{"line_number":50,"context_line":"        self.zm \u003d None  # zone manager"},{"line_number":51,"context_line":"        if not self.configuration:"},{"line_number":52,"context_line":"            msg \u003d (_(\u0027_instantiate_driver: configuration not found.\u0027))"},{"line_number":53,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_db8162c4","line":50,"in_reply_to":"9a41bdd9_9343e712","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"bb3fee908fd216f4a1531fe6c002fdabd7d549f1","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from oslo_config import cfg"},{"line_number":19,"context_line":"from oslo_log import log as logging"},{"line_number":20,"context_line":"from oslo_utils import excutils"},{"line_number":21,"context_line":"from oslo_utils import importutils"},{"line_number":22,"context_line":"from oslo_utils import units"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from cinder import exception"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_f4a9b491","line":21,"updated":"2015-07-16 20:26:10.000000000","message":"You should just import the package that you want. Right now you are still importing an additional package, just not your package. I might be missing something, but it seems like this is attempting to optimize something that doesn\u0027t need to be optimized as well as not actually achieving any optimization.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from oslo_config import cfg"},{"line_number":19,"context_line":"from oslo_log import log as logging"},{"line_number":20,"context_line":"from oslo_utils import excutils"},{"line_number":21,"context_line":"from oslo_utils import importutils"},{"line_number":22,"context_line":"from oslo_utils import units"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from cinder import exception"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_9b2ac77d","line":21,"in_reply_to":"9a41bdd9_f4a9b491","updated":"2015-07-17 03:48:05.000000000","message":"I agree with you, and I will change it to import my module directly. Thanks Skgler!","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"bb3fee908fd216f4a1531fe6c002fdabd7d549f1","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":48,"context_line":"        super(HuaweiBaseDriver, self).__init__(*args, **kwargs)"},{"line_number":49,"context_line":"        self.configuration \u003d kwargs.get(\u0027configuration\u0027, None)"},{"line_number":50,"context_line":"        self.zone_manager \u003d None  # zone manager"},{"line_number":51,"context_line":"        if not self.configuration:"},{"line_number":52,"context_line":"            msg \u003d (_(\u0027_instantiate_driver: configuration not found.\u0027))"},{"line_number":53,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_d46ef095","line":50,"updated":"2015-07-16 20:26:10.000000000","message":"Remove comment","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":48,"context_line":"        super(HuaweiBaseDriver, self).__init__(*args, **kwargs)"},{"line_number":49,"context_line":"        self.configuration \u003d kwargs.get(\u0027configuration\u0027, None)"},{"line_number":50,"context_line":"        self.zone_manager \u003d None  # zone manager"},{"line_number":51,"context_line":"        if not self.configuration:"},{"line_number":52,"context_line":"            msg \u003d (_(\u0027_instantiate_driver: configuration not found.\u0027))"},{"line_number":53,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_db304feb","line":50,"in_reply_to":"9a41bdd9_d46ef095","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"0afa674b6589b9f5d28f1dcba466a3cebfb9828e","unresolved":false,"context_lines":[{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        host_name_before_hash \u003d None"},{"line_number":279,"context_line":"        host_name \u003d connector[\u0027host\u0027]"},{"line_number":280,"context_line":"        if host_name and (len(host_name) \u003e 32):"},{"line_number":281,"context_line":"            host_name_before_hash \u003d host_name"},{"line_number":282,"context_line":"            host_name \u003d str(hash(host_name))"},{"line_number":283,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_e9e31204","line":280,"updated":"2015-07-17 01:54:10.000000000","message":"\"(len(host_name)) \u003e 32\" is different with the function \"terminate_connection_fc\" \"(len(host_name)) \u003e 31\" on line 497.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        host_name_before_hash \u003d None"},{"line_number":279,"context_line":"        host_name \u003d connector[\u0027host\u0027]"},{"line_number":280,"context_line":"        if host_name and (len(host_name) \u003e 32):"},{"line_number":281,"context_line":"            host_name_before_hash \u003d host_name"},{"line_number":282,"context_line":"            host_name \u003d str(hash(host_name))"},{"line_number":283,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_1bf6b7d7","line":280,"in_reply_to":"9a41bdd9_e9e31204","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"bb3fee908fd216f4a1531fe6c002fdabd7d549f1","unresolved":false,"context_lines":[{"line_number":289,"context_line":"            # Create host if not exist."},{"line_number":290,"context_line":"            hostid \u003d self.restclient.add_host_with_check(host_name,"},{"line_number":291,"context_line":"                                                         host_name_before_hash)"},{"line_number":292,"context_line":"            fc_zone_helper \u003d importutils.import_object("},{"line_number":293,"context_line":"                constants.FC_ZONE_HELPER,"},{"line_number":294,"context_line":"                self.zone_manager,"},{"line_number":295,"context_line":"                self.restclient)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_94738815","line":292,"updated":"2015-07-16 20:26:10.000000000","message":"As mentioned above, this could be more straightforward.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":289,"context_line":"            # Create host if not exist."},{"line_number":290,"context_line":"            hostid \u003d self.restclient.add_host_with_check(host_name,"},{"line_number":291,"context_line":"                                                         host_name_before_hash)"},{"line_number":292,"context_line":"            fc_zone_helper \u003d importutils.import_object("},{"line_number":293,"context_line":"                constants.FC_ZONE_HELPER,"},{"line_number":294,"context_line":"                self.zone_manager,"},{"line_number":295,"context_line":"                self.restclient)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_bb022bb3","line":292,"in_reply_to":"9a41bdd9_94738815","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"0afa674b6589b9f5d28f1dcba466a3cebfb9828e","unresolved":false,"context_lines":[{"line_number":292,"context_line":"            fc_zone_helper \u003d importutils.import_object("},{"line_number":293,"context_line":"                constants.FC_ZONE_HELPER,"},{"line_number":294,"context_line":"                self.zone_manager,"},{"line_number":295,"context_line":"                self.restclient)"},{"line_number":296,"context_line":"            fc_zone_helper._check_fc_port_and_init(wwns, hostid)"},{"line_number":297,"context_line":"            (tgt_port_wwns, init_targ_map) \u003d fc_zone_helper.\\"},{"line_number":298,"context_line":"                _get_init_targ_map_and_tgt_port_wwns(wwns, True)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_ae2bd093","line":295,"updated":"2015-07-17 01:54:10.000000000","message":"It\u0027s better to use self.rest_client instead of self.restclient.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"0afa674b6589b9f5d28f1dcba466a3cebfb9828e","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                self.restclient)"},{"line_number":296,"context_line":"            fc_zone_helper._check_fc_port_and_init(wwns, hostid)"},{"line_number":297,"context_line":"            (tgt_port_wwns, init_targ_map) \u003d fc_zone_helper.\\"},{"line_number":298,"context_line":"                _get_init_targ_map_and_tgt_port_wwns(wwns, True)"},{"line_number":299,"context_line":"        else:"},{"line_number":300,"context_line":"            # Not use FC switch."},{"line_number":301,"context_line":"            free_wwns \u003d self.restclient.get_connected_free_wwns()"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_0940b606","line":298,"updated":"2015-07-17 01:54:10.000000000","message":"The function name \"_get_init_targ_map_and_tgt_port_wwns\" is too long. It\u0027s better to make it short and more clear.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"bb3fee908fd216f4a1531fe6c002fdabd7d549f1","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            is_ini_in_free_wwns \u003d False"},{"line_number":306,"context_line":"            for wwn in wwns:"},{"line_number":307,"context_line":"                if wwn in free_wwns:"},{"line_number":308,"context_line":"                    is_ini_in_free_wwns \u003d True"},{"line_number":309,"context_line":"            if not is_ini_in_free_wwns:"},{"line_number":310,"context_line":"                msg \u003d (_(\u0027FC is not connected from host to array directly.\u0027))"},{"line_number":311,"context_line":"                LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_34eddc8e","line":308,"updated":"2015-07-16 20:26:10.000000000","message":"break after setting to true.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            is_ini_in_free_wwns \u003d False"},{"line_number":306,"context_line":"            for wwn in wwns:"},{"line_number":307,"context_line":"                if wwn in free_wwns:"},{"line_number":308,"context_line":"                    is_ini_in_free_wwns \u003d True"},{"line_number":309,"context_line":"            if not is_ini_in_free_wwns:"},{"line_number":310,"context_line":"                msg \u003d (_(\u0027FC is not connected from host to array directly.\u0027))"},{"line_number":311,"context_line":"                LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_db160ff1","line":308,"in_reply_to":"9a41bdd9_34eddc8e","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"bb3fee908fd216f4a1531fe6c002fdabd7d549f1","unresolved":false,"context_lines":[{"line_number":309,"context_line":"            if not is_ini_in_free_wwns:"},{"line_number":310,"context_line":"                msg \u003d (_(\u0027FC is not connected from host to array directly.\u0027))"},{"line_number":311,"context_line":"                LOG.error(msg)"},{"line_number":312,"context_line":"                raise exception.CinderException(msg)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"            # Create host if not exist."},{"line_number":315,"context_line":"            hostid \u003d self.restclient.add_host_with_check(host_name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_94f8684b","line":312,"updated":"2015-07-16 20:26:10.000000000","message":"Use more specific exception.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":309,"context_line":"            if not is_ini_in_free_wwns:"},{"line_number":310,"context_line":"                msg \u003d (_(\u0027FC is not connected from host to array directly.\u0027))"},{"line_number":311,"context_line":"                LOG.error(msg)"},{"line_number":312,"context_line":"                raise exception.CinderException(msg)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"            # Create host if not exist."},{"line_number":315,"context_line":"            hostid \u003d self.restclient.add_host_with_check(host_name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_7bd26336","line":312,"in_reply_to":"9a41bdd9_94f8684b","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"0afa674b6589b9f5d28f1dcba466a3cebfb9828e","unresolved":false,"context_lines":[{"line_number":485,"context_line":"        lun_id \u003d volume.get(\u0027provider_location\u0027, None)"},{"line_number":486,"context_line":"        host_name \u003d connector[\u0027host\u0027]"},{"line_number":487,"context_line":"        left_lunnum \u003d -1"},{"line_number":488,"context_line":"        lungroupid \u003d None"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"        LOG.info(_LI(\u0027terminate_connection_fc: volume name: %(volume)s, \u0027"},{"line_number":491,"context_line":"                     \u0027wwpns: %(wwns)s, \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_e9ca326e","line":488,"updated":"2015-07-17 01:54:10.000000000","message":"It\u0027s better to use \"lungroup_id\" instead of \"lungroupid\".","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":485,"context_line":"        lun_id \u003d volume.get(\u0027provider_location\u0027, None)"},{"line_number":486,"context_line":"        host_name \u003d connector[\u0027host\u0027]"},{"line_number":487,"context_line":"        left_lunnum \u003d -1"},{"line_number":488,"context_line":"        lungroupid \u003d None"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"        LOG.info(_LI(\u0027terminate_connection_fc: volume name: %(volume)s, \u0027"},{"line_number":491,"context_line":"                     \u0027wwpns: %(wwns)s, \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_3bdcdb45","line":488,"in_reply_to":"9a41bdd9_e9ca326e","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"0afa674b6589b9f5d28f1dcba466a3cebfb9828e","unresolved":false,"context_lines":[{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        if host_name and (len(host_name) \u003e 31):"},{"line_number":498,"context_line":"            host_name \u003d str(hash(host_name))"},{"line_number":499,"context_line":"        hostid \u003d self.restclient.find_host(host_name)"},{"line_number":500,"context_line":"        if hostid:"},{"line_number":501,"context_line":"            mapping_view_name \u003d constants.MAPPING_VIEW_PREFIX + hostid"},{"line_number":502,"context_line":"            view_id \u003d self.restclient.find_mapping_view(mapping_view_name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_2986da13","line":499,"updated":"2015-07-17 01:54:10.000000000","message":"Maybe host_id is better. Keep consistent with other parameter. eg, lun_id, view_id, etc.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":496,"context_line":""},{"line_number":497,"context_line":"        if host_name and (len(host_name) \u003e 31):"},{"line_number":498,"context_line":"            host_name \u003d str(hash(host_name))"},{"line_number":499,"context_line":"        hostid \u003d self.restclient.find_host(host_name)"},{"line_number":500,"context_line":"        if hostid:"},{"line_number":501,"context_line":"            mapping_view_name \u003d constants.MAPPING_VIEW_PREFIX + hostid"},{"line_number":502,"context_line":"            view_id \u003d self.restclient.find_mapping_view(mapping_view_name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_dbf84f4c","line":499,"in_reply_to":"9a41bdd9_2986da13","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"bb3fee908fd216f4a1531fe6c002fdabd7d549f1","unresolved":false,"context_lines":[{"line_number":503,"context_line":"            if view_id:"},{"line_number":504,"context_line":"                lungroupid \u003d self.restclient.find_lungroup_from_map(view_id)"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"        if lun_id and self.restclient.check_lun_exist(lun_id) is True:"},{"line_number":507,"context_line":"            lungroupid \u003d self.restclient.get_lungroupid_by_lunid(lun_id)"},{"line_number":508,"context_line":"            if lungroupid:"},{"line_number":509,"context_line":"                self.restclient.remove_lun_from_lungroup(lungroupid,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_543500f5","line":506,"updated":"2015-07-16 20:26:10.000000000","message":"No need for \"is True\"","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":503,"context_line":"            if view_id:"},{"line_number":504,"context_line":"                lungroupid \u003d self.restclient.find_lungroup_from_map(view_id)"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"        if lun_id and self.restclient.check_lun_exist(lun_id) is True:"},{"line_number":507,"context_line":"            lungroupid \u003d self.restclient.get_lungroupid_by_lunid(lun_id)"},{"line_number":508,"context_line":"            if lungroupid:"},{"line_number":509,"context_line":"                self.restclient.remove_lun_from_lungroup(lungroupid,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_7b626318","line":506,"in_reply_to":"9a41bdd9_543500f5","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"bb3fee908fd216f4a1531fe6c002fdabd7d549f1","unresolved":false,"context_lines":[{"line_number":525,"context_line":"            if not self.zone_manager:"},{"line_number":526,"context_line":"                self.zone_manager \u003d fczm_utils.create_zone_manager()"},{"line_number":527,"context_line":"            if self.zone_manager:"},{"line_number":528,"context_line":"                fc_zone_helper \u003d importutils.import_object("},{"line_number":529,"context_line":"                    constants.FC_ZONE_HELPER,"},{"line_number":530,"context_line":"                    self.zone_manager,"},{"line_number":531,"context_line":"                    self.restclient)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_773366f7","line":528,"updated":"2015-07-16 20:26:10.000000000","message":"Same as above.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":525,"context_line":"            if not self.zone_manager:"},{"line_number":526,"context_line":"                self.zone_manager \u003d fczm_utils.create_zone_manager()"},{"line_number":527,"context_line":"            if self.zone_manager:"},{"line_number":528,"context_line":"                fc_zone_helper \u003d importutils.import_object("},{"line_number":529,"context_line":"                    constants.FC_ZONE_HELPER,"},{"line_number":530,"context_line":"                    self.zone_manager,"},{"line_number":531,"context_line":"                    self.restclient)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_9b672725","line":528,"in_reply_to":"9a41bdd9_773366f7","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"0afa674b6589b9f5d28f1dcba466a3cebfb9828e","unresolved":false,"context_lines":[{"line_number":531,"context_line":"                    self.restclient)"},{"line_number":532,"context_line":"                (tgt_port_wwns,"},{"line_number":533,"context_line":"                 init_targ_map) \u003d fc_zone_helper.\\"},{"line_number":534,"context_line":"                    _get_init_targ_map_and_tgt_port_wwns(wwns, False)"},{"line_number":535,"context_line":"                LOG.debug(\"Got init_targ_map to delete zone, \""},{"line_number":536,"context_line":"                          \"init_targ_map: %s\" % init_targ_map)"},{"line_number":537,"context_line":"                self.zone_manager.delete_connection(init_targ_map)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_c94ace27","line":534,"updated":"2015-07-17 01:54:10.000000000","message":"The function name \"_get_init_targ_map_and_tgt_port_wwns\" is too long. It\u0027s better to make it short and more clear.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"0afa674b6589b9f5d28f1dcba466a3cebfb9828e","unresolved":false,"context_lines":[{"line_number":532,"context_line":"                (tgt_port_wwns,"},{"line_number":533,"context_line":"                 init_targ_map) \u003d fc_zone_helper.\\"},{"line_number":534,"context_line":"                    _get_init_targ_map_and_tgt_port_wwns(wwns, False)"},{"line_number":535,"context_line":"                LOG.debug(\"Got init_targ_map to delete zone, \""},{"line_number":536,"context_line":"                          \"init_targ_map: %s\" % init_targ_map)"},{"line_number":537,"context_line":"                self.zone_manager.delete_connection(init_targ_map)"},{"line_number":538,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_492a3ee9","line":535,"updated":"2015-07-17 01:54:10.000000000","message":"Got -\u003e Get?","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":532,"context_line":"                (tgt_port_wwns,"},{"line_number":533,"context_line":"                 init_targ_map) \u003d fc_zone_helper.\\"},{"line_number":534,"context_line":"                    _get_init_targ_map_and_tgt_port_wwns(wwns, False)"},{"line_number":535,"context_line":"                LOG.debug(\"Got init_targ_map to delete zone, \""},{"line_number":536,"context_line":"                          \"init_targ_map: %s\" % init_targ_map)"},{"line_number":537,"context_line":"                self.zone_manager.delete_connection(init_targ_map)"},{"line_number":538,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_db7dafb2","line":535,"in_reply_to":"9a41bdd9_492a3ee9","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"0afa674b6589b9f5d28f1dcba466a3cebfb9828e","unresolved":false,"context_lines":[{"line_number":533,"context_line":"                 init_targ_map) \u003d fc_zone_helper.\\"},{"line_number":534,"context_line":"                    _get_init_targ_map_and_tgt_port_wwns(wwns, False)"},{"line_number":535,"context_line":"                LOG.debug(\"Got init_targ_map to delete zone, \""},{"line_number":536,"context_line":"                          \"init_targ_map: %s\" % init_targ_map)"},{"line_number":537,"context_line":"                self.zone_manager.delete_connection(init_targ_map)"},{"line_number":538,"context_line":"            else:"},{"line_number":539,"context_line":"                tgt_port_wwns \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_e9f47288","line":536,"updated":"2015-07-17 01:54:10.000000000","message":"% -\u003e ,","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":533,"context_line":"                 init_targ_map) \u003d fc_zone_helper.\\"},{"line_number":534,"context_line":"                    _get_init_targ_map_and_tgt_port_wwns(wwns, False)"},{"line_number":535,"context_line":"                LOG.debug(\"Got init_targ_map to delete zone, \""},{"line_number":536,"context_line":"                          \"init_targ_map: %s\" % init_targ_map)"},{"line_number":537,"context_line":"                self.zone_manager.delete_connection(init_targ_map)"},{"line_number":538,"context_line":"            else:"},{"line_number":539,"context_line":"                tgt_port_wwns \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_db54cf22","line":536,"in_reply_to":"9a41bdd9_e9f47288","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"0afa674b6589b9f5d28f1dcba466a3cebfb9828e","unresolved":false,"context_lines":[{"line_number":538,"context_line":"            else:"},{"line_number":539,"context_line":"                tgt_port_wwns \u003d []"},{"line_number":540,"context_line":"                for wwn in wwns:"},{"line_number":541,"context_line":"                    tgtwwpns \u003d self.restclient.get_fc_target_wwpns(wwn)"},{"line_number":542,"context_line":"                    if tgtwwpns:"},{"line_number":543,"context_line":"                        tgt_port_wwns.append(tgtwwpns)"},{"line_number":544,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_a9450ab4","line":541,"updated":"2015-07-17 01:54:10.000000000","message":"It\u0027s better to use tgt_wwpns instead of tgtwwpns.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":538,"context_line":"            else:"},{"line_number":539,"context_line":"                tgt_port_wwns \u003d []"},{"line_number":540,"context_line":"                for wwn in wwns:"},{"line_number":541,"context_line":"                    tgtwwpns \u003d self.restclient.get_fc_target_wwpns(wwn)"},{"line_number":542,"context_line":"                    if tgtwwpns:"},{"line_number":543,"context_line":"                        tgt_port_wwns.append(tgtwwpns)"},{"line_number":544,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_fb2433c7","line":541,"in_reply_to":"9a41bdd9_a9450ab4","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"bb3fee908fd216f4a1531fe6c002fdabd7d549f1","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                    init_targ_map[initiator] \u003d tgt_port_wwns"},{"line_number":548,"context_line":""},{"line_number":549,"context_line":"            for wwn in wwns:"},{"line_number":550,"context_line":"                if self.restclient._is_fc_initiator_associated_to_host(wwn):"},{"line_number":551,"context_line":"                    self.restclient.remove_fc_from_host(wwn)"},{"line_number":552,"context_line":"            if lungroupid:"},{"line_number":553,"context_line":"                if view_id and self.restclient.lungroup_associated(view_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_d73d92bc","line":550,"updated":"2015-07-16 20:26:10.000000000","message":"Make method public.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                    init_targ_map[initiator] \u003d tgt_port_wwns"},{"line_number":548,"context_line":""},{"line_number":549,"context_line":"            for wwn in wwns:"},{"line_number":550,"context_line":"                if self.restclient._is_fc_initiator_associated_to_host(wwn):"},{"line_number":551,"context_line":"                    self.restclient.remove_fc_from_host(wwn)"},{"line_number":552,"context_line":"            if lungroupid:"},{"line_number":553,"context_line":"                if view_id and self.restclient.lungroup_associated(view_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_3e7b697d","line":550,"in_reply_to":"9a41bdd9_d73d92bc","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"0afa674b6589b9f5d28f1dcba466a3cebfb9828e","unresolved":false,"context_lines":[{"line_number":554,"context_line":"                                                                   lungroupid):"},{"line_number":555,"context_line":"                    self.restclient.delete_lungroup_mapping_view(view_id,"},{"line_number":556,"context_line":"                                                                 lungroupid)"},{"line_number":557,"context_line":"                self.restclient.delete_lungroup(lungroupid)"},{"line_number":558,"context_line":"            host_group_name \u003d constants.HOSTGROUP_PREFIX + hostid"},{"line_number":559,"context_line":"            hostgroup_id \u003d self.restclient.find_hostgroup(host_group_name)"},{"line_number":560,"context_line":"            if hostgroup_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_c925ee0a","line":557,"updated":"2015-07-17 01:54:10.000000000","message":"Need a blank line.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":554,"context_line":"                                                                   lungroupid):"},{"line_number":555,"context_line":"                    self.restclient.delete_lungroup_mapping_view(view_id,"},{"line_number":556,"context_line":"                                                                 lungroupid)"},{"line_number":557,"context_line":"                self.restclient.delete_lungroup(lungroupid)"},{"line_number":558,"context_line":"            host_group_name \u003d constants.HOSTGROUP_PREFIX + hostid"},{"line_number":559,"context_line":"            hostgroup_id \u003d self.restclient.find_hostgroup(host_group_name)"},{"line_number":560,"context_line":"            if hostgroup_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_9ed4f547","line":557,"in_reply_to":"9a41bdd9_c925ee0a","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"0afa674b6589b9f5d28f1dcba466a3cebfb9828e","unresolved":false,"context_lines":[{"line_number":556,"context_line":"                                                                 lungroupid)"},{"line_number":557,"context_line":"                self.restclient.delete_lungroup(lungroupid)"},{"line_number":558,"context_line":"            host_group_name \u003d constants.HOSTGROUP_PREFIX + hostid"},{"line_number":559,"context_line":"            hostgroup_id \u003d self.restclient.find_hostgroup(host_group_name)"},{"line_number":560,"context_line":"            if hostgroup_id:"},{"line_number":561,"context_line":"                if view_id and self.restclient.hostgroup_associated("},{"line_number":562,"context_line":"                        view_id, hostgroup_id):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_0982f6c8","line":559,"updated":"2015-07-17 01:54:10.000000000","message":"hostgroup_id, host_group_name? may keep consistent is better.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":556,"context_line":"                                                                 lungroupid)"},{"line_number":557,"context_line":"                self.restclient.delete_lungroup(lungroupid)"},{"line_number":558,"context_line":"            host_group_name \u003d constants.HOSTGROUP_PREFIX + hostid"},{"line_number":559,"context_line":"            hostgroup_id \u003d self.restclient.find_hostgroup(host_group_name)"},{"line_number":560,"context_line":"            if hostgroup_id:"},{"line_number":561,"context_line":"                if view_id and self.restclient.hostgroup_associated("},{"line_number":562,"context_line":"                        view_id, hostgroup_id):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_3ec929ad","line":559,"in_reply_to":"9a41bdd9_0982f6c8","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"0afa674b6589b9f5d28f1dcba466a3cebfb9828e","unresolved":false,"context_lines":[{"line_number":564,"context_line":"                                                                 hostgroup_id)"},{"line_number":565,"context_line":"                self.restclient.remove_host_from_hostgroup(hostgroup_id,"},{"line_number":566,"context_line":"                                                           hostid)"},{"line_number":567,"context_line":"                self.restclient.delete_hostgroup(hostgroup_id)"},{"line_number":568,"context_line":"            if not self.restclient._check_fc_initiators_exist_in_host(hostid):"},{"line_number":569,"context_line":"                self.restclient.remove_host(hostid)"},{"line_number":570,"context_line":"            if view_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_891fe6b6","line":567,"updated":"2015-07-17 01:54:10.000000000","message":"Need a blank line.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"bb3fee908fd216f4a1531fe6c002fdabd7d549f1","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                self.restclient.remove_host_from_hostgroup(hostgroup_id,"},{"line_number":566,"context_line":"                                                           hostid)"},{"line_number":567,"context_line":"                self.restclient.delete_hostgroup(hostgroup_id)"},{"line_number":568,"context_line":"            if not self.restclient._check_fc_initiators_exist_in_host(hostid):"},{"line_number":569,"context_line":"                self.restclient.remove_host(hostid)"},{"line_number":570,"context_line":"            if view_id:"},{"line_number":571,"context_line":"                self.restclient.delete_mapping_view(view_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_77e60646","line":568,"updated":"2015-07-16 20:26:10.000000000","message":"Make method public.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                self.restclient.remove_host_from_hostgroup(hostgroup_id,"},{"line_number":566,"context_line":"                                                           hostid)"},{"line_number":567,"context_line":"                self.restclient.delete_hostgroup(hostgroup_id)"},{"line_number":568,"context_line":"            if not self.restclient._check_fc_initiators_exist_in_host(hostid):"},{"line_number":569,"context_line":"                self.restclient.remove_host(hostid)"},{"line_number":570,"context_line":"            if view_id:"},{"line_number":571,"context_line":"                self.restclient.delete_mapping_view(view_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_7e36d1b5","line":568,"in_reply_to":"9a41bdd9_77e60646","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"4ae35ea991b0a970f58d0399cc8c79d6090244ce","unresolved":false,"context_lines":[{"line_number":492,"context_line":"                  \u0027wwns\u0027: wwns,"},{"line_number":493,"context_line":"                  \u0027lunid\u0027: lun_id},)"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"        if host_name and (len(host_name) \u003e constants.MAX_HOSTNAME_LENTH):"},{"line_number":496,"context_line":"            host_name \u003d str(hash(host_name))"},{"line_number":497,"context_line":"        host_id \u003d self.restclient.find_host(host_name)"},{"line_number":498,"context_line":"        if host_id:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_9e6267ac","line":495,"updated":"2015-07-21 17:39:50.000000000","message":"No need for parentheses around len.","commit_id":"a7d9d1e2e6fdb98ed9803ccee5376ea4db091d28"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"7a91eed3e0abb36c2cb2e88306609d30b60d0052","unresolved":false,"context_lines":[{"line_number":492,"context_line":"                  \u0027wwns\u0027: wwns,"},{"line_number":493,"context_line":"                  \u0027lunid\u0027: lun_id},)"},{"line_number":494,"context_line":""},{"line_number":495,"context_line":"        if host_name and (len(host_name) \u003e constants.MAX_HOSTNAME_LENTH):"},{"line_number":496,"context_line":"            host_name \u003d str(hash(host_name))"},{"line_number":497,"context_line":"        host_id \u003d self.restclient.find_host(host_name)"},{"line_number":498,"context_line":"        if host_id:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_c9a8267a","line":495,"in_reply_to":"3a50d1a3_9e6267ac","updated":"2015-07-22 03:20:00.000000000","message":"Done","commit_id":"a7d9d1e2e6fdb98ed9803ccee5376ea4db091d28"},{"author":{"_account_id":8757,"name":"Angela Smith","email":"angela.smith@broadcom.com","username":"asmith_brcd"},"change_message_id":"5b649eddff8153ca52345a21dc4cea2ccfbfc551","unresolved":false,"context_lines":[{"line_number":291,"context_line":"                self.zone_manager, self.restclient)"},{"line_number":292,"context_line":"            zone_helper.check_fc_port_and_init(wwns, host_id)"},{"line_number":293,"context_line":"            (tgt_port_wwns, init_targ_map) \u003d zone_helper.\\"},{"line_number":294,"context_line":"                get_init_targ_map_and_tgt_port_wwns(wwns, True)"},{"line_number":295,"context_line":"        else:"},{"line_number":296,"context_line":"            # Not use FC switch."},{"line_number":297,"context_line":"            free_wwns \u003d self.restclient.get_connected_free_wwns()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_2b39f041","line":294,"updated":"2015-07-24 09:19:50.000000000","message":"I think this logic needs some more thought.  Volume drivers should not be using FC zoning driver methods to determine which Init WWN to be zoned to the target WWN.  Please use the lookup service method get_device_mapping_from_network for this purpose.","commit_id":"dfe70ba4710f6321f288c9e8f5fa66b6c00cb477"},{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"8e191e623d1f97daa6498a8d571c966187e9866e","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        smartcache \u003d smartx.SmartCache(self.restclient)"},{"line_number":116,"context_line":"        smartcache.add(opts, lun_id)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        try:"},{"line_number":119,"context_line":"            qos \u003d huawei_utils.get_volume_qos(volume)"},{"line_number":120,"context_line":"            if qos:"},{"line_number":121,"context_line":"                smart_qos \u003d smartx.SmartQos(self.restclient)"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa1b9901_2da8171f","line":118,"updated":"2015-08-18 09:01:03.000000000","message":"line 119 to 127 is same as line 109 to 116.","commit_id":"2973ffba0ed926711dfe1d0bb2712b1e23da9fca"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"0b472c0c664b0160b169521a5982f8ef20907358","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            host_name \u003d six.text_type(hash(host_name))"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"        if not self.zone_manager:"},{"line_number":342,"context_line":"            self.zone_manager \u003d fczm_utils.create_zone_manager()"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"        if self.zone_manager:"},{"line_number":345,"context_line":"            # Use FC switch."}],"source_content_type":"text/x-python","patch_set":16,"id":"fa1b9901_76cfa27f","line":342,"updated":"2015-08-18 19:14:22.000000000","message":"Why do you need the zone manager.  drivers shouldn\u0027t need to even talk to the zone manager. \n\nYou just need to add the fczm_utils.AddFCZone decorator to initialize_connection and return the initiator_target map.","commit_id":"9cc214eeebabecc7e2a57c3efcb02dac75a205f9"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"a3a54d78fe6f53d9bb998d248fa040133ab6df9c","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            host_name \u003d six.text_type(hash(host_name))"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"        if not self.zone_manager:"},{"line_number":342,"context_line":"            self.zone_manager \u003d fczm_utils.create_zone_manager()"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"        if self.zone_manager:"},{"line_number":345,"context_line":"            # Use FC switch."}],"source_content_type":"text/x-python","patch_set":16,"id":"fa1b9901_bcd190cf","line":342,"in_reply_to":"fa1b9901_76cfa27f","updated":"2015-08-19 01:57:55.000000000","message":"Done, thanks!","commit_id":"9cc214eeebabecc7e2a57c3efcb02dac75a205f9"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"22b90755514edae2b248f811904592c16e3a0491","unresolved":false,"context_lines":[{"line_number":535,"context_line":"            return False"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        return True"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"    @utils.synchronized(\u0027huawei\u0027, external\u003dTrue)"},{"line_number":540,"context_line":"    def initialize_connection_fc(self, volume, connector):"},{"line_number":541,"context_line":"        wwns \u003d connector[\u0027wwpns\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa1b9901_2c0d3290","line":538,"updated":"2015-08-19 13:49:35.000000000","message":"Need to add the fczm decorator","commit_id":"c373ad943861c0d6811e3fa36018cc42fd31863b"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"a464a9d90ca790d9d035a1ec6e288739780a4dc6","unresolved":false,"context_lines":[{"line_number":535,"context_line":"            return False"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        return True"},{"line_number":538,"context_line":""},{"line_number":539,"context_line":"    @utils.synchronized(\u0027huawei\u0027, external\u003dTrue)"},{"line_number":540,"context_line":"    def initialize_connection_fc(self, volume, connector):"},{"line_number":541,"context_line":"        wwns \u003d connector[\u0027wwpns\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa1b9901_cd434d41","line":538,"in_reply_to":"fa1b9901_2c0d3290","updated":"2015-08-20 01:28:34.000000000","message":"The fczm decorator is added at line 986, thanks.","commit_id":"c373ad943861c0d6811e3fa36018cc42fd31863b"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"22b90755514edae2b248f811904592c16e3a0491","unresolved":false,"context_lines":[{"line_number":770,"context_line":"            self.restclient.remove_host(host_id)"},{"line_number":771,"context_line":"            self.restclient.delete_mapping_view(view_id)"},{"line_number":772,"context_line":""},{"line_number":773,"context_line":"    def terminate_connection_fc(self, volume, connector):"},{"line_number":774,"context_line":"        \"\"\"Delete map between a volume and a host.\"\"\""},{"line_number":775,"context_line":"        wwns \u003d connector[\u0027wwpns\u0027]"},{"line_number":776,"context_line":"        volume_name \u003d huawei_utils.encode_name(volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa1b9901_0c238e06","line":773,"updated":"2015-08-19 13:49:35.000000000","message":"Need the fczm decorator","commit_id":"c373ad943861c0d6811e3fa36018cc42fd31863b"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"a464a9d90ca790d9d035a1ec6e288739780a4dc6","unresolved":false,"context_lines":[{"line_number":770,"context_line":"            self.restclient.remove_host(host_id)"},{"line_number":771,"context_line":"            self.restclient.delete_mapping_view(view_id)"},{"line_number":772,"context_line":""},{"line_number":773,"context_line":"    def terminate_connection_fc(self, volume, connector):"},{"line_number":774,"context_line":"        \"\"\"Delete map between a volume and a host.\"\"\""},{"line_number":775,"context_line":"        wwns \u003d connector[\u0027wwpns\u0027]"},{"line_number":776,"context_line":"        volume_name \u003d huawei_utils.encode_name(volume[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa1b9901_ed6731e7","line":773,"in_reply_to":"fa1b9901_0c238e06","updated":"2015-08-20 01:28:34.000000000","message":"The fczm decorator can be found at line 992, thanks.","commit_id":"c373ad943861c0d6811e3fa36018cc42fd31863b"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"a340a22da32f70961de930c17c41b6d9b219f00d","unresolved":false,"context_lines":[{"line_number":1218,"context_line":"    @fczm_utils.AddFCZone"},{"line_number":1219,"context_line":"    def initialize_connection(self, volume, connector):"},{"line_number":1220,"context_line":"        return HuaweiBaseDriver.initialize_connection_fc(self,"},{"line_number":1221,"context_line":"                                                         volume,"},{"line_number":1222,"context_line":"                                                         connector)"},{"line_number":1223,"context_line":""},{"line_number":1224,"context_line":"    @fczm_utils.RemoveFCZone"}],"source_content_type":"text/x-python","patch_set":25,"id":"da20952f_1b030444","line":1221,"updated":"2015-08-27 15:20:08.000000000","message":"This is a very strange way to code objects.   You have a function that is specific to FC, and yet you put that FC specific code in a common class and then make it a static method ?!?!\n\nWhy not put the actual common code in the common class and the FC specific code in the FC class?   I don\u0027t understand the benefit of this.","commit_id":"ed7fc97b3fcf5b3251b20a9eda4d3dba44e2deca"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"d45879869e45453b000fe5118e4781af08d5ce78","unresolved":false,"context_lines":[{"line_number":1218,"context_line":"    @fczm_utils.AddFCZone"},{"line_number":1219,"context_line":"    def initialize_connection(self, volume, connector):"},{"line_number":1220,"context_line":"        return HuaweiBaseDriver.initialize_connection_fc(self,"},{"line_number":1221,"context_line":"                                                         volume,"},{"line_number":1222,"context_line":"                                                         connector)"},{"line_number":1223,"context_line":""},{"line_number":1224,"context_line":"    @fczm_utils.RemoveFCZone"}],"source_content_type":"text/x-python","patch_set":25,"id":"da20952f_b16319b1","line":1221,"in_reply_to":"da20952f_1b030444","updated":"2015-08-27 16:48:51.000000000","message":"Will change it in next patch, thanks!","commit_id":"ed7fc97b3fcf5b3251b20a9eda4d3dba44e2deca"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"ce7a2975dea0f4de281091109d27e9eef996fa67","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":52,"context_line":"        super(HuaweiBaseDriver, self).__init__(*args, **kwargs)"},{"line_number":53,"context_line":"        self.configuration \u003d kwargs.get(\u0027configuration\u0027, None)"},{"line_number":54,"context_line":"        self.fcsan_lookup_service \u003d None"},{"line_number":55,"context_line":"        if not self.configuration:"},{"line_number":56,"context_line":"            msg \u003d _(\u0027_instantiate_driver: configuration not found.\u0027)"},{"line_number":57,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":27,"id":"da20952f_2286b965","line":54,"updated":"2015-08-28 04:46:55.000000000","message":"shouldn\u0027t this only be in the FC driver?","commit_id":"6889f437214a7d4e0159f68082c1692271a89380"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"ce7a2975dea0f4de281091109d27e9eef996fa67","unresolved":false,"context_lines":[{"line_number":1047,"context_line":"        wwns \u003d connector[\u0027wwpns\u0027]"},{"line_number":1048,"context_line":"        volume_name \u003d huawei_utils.encode_name(volume[\u0027id\u0027])"},{"line_number":1049,"context_line":"        LOG.info(_LI("},{"line_number":1050,"context_line":"            \u0027initialize_connection_fc, initiator: %(wwpns)s,\u0027"},{"line_number":1051,"context_line":"            \u0027 volume name: %(volume)s.\u0027),"},{"line_number":1052,"context_line":"            {\u0027wwpns\u0027: wwns,"},{"line_number":1053,"context_line":"             \u0027volume\u0027: volume_name},)"}],"source_content_type":"text/x-python","patch_set":27,"id":"da20952f_e2a8c1dd","line":1050,"updated":"2015-08-28 04:46:55.000000000","message":"need to update the name to initialize_connection from the older initialize_connection_fc","commit_id":"6889f437214a7d4e0159f68082c1692271a89380"},{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"ce7a2975dea0f4de281091109d27e9eef996fa67","unresolved":false,"context_lines":[{"line_number":1130,"context_line":"        left_lunnum \u003d -1"},{"line_number":1131,"context_line":"        lungroup_id \u003d None"},{"line_number":1132,"context_line":"        view_id \u003d None"},{"line_number":1133,"context_line":"        LOG.info(_LI(\u0027terminate_connection_fc: volume name: %(volume)s, \u0027"},{"line_number":1134,"context_line":"                     \u0027wwpns: %(wwns)s, \u0027"},{"line_number":1135,"context_line":"                     \u0027lun_id: %(lunid)s.\u0027),"},{"line_number":1136,"context_line":"                 {\u0027volume\u0027: volume_name,"}],"source_content_type":"text/x-python","patch_set":27,"id":"da20952f_2278f98e","line":1133,"updated":"2015-08-28 04:46:55.000000000","message":"need to update the name to terminate_connection from the older terminate_connection_fc","commit_id":"6889f437214a7d4e0159f68082c1692271a89380"}],"cinder/volume/drivers/huawei/huawei_utils.py":[{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"830b07dec9c6ce4c8390b2d2516c6e7d269cbcd4","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                LOG.error(_LE(\"Capabilities value must be specified as \""},{"line_number":117,"context_line":"                              \"\u0027\u003cis\u003e True\u0027 or \u0027\u003cis\u003e true\u0027.\"))"},{"line_number":118,"context_line":"            else:"},{"line_number":119,"context_line":"                del words[0]"},{"line_number":120,"context_line":"                value \u003d words[0]"},{"line_number":121,"context_line":"                opts[key] \u003d value.lower()"},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa1b9901_e28533ad","line":119,"updated":"2015-08-18 16:55:10.000000000","message":"I am not sure why you need to delete words[0] when you could just get words[1] directly on the next line.","commit_id":"9cc214eeebabecc7e2a57c3efcb02dac75a205f9"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"a3a54d78fe6f53d9bb998d248fa040133ab6df9c","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                LOG.error(_LE(\"Capabilities value must be specified as \""},{"line_number":117,"context_line":"                              \"\u0027\u003cis\u003e True\u0027 or \u0027\u003cis\u003e true\u0027.\"))"},{"line_number":118,"context_line":"            else:"},{"line_number":119,"context_line":"                del words[0]"},{"line_number":120,"context_line":"                value \u003d words[0]"},{"line_number":121,"context_line":"                opts[key] \u003d value.lower()"},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa1b9901_7c0d383d","line":119,"in_reply_to":"fa1b9901_e28533ad","updated":"2015-08-19 01:57:55.000000000","message":"Done","commit_id":"9cc214eeebabecc7e2a57c3efcb02dac75a205f9"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"830b07dec9c6ce4c8390b2d2516c6e7d269cbcd4","unresolved":false,"context_lines":[{"line_number":323,"context_line":"    return lunsetinfo"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"def find_luntype_in_xml(xml_file_path):"},{"line_number":327,"context_line":"    root \u003d parse_xml_file(xml_file_path)"},{"line_number":328,"context_line":"    luntype \u003d root.findtext(\u0027LUN/LUNType\u0027)"},{"line_number":329,"context_line":"    if luntype:"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa1b9901_3dcef0b4","line":326,"updated":"2015-08-18 16:55:10.000000000","message":"Where is this function used? I couldn\u0027t find it, but I may be missing something.","commit_id":"9cc214eeebabecc7e2a57c3efcb02dac75a205f9"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"a3a54d78fe6f53d9bb998d248fa040133ab6df9c","unresolved":false,"context_lines":[{"line_number":323,"context_line":"    return lunsetinfo"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"def find_luntype_in_xml(xml_file_path):"},{"line_number":327,"context_line":"    root \u003d parse_xml_file(xml_file_path)"},{"line_number":328,"context_line":"    luntype \u003d root.findtext(\u0027LUN/LUNType\u0027)"},{"line_number":329,"context_line":"    if luntype:"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa1b9901_3c826095","line":326,"in_reply_to":"fa1b9901_3dcef0b4","updated":"2015-08-19 01:57:55.000000000","message":"This function is called in huawei_driver.py, thanks.","commit_id":"9cc214eeebabecc7e2a57c3efcb02dac75a205f9"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"830b07dec9c6ce4c8390b2d2516c6e7d269cbcd4","unresolved":false,"context_lines":[{"line_number":329,"context_line":"    if luntype:"},{"line_number":330,"context_line":"        if luntype.strip() in [\u0027Thick\u0027, \u0027Thin\u0027]:"},{"line_number":331,"context_line":"            if luntype.strip() \u003d\u003d \u0027Thick\u0027:"},{"line_number":332,"context_line":"                luntype \u003d 0"},{"line_number":333,"context_line":"            elif luntype.strip() \u003d\u003d \u0027Thin\u0027:"},{"line_number":334,"context_line":"                luntype \u003d 1"},{"line_number":335,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa1b9901_1d59acfe","line":332,"updated":"2015-08-18 16:55:10.000000000","message":"The values are you setting luntype too should probably be constants rather than literal integers.","commit_id":"9cc214eeebabecc7e2a57c3efcb02dac75a205f9"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"a3a54d78fe6f53d9bb998d248fa040133ab6df9c","unresolved":false,"context_lines":[{"line_number":329,"context_line":"    if luntype:"},{"line_number":330,"context_line":"        if luntype.strip() in [\u0027Thick\u0027, \u0027Thin\u0027]:"},{"line_number":331,"context_line":"            if luntype.strip() \u003d\u003d \u0027Thick\u0027:"},{"line_number":332,"context_line":"                luntype \u003d 0"},{"line_number":333,"context_line":"            elif luntype.strip() \u003d\u003d \u0027Thin\u0027:"},{"line_number":334,"context_line":"                luntype \u003d 1"},{"line_number":335,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa1b9901_5ca63454","line":332,"in_reply_to":"fa1b9901_1d59acfe","updated":"2015-08-19 01:57:55.000000000","message":"Done, thanks.","commit_id":"9cc214eeebabecc7e2a57c3efcb02dac75a205f9"}],"cinder/volume/drivers/huawei/rest_client.py":[{"author":{"_account_id":16883,"name":"huyang","email":"huyang1@huawei.com","username":"huyang"},"change_message_id":"4b681aa72799d56c94a3544c962a0745eebf6b82","unresolved":false,"context_lines":[{"line_number":1235,"context_line":"        data \u003d json.dumps({\"TYPE\": \"223\","},{"line_number":1236,"context_line":"                           \"ID\": initiator})"},{"line_number":1237,"context_line":"        result \u003d self.call(url, data, \"PUT\")"},{"line_number":1238,"context_line":"        self._assert_rest_result(result, \u0027remove fc from host error.\u0027)"},{"line_number":1239,"context_line":""},{"line_number":1240,"context_line":"    def _check_fc_initiators_exist_in_host(self, host_id):"},{"line_number":1241,"context_line":"        url \u003d self.url + \"/fc_initiator?range\u003d[0-256]\""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_fadfb237","line":1238,"updated":"2015-07-15 12:43:27.000000000","message":"remove -\u003e Remove. keep consistent with other debug info.","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"232546fab642f6751ddc2867dfece230f45964f5","unresolved":false,"context_lines":[{"line_number":1235,"context_line":"        data \u003d json.dumps({\"TYPE\": \"223\","},{"line_number":1236,"context_line":"                           \"ID\": initiator})"},{"line_number":1237,"context_line":"        result \u003d self.call(url, data, \"PUT\")"},{"line_number":1238,"context_line":"        self._assert_rest_result(result, \u0027remove fc from host error.\u0027)"},{"line_number":1239,"context_line":""},{"line_number":1240,"context_line":"    def _check_fc_initiators_exist_in_host(self, host_id):"},{"line_number":1241,"context_line":"        url \u003d self.url + \"/fc_initiator?range\u003d[0-256]\""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a41bdd9_1b634a43","line":1238,"in_reply_to":"9a41bdd9_fadfb237","updated":"2015-07-16 09:06:17.000000000","message":"Done","commit_id":"8cbc37c9c80cb6044120927f7f6f515015b3d027"},{"author":{"_account_id":16973,"name":"Skyler Berg","email":"skylertheberg@gmail.com","username":"sberg"},"change_message_id":"bb3fee908fd216f4a1531fe6c002fdabd7d549f1","unresolved":false,"context_lines":[{"line_number":1292,"context_line":""},{"line_number":1293,"context_line":"    def get_fc_ports_from_contr(self, contr):"},{"line_number":1294,"context_line":"        port_list_from_contr \u003d []"},{"line_number":1295,"context_line":"        location \u003d []"},{"line_number":1296,"context_line":"        data \u003d self._get_fc_ports_on_array()"},{"line_number":1297,"context_line":"        for item in data:"},{"line_number":1298,"context_line":"            location \u003d item[\u0027PARENTID\u0027].split(\u0027.\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_77da8619","line":1295,"updated":"2015-07-16 20:26:10.000000000","message":"No need to initialize.","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"5f359a977a9bb6fa8aa8b35f49aba9401deea2ba","unresolved":false,"context_lines":[{"line_number":1292,"context_line":""},{"line_number":1293,"context_line":"    def get_fc_ports_from_contr(self, contr):"},{"line_number":1294,"context_line":"        port_list_from_contr \u003d []"},{"line_number":1295,"context_line":"        location \u003d []"},{"line_number":1296,"context_line":"        data \u003d self._get_fc_ports_on_array()"},{"line_number":1297,"context_line":"        for item in data:"},{"line_number":1298,"context_line":"            location \u003d item[\u0027PARENTID\u0027].split(\u0027.\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_5e5c2ded","line":1295,"in_reply_to":"9a41bdd9_77da8619","updated":"2015-07-17 03:48:05.000000000","message":"Done","commit_id":"d105a9fc94d4c527ec3d76f349637ff3be5dfd59"}]}
