)]}'
{"ironic_python_agent/hardware.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"d1eab6d1983710c4d155e91d36d7de16bdc8a133","unresolved":false,"context_lines":[{"line_number":357,"context_line":"        if self._ata_erase(block_device):"},{"line_number":358,"context_line":"            return"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"        if self._shred_block_device(block_device):"},{"line_number":361,"context_line":"            return"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        msg \u003d (\u0027Unable to erase block device {0}: device is unsupported.\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_47c7a164","line":360,"updated":"2015-03-17 23:30:23.000000000","message":"_shred_block_device !\u003d _shred_block_device_erase","commit_id":"f83ea1831d9ad6004a10052c9cf2991aa6f92d86"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"5366a19d3fcddfb0b59b5c2dfd54681dd1eaf694","unresolved":false,"context_lines":[{"line_number":360,"context_line":"        if self._shred_block_device(block_device):"},{"line_number":361,"context_line":"            return"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        msg \u003d (\u0027Unable to erase block device {0}: device is unsupported.\u0027"},{"line_number":364,"context_line":"              ).format(block_device.name)"},{"line_number":365,"context_line":"        LOG.error(msg)"},{"line_number":366,"context_line":"        raise errors.IncompatibleHardwareMethodError(msg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_1bcfb9b4","line":363,"updated":"2015-03-18 05:16:05.000000000","message":"You can\u0027t get to this point. Maybe wrap utils.execute in a try/except, return false if it excepts, so it\u0027ll fall all the way through?","commit_id":"b23524db63efca47139bfb824d40542da0c184d9"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"b5bb91c65f3d7ada28bcecdfb0d742fe6c3fd7cb","unresolved":false,"context_lines":[{"line_number":360,"context_line":"        if self._shred_block_device(block_device):"},{"line_number":361,"context_line":"            return"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        msg \u003d (\u0027Unable to erase block device {0}: device is unsupported.\u0027"},{"line_number":364,"context_line":"              ).format(block_device.name)"},{"line_number":365,"context_line":"        LOG.error(msg)"},{"line_number":366,"context_line":"        raise errors.IncompatibleHardwareMethodError(msg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_a65cba1a","line":363,"in_reply_to":"9a80dd14_1bcfb9b4","updated":"2015-03-18 16:44:24.000000000","message":"I\u0027m making the assumption that someone may override _shred_block_device in their own hardware manager. I can wrap that if you want (it might be better) but I think this code block should stay either way.","commit_id":"b23524db63efca47139bfb824d40542da0c184d9"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"66a52fd1ca44ca82eb2ccdaf4057e021c9770614","unresolved":false,"context_lines":[{"line_number":360,"context_line":"        if self._shred_block_device(block_device):"},{"line_number":361,"context_line":"            return"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        msg \u003d (\u0027Unable to erase block device {0}: device is unsupported.\u0027"},{"line_number":364,"context_line":"              ).format(block_device.name)"},{"line_number":365,"context_line":"        LOG.error(msg)"},{"line_number":366,"context_line":"        raise errors.IncompatibleHardwareMethodError(msg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_5ca90623","line":363,"in_reply_to":"9a80dd14_866b3684","updated":"2015-03-18 19:11:53.000000000","message":"Done","commit_id":"b23524db63efca47139bfb824d40542da0c184d9"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"6826bcadfeda720ed530d38df1edcea4a0f4269f","unresolved":false,"context_lines":[{"line_number":360,"context_line":"        if self._shred_block_device(block_device):"},{"line_number":361,"context_line":"            return"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        msg \u003d (\u0027Unable to erase block device {0}: device is unsupported.\u0027"},{"line_number":364,"context_line":"              ).format(block_device.name)"},{"line_number":365,"context_line":"        LOG.error(msg)"},{"line_number":366,"context_line":"        raise errors.IncompatibleHardwareMethodError(msg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_2c40a934","line":363,"in_reply_to":"9a80dd14_866b3684","updated":"2015-03-18 17:19:59.000000000","message":"I agree with Josh unless the desired behavior is to bubble up the ProcessExecutionError","commit_id":"b23524db63efca47139bfb824d40542da0c184d9"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ee17b92d9e0bce7e4ee2c0a0414668c1961cd285","unresolved":false,"context_lines":[{"line_number":360,"context_line":"        if self._shred_block_device(block_device):"},{"line_number":361,"context_line":"            return"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        msg \u003d (\u0027Unable to erase block device {0}: device is unsupported.\u0027"},{"line_number":364,"context_line":"              ).format(block_device.name)"},{"line_number":365,"context_line":"        LOG.error(msg)"},{"line_number":366,"context_line":"        raise errors.IncompatibleHardwareMethodError(msg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_866b3684","line":363,"in_reply_to":"9a80dd14_a65cba1a","updated":"2015-03-18 16:47:38.000000000","message":"That\u0027s a good call. Just looks odd as it stands. If you wrap utils.execute in a try/except (which we should have anyway), and return false, then this code block is applicable both as it stands (if shred somehow fails) and if it\u0027s overridden.","commit_id":"b23524db63efca47139bfb824d40542da0c184d9"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"5366a19d3fcddfb0b59b5c2dfd54681dd1eaf694","unresolved":false,"context_lines":[{"line_number":368,"context_line":"    def _shred_block_device(self, block_device):"},{"line_number":369,"context_line":"        passes \u003d 1"},{"line_number":370,"context_line":"        utils.execute(\u0027shred\u0027, \u0027--force\u0027, \u0027--zero\u0027, \u0027--verbose\u0027,"},{"line_number":371,"context_line":"                      \u0027--iterations\u0027, passes, block_device.name,"},{"line_number":372,"context_line":"                      check_exit_code\u003d[0])"},{"line_number":373,"context_line":"        return True"},{"line_number":374,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_5bf21107","line":371,"updated":"2015-03-18 05:16:05.000000000","message":"I think you need str(passes). When running this in devstack, I got: sequence item 5: expected string, int found","commit_id":"b23524db63efca47139bfb824d40542da0c184d9"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"66a52fd1ca44ca82eb2ccdaf4057e021c9770614","unresolved":false,"context_lines":[{"line_number":368,"context_line":"    def _shred_block_device(self, block_device):"},{"line_number":369,"context_line":"        passes \u003d 1"},{"line_number":370,"context_line":"        utils.execute(\u0027shred\u0027, \u0027--force\u0027, \u0027--zero\u0027, \u0027--verbose\u0027,"},{"line_number":371,"context_line":"                      \u0027--iterations\u0027, passes, block_device.name,"},{"line_number":372,"context_line":"                      check_exit_code\u003d[0])"},{"line_number":373,"context_line":"        return True"},{"line_number":374,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_bc65a21e","line":371,"in_reply_to":"9a80dd14_066e66c9","updated":"2015-03-18 19:11:53.000000000","message":"I just made it a string and killed the intermediate var.\n\nDone.","commit_id":"b23524db63efca47139bfb824d40542da0c184d9"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"b5bb91c65f3d7ada28bcecdfb0d742fe6c3fd7cb","unresolved":false,"context_lines":[{"line_number":368,"context_line":"    def _shred_block_device(self, block_device):"},{"line_number":369,"context_line":"        passes \u003d 1"},{"line_number":370,"context_line":"        utils.execute(\u0027shred\u0027, \u0027--force\u0027, \u0027--zero\u0027, \u0027--verbose\u0027,"},{"line_number":371,"context_line":"                      \u0027--iterations\u0027, passes, block_device.name,"},{"line_number":372,"context_line":"                      check_exit_code\u003d[0])"},{"line_number":373,"context_line":"        return True"},{"line_number":374,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_066e66c9","line":371,"in_reply_to":"9a80dd14_5bf21107","updated":"2015-03-18 16:44:24.000000000","message":"probably six.text_type, but yeah. I\u0027ll fix.","commit_id":"b23524db63efca47139bfb824d40542da0c184d9"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"6826bcadfeda720ed530d38df1edcea4a0f4269f","unresolved":false,"context_lines":[{"line_number":369,"context_line":"        passes \u003d 1"},{"line_number":370,"context_line":"        utils.execute(\u0027shred\u0027, \u0027--force\u0027, \u0027--zero\u0027, \u0027--verbose\u0027,"},{"line_number":371,"context_line":"                      \u0027--iterations\u0027, passes, block_device.name,"},{"line_number":372,"context_line":"                      check_exit_code\u003d[0])"},{"line_number":373,"context_line":"        return True"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def _get_ata_security_lines(self, block_device):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_4c0ddd34","line":372,"updated":"2015-03-18 17:19:59.000000000","message":"I think you already know this, but if shred fails, then it will raise a ProcessExecutionError.  Is that the desired behavior?","commit_id":"b23524db63efca47139bfb824d40542da0c184d9"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"a8d4cc27886ab51275f81dac3f1074c40c9e744b","unresolved":false,"context_lines":[{"line_number":374,"context_line":"        try:"},{"line_number":375,"context_line":"            utils.execute(\u0027shred\u0027, \u0027--force\u0027, \u0027--zero\u0027, \u0027--verbose\u0027,"},{"line_number":376,"context_line":"                          \u0027--iterations\u0027, \u00271\u0027, block_device.name)"},{"line_number":377,"context_line":"        except Exception:"},{"line_number":378,"context_line":"            return False"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_70c26b54","line":377,"updated":"2015-03-18 20:30:33.000000000","message":"I would think just want:\n except ProcessExecutionError:\n\nAnd maybe log the exception for debugging purposes.","commit_id":"71eec1408fe26fe8c4791f3114023175e06d85ee"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"1ea9ff778b11addf96819212af259d09468e71e3","unresolved":false,"context_lines":[{"line_number":374,"context_line":"        try:"},{"line_number":375,"context_line":"            utils.execute(\u0027shred\u0027, \u0027--force\u0027, \u0027--zero\u0027, \u0027--verbose\u0027,"},{"line_number":376,"context_line":"                          \u0027--iterations\u0027, \u00271\u0027, block_device.name)"},{"line_number":377,"context_line":"        except Exception:"},{"line_number":378,"context_line":"            return False"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_fd270f61","line":377,"in_reply_to":"9a80dd14_70c26b54","updated":"2015-03-18 21:54:17.000000000","message":"utils.execute will log the output on error anyway, without us needing to log the exception, although I can lower the scope of the except:","commit_id":"71eec1408fe26fe8c4791f3114023175e06d85ee"}]}
