)]}'
{"manila/share/drivers/hitachi/hnas/driver.py":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"98420d2114237ee7507d54d6e71975e5e33ab73a","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        if snapshot[\u0027provider_location\u0027]:"},{"line_number":583,"context_line":"            LOG.debug(\"Snapshot %(snap_id)s with provider_location: \""},{"line_number":584,"context_line":"                      \"%(p_loc)s.\","},{"line_number":585,"context_line":"                      {\u0027snap_id\u0027: snapshot[\u0027id\u0027],"},{"line_number":586,"context_line":"                       \u0027p_loc\u0027: snapshot[\u0027provider_location\u0027]})"},{"line_number":587,"context_line":"            hnas_snapshot_id \u003d snapshot[\u0027provider_location\u0027].split(\u0027/\u0027)[-1]"},{"line_number":588,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_b6c4bd92","line":585,"range":{"start_line":585,"start_character":33,"end_line":585,"end_character":49},"updated":"2016-11-23 17:45:03.000000000","message":"hnas_snapshot_id ?","commit_id":"d5a11948ee9d712cdb97030815cffa8f31165c1b"},{"author":{"_account_id":14907,"name":"Alyson","email":"alyson.rodrigues.rosa@gmail.com","username":"Alyson"},"change_message_id":"6eece414ad865c7345e7012de16d409553b00c0e","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        if snapshot[\u0027provider_location\u0027]:"},{"line_number":583,"context_line":"            LOG.debug(\"Snapshot %(snap_id)s with provider_location: \""},{"line_number":584,"context_line":"                      \"%(p_loc)s.\","},{"line_number":585,"context_line":"                      {\u0027snap_id\u0027: snapshot[\u0027id\u0027],"},{"line_number":586,"context_line":"                       \u0027p_loc\u0027: snapshot[\u0027provider_location\u0027]})"},{"line_number":587,"context_line":"            hnas_snapshot_id \u003d snapshot[\u0027provider_location\u0027].split(\u0027/\u0027)[-1]"},{"line_number":588,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_70484988","line":585,"range":{"start_line":585,"start_character":33,"end_line":585,"end_character":49},"in_reply_to":"5a74a57a_b6c4bd92","updated":"2016-11-24 12:46:38.000000000","message":"Done","commit_id":"d5a11948ee9d712cdb97030815cffa8f31165c1b"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"98420d2114237ee7507d54d6e71975e5e33ab73a","unresolved":false,"context_lines":[{"line_number":879,"context_line":""},{"line_number":880,"context_line":"        path_info \u003d snapshot[\u0027provider_location\u0027].split(\u0027/\u0027)"},{"line_number":881,"context_line":""},{"line_number":882,"context_line":"        if len(path_info) \u003d\u003d 4 and path_info[1] \u003d\u003d \u0027snapshots\u0027:"},{"line_number":883,"context_line":"            path_share_id \u003d path_info[2]"},{"line_number":884,"context_line":"            hnas_snapshot_id \u003d path_info[3]"},{"line_number":885,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_b672fd7a","line":882,"range":{"start_line":882,"start_character":35,"end_line":882,"end_character":47},"updated":"2016-11-23 17:45:03.000000000","message":"Not safe programming. It is possible to get IndexError here.","commit_id":"d5a11948ee9d712cdb97030815cffa8f31165c1b"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"98420d2114237ee7507d54d6e71975e5e33ab73a","unresolved":false,"context_lines":[{"line_number":880,"context_line":"        path_info \u003d snapshot[\u0027provider_location\u0027].split(\u0027/\u0027)"},{"line_number":881,"context_line":""},{"line_number":882,"context_line":"        if len(path_info) \u003d\u003d 4 and path_info[1] \u003d\u003d \u0027snapshots\u0027:"},{"line_number":883,"context_line":"            path_share_id \u003d path_info[2]"},{"line_number":884,"context_line":"            hnas_snapshot_id \u003d path_info[3]"},{"line_number":885,"context_line":"        else:"},{"line_number":886,"context_line":"            msg \u003d _(\"Incorrect path. It should have the following format: \""},{"line_number":887,"context_line":"                    \"/snapshots/SHARE_ID/SNAPSHOT_ID.\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_d66f7990","line":884,"range":{"start_line":883,"start_character":27,"end_line":884,"end_character":43},"updated":"2016-11-23 17:45:03.000000000","message":"same","commit_id":"d5a11948ee9d712cdb97030815cffa8f31165c1b"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"98420d2114237ee7507d54d6e71975e5e33ab73a","unresolved":false,"context_lines":[{"line_number":883,"context_line":"            path_share_id \u003d path_info[2]"},{"line_number":884,"context_line":"            hnas_snapshot_id \u003d path_info[3]"},{"line_number":885,"context_line":"        else:"},{"line_number":886,"context_line":"            msg \u003d _(\"Incorrect path. It should have the following format: \""},{"line_number":887,"context_line":"                    \"/snapshots/SHARE_ID/SNAPSHOT_ID.\")"},{"line_number":888,"context_line":"            raise exception.ManageInvalidShareSnapshot(reason\u003dmsg)"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"        if hnas_share_id !\u003d path_share_id:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_560a89d3","line":887,"range":{"start_line":886,"start_character":11,"end_line":887,"end_character":55},"updated":"2016-11-23 17:45:03.000000000","message":"Which path? need to add it to the message.","commit_id":"d5a11948ee9d712cdb97030815cffa8f31165c1b"},{"author":{"_account_id":14907,"name":"Alyson","email":"alyson.rodrigues.rosa@gmail.com","username":"Alyson"},"change_message_id":"6eece414ad865c7345e7012de16d409553b00c0e","unresolved":false,"context_lines":[{"line_number":883,"context_line":"            path_share_id \u003d path_info[2]"},{"line_number":884,"context_line":"            hnas_snapshot_id \u003d path_info[3]"},{"line_number":885,"context_line":"        else:"},{"line_number":886,"context_line":"            msg \u003d _(\"Incorrect path. It should have the following format: \""},{"line_number":887,"context_line":"                    \"/snapshots/SHARE_ID/SNAPSHOT_ID.\")"},{"line_number":888,"context_line":"            raise exception.ManageInvalidShareSnapshot(reason\u003dmsg)"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"        if hnas_share_id !\u003d path_share_id:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_2b866065","line":887,"range":{"start_line":886,"start_character":11,"end_line":887,"end_character":55},"in_reply_to":"5a74a57a_560a89d3","updated":"2016-11-24 12:46:38.000000000","message":"Done","commit_id":"d5a11948ee9d712cdb97030815cffa8f31165c1b"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"df02132a1db333b3d57ae255a34f362f3ba99bec","unresolved":false,"context_lines":[{"line_number":382,"context_line":""},{"line_number":383,"context_line":"        LOG.debug(\"The snapshot %(ss_sid)s will be deleted. The related \""},{"line_number":384,"context_line":"                  \"share ID is %(ss_id)s.\","},{"line_number":385,"context_line":"                  {\u0027ss_sid\u0027: snapshot[\u0027id\u0027], \u0027ss_id\u0027: snapshot[\u0027share_id\u0027]})"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"        self._delete_snapshot(hnas_share_id, hnas_snapshot_id)"},{"line_number":388,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_db16d0f0","line":385,"range":{"start_line":385,"start_character":20,"end_line":385,"end_character":26},"updated":"2016-11-30 06:46:55.000000000","message":"better switch the key name to \u0027ss_id\u0027 as well.","commit_id":"f2cced235ccf755f2fc704da0782939b41f2794c"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"df02132a1db333b3d57ae255a34f362f3ba99bec","unresolved":false,"context_lines":[{"line_number":382,"context_line":""},{"line_number":383,"context_line":"        LOG.debug(\"The snapshot %(ss_sid)s will be deleted. The related \""},{"line_number":384,"context_line":"                  \"share ID is %(ss_id)s.\","},{"line_number":385,"context_line":"                  {\u0027ss_sid\u0027: snapshot[\u0027id\u0027], \u0027ss_id\u0027: snapshot[\u0027share_id\u0027]})"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"        self._delete_snapshot(hnas_share_id, hnas_snapshot_id)"},{"line_number":388,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_7be69c17","line":385,"range":{"start_line":385,"start_character":46,"end_line":385,"end_character":51},"updated":"2016-11-30 06:46:55.000000000","message":"ss_sid","commit_id":"f2cced235ccf755f2fc704da0782939b41f2794c"},{"author":{"_account_id":14907,"name":"Alyson","email":"alyson.rodrigues.rosa@gmail.com","username":"Alyson"},"change_message_id":"0d11c9f537ea4d026c66ff4e094220fe58503794","unresolved":false,"context_lines":[{"line_number":382,"context_line":""},{"line_number":383,"context_line":"        LOG.debug(\"The snapshot %(ss_sid)s will be deleted. The related \""},{"line_number":384,"context_line":"                  \"share ID is %(ss_id)s.\","},{"line_number":385,"context_line":"                  {\u0027ss_sid\u0027: snapshot[\u0027id\u0027], \u0027ss_id\u0027: snapshot[\u0027share_id\u0027]})"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"        self._delete_snapshot(hnas_share_id, hnas_snapshot_id)"},{"line_number":388,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_e5dafd16","line":385,"range":{"start_line":385,"start_character":46,"end_line":385,"end_character":51},"in_reply_to":"5a74a57a_7be69c17","updated":"2016-11-30 11:46:20.000000000","message":"Done","commit_id":"f2cced235ccf755f2fc704da0782939b41f2794c"},{"author":{"_account_id":14907,"name":"Alyson","email":"alyson.rodrigues.rosa@gmail.com","username":"Alyson"},"change_message_id":"0d11c9f537ea4d026c66ff4e094220fe58503794","unresolved":false,"context_lines":[{"line_number":382,"context_line":""},{"line_number":383,"context_line":"        LOG.debug(\"The snapshot %(ss_sid)s will be deleted. The related \""},{"line_number":384,"context_line":"                  \"share ID is %(ss_id)s.\","},{"line_number":385,"context_line":"                  {\u0027ss_sid\u0027: snapshot[\u0027id\u0027], \u0027ss_id\u0027: snapshot[\u0027share_id\u0027]})"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"        self._delete_snapshot(hnas_share_id, hnas_snapshot_id)"},{"line_number":388,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_e2759332","line":385,"range":{"start_line":385,"start_character":20,"end_line":385,"end_character":26},"in_reply_to":"5a74a57a_db16d0f0","updated":"2016-11-30 11:46:20.000000000","message":"Done","commit_id":"f2cced235ccf755f2fc704da0782939b41f2794c"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"df02132a1db333b3d57ae255a34f362f3ba99bec","unresolved":false,"context_lines":[{"line_number":1028,"context_line":""},{"line_number":1029,"context_line":"        if snapshot_size \u003d\u003d 0:"},{"line_number":1030,"context_line":"            msg \u003d _(\"Snapshot %(snap_id)s has no size specified for manage. \""},{"line_number":1031,"context_line":"                    \"Please, provide the size with parameter --driver-options \""},{"line_number":1032,"context_line":"                    \"size\u003d\u003cSIZE\u003e.\") % {\u0027snap_id\u0027: snapshot[\u0027id\u0027]}"},{"line_number":1033,"context_line":"            raise exception.ManageInvalidShareSnapshot(reason\u003dmsg)"},{"line_number":1034,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_fb2f0ca5","line":1031,"range":{"start_line":1031,"start_character":61,"end_line":1031,"end_character":77},"updated":"2016-11-30 06:46:55.000000000","message":"this\u0027s the option for CLI, what if users pass this argument by UI or directly send REST request? Maybe just \u0027driver_options\u0027 better?","commit_id":"f2cced235ccf755f2fc704da0782939b41f2794c"},{"author":{"_account_id":14907,"name":"Alyson","email":"alyson.rodrigues.rosa@gmail.com","username":"Alyson"},"change_message_id":"0d11c9f537ea4d026c66ff4e094220fe58503794","unresolved":false,"context_lines":[{"line_number":1028,"context_line":""},{"line_number":1029,"context_line":"        if snapshot_size \u003d\u003d 0:"},{"line_number":1030,"context_line":"            msg \u003d _(\"Snapshot %(snap_id)s has no size specified for manage. \""},{"line_number":1031,"context_line":"                    \"Please, provide the size with parameter --driver-options \""},{"line_number":1032,"context_line":"                    \"size\u003d\u003cSIZE\u003e.\") % {\u0027snap_id\u0027: snapshot[\u0027id\u0027]}"},{"line_number":1033,"context_line":"            raise exception.ManageInvalidShareSnapshot(reason\u003dmsg)"},{"line_number":1034,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_45081192","line":1031,"range":{"start_line":1031,"start_character":61,"end_line":1031,"end_character":77},"in_reply_to":"5a74a57a_fb2f0ca5","updated":"2016-11-30 11:46:20.000000000","message":"Done","commit_id":"f2cced235ccf755f2fc704da0782939b41f2794c"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"df02132a1db333b3d57ae255a34f362f3ba99bec","unresolved":false,"context_lines":[{"line_number":1075,"context_line":"        \"\"\""},{"line_number":1076,"context_line":"        LOG.info(_LI(\"The snapshot with ID %(snap_id)s from share \""},{"line_number":1077,"context_line":"                     \"%(share_id)s is no longer being managed by Manila. \""},{"line_number":1078,"context_line":"                     \"However, it was not deleted and can be found in HNAS.\"),"},{"line_number":1079,"context_line":"                 {\u0027snap_id\u0027: snapshot[\u0027id\u0027],"},{"line_number":1080,"context_line":"                  \u0027share_id\u0027: snapshot[\u0027share_id\u0027]})"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_b64a0b54","line":1078,"range":{"start_line":1078,"start_character":34,"end_line":1078,"end_character":37},"updated":"2016-11-30 06:46:55.000000000","message":"is","commit_id":"f2cced235ccf755f2fc704da0782939b41f2794c"},{"author":{"_account_id":14907,"name":"Alyson","email":"alyson.rodrigues.rosa@gmail.com","username":"Alyson"},"change_message_id":"0d11c9f537ea4d026c66ff4e094220fe58503794","unresolved":false,"context_lines":[{"line_number":1075,"context_line":"        \"\"\""},{"line_number":1076,"context_line":"        LOG.info(_LI(\"The snapshot with ID %(snap_id)s from share \""},{"line_number":1077,"context_line":"                     \"%(share_id)s is no longer being managed by Manila. \""},{"line_number":1078,"context_line":"                     \"However, it was not deleted and can be found in HNAS.\"),"},{"line_number":1079,"context_line":"                 {\u0027snap_id\u0027: snapshot[\u0027id\u0027],"},{"line_number":1080,"context_line":"                  \u0027share_id\u0027: snapshot[\u0027share_id\u0027]})"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_b8082c2f","line":1078,"range":{"start_line":1078,"start_character":34,"end_line":1078,"end_character":37},"in_reply_to":"5a74a57a_b64a0b54","updated":"2016-11-30 11:46:20.000000000","message":"Done","commit_id":"f2cced235ccf755f2fc704da0782939b41f2794c"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"1fb09a04be3e463dfc9f3e6c1d54367a3d7c15aa","unresolved":false,"context_lines":[{"line_number":1026,"context_line":""},{"line_number":1027,"context_line":"        :returns: Returns a dict with size of snapshot managed"},{"line_number":1028,"context_line":"        \"\"\""},{"line_number":1029,"context_line":"        snapshot_size \u003d int(driver_options.get(\"size\", 0))"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"        if snapshot_size \u003d\u003d 0:"},{"line_number":1032,"context_line":"            msg \u003d _(\"Snapshot %(snap_id)s has no size specified for manage. \""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_e6fc2aba","line":1029,"range":{"start_line":1029,"start_character":24,"end_line":1029,"end_character":58},"updated":"2016-12-06 10:26:07.000000000","message":"You can get here TypeError/VAlueError in case value is provided and it is not translatable to integer. In this case, we will get not nice exception as below.","commit_id":"c7c3dba3985749dbf0ce3b7e77cdbe046c64c94c"},{"author":{"_account_id":14907,"name":"Alyson","email":"alyson.rodrigues.rosa@gmail.com","username":"Alyson"},"change_message_id":"028f1a8a6874b15888611afdef714930985cc6a2","unresolved":false,"context_lines":[{"line_number":1026,"context_line":""},{"line_number":1027,"context_line":"        :returns: Returns a dict with size of snapshot managed"},{"line_number":1028,"context_line":"        \"\"\""},{"line_number":1029,"context_line":"        snapshot_size \u003d int(driver_options.get(\"size\", 0))"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"        if snapshot_size \u003d\u003d 0:"},{"line_number":1032,"context_line":"            msg \u003d _(\"Snapshot %(snap_id)s has no size specified for manage. \""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_4d596f8d","line":1029,"range":{"start_line":1029,"start_character":24,"end_line":1029,"end_character":58},"in_reply_to":"3a71b18c_d3a7eb08","updated":"2016-12-06 17:02:40.000000000","message":"You are right, in this case it will raise a TypeError Exception. I\u0027m adding this cast to a try-except block.","commit_id":"c7c3dba3985749dbf0ce3b7e77cdbe046c64c94c"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"c5dc83a4e0e0a1cff2db77a37cf3e2c830eeeebc","unresolved":false,"context_lines":[{"line_number":1026,"context_line":""},{"line_number":1027,"context_line":"        :returns: Returns a dict with size of snapshot managed"},{"line_number":1028,"context_line":"        \"\"\""},{"line_number":1029,"context_line":"        snapshot_size \u003d int(driver_options.get(\"size\", 0))"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"        if snapshot_size \u003d\u003d 0:"},{"line_number":1032,"context_line":"            msg \u003d _(\"Snapshot %(snap_id)s has no size specified for manage. \""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_d3a7eb08","line":1029,"range":{"start_line":1029,"start_character":24,"end_line":1029,"end_character":58},"in_reply_to":"3a71b18c_e6fc2aba","updated":"2016-12-06 11:05:22.000000000","message":"Yeah, what if the admin says --driver-options size\u003d400GB ?  Should put the cast to int inside a try-except.","commit_id":"c7c3dba3985749dbf0ce3b7e77cdbe046c64c94c"}],"manila/share/drivers/hitachi/hnas/ssh.py":[{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"98420d2114237ee7507d54d6e71975e5e33ab73a","unresolved":false,"context_lines":[{"line_number":277,"context_line":"            self._execute(command)"},{"line_number":278,"context_line":"            return True"},{"line_number":279,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":280,"context_line":"            if \u0027Unable to locate component:\u0027 in e.stdout:"},{"line_number":281,"context_line":"                LOG.debug(\"Error: %(out)s\", {\u0027out\u0027: e.stdout})"},{"line_number":282,"context_line":"                return False"},{"line_number":283,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_f690f597","line":280,"range":{"start_line":280,"start_character":16,"end_line":280,"end_character":43},"updated":"2016-11-23 17:45:03.000000000","message":"Oh nooo, not again. That \"error-message-driver\" programming is fragile.","commit_id":"d5a11948ee9d712cdb97030815cffa8f31165c1b"},{"author":{"_account_id":14907,"name":"Alyson","email":"alyson.rodrigues.rosa@gmail.com","username":"Alyson"},"change_message_id":"6eece414ad865c7345e7012de16d409553b00c0e","unresolved":false,"context_lines":[{"line_number":277,"context_line":"            self._execute(command)"},{"line_number":278,"context_line":"            return True"},{"line_number":279,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":280,"context_line":"            if \u0027Unable to locate component:\u0027 in e.stdout:"},{"line_number":281,"context_line":"                LOG.debug(\"Error: %(out)s\", {\u0027out\u0027: e.stdout})"},{"line_number":282,"context_line":"                return False"},{"line_number":283,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_51c6ee49","line":280,"range":{"start_line":280,"start_character":16,"end_line":280,"end_character":43},"in_reply_to":"5a74a57a_f690f597","updated":"2016-11-24 12:46:38.000000000","message":":(","commit_id":"d5a11948ee9d712cdb97030815cffa8f31165c1b"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"98420d2114237ee7507d54d6e71975e5e33ab73a","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                LOG.debug(\"Error: %(out)s\", {\u0027out\u0027: e.stdout})"},{"line_number":282,"context_line":"                return False"},{"line_number":283,"context_line":"            else:"},{"line_number":284,"context_line":"                msg \u003d six.text_type(e)"},{"line_number":285,"context_line":"                LOG.exception(msg)"},{"line_number":286,"context_line":"                raise e"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def check_fs_mounted(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_f6e7153e","line":285,"range":{"start_line":284,"start_character":16,"end_line":285,"end_character":34},"updated":"2016-11-23 17:45:03.000000000","message":"LOG.exception already does logging of stacktrace. It will be duplicated in logs always.","commit_id":"d5a11948ee9d712cdb97030815cffa8f31165c1b"},{"author":{"_account_id":14907,"name":"Alyson","email":"alyson.rodrigues.rosa@gmail.com","username":"Alyson"},"change_message_id":"6eece414ad865c7345e7012de16d409553b00c0e","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                LOG.debug(\"Error: %(out)s\", {\u0027out\u0027: e.stdout})"},{"line_number":282,"context_line":"                return False"},{"line_number":283,"context_line":"            else:"},{"line_number":284,"context_line":"                msg \u003d six.text_type(e)"},{"line_number":285,"context_line":"                LOG.exception(msg)"},{"line_number":286,"context_line":"                raise e"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def check_fs_mounted(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_cbdc0c15","line":285,"range":{"start_line":284,"start_character":16,"end_line":285,"end_character":34},"in_reply_to":"5a74a57a_f6e7153e","updated":"2016-11-24 12:46:38.000000000","message":"Done","commit_id":"d5a11948ee9d712cdb97030815cffa8f31165c1b"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"a2aee64b9d595806378cdbcb10399613a3d6f068","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                          {\u0027path\u0027: path, \u0027out\u0027: e.stdout})"},{"line_number":283,"context_line":"                return False"},{"line_number":284,"context_line":"            else:"},{"line_number":285,"context_line":"                raise e"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def check_fs_mounted(self):"},{"line_number":288,"context_line":"        command \u003d [\u0027df\u0027, \u0027-a\u0027, \u0027-f\u0027, self.fs_name]"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a74a57a_602ab791","line":285,"updated":"2016-11-28 18:47:54.000000000","message":"Just say \"raise\".  No need to add \"e\" there.","commit_id":"8f9b676a7fe5939e76afe9822a35eed90ae52b0f"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"df02132a1db333b3d57ae255a34f362f3ba99bec","unresolved":false,"context_lines":[{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        try:"},{"line_number":277,"context_line":"            self._execute(command)"},{"line_number":278,"context_line":"            return True"},{"line_number":279,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":280,"context_line":"            if \u0027Unable to locate component:\u0027 in e.stdout:"},{"line_number":281,"context_line":"                LOG.debug(\"Cannot find %(path)s: %(out)s\","}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_565c57ed","line":278,"updated":"2016-11-30 06:46:55.000000000","message":"better move this line to the end of this method.","commit_id":"f2cced235ccf755f2fc704da0782939b41f2794c"},{"author":{"_account_id":14907,"name":"Alyson","email":"alyson.rodrigues.rosa@gmail.com","username":"Alyson"},"change_message_id":"0d11c9f537ea4d026c66ff4e094220fe58503794","unresolved":false,"context_lines":[{"line_number":275,"context_line":""},{"line_number":276,"context_line":"        try:"},{"line_number":277,"context_line":"            self._execute(command)"},{"line_number":278,"context_line":"            return True"},{"line_number":279,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":280,"context_line":"            if \u0027Unable to locate component:\u0027 in e.stdout:"},{"line_number":281,"context_line":"                LOG.debug(\"Cannot find %(path)s: %(out)s\","}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_e2767305","line":278,"in_reply_to":"5a74a57a_565c57ed","updated":"2016-11-30 11:46:20.000000000","message":"Done","commit_id":"f2cced235ccf755f2fc704da0782939b41f2794c"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"c5dc83a4e0e0a1cff2db77a37cf3e2c830eeeebc","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                          {\u0027path\u0027: path, \u0027out\u0027: e.stdout})"},{"line_number":282,"context_line":"                return False"},{"line_number":283,"context_line":"            else:"},{"line_number":284,"context_line":"                raise"},{"line_number":285,"context_line":"        return True"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def check_fs_mounted(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_33765f3e","line":284,"range":{"start_line":284,"start_character":0,"end_line":284,"end_character":21},"updated":"2016-12-06 11:05:22.000000000","message":"I think this will bubble a raw backend exception all the way\nup to the manager.  Are you sure you want to do that rather\nthan raising exception.HNASBackendException ?","commit_id":"c7c3dba3985749dbf0ce3b7e77cdbe046c64c94c"},{"author":{"_account_id":14907,"name":"Alyson","email":"alyson.rodrigues.rosa@gmail.com","username":"Alyson"},"change_message_id":"028f1a8a6874b15888611afdef714930985cc6a2","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                          {\u0027path\u0027: path, \u0027out\u0027: e.stdout})"},{"line_number":282,"context_line":"                return False"},{"line_number":283,"context_line":"            else:"},{"line_number":284,"context_line":"                raise"},{"line_number":285,"context_line":"        return True"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def check_fs_mounted(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_d3fb5c45","line":284,"range":{"start_line":284,"start_character":0,"end_line":284,"end_character":21},"in_reply_to":"3a71b18c_33765f3e","updated":"2016-12-06 17:02:40.000000000","message":"Yes, as the others functions from this layer, if command fails and its not a case that we handle, this exception is raised.","commit_id":"c7c3dba3985749dbf0ce3b7e77cdbe046c64c94c"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"69d2b6b3abf65fe50444367fb99bc8062e71fdd3","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                          {\u0027path\u0027: path, \u0027out\u0027: e.stdout})"},{"line_number":282,"context_line":"                return False"},{"line_number":283,"context_line":"            else:"},{"line_number":284,"context_line":"                raise"},{"line_number":285,"context_line":"        return True"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def check_fs_mounted(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_0f726849","line":284,"range":{"start_line":284,"start_character":0,"end_line":284,"end_character":21},"in_reply_to":"3a71b18c_d3fb5c45","updated":"2016-12-09 17:16:36.000000000","message":"Well, you do that some of the time.  I see 16 occurrences\nof ProcessExecutionError in this file and in six of them\nyou do bare raises.  But generally you test for a specific string in output, log and swallow the exception (like here) but if you don\u0027t find it you log the exception and raise an\nHNASBackendException saying that you failed to do the\noperation in question.  That approach seems to me friendlier to the end user.","commit_id":"c7c3dba3985749dbf0ce3b7e77cdbe046c64c94c"}],"manila/tests/share/drivers/hitachi/hnas/test_driver.py":[{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"df02132a1db333b3d57ae255a34f362f3ba99bec","unresolved":false,"context_lines":[{"line_number":535,"context_line":"    def test_delete_managed_snapshot(self):"},{"line_number":536,"context_line":"        hnas_id \u003d manage_snapshot[\u0027share_id\u0027]"},{"line_number":537,"context_line":"        self.mock_object(driver.HitachiHNASDriver, \"_check_fs_mounted\")"},{"line_number":538,"context_line":"        self.mock_object(ssh.HNASSSHBackend, \"tree_delete\", mock.Mock())"},{"line_number":539,"context_line":"        self.mock_object(ssh.HNASSSHBackend, \"delete_directory\", mock.Mock())"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        self._driver.delete_snapshot(\u0027context\u0027, manage_snapshot)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_c23345f5","line":538,"range":{"start_line":538,"start_character":58,"end_line":538,"end_character":71},"updated":"2016-11-30 06:46:55.000000000","message":"as the above line, you could not specify this mock.Mock() explicitly.","commit_id":"f2cced235ccf755f2fc704da0782939b41f2794c"},{"author":{"_account_id":14907,"name":"Alyson","email":"alyson.rodrigues.rosa@gmail.com","username":"Alyson"},"change_message_id":"0d11c9f537ea4d026c66ff4e094220fe58503794","unresolved":false,"context_lines":[{"line_number":535,"context_line":"    def test_delete_managed_snapshot(self):"},{"line_number":536,"context_line":"        hnas_id \u003d manage_snapshot[\u0027share_id\u0027]"},{"line_number":537,"context_line":"        self.mock_object(driver.HitachiHNASDriver, \"_check_fs_mounted\")"},{"line_number":538,"context_line":"        self.mock_object(ssh.HNASSSHBackend, \"tree_delete\", mock.Mock())"},{"line_number":539,"context_line":"        self.mock_object(ssh.HNASSSHBackend, \"delete_directory\", mock.Mock())"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        self._driver.delete_snapshot(\u0027context\u0027, manage_snapshot)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_42cba71e","line":538,"range":{"start_line":538,"start_character":58,"end_line":538,"end_character":71},"in_reply_to":"5a74a57a_c23345f5","updated":"2016-11-30 11:46:20.000000000","message":"Done","commit_id":"f2cced235ccf755f2fc704da0782939b41f2794c"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"df02132a1db333b3d57ae255a34f362f3ba99bec","unresolved":false,"context_lines":[{"line_number":536,"context_line":"        hnas_id \u003d manage_snapshot[\u0027share_id\u0027]"},{"line_number":537,"context_line":"        self.mock_object(driver.HitachiHNASDriver, \"_check_fs_mounted\")"},{"line_number":538,"context_line":"        self.mock_object(ssh.HNASSSHBackend, \"tree_delete\", mock.Mock())"},{"line_number":539,"context_line":"        self.mock_object(ssh.HNASSSHBackend, \"delete_directory\", mock.Mock())"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        self._driver.delete_snapshot(\u0027context\u0027, manage_snapshot)"},{"line_number":542,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_2251590f","line":539,"range":{"start_line":539,"start_character":65,"end_line":539,"end_character":76},"updated":"2016-11-30 06:46:55.000000000","message":"ditto","commit_id":"f2cced235ccf755f2fc704da0782939b41f2794c"},{"author":{"_account_id":14907,"name":"Alyson","email":"alyson.rodrigues.rosa@gmail.com","username":"Alyson"},"change_message_id":"0d11c9f537ea4d026c66ff4e094220fe58503794","unresolved":false,"context_lines":[{"line_number":536,"context_line":"        hnas_id \u003d manage_snapshot[\u0027share_id\u0027]"},{"line_number":537,"context_line":"        self.mock_object(driver.HitachiHNASDriver, \"_check_fs_mounted\")"},{"line_number":538,"context_line":"        self.mock_object(ssh.HNASSSHBackend, \"tree_delete\", mock.Mock())"},{"line_number":539,"context_line":"        self.mock_object(ssh.HNASSSHBackend, \"delete_directory\", mock.Mock())"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        self._driver.delete_snapshot(\u0027context\u0027, manage_snapshot)"},{"line_number":542,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_62d0a3ca","line":539,"range":{"start_line":539,"start_character":65,"end_line":539,"end_character":76},"in_reply_to":"5a74a57a_2251590f","updated":"2016-11-30 11:46:20.000000000","message":"Done","commit_id":"f2cced235ccf755f2fc704da0782939b41f2794c"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"df02132a1db333b3d57ae255a34f362f3ba99bec","unresolved":false,"context_lines":[{"line_number":869,"context_line":"                          self._driver.manage_existing_snapshot,"},{"line_number":870,"context_line":"                          manage_snapshot, {})"},{"line_number":871,"context_line":""},{"line_number":872,"context_line":"    def test_manage_snapshot_invalid_path_exception(self):"},{"line_number":873,"context_line":"        snap_copy \u003d manage_snapshot.copy()"},{"line_number":874,"context_line":"        snap_copy[\u0027provider_location\u0027] \u003d \u0027/root/snapshot_id\u0027"},{"line_number":875,"context_line":""},{"line_number":876,"context_line":"        self.assertRaises(exception.ManageInvalidShareSnapshot,"},{"line_number":877,"context_line":"                          self._driver.manage_existing_snapshot,"},{"line_number":878,"context_line":"                          snap_copy, {\u0027size\u0027: 20})"},{"line_number":879,"context_line":"        self.assertTrue(self.mock_log.debug.called)"},{"line_number":880,"context_line":""},{"line_number":881,"context_line":"    def test_manage_snapshot_wrong_share_exception(self):"},{"line_number":882,"context_line":"        snap_copy \u003d manage_snapshot.copy()"},{"line_number":883,"context_line":"        snap_copy[\u0027provider_location\u0027] \u003d \u0027/snapshots/share1/snapshot_id\u0027"},{"line_number":884,"context_line":""},{"line_number":885,"context_line":"        self.assertRaises(exception.ManageInvalidShareSnapshot,"},{"line_number":886,"context_line":"                          self._driver.manage_existing_snapshot,"},{"line_number":887,"context_line":"                          snap_copy, {\u0027size\u0027: 20})"},{"line_number":888,"context_line":"        self.assertTrue(self.mock_log.debug.called)"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"    def test_manage_inexistent_snapshot_exception(self):"},{"line_number":891,"context_line":"        self.mock_object(ssh.HNASSSHBackend, \u0027check_snapshot\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_d6ff87a8","line":888,"range":{"start_line":872,"start_character":4,"end_line":888,"end_character":51},"updated":"2016-11-30 06:46:55.000000000","message":"these two tests almost the same, could be merged to one by @ddt","commit_id":"f2cced235ccf755f2fc704da0782939b41f2794c"},{"author":{"_account_id":14907,"name":"Alyson","email":"alyson.rodrigues.rosa@gmail.com","username":"Alyson"},"change_message_id":"0d11c9f537ea4d026c66ff4e094220fe58503794","unresolved":false,"context_lines":[{"line_number":869,"context_line":"                          self._driver.manage_existing_snapshot,"},{"line_number":870,"context_line":"                          manage_snapshot, {})"},{"line_number":871,"context_line":""},{"line_number":872,"context_line":"    def test_manage_snapshot_invalid_path_exception(self):"},{"line_number":873,"context_line":"        snap_copy \u003d manage_snapshot.copy()"},{"line_number":874,"context_line":"        snap_copy[\u0027provider_location\u0027] \u003d \u0027/root/snapshot_id\u0027"},{"line_number":875,"context_line":""},{"line_number":876,"context_line":"        self.assertRaises(exception.ManageInvalidShareSnapshot,"},{"line_number":877,"context_line":"                          self._driver.manage_existing_snapshot,"},{"line_number":878,"context_line":"                          snap_copy, {\u0027size\u0027: 20})"},{"line_number":879,"context_line":"        self.assertTrue(self.mock_log.debug.called)"},{"line_number":880,"context_line":""},{"line_number":881,"context_line":"    def test_manage_snapshot_wrong_share_exception(self):"},{"line_number":882,"context_line":"        snap_copy \u003d manage_snapshot.copy()"},{"line_number":883,"context_line":"        snap_copy[\u0027provider_location\u0027] \u003d \u0027/snapshots/share1/snapshot_id\u0027"},{"line_number":884,"context_line":""},{"line_number":885,"context_line":"        self.assertRaises(exception.ManageInvalidShareSnapshot,"},{"line_number":886,"context_line":"                          self._driver.manage_existing_snapshot,"},{"line_number":887,"context_line":"                          snap_copy, {\u0027size\u0027: 20})"},{"line_number":888,"context_line":"        self.assertTrue(self.mock_log.debug.called)"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"    def test_manage_inexistent_snapshot_exception(self):"},{"line_number":891,"context_line":"        self.mock_object(ssh.HNASSSHBackend, \u0027check_snapshot\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a74a57a_e5611dd5","line":888,"range":{"start_line":872,"start_character":4,"end_line":888,"end_character":51},"in_reply_to":"5a74a57a_d6ff87a8","updated":"2016-11-30 11:46:20.000000000","message":"nice catch!","commit_id":"f2cced235ccf755f2fc704da0782939b41f2794c"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"bb50a03b52d6622963d0b0eb77bdf6b45021021c","unresolved":false,"context_lines":[{"line_number":849,"context_line":"        (manila.share.driver.ShareDriver._update_share_stats."},{"line_number":850,"context_line":"         assert_called_once_with(fake_data))"},{"line_number":851,"context_line":"        self.assertTrue(self.mock_log.info.called)"},{"line_number":852,"context_line":""},{"line_number":853,"context_line":"    def test_manage_existing_snapshot(self):"},{"line_number":854,"context_line":"        self.mock_object(ssh.HNASSSHBackend, \u0027check_snapshot\u0027,"},{"line_number":855,"context_line":"                         mock.Mock(return_value\u003dTrue))"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_66a49ab9","line":852,"updated":"2016-12-06 10:27:55.000000000","message":"No negative test for fake size value.","commit_id":"c7c3dba3985749dbf0ce3b7e77cdbe046c64c94c"},{"author":{"_account_id":14907,"name":"Alyson","email":"alyson.rodrigues.rosa@gmail.com","username":"Alyson"},"change_message_id":"028f1a8a6874b15888611afdef714930985cc6a2","unresolved":false,"context_lines":[{"line_number":849,"context_line":"        (manila.share.driver.ShareDriver._update_share_stats."},{"line_number":850,"context_line":"         assert_called_once_with(fake_data))"},{"line_number":851,"context_line":"        self.assertTrue(self.mock_log.info.called)"},{"line_number":852,"context_line":""},{"line_number":853,"context_line":"    def test_manage_existing_snapshot(self):"},{"line_number":854,"context_line":"        self.mock_object(ssh.HNASSSHBackend, \u0027check_snapshot\u0027,"},{"line_number":855,"context_line":"                         mock.Mock(return_value\u003dTrue))"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a71b18c_336490b7","line":852,"in_reply_to":"3a71b18c_66a49ab9","updated":"2016-12-06 17:02:40.000000000","message":"Good point. I am adding more unit tests to cover this.","commit_id":"c7c3dba3985749dbf0ce3b7e77cdbe046c64c94c"}],"manila_tempest_tests/tests/api/admin/test_snapshot_manage.py":[{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"9c2b22c245fcae57afc1be0323ddeb7180ab208e","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            snapshot[\u0027provider_location\u0027],"},{"line_number":82,"context_line":"            name\u003dname,"},{"line_number":83,"context_line":"            description\u003ddescription,"},{"line_number":84,"context_line":"            # Hitachi HNAS Driver requires parameter snapshot \u0027size\u0027 passed as"},{"line_number":85,"context_line":"            # a driver option"},{"line_number":86,"context_line":"            driver_options\u003d{\u0027size\u0027: snapshot[\u0027size\u0027]},"},{"line_number":87,"context_line":"            version\u003dversion,"},{"line_number":88,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_be494f33","line":85,"range":{"start_line":84,"start_character":12,"end_line":85,"end_character":29},"updated":"2016-11-28 19:44:11.000000000","message":"Assuming other drivers could also add other options, I suggest doing the following:\n\n# Some drivers require additional parameters passed as driver options, as follows:\n# - size: Hitachi HNAS Driver","commit_id":"7111a15c33ad3bdbbbdc35b5c6104174d681825b"},{"author":{"_account_id":14907,"name":"Alyson","email":"alyson.rodrigues.rosa@gmail.com","username":"Alyson"},"change_message_id":"b2e97c9108fa1dcdd20329ae86fb2b95658814b8","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            snapshot[\u0027provider_location\u0027],"},{"line_number":82,"context_line":"            name\u003dname,"},{"line_number":83,"context_line":"            description\u003ddescription,"},{"line_number":84,"context_line":"            # Hitachi HNAS Driver requires parameter snapshot \u0027size\u0027 passed as"},{"line_number":85,"context_line":"            # a driver option"},{"line_number":86,"context_line":"            driver_options\u003d{\u0027size\u0027: snapshot[\u0027size\u0027]},"},{"line_number":87,"context_line":"            version\u003dversion,"},{"line_number":88,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_5e983b6a","line":85,"range":{"start_line":84,"start_character":12,"end_line":85,"end_character":29},"in_reply_to":"5a74a57a_be494f33","updated":"2016-11-28 19:52:34.000000000","message":"Hmm, makes sense. I\u0027ll change it, thanks Ganso :)","commit_id":"7111a15c33ad3bdbbbdc35b5c6104174d681825b"}]}
