)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ab04b647071aa1d962988a8e2173074477d563e4","unresolved":false,"context_lines":[{"line_number":18,"context_line":"wipefs is part of util-linux which is available on all the Linux"},{"line_number":19,"context_line":"distribution."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"This review superseded Id59fa5a06b9115c0f9afc09aae95daaac97e2fac."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"References:"},{"line_number":24,"context_line":"https://review.openstack.org/#/c/284347/"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7af24918_d3feb604","line":21,"updated":"2016-03-01 12:26:19.000000000","message":"This comment should be removed from the commit message.","commit_id":"b99c1e8111eea86b92c601c91dbb1df7629d2e9f"}],"ironic_lib/disk_utils.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"25ef21fa7728715ce60abb405fcf35295d896bba","unresolved":false,"context_lines":[{"line_number":294,"context_line":"    LOG.debug(\"Start destroy disk metadata for node %(node)s.\","},{"line_number":295,"context_line":"              {\u0027node\u0027: node_uuid})"},{"line_number":296,"context_line":"    utils.execute(\u0027wipefs\u0027, \u0027--all\u0027, dev,"},{"line_number":297,"context_line":"                  run_as_root\u003dTrue,"},{"line_number":298,"context_line":"                  check_exit_code\u003d[0],"},{"line_number":299,"context_line":"                  use_standard_locale\u003dTrue)"},{"line_number":300,"context_line":"    LOG.info(_LI(\"Disk metadata on %(dev)s successfully destroyed for node \""}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_93038eb8","line":297,"updated":"2016-03-01 12:30:18.000000000","message":"This command should be added to the rootwrap filter [0] to be executed as root.\n\n[0] https://github.com/openstack/ironic-lib/blob/master/etc/rootwrap.d/ironic-lib.filters","commit_id":"b99c1e8111eea86b92c601c91dbb1df7629d2e9f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"b7adaf551ae09d44fb55e5265627dc5aa8af0c4e","unresolved":false,"context_lines":[{"line_number":274,"context_line":"    return image_mb"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"def get_dev_block_size(dev):"},{"line_number":278,"context_line":"    \"\"\"Get the device size in 512 byte sectors.\"\"\""},{"line_number":279,"context_line":"    block_sz, cmderr \u003d utils.execute(\u0027blockdev\u0027, \u0027--getsz\u0027, dev,"},{"line_number":280,"context_line":"                                     run_as_root\u003dTrue, check_exit_code\u003d[0])"}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_d998941e","line":277,"range":{"start_line":277,"start_character":4,"end_line":277,"end_character":22},"updated":"2016-03-04 21:32:31.000000000","message":"is this method required anymore?","commit_id":"3db509729e7b0eea020e8000463d0766e654bdda"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"a20335c3535b4edbe932e5880843d20eb887155c","unresolved":false,"context_lines":[{"line_number":274,"context_line":"    return image_mb"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"def get_dev_block_size(dev):"},{"line_number":278,"context_line":"    \"\"\"Get the device size in 512 byte sectors.\"\"\""},{"line_number":279,"context_line":"    block_sz, cmderr \u003d utils.execute(\u0027blockdev\u0027, \u0027--getsz\u0027, dev,"},{"line_number":280,"context_line":"                                     run_as_root\u003dTrue, check_exit_code\u003d[0])"}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_54f569c9","line":277,"range":{"start_line":277,"start_character":4,"end_line":277,"end_character":22},"in_reply_to":"7af24918_3456dd06","updated":"2016-03-04 21:53:51.000000000","message":"yes. you are right. it makes perfect sense then.","commit_id":"3db509729e7b0eea020e8000463d0766e654bdda"},{"author":{"_account_id":9268,"name":"Gonéri Le Bouder","email":"goneri@redhat.com","username":"goneri"},"change_message_id":"9dbfed0e0c7a3423a2702a7877f120b56aa0838c","unresolved":false,"context_lines":[{"line_number":274,"context_line":"    return image_mb"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"def get_dev_block_size(dev):"},{"line_number":278,"context_line":"    \"\"\"Get the device size in 512 byte sectors.\"\"\""},{"line_number":279,"context_line":"    block_sz, cmderr \u003d utils.execute(\u0027blockdev\u0027, \u0027--getsz\u0027, dev,"},{"line_number":280,"context_line":"                                     run_as_root\u003dTrue, check_exit_code\u003d[0])"}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_3456dd06","line":277,"range":{"start_line":277,"start_character":4,"end_line":277,"end_character":22},"in_reply_to":"7af24918_d998941e","updated":"2016-03-04 21:39:18.000000000","message":"this is a public function of a lib. I\u0027m not sure it\u0027s a good idea to drop it.","commit_id":"3db509729e7b0eea020e8000463d0766e654bdda"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"b7adaf551ae09d44fb55e5265627dc5aa8af0c4e","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    :param dev: Path for the device to work on."},{"line_number":291,"context_line":"    :param node_uuid: Node\u0027s uuid. Used for logging."},{"line_number":292,"context_line":"    \"\"\""},{"line_number":293,"context_line":"    # NOTE(NobodyCam): This is needed to work around bug:"},{"line_number":294,"context_line":"    # https://bugs.launchpad.net/ironic/+bug/1317647"},{"line_number":295,"context_line":"    LOG.debug(\"Start destroy disk metadata for node %(node)s.\","}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_b92e68a3","line":292,"range":{"start_line":292,"start_character":4,"end_line":292,"end_character":7},"updated":"2016-03-04 21:32:31.000000000","message":"raises which exceptions should also be part of docstring","commit_id":"3db509729e7b0eea020e8000463d0766e654bdda"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"6974fab424d29372308aa402c64bd26e88384c6c","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    :param dev: Path for the device to work on."},{"line_number":291,"context_line":"    :param node_uuid: Node\u0027s uuid. Used for logging."},{"line_number":292,"context_line":"    \"\"\""},{"line_number":293,"context_line":"    # NOTE(NobodyCam): This is needed to work around bug:"},{"line_number":294,"context_line":"    # https://bugs.launchpad.net/ironic/+bug/1317647"},{"line_number":295,"context_line":"    LOG.debug(\"Start destroy disk metadata for node %(node)s.\","}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_3b1cbc12","line":292,"range":{"start_line":292,"start_character":4,"end_line":292,"end_character":7},"in_reply_to":"7af24918_346c1d08","updated":"2016-03-08 17:20:20.000000000","message":"Yeah right now it only raises ProcessExecutionError, I would be fine to add it to the docstring but since other methods in this module also do not add it I\u0027m with this as-is.\n\nIn the future we can have a patch fixing the docstrings for all methods here.","commit_id":"3db509729e7b0eea020e8000463d0766e654bdda"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"a20335c3535b4edbe932e5880843d20eb887155c","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    :param dev: Path for the device to work on."},{"line_number":291,"context_line":"    :param node_uuid: Node\u0027s uuid. Used for logging."},{"line_number":292,"context_line":"    \"\"\""},{"line_number":293,"context_line":"    # NOTE(NobodyCam): This is needed to work around bug:"},{"line_number":294,"context_line":"    # https://bugs.launchpad.net/ironic/+bug/1317647"},{"line_number":295,"context_line":"    LOG.debug(\"Start destroy disk metadata for node %(node)s.\","}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_d4a4d9ba","line":292,"range":{"start_line":292,"start_character":4,"end_line":292,"end_character":7},"in_reply_to":"7af24918_549289a0","updated":"2016-03-04 21:53:51.000000000","message":"As a user of this method I would definitely like to see what all exceptions it throws as part of it\u0027s doc. imho, the user should not be going into each one of the invoking subfunctions to figure out what all exceptions this method (or any method) raises.\nAlthough if it\u0027s a norm not to mention the raised exceptions in docstrings and to maintain that consistency, i am okay with it. But i still see in another module though: https://github.com/openstack/ironic-lib/blob/master/ironic_lib/utils.py#L54-L55. Of course, feel free to ignore.","commit_id":"3db509729e7b0eea020e8000463d0766e654bdda"},{"author":{"_account_id":9268,"name":"Gonéri Le Bouder","email":"goneri@redhat.com","username":"goneri"},"change_message_id":"9dbfed0e0c7a3423a2702a7877f120b56aa0838c","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    :param dev: Path for the device to work on."},{"line_number":291,"context_line":"    :param node_uuid: Node\u0027s uuid. Used for logging."},{"line_number":292,"context_line":"    \"\"\""},{"line_number":293,"context_line":"    # NOTE(NobodyCam): This is needed to work around bug:"},{"line_number":294,"context_line":"    # https://bugs.launchpad.net/ironic/+bug/1317647"},{"line_number":295,"context_line":"    LOG.debug(\"Start destroy disk metadata for node %(node)s.\","}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_549289a0","line":292,"range":{"start_line":292,"start_character":4,"end_line":292,"end_character":7},"in_reply_to":"7af24918_b92e68a3","updated":"2016-03-04 21:39:18.000000000","message":"I\u0027m not sure I get the point here. This function does not call raise but can get exception from various sub-function, it seems pointless to list all of them.\n\nThe other functions in this module do not document that neither.","commit_id":"3db509729e7b0eea020e8000463d0766e654bdda"},{"author":{"_account_id":9268,"name":"Gonéri Le Bouder","email":"goneri@redhat.com","username":"goneri"},"change_message_id":"7cb9ac172573026a1a44447fec4c2607da59ea4f","unresolved":false,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    :param dev: Path for the device to work on."},{"line_number":291,"context_line":"    :param node_uuid: Node\u0027s uuid. Used for logging."},{"line_number":292,"context_line":"    \"\"\""},{"line_number":293,"context_line":"    # NOTE(NobodyCam): This is needed to work around bug:"},{"line_number":294,"context_line":"    # https://bugs.launchpad.net/ironic/+bug/1317647"},{"line_number":295,"context_line":"    LOG.debug(\"Start destroy disk metadata for node %(node)s.\","}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_346c1d08","line":292,"range":{"start_line":292,"start_character":4,"end_line":292,"end_character":7},"in_reply_to":"7af24918_d4a4d9ba","updated":"2016-03-04 22:05:45.000000000","message":"deray, it\u0027s the first time I see that. I\u0027m not sure this is really useful because it\u0027s impossible to give the full list of exceptions. This also means we will have to maintain this list over time. What if proccessutils decides to raise some new error in the future?","commit_id":"3db509729e7b0eea020e8000463d0766e654bdda"}],"ironic_lib/tests/test_disk_utils.py":[{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"b7adaf551ae09d44fb55e5265627dc5aa8af0c4e","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        self.assertEqual(expected_result, result)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"@mock.patch.object(disk_utils, \u0027get_dev_block_size\u0027)"},{"line_number":280,"context_line":"@mock.patch.object(utils, \u0027execute\u0027)"},{"line_number":281,"context_line":"class DestroyMetaDataTestCase(test_base.BaseTestCase):"},{"line_number":282,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_19483c87","line":279,"range":{"start_line":279,"start_character":0,"end_line":279,"end_character":52},"updated":"2016-03-04 21:32:31.000000000","message":"this is not called in the unit method under test (``destroy_disk_metadata``). Do we need to mock it in that case?","commit_id":"3db509729e7b0eea020e8000463d0766e654bdda"},{"author":{"_account_id":9268,"name":"Gonéri Le Bouder","email":"goneri@redhat.com","username":"goneri"},"change_message_id":"f8ee2c15266c9b58db6990b70fbb6728ff5cb952","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        self.assertEqual(expected_result, result)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"@mock.patch.object(disk_utils, \u0027get_dev_block_size\u0027)"},{"line_number":280,"context_line":"@mock.patch.object(utils, \u0027execute\u0027)"},{"line_number":281,"context_line":"class DestroyMetaDataTestCase(test_base.BaseTestCase):"},{"line_number":282,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_e8d2fa5a","line":279,"range":{"start_line":279,"start_character":0,"end_line":279,"end_character":52},"in_reply_to":"5aef4532_bbbd6cd9","updated":"2016-03-10 18:09:25.000000000","message":"Done","commit_id":"3db509729e7b0eea020e8000463d0766e654bdda"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"6974fab424d29372308aa402c64bd26e88384c6c","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        self.assertEqual(expected_result, result)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"@mock.patch.object(disk_utils, \u0027get_dev_block_size\u0027)"},{"line_number":280,"context_line":"@mock.patch.object(utils, \u0027execute\u0027)"},{"line_number":281,"context_line":"class DestroyMetaDataTestCase(test_base.BaseTestCase):"},{"line_number":282,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_bbbd6cd9","line":279,"range":{"start_line":279,"start_character":0,"end_line":279,"end_character":52},"in_reply_to":"7af24918_19483c87","updated":"2016-03-08 17:20:20.000000000","message":"++","commit_id":"3db509729e7b0eea020e8000463d0766e654bdda"},{"author":{"_account_id":9268,"name":"Gonéri Le Bouder","email":"goneri@redhat.com","username":"goneri"},"change_message_id":"f8ee2c15266c9b58db6990b70fbb6728ff5cb952","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        self.assertEqual(expected_result, result)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"@mock.patch.object(disk_utils, \u0027get_dev_block_size\u0027)"},{"line_number":280,"context_line":"@mock.patch.object(utils, \u0027execute\u0027)"},{"line_number":281,"context_line":"class DestroyMetaDataTestCase(test_base.BaseTestCase):"},{"line_number":282,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_e8eb1a11","line":279,"range":{"start_line":279,"start_character":0,"end_line":279,"end_character":52},"in_reply_to":"7af24918_19483c87","updated":"2016-03-10 18:09:25.000000000","message":"Done","commit_id":"3db509729e7b0eea020e8000463d0766e654bdda"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"b7adaf551ae09d44fb55e5265627dc5aa8af0c4e","unresolved":false,"context_lines":[{"line_number":305,"context_line":"                          self.dev,"},{"line_number":306,"context_line":"                          self.node_uuid)"},{"line_number":307,"context_line":"        mock_exec.assert_has_calls(expected_call)"},{"line_number":308,"context_line":"        self.assertFalse(mock_gz.called)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"@mock.patch.object(utils, \u0027execute\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7af24918_b9578825","line":308,"range":{"start_line":308,"start_character":8,"end_line":308,"end_character":40},"updated":"2016-03-04 21:32:31.000000000","message":"unnecessary, it seems.","commit_id":"3db509729e7b0eea020e8000463d0766e654bdda"},{"author":{"_account_id":9268,"name":"Gonéri Le Bouder","email":"goneri@redhat.com","username":"goneri"},"change_message_id":"f8ee2c15266c9b58db6990b70fbb6728ff5cb952","unresolved":false,"context_lines":[{"line_number":305,"context_line":"                          self.dev,"},{"line_number":306,"context_line":"                          self.node_uuid)"},{"line_number":307,"context_line":"        mock_exec.assert_has_calls(expected_call)"},{"line_number":308,"context_line":"        self.assertFalse(mock_gz.called)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"@mock.patch.object(utils, \u0027execute\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_a8e63241","line":308,"range":{"start_line":308,"start_character":8,"end_line":308,"end_character":40},"in_reply_to":"5aef4532_3be31c07","updated":"2016-03-10 18:09:25.000000000","message":"Done","commit_id":"3db509729e7b0eea020e8000463d0766e654bdda"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"6974fab424d29372308aa402c64bd26e88384c6c","unresolved":false,"context_lines":[{"line_number":305,"context_line":"                          self.dev,"},{"line_number":306,"context_line":"                          self.node_uuid)"},{"line_number":307,"context_line":"        mock_exec.assert_has_calls(expected_call)"},{"line_number":308,"context_line":"        self.assertFalse(mock_gz.called)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"@mock.patch.object(utils, \u0027execute\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_3be31c07","line":308,"range":{"start_line":308,"start_character":8,"end_line":308,"end_character":40},"in_reply_to":"7af24918_b9578825","updated":"2016-03-08 17:20:20.000000000","message":"++","commit_id":"3db509729e7b0eea020e8000463d0766e654bdda"},{"author":{"_account_id":9268,"name":"Gonéri Le Bouder","email":"goneri@redhat.com","username":"goneri"},"change_message_id":"f8ee2c15266c9b58db6990b70fbb6728ff5cb952","unresolved":false,"context_lines":[{"line_number":305,"context_line":"                          self.dev,"},{"line_number":306,"context_line":"                          self.node_uuid)"},{"line_number":307,"context_line":"        mock_exec.assert_has_calls(expected_call)"},{"line_number":308,"context_line":"        self.assertFalse(mock_gz.called)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"@mock.patch.object(utils, \u0027execute\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_48db2e7c","line":308,"range":{"start_line":308,"start_character":8,"end_line":308,"end_character":40},"in_reply_to":"7af24918_b9578825","updated":"2016-03-10 18:09:25.000000000","message":"Done","commit_id":"3db509729e7b0eea020e8000463d0766e654bdda"}]}
