)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"129a8f802b5d1c1b9cde5c303e8efadb36f48864","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Firmware update as part of iLO manual cleaning process"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Added a new file firmware_processor.py to manage the firmware"},{"line_number":10,"context_line":"processing logic. It uses proliantutils to do the actual firmware"},{"line_number":11,"context_line":"update on the iLO."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"fa69d971_c51e746f","line":9,"range":{"start_line":9,"start_character":17,"end_line":9,"end_character":35},"updated":"2016-01-06 09:53:51.000000000","message":"We generally do not add filenames into commit message. Providing just summary of overall functionality added through this commit would be helpful.","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ae6586a99ac07b3cd93ee92b2c5861cd07e4d7a1","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Firmware update as part of iLO manual cleaning process"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Added a new file firmware_processor.py to manage the firmware"},{"line_number":10,"context_line":"processing logic. It uses proliantutils to do the actual firmware"},{"line_number":11,"context_line":"update on the iLO."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"fa69d971_0966b050","line":9,"range":{"start_line":9,"start_character":17,"end_line":9,"end_character":35},"in_reply_to":"fa69d971_c51e746f","updated":"2016-01-08 07:06:29.000000000","message":"Done","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"db98c84eaa153d235c30aea21ddc39e312b98649","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Added firmware file processing (download, extraction) logic."},{"line_number":10,"context_line":"It uses proliantutils to do the actual firmware update on the iLO."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Id40bc3283b7cfb9bed5466bdf7f8bc43d49dda34"},{"line_number":13,"context_line":"Partial-Bug: #1526216"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"fa69d971_537827c4","line":11,"updated":"2016-01-11 14:22:48.000000000","message":"This patch appears dependent upon a feature that has not yet landed in proliantutils.  You may want to use the Depends-On gerrit feature.","commit_id":"212b06e12eb91e2d96d272d23aab2844749d02da"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"2c494d795b5b1e14c09bff3ed686fcb1bab132ef","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Added firmware file processing (download, extraction) logic."},{"line_number":10,"context_line":"It uses proliantutils to do the actual firmware update on the iLO."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Id40bc3283b7cfb9bed5466bdf7f8bc43d49dda34"},{"line_number":13,"context_line":"Partial-Bug: #1526216"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"da6ed579_30fb72c3","line":11,"in_reply_to":"fa69d971_537827c4","updated":"2016-01-13 13:06:34.000000000","message":"Will do in my next patch set.","commit_id":"212b06e12eb91e2d96d272d23aab2844749d02da"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"734f72622d2e752503d32f1da5714489767d6ff0","unresolved":false,"context_lines":[{"line_number":11,"context_line":"firmware update through the iLO."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Partial-Bug: #1526216"},{"line_number":14,"context_line":"Depends On: I0e34407133684e34c4ab9446b3521a24f3038f92"},{"line_number":15,"context_line":"Depends On: I1eca5a08d808df1c4bda0e91181a8389d053c379"},{"line_number":16,"context_line":"Change-Id: Id40bc3283b7cfb9bed5466bdf7f8bc43d49dda34"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"7af24918_a875a964","line":14,"updated":"2016-03-03 23:42:18.000000000","message":"There is no need for depends-on for changes in the same project. You need to rebase on top of them instead (this is merged already so doesn\u0027t matter)","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e0c7adfa6399294f401c9e2196557be7024294ec","unresolved":false,"context_lines":[{"line_number":11,"context_line":"firmware update through the iLO."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Partial-Bug: #1526216"},{"line_number":14,"context_line":"Depends On: I0e34407133684e34c4ab9446b3521a24f3038f92"},{"line_number":15,"context_line":"Depends On: I1eca5a08d808df1c4bda0e91181a8389d053c379"},{"line_number":16,"context_line":"Change-Id: Id40bc3283b7cfb9bed5466bdf7f8bc43d49dda34"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"7af24918_3e842509","line":14,"in_reply_to":"7af24918_a875a964","updated":"2016-03-04 11:51:51.000000000","message":"Okay. thanks for the information.","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":11,"context_line":"firmware update through the iLO."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Partial-Bug: #1526216"},{"line_number":14,"context_line":"Depends On: I0e34407133684e34c4ab9446b3521a24f3038f92"},{"line_number":15,"context_line":"Depends On: I1eca5a08d808df1c4bda0e91181a8389d053c379"},{"line_number":16,"context_line":"Change-Id: Id40bc3283b7cfb9bed5466bdf7f8bc43d49dda34"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"7af24918_c0c39336","line":15,"range":{"start_line":14,"start_character":1,"end_line":15,"end_character":53},"updated":"2016-03-04 14:52:15.000000000","message":"Both these reviews are merged.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"}],"ironic/common/exception.py":[{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"036dc77817ddb3afc267703ccad79e97e0d1b4cb","unresolved":false,"context_lines":[{"line_number":485,"context_line":""},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"class IloInvalidParameterValue(InvalidParameterValue):"},{"line_number":488,"context_line":"    _msg_fmt \u003d _(\"Invalid parameter value for %(param_name)s. %(reason)s\")"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"class DracOperationError(IronicException):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a7b0d38_576de496","line":488,"range":{"start_line":488,"start_character":72,"end_line":488,"end_character":74},"updated":"2015-12-24 05:30:44.000000000","message":"how about?\n\n    _msg_fmt \u003d _(\"Invalid parameter value for %(param_name)s. Reason: %(reason)s\")","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"c69eef289018a3ec1d8c646af203c3607d4658df","unresolved":false,"context_lines":[{"line_number":485,"context_line":""},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"class IloInvalidParameterValue(InvalidParameterValue):"},{"line_number":488,"context_line":"    _msg_fmt \u003d _(\"Invalid parameter value for %(param_name)s. %(reason)s\")"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"class DracOperationError(IronicException):"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_b19c46c1","line":488,"range":{"start_line":488,"start_character":72,"end_line":488,"end_character":74},"in_reply_to":"1a7b0d38_576de496","updated":"2016-01-06 04:34:42.000000000","message":"Thx. Done","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"}],"ironic/drivers/modules/ilo/common.py":[{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"09abcf5317564d1c9a01e42e3eceb1a371791c31","unresolved":false,"context_lines":[{"line_number":664,"context_line":"            try:"},{"line_number":665,"context_line":"                remove_file(location)"},{"line_number":666,"context_line":"            except OSError:"},{"line_number":667,"context_line":"                LOG.warn(_LW(\u0027Not able to remove %s. Maybe, its not a file\u0027),"},{"line_number":668,"context_line":"                         location)"},{"line_number":669,"context_line":""},{"line_number":670,"context_line":"    if os.path.exists(file_location):"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_25c8b0a5","line":667,"range":{"start_line":667,"start_character":74,"end_line":667,"end_character":77},"updated":"2016-01-06 05:14:40.000000000","message":"Replace deprecated LOG.warn with LOG.warning.","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"fa7d54bcba9e097c10237a5296e78bd686d88bc2","unresolved":false,"context_lines":[{"line_number":664,"context_line":"            try:"},{"line_number":665,"context_line":"                remove_file(location)"},{"line_number":666,"context_line":"            except OSError:"},{"line_number":667,"context_line":"                LOG.warn(_LW(\u0027Not able to remove %s. Maybe, its not a file\u0027),"},{"line_number":668,"context_line":"                         location)"},{"line_number":669,"context_line":""},{"line_number":670,"context_line":"    if os.path.exists(file_location):"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_284f2738","line":667,"range":{"start_line":667,"start_character":74,"end_line":667,"end_character":77},"in_reply_to":"fa69d971_25c8b0a5","updated":"2016-01-06 11:06:16.000000000","message":"Done","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"d5b9c2a1c25482de1f499be20bee1bf2cd625e7c","unresolved":false,"context_lines":[{"line_number":659,"context_line":"    :param file_location: a file path."},{"line_number":660,"context_line":"    :raises: OSError, if file is a directory"},{"line_number":661,"context_line":"    \"\"\""},{"line_number":662,"context_line":"    if hasattr(file_location, \u0027__iter__\u0027):"},{"line_number":663,"context_line":"        for location in file_location:"},{"line_number":664,"context_line":"            try:"},{"line_number":665,"context_line":"                remove_single_or_collection_of_file(location)"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_997f79df","line":662,"updated":"2016-01-06 15:55:19.000000000","message":"This also allows sets, dicts, and even something like {\u0027name1\u0027, [\u0027name2\u0027, {\u0027name3\u0027: \u0027aaa\u0027}]}. Maybe we should explicitly have 2 cases - if it is a string or a list?","commit_id":"d4498f422e829e3b6be44a40cb895055995f0d2d"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"1eb079a6a19dc76845fc31211492244903c7dc6f","unresolved":false,"context_lines":[{"line_number":659,"context_line":"    :param file_location: a file path."},{"line_number":660,"context_line":"    :raises: OSError, if file is a directory"},{"line_number":661,"context_line":"    \"\"\""},{"line_number":662,"context_line":"    if hasattr(file_location, \u0027__iter__\u0027):"},{"line_number":663,"context_line":"        for location in file_location:"},{"line_number":664,"context_line":"            try:"},{"line_number":665,"context_line":"                remove_single_or_collection_of_file(location)"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_3f8cfb7e","line":662,"in_reply_to":"fa69d971_997f79df","updated":"2016-01-08 07:00:35.000000000","message":"Makes sense. Have done some modifications to the logic. Please check.","commit_id":"d4498f422e829e3b6be44a40cb895055995f0d2d"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"1118bd34fac44cbb709d4f9fdd905a7f817ae16d","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from oslo_utils import importutils"},{"line_number":27,"context_line":"import six.moves.urllib.parse as urlparse"},{"line_number":28,"context_line":"from six.moves.urllib.parse import urljoin"},{"line_number":29,"context_line":"from six import string_types"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"from ironic.common import boot_devices"},{"line_number":32,"context_line":"from ironic.common import exception"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_48f1e9cc","line":29,"updated":"2016-01-20 17:51:48.000000000","message":"In general, it is not recommended to import an object, it\u0027s better to import six and then use six.string_types","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from oslo_utils import importutils"},{"line_number":27,"context_line":"import six.moves.urllib.parse as urlparse"},{"line_number":28,"context_line":"from six.moves.urllib.parse import urljoin"},{"line_number":29,"context_line":"from six import string_types"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"from ironic.common import boot_devices"},{"line_number":32,"context_line":"from ironic.common import exception"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_aee308d8","line":29,"in_reply_to":"9a68dd71_48f1e9cc","updated":"2016-01-29 14:54:05.000000000","message":"Done","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"1118bd34fac44cbb709d4f9fdd905a7f817ae16d","unresolved":false,"context_lines":[{"line_number":681,"context_line":"    \"\"\""},{"line_number":682,"context_line":"    # file_location is a list of files"},{"line_number":683,"context_line":"    if (isinstance(file_location, list) and"},{"line_number":684,"context_line":"            not isinstance(file_location, string_types)):"},{"line_number":685,"context_line":"        for location in file_location:"},{"line_number":686,"context_line":"            remove_single_or_list_of_files(location)"},{"line_number":687,"context_line":"    # file_location is a single file path"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_48c80975","line":684,"updated":"2016-01-20 17:51:48.000000000","message":"If it is a list it won\u0027t be a string I think :)","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":681,"context_line":"    \"\"\""},{"line_number":682,"context_line":"    # file_location is a list of files"},{"line_number":683,"context_line":"    if (isinstance(file_location, list) and"},{"line_number":684,"context_line":"            not isinstance(file_location, string_types)):"},{"line_number":685,"context_line":"        for location in file_location:"},{"line_number":686,"context_line":"            remove_single_or_list_of_files(location)"},{"line_number":687,"context_line":"    # file_location is a single file path"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_c9f19696","line":684,"in_reply_to":"9a68dd71_48c80975","updated":"2016-01-29 14:54:05.000000000","message":"yeah.. you got it right. At first, I was planning to make this ``remove..`` method a little more generic and thinking of accepting any kind of iterable. So, wanted to have a check like this:\n\n  if hasattr(file_location, \u0027__iter__\u0027):\n    # treat it as a file list/tuple\n  elif isinstance(file_location, string_types):\n    # treat it as file path (string)\n\nbut then ``hasattr`` started returning True in py34 for string types. Then changed that to:\n\n  if (isinstance(file_location, list) and\n      not isinstance(file_location, string_types)):\n    # treat it as a file list/tuple\n  elif isinstance(file_location, string_types):\n    # treat it as file path (string)\n\nYet again, I had decided to accept only list (and not any other iterable) of files and so changed that to check for list type and missed out to remove the redundant string type check. Now, wdyt.. should I make this method more generic to accept any kind of iterable, and not just list?","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"1118bd34fac44cbb709d4f9fdd905a7f817ae16d","unresolved":false,"context_lines":[{"line_number":683,"context_line":"    if (isinstance(file_location, list) and"},{"line_number":684,"context_line":"            not isinstance(file_location, string_types)):"},{"line_number":685,"context_line":"        for location in file_location:"},{"line_number":686,"context_line":"            remove_single_or_list_of_files(location)"},{"line_number":687,"context_line":"    # file_location is a single file path"},{"line_number":688,"context_line":"    elif isinstance(file_location, string_types):"},{"line_number":689,"context_line":"        ironic_utils.unlink_without_raise(file_location)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_e8869d12","line":686,"updated":"2016-01-20 17:51:48.000000000","message":"Why is there recursion now? If it is a list of files, just do ironic_utils.unlink_without_raise(location)","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":683,"context_line":"    if (isinstance(file_location, list) and"},{"line_number":684,"context_line":"            not isinstance(file_location, string_types)):"},{"line_number":685,"context_line":"        for location in file_location:"},{"line_number":686,"context_line":"            remove_single_or_list_of_files(location)"},{"line_number":687,"context_line":"    # file_location is a single file path"},{"line_number":688,"context_line":"    elif isinstance(file_location, string_types):"},{"line_number":689,"context_line":"        ironic_utils.unlink_without_raise(file_location)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_69850acd","line":686,"in_reply_to":"9a68dd71_e8869d12","updated":"2016-01-29 14:54:05.000000000","message":"yes. till the point we assume that there wont be any nested list of filepaths inside the list, its perfect. And I feel that\u0027s a fair assumption. But it will also work for files in format like:\n\n  [file1, [file2, file3]]\n\nwith this recursion. Your thoughts?","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"96644fbfc6a4abc4a757b8742ce6c5ba94744b3b","unresolved":false,"context_lines":[{"line_number":690,"context_line":""},{"line_number":691,"context_line":""},{"line_number":692,"context_line":"def verify_image_checksum(image_location, expected_checksum):"},{"line_number":693,"context_line":"    \"\"\"Verifies checksum (sha-1) of image file against the expected one."},{"line_number":694,"context_line":""},{"line_number":695,"context_line":"    This method generates the checksum of the image file on the fly and"},{"line_number":696,"context_line":"    verifies it against the expected checksum provided as argument."}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_9a668228","line":693,"range":{"start_line":693,"start_character":26,"end_line":693,"end_character":31},"updated":"2016-01-25 13:29:49.000000000","message":"Note: Existing checksum validation code in uses md5 instead of sha-1","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"8169afbba5dc807fcb6a0686dee8a6af45d79059","unresolved":false,"context_lines":[{"line_number":690,"context_line":""},{"line_number":691,"context_line":""},{"line_number":692,"context_line":"def verify_image_checksum(image_location, expected_checksum):"},{"line_number":693,"context_line":"    \"\"\"Verifies checksum (sha-1) of image file against the expected one."},{"line_number":694,"context_line":""},{"line_number":695,"context_line":"    This method generates the checksum of the image file on the fly and"},{"line_number":696,"context_line":"    verifies it against the expected checksum provided as argument."}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_c9bab50a","line":693,"range":{"start_line":693,"start_character":26,"end_line":693,"end_character":31},"in_reply_to":"5a5ae5dd_7a5086d4","updated":"2016-02-09 15:26:21.000000000","message":"Have raised a patch (https://review.openstack.org/#/c/277408) to add the md5 hashign in ``hash_file`` method, default being \u0027md5\u0027. Will be using it for our purpose then.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":690,"context_line":""},{"line_number":691,"context_line":""},{"line_number":692,"context_line":"def verify_image_checksum(image_location, expected_checksum):"},{"line_number":693,"context_line":"    \"\"\"Verifies checksum (sha-1) of image file against the expected one."},{"line_number":694,"context_line":""},{"line_number":695,"context_line":"    This method generates the checksum of the image file on the fly and"},{"line_number":696,"context_line":"    verifies it against the expected checksum provided as argument."}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_e9001a04","line":693,"range":{"start_line":693,"start_character":26,"end_line":693,"end_character":31},"in_reply_to":"9a68dd71_9a668228","updated":"2016-01-29 14:54:05.000000000","message":"sorry, I didn\u0027t get you. I thought I was using the sha-1 technique here.\n\nhttps://github.com/openstack/ironic/blob/master/ironic/common/utils.py#L393\n\nIs there something I am missing? Or are you asking me to add a ``Note`` here?","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"33cb8bee141c65fa5f68177a15973669c052f69a","unresolved":false,"context_lines":[{"line_number":690,"context_line":""},{"line_number":691,"context_line":""},{"line_number":692,"context_line":"def verify_image_checksum(image_location, expected_checksum):"},{"line_number":693,"context_line":"    \"\"\"Verifies checksum (sha-1) of image file against the expected one."},{"line_number":694,"context_line":""},{"line_number":695,"context_line":"    This method generates the checksum of the image file on the fly and"},{"line_number":696,"context_line":"    verifies it against the expected checksum provided as argument."}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_7a5086d4","line":693,"range":{"start_line":693,"start_character":26,"end_line":693,"end_character":31},"in_reply_to":"9a68dd71_e9001a04","updated":"2016-02-06 15:43:03.000000000","message":"Looks like the hash_file you referenced is not even used...   IPA expects the image_checksum to be an MD5 hash.  All I\u0027m advocating is for consistency.\n\nhttps://github.com/openstack/ironic-python-agent/blob/master/ironic_python_agent/extensions/standby.py#L127","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"96644fbfc6a4abc4a757b8742ce6c5ba94744b3b","unresolved":false,"context_lines":[{"line_number":700,"context_line":"    :param expected_checksum: checksum to be checked against"},{"line_number":701,"context_line":"    :raises: ImageRefValidationFailed, if verification fails."},{"line_number":702,"context_line":"    \"\"\""},{"line_number":703,"context_line":"    # if its already a file-like-object, then no need to invoke ``open``"},{"line_number":704,"context_line":"    if not hasattr(image_location, \u0027read\u0027):"},{"line_number":705,"context_line":"        with open(image_location, \u0027rb\u0027) as fd:"},{"line_number":706,"context_line":"            actual_checksum \u003d utils.hash_file(fd)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_3a5d1647","line":703,"range":{"start_line":703,"start_character":6,"end_line":703,"end_character":39},"updated":"2016-01-25 13:29:49.000000000","message":"Why is this also supporting a file handler?  It does not seem necessary and seems out of place for this patch given what the other methods do.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":700,"context_line":"    :param expected_checksum: checksum to be checked against"},{"line_number":701,"context_line":"    :raises: ImageRefValidationFailed, if verification fails."},{"line_number":702,"context_line":"    \"\"\""},{"line_number":703,"context_line":"    # if its already a file-like-object, then no need to invoke ``open``"},{"line_number":704,"context_line":"    if not hasattr(image_location, \u0027read\u0027):"},{"line_number":705,"context_line":"        with open(image_location, \u0027rb\u0027) as fd:"},{"line_number":706,"context_line":"            actual_checksum \u003d utils.hash_file(fd)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_04fd55b3","line":703,"range":{"start_line":703,"start_character":6,"end_line":703,"end_character":39},"in_reply_to":"9a68dd71_3a5d1647","updated":"2016-01-29 14:54:05.000000000","message":"Frankly speaking, just to test this method I had to fall back on suck an implementation.\n\nhttps://review.openstack.org/#/c/211019/16/ironic/tests/unit/drivers/modules/ilo/test_common.py:I845\n\nPlease refer my comment there, as well. And thank you for reviewing this code so closely :)","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"87b1780116d16d5cb8f72d7d46eee956273b75d3","unresolved":false,"context_lines":[{"line_number":709,"context_line":""},{"line_number":710,"context_line":"    if actual_checksum !\u003d expected_checksum:"},{"line_number":711,"context_line":"        msg \u003d (_(\u0027Error verifying image checksum. Image %(image)s failed to \u0027"},{"line_number":712,"context_line":"                 \u0027verify against checksum %(checksum)s.\u0027)"},{"line_number":713,"context_line":"               % {\u0027image\u0027: image_location, \u0027checksum\u0027: expected_checksum})"},{"line_number":714,"context_line":"        LOG.error(msg)"},{"line_number":715,"context_line":"        raise exception.ImageRefValidationFailed(image_href\u003dimage_location,"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_5a5214df","line":712,"range":{"start_line":712,"start_character":25,"end_line":712,"end_character":54},"updated":"2016-01-20 16:20:54.000000000","message":"might be nice to include the actual_checksum here. I could see it being helpful in trouble shooting.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"96644fbfc6a4abc4a757b8742ce6c5ba94744b3b","unresolved":false,"context_lines":[{"line_number":709,"context_line":""},{"line_number":710,"context_line":"    if actual_checksum !\u003d expected_checksum:"},{"line_number":711,"context_line":"        msg \u003d (_(\u0027Error verifying image checksum. Image %(image)s failed to \u0027"},{"line_number":712,"context_line":"                 \u0027verify against checksum %(checksum)s.\u0027)"},{"line_number":713,"context_line":"               % {\u0027image\u0027: image_location, \u0027checksum\u0027: expected_checksum})"},{"line_number":714,"context_line":"        LOG.error(msg)"},{"line_number":715,"context_line":"        raise exception.ImageRefValidationFailed(image_href\u003dimage_location,"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_9a3442fc","line":712,"range":{"start_line":712,"start_character":25,"end_line":712,"end_character":54},"in_reply_to":"9a68dd71_5a5214df","updated":"2016-01-25 13:29:49.000000000","message":"++","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":709,"context_line":""},{"line_number":710,"context_line":"    if actual_checksum !\u003d expected_checksum:"},{"line_number":711,"context_line":"        msg \u003d (_(\u0027Error verifying image checksum. Image %(image)s failed to \u0027"},{"line_number":712,"context_line":"                 \u0027verify against checksum %(checksum)s.\u0027)"},{"line_number":713,"context_line":"               % {\u0027image\u0027: image_location, \u0027checksum\u0027: expected_checksum})"},{"line_number":714,"context_line":"        LOG.error(msg)"},{"line_number":715,"context_line":"        raise exception.ImageRefValidationFailed(image_href\u003dimage_location,"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_c44add54","line":712,"range":{"start_line":712,"start_character":25,"end_line":712,"end_character":54},"in_reply_to":"9a68dd71_5a5214df","updated":"2016-01-29 14:54:05.000000000","message":"Done","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":709,"context_line":""},{"line_number":710,"context_line":"    if actual_checksum !\u003d expected_checksum:"},{"line_number":711,"context_line":"        msg \u003d (_(\u0027Error verifying image checksum. Image %(image)s failed to \u0027"},{"line_number":712,"context_line":"                 \u0027verify against checksum %(checksum)s.\u0027)"},{"line_number":713,"context_line":"               % {\u0027image\u0027: image_location, \u0027checksum\u0027: expected_checksum})"},{"line_number":714,"context_line":"        LOG.error(msg)"},{"line_number":715,"context_line":"        raise exception.ImageRefValidationFailed(image_href\u003dimage_location,"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_e445a142","line":712,"range":{"start_line":712,"start_character":25,"end_line":712,"end_character":54},"in_reply_to":"9a68dd71_9a3442fc","updated":"2016-01-29 14:54:05.000000000","message":"Done","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"38fd256f7c20dac906dff00cd616a0347cff988f","unresolved":false,"context_lines":[{"line_number":680,"context_line":"    :param file_location: a single or a list of file paths"},{"line_number":681,"context_line":"    \"\"\""},{"line_number":682,"context_line":"    # file_location is a list of files"},{"line_number":683,"context_line":"    if (isinstance(file_location, list) and"},{"line_number":684,"context_line":"            not isinstance(file_location, six.string_types)):"},{"line_number":685,"context_line":"        for location in file_location:"},{"line_number":686,"context_line":"            remove_single_or_list_of_files(location)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_ac7a0cef","line":683,"updated":"2016-02-23 14:29:08.000000000","message":"You append tuples (location, component) in firmware_file_locations list (management l370), looks like these locations are not be deleted.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":680,"context_line":"    :param file_location: a single or a list of file paths"},{"line_number":681,"context_line":"    \"\"\""},{"line_number":682,"context_line":"    # file_location is a list of files"},{"line_number":683,"context_line":"    if (isinstance(file_location, list) and"},{"line_number":684,"context_line":"            not isinstance(file_location, six.string_types)):"},{"line_number":685,"context_line":"        for location in file_location:"},{"line_number":686,"context_line":"            remove_single_or_list_of_files(location)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_29ee5cec","line":683,"in_reply_to":"bae84128_ac7a0cef","updated":"2016-02-26 14:46:24.000000000","message":"I owe you a lot for this comment :). Anyway, it would have blasted when I would have seen testing this with multiple firmware files in a single step. But still, thx a ton for pointing this out :). I have changed the code a little bit. Using a custom context manager now, please have a look. Also, would appreciate if you can let me know if this portion of the code (https://review.openstack.org/#/c/211019/18/ironic/drivers/modules/ilo/management.py@360-386) can also be wrapped with this context manager (or a similar one).","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"38fd256f7c20dac906dff00cd616a0347cff988f","unresolved":false,"context_lines":[{"line_number":681,"context_line":"    \"\"\""},{"line_number":682,"context_line":"    # file_location is a list of files"},{"line_number":683,"context_line":"    if (isinstance(file_location, list) and"},{"line_number":684,"context_line":"            not isinstance(file_location, six.string_types)):"},{"line_number":685,"context_line":"        for location in file_location:"},{"line_number":686,"context_line":"            remove_single_or_list_of_files(location)"},{"line_number":687,"context_line":"    # file_location is a single file path"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_8cd6284d","line":684,"updated":"2016-02-23 14:29:08.000000000","message":"This is not needed, list is not any string.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":681,"context_line":"    \"\"\""},{"line_number":682,"context_line":"    # file_location is a list of files"},{"line_number":683,"context_line":"    if (isinstance(file_location, list) and"},{"line_number":684,"context_line":"            not isinstance(file_location, six.string_types)):"},{"line_number":685,"context_line":"        for location in file_location:"},{"line_number":686,"context_line":"            remove_single_or_list_of_files(location)"},{"line_number":687,"context_line":"    # file_location is a single file path"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_3f56dc05","line":684,"in_reply_to":"bae84128_8cd6284d","updated":"2016-02-26 14:46:24.000000000","message":"Done","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"6bff64e8315e1612a38dd77a02ebed1a6f5de38f","unresolved":false,"context_lines":[{"line_number":683,"context_line":"    if (isinstance(file_location, list) and"},{"line_number":684,"context_line":"            not isinstance(file_location, six.string_types)):"},{"line_number":685,"context_line":"        for location in file_location:"},{"line_number":686,"context_line":"            remove_single_or_list_of_files(location)"},{"line_number":687,"context_line":"    # file_location is a single file path"},{"line_number":688,"context_line":"    elif isinstance(file_location, six.string_types):"},{"line_number":689,"context_line":"        ironic_utils.unlink_without_raise(file_location)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_645c664b","line":686,"updated":"2016-02-24 11:32:42.000000000","message":"So this still allows nested lists. What about just doing\n\n for location in file_location:\n   ironic_utils.unlink_without_raise(location)","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":683,"context_line":"    if (isinstance(file_location, list) and"},{"line_number":684,"context_line":"            not isinstance(file_location, six.string_types)):"},{"line_number":685,"context_line":"        for location in file_location:"},{"line_number":686,"context_line":"            remove_single_or_list_of_files(location)"},{"line_number":687,"context_line":"    # file_location is a single file path"},{"line_number":688,"context_line":"    elif isinstance(file_location, six.string_types):"},{"line_number":689,"context_line":"        ironic_utils.unlink_without_raise(file_location)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_3fe7fcac","line":686,"in_reply_to":"bae84128_645c664b","updated":"2016-02-26 14:46:24.000000000","message":"Done","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"6bff64e8315e1612a38dd77a02ebed1a6f5de38f","unresolved":false,"context_lines":[{"line_number":703,"context_line":"    try:"},{"line_number":704,"context_line":"        with open(image_location, \u0027rb\u0027) as fd:"},{"line_number":705,"context_line":"            actual_checksum \u003d utils.hash_file(fd)"},{"line_number":706,"context_line":"    except (IOError, Exception):"},{"line_number":707,"context_line":"        LOG.error(_LE(\"Error opening file: %(file)s\"),"},{"line_number":708,"context_line":"                  {\u0027file\u0027: image_location})"},{"line_number":709,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_a7e1502c","line":706,"updated":"2016-02-24 11:32:42.000000000","message":"Exception will catch everything, no need to add IOError. But it\u0027s better to list more specific exception classes. I think only IOError would be enough.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":703,"context_line":"    try:"},{"line_number":704,"context_line":"        with open(image_location, \u0027rb\u0027) as fd:"},{"line_number":705,"context_line":"            actual_checksum \u003d utils.hash_file(fd)"},{"line_number":706,"context_line":"    except (IOError, Exception):"},{"line_number":707,"context_line":"        LOG.error(_LE(\"Error opening file: %(file)s\"),"},{"line_number":708,"context_line":"                  {\u0027file\u0027: image_location})"},{"line_number":709,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_df6890f7","line":706,"in_reply_to":"bae84128_a7e1502c","updated":"2016-02-26 14:46:24.000000000","message":"Done","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"38fd256f7c20dac906dff00cd616a0347cff988f","unresolved":false,"context_lines":[{"line_number":706,"context_line":"    except (IOError, Exception):"},{"line_number":707,"context_line":"        LOG.error(_LE(\"Error opening file: %(file)s\"),"},{"line_number":708,"context_line":"                  {\u0027file\u0027: image_location})"},{"line_number":709,"context_line":"        raise"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"    if actual_checksum !\u003d expected_checksum:"},{"line_number":712,"context_line":"        msg \u003d (_(\u0027Error verifying image checksum. Image %(image)s failed to \u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_8988da72","line":709,"updated":"2016-02-23 14:29:08.000000000","message":"Please convert to Ironic exception.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":706,"context_line":"    except (IOError, Exception):"},{"line_number":707,"context_line":"        LOG.error(_LE(\"Error opening file: %(file)s\"),"},{"line_number":708,"context_line":"                  {\u0027file\u0027: image_location})"},{"line_number":709,"context_line":"        raise"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"    if actual_checksum !\u003d expected_checksum:"},{"line_number":712,"context_line":"        msg \u003d (_(\u0027Error verifying image checksum. Image %(image)s failed to \u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_ba1cba6a","line":709,"in_reply_to":"bae84128_8988da72","updated":"2016-02-26 14:46:24.000000000","message":"Done","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"bf113c53a05164aa4d35e83deb2528e953868efb","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                    {\u0027associated_with_msg\u0027:"},{"line_number":199,"context_line":"                        (\"associated with %s \" % associated_with"},{"line_number":200,"context_line":"                         if associated_with else \"\"),"},{"line_number":201,"context_line":"                     \u0027error\u0027: e})"},{"line_number":202,"context_line":"    except exception.SwiftOperationError as e:"},{"line_number":203,"context_line":"        LOG.exception(_LE(\"Error while deleting temporary swift object \""},{"line_number":204,"context_line":"                          \"%(object_name)s from %(container)s associated \""}],"source_content_type":"text/x-python","patch_set":19,"id":"7af24918_35a41456","line":201,"updated":"2016-03-01 15:41:35.000000000","message":"It\u0027s not needed double not found error from swift.","commit_id":"5db8757ab4b983960450f027e81f70e75635d679"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"34e5ce2050f68cb5c865423e62a000cec1823008","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                    {\u0027associated_with_msg\u0027:"},{"line_number":199,"context_line":"                        (\"associated with %s \" % associated_with"},{"line_number":200,"context_line":"                         if associated_with else \"\"),"},{"line_number":201,"context_line":"                     \u0027error\u0027: e})"},{"line_number":202,"context_line":"    except exception.SwiftOperationError as e:"},{"line_number":203,"context_line":"        LOG.exception(_LE(\"Error while deleting temporary swift object \""},{"line_number":204,"context_line":"                          \"%(object_name)s from %(container)s associated \""}],"source_content_type":"text/x-python","patch_set":19,"id":"7af24918_3e55d34f","line":201,"in_reply_to":"7af24918_35a41456","updated":"2016-03-02 12:40:04.000000000","message":"Because \"associated_with\" is optional, we can leave as is.","commit_id":"5db8757ab4b983960450f027e81f70e75635d679"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"0dad33f7489800b2500036de980a6b15e1454072","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                    {\u0027associated_with_msg\u0027:"},{"line_number":199,"context_line":"                        (\"associated with %s \" % associated_with"},{"line_number":200,"context_line":"                         if associated_with else \"\"),"},{"line_number":201,"context_line":"                     \u0027error\u0027: e})"},{"line_number":202,"context_line":"    except exception.SwiftOperationError as e:"},{"line_number":203,"context_line":"        LOG.exception(_LE(\"Error while deleting temporary swift object \""},{"line_number":204,"context_line":"                          \"%(object_name)s from %(container)s associated \""}],"source_content_type":"text/x-python","patch_set":19,"id":"7af24918_f9ca65a0","line":201,"in_reply_to":"7af24918_3e55d34f","updated":"2016-03-02 12:48:20.000000000","message":"It\u0027s come from previous code after refactoring, so OK as is.","commit_id":"5db8757ab4b983960450f027e81f70e75635d679"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"59cc3e2afa22cc87ef44510d3e486d6483906af7","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                    {\u0027associated_with_msg\u0027:"},{"line_number":199,"context_line":"                        (\"associated with %s \" % associated_with"},{"line_number":200,"context_line":"                         if associated_with else \"\"),"},{"line_number":201,"context_line":"                     \u0027error\u0027: e})"},{"line_number":202,"context_line":"    except exception.SwiftOperationError as e:"},{"line_number":203,"context_line":"        LOG.exception(_LE(\"Error while deleting temporary swift object \""},{"line_number":204,"context_line":"                          \"%(object_name)s from %(container)s associated \""}],"source_content_type":"text/x-python","patch_set":19,"id":"7af24918_797815f3","line":201,"in_reply_to":"7af24918_f9ca65a0","updated":"2016-03-02 13:32:41.000000000","message":"Okay","commit_id":"5db8757ab4b983960450f027e81f70e75635d679"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"734f72622d2e752503d32f1da5714489767d6ff0","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        swift_api.delete_object(container, object_name)"},{"line_number":195,"context_line":"    except exception.SwiftObjectNotFoundError as e:"},{"line_number":196,"context_line":"        LOG.warning("},{"line_number":197,"context_line":"            _LW(\"Temporary object %(associated_with_msg)s\""},{"line_number":198,"context_line":"                \"was already deleted from Swift. Error: %(err)s\"),"},{"line_number":199,"context_line":"            {\u0027associated_with_msg\u0027: (\"associated with %s \" % associated_with"},{"line_number":200,"context_line":"                                     if associated_with else \"\"), \u0027err\u0027: e})"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_9a1e370a","line":197,"updated":"2016-03-03 23:42:18.000000000","message":"nit - space missing.","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e0c7adfa6399294f401c9e2196557be7024294ec","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        swift_api.delete_object(container, object_name)"},{"line_number":195,"context_line":"    except exception.SwiftObjectNotFoundError as e:"},{"line_number":196,"context_line":"        LOG.warning("},{"line_number":197,"context_line":"            _LW(\"Temporary object %(associated_with_msg)s\""},{"line_number":198,"context_line":"                \"was already deleted from Swift. Error: %(err)s\"),"},{"line_number":199,"context_line":"            {\u0027associated_with_msg\u0027: (\"associated with %s \" % associated_with"},{"line_number":200,"context_line":"                                     if associated_with else \"\"), \u0027err\u0027: e})"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_596dcbca","line":197,"in_reply_to":"7af24918_9a1e370a","updated":"2016-03-04 11:51:51.000000000","message":"It\u0027s fine. The logic is::\n\n  if associated_with \u003d\u003d \u0027virtual floppy\u0027:\n    warn_msg \u003d \"Temporary object associated with virtual floppy was already deleted from Swift. Error: blah..\"\n  elif associated_with \u003d\u003d None:\n    warn_msg \u003d \"Temporary object was already deleted from Swift. Error: blah..\"\n\nSee my comment below.","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e0c7adfa6399294f401c9e2196557be7024294ec","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        LOG.warning("},{"line_number":197,"context_line":"            _LW(\"Temporary object %(associated_with_msg)s\""},{"line_number":198,"context_line":"                \"was already deleted from Swift. Error: %(err)s\"),"},{"line_number":199,"context_line":"            {\u0027associated_with_msg\u0027: (\"associated with %s \" % associated_with"},{"line_number":200,"context_line":"                                     if associated_with else \"\"), \u0027err\u0027: e})"},{"line_number":201,"context_line":"    except exception.SwiftOperationError as e:"},{"line_number":202,"context_line":"        LOG.exception("}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_f9ee5720","line":199,"range":{"start_line":199,"start_character":53,"end_line":199,"end_character":57},"updated":"2016-03-04 11:51:51.000000000","message":"space is with the placeholder string.","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"b8c0e0140bafd8989f162212db83a8ff8ab9ba37","unresolved":false,"context_lines":[{"line_number":736,"context_line":"        LOG.error(_LE(\"Error opening file: %(file)s\"),"},{"line_number":737,"context_line":"                  {\u0027file\u0027: image_location})"},{"line_number":738,"context_line":"        raise exception.ImageRefValidationFailed(image_href\u003dimage_location,"},{"line_number":739,"context_line":"                                                 reason\u003dstr(e))"},{"line_number":740,"context_line":""},{"line_number":741,"context_line":"    if actual_checksum !\u003d expected_checksum:"},{"line_number":742,"context_line":"        msg \u003d (_(\u0027Error verifying image checksum. Image %(image)s failed to \u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_e67f04a9","line":739,"updated":"2016-03-03 14:49:19.000000000","message":"better to use six.text_type(e) for extracting exception message https://github.com/openstack/ironic/blob/master/ironic/common/exception.py#L55-L56","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e0c7adfa6399294f401c9e2196557be7024294ec","unresolved":false,"context_lines":[{"line_number":736,"context_line":"        LOG.error(_LE(\"Error opening file: %(file)s\"),"},{"line_number":737,"context_line":"                  {\u0027file\u0027: image_location})"},{"line_number":738,"context_line":"        raise exception.ImageRefValidationFailed(image_href\u003dimage_location,"},{"line_number":739,"context_line":"                                                 reason\u003dstr(e))"},{"line_number":740,"context_line":""},{"line_number":741,"context_line":"    if actual_checksum !\u003d expected_checksum:"},{"line_number":742,"context_line":"        msg \u003d (_(\u0027Error verifying image checksum. Image %(image)s failed to \u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_de76e104","line":739,"in_reply_to":"7af24918_e67f04a9","updated":"2016-03-04 11:51:51.000000000","message":"Thanks. Done.","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"def remove_image_from_web_server(object_name):"},{"line_number":140,"context_line":"    \"\"\"Removes the given image from the configured http web server."},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    This method removes the given image from the http_root location. It deletes"},{"line_number":143,"context_line":"    the image if it exists in web server."}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_20007765","line":140,"range":{"start_line":140,"start_character":51,"end_line":140,"end_character":66},"updated":"2016-03-04 14:52:15.000000000","message":"nit: \u0027http web server.\u0027 / \u0027web server.\u0027","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"def remove_image_from_web_server(object_name):"},{"line_number":140,"context_line":"    \"\"\"Removes the given image from the configured http web server."},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    This method removes the given image from the http_root location. It deletes"},{"line_number":143,"context_line":"    the image if it exists in web server."}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_44da5218","line":140,"range":{"start_line":140,"start_character":51,"end_line":140,"end_character":66},"in_reply_to":"7af24918_20007765","updated":"2016-03-10 09:30:47.000000000","message":"Done","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":139,"context_line":"def remove_image_from_web_server(object_name):"},{"line_number":140,"context_line":"    \"\"\"Removes the given image from the configured http web server."},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    This method removes the given image from the http_root location. It deletes"},{"line_number":143,"context_line":"    the image if it exists in web server."},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    :param object_name: The name of the image file which needs to be removed"},{"line_number":146,"context_line":"                        from the web server root."}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_00157b9a","line":143,"range":{"start_line":142,"start_character":4,"end_line":143,"end_character":41},"updated":"2016-03-04 14:52:15.000000000","message":"nit: Both the sentences mean same.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":139,"context_line":"def remove_image_from_web_server(object_name):"},{"line_number":140,"context_line":"    \"\"\"Removes the given image from the configured http web server."},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    This method removes the given image from the http_root location. It deletes"},{"line_number":143,"context_line":"    the image if it exists in web server."},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    :param object_name: The name of the image file which needs to be removed"},{"line_number":146,"context_line":"                        from the web server root."}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_24ee26b4","line":143,"range":{"start_line":142,"start_character":4,"end_line":143,"end_character":41},"in_reply_to":"7af24918_00157b9a","updated":"2016-03-10 09:30:47.000000000","message":"Done","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    try:"},{"line_number":193,"context_line":"        swift_api \u003d swift.SwiftAPI()"},{"line_number":194,"context_line":"        swift_api.delete_object(container, object_name)"},{"line_number":195,"context_line":"    except exception.SwiftObjectNotFoundError as e:"},{"line_number":196,"context_line":"        LOG.warning("},{"line_number":197,"context_line":"            _LW(\"Temporary object %(associated_with_msg)s\""},{"line_number":198,"context_line":"                \"was already deleted from Swift. Error: %(err)s\"),"}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_1e6cbb06","line":195,"range":{"start_line":195,"start_character":4,"end_line":195,"end_character":51},"updated":"2016-03-04 14:52:15.000000000","message":"Need to add a testcase for this exception path.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    try:"},{"line_number":193,"context_line":"        swift_api \u003d swift.SwiftAPI()"},{"line_number":194,"context_line":"        swift_api.delete_object(container, object_name)"},{"line_number":195,"context_line":"    except exception.SwiftObjectNotFoundError as e:"},{"line_number":196,"context_line":"        LOG.warning("},{"line_number":197,"context_line":"            _LW(\"Temporary object %(associated_with_msg)s\""},{"line_number":198,"context_line":"                \"was already deleted from Swift. Error: %(err)s\"),"}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_5054ccfd","line":195,"range":{"start_line":195,"start_character":4,"end_line":195,"end_character":51},"in_reply_to":"7af24918_1e6cbb06","updated":"2016-03-10 09:30:47.000000000","message":"Done","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                \"was already deleted from Swift. Error: %(err)s\"),"},{"line_number":199,"context_line":"            {\u0027associated_with_msg\u0027: (\"associated with %s \" % associated_with"},{"line_number":200,"context_line":"                                     if associated_with else \"\"), \u0027err\u0027: e})"},{"line_number":201,"context_line":"    except exception.SwiftOperationError as e:"},{"line_number":202,"context_line":"        LOG.exception("},{"line_number":203,"context_line":"            _LE(\"Error while deleting temporary swift object %(object_name)s \""},{"line_number":204,"context_line":"                \"%(associated_with_msg)s from %(container)s. Error: %(err)s\"),"}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_de4c13a0","line":201,"range":{"start_line":201,"start_character":4,"end_line":201,"end_character":46},"updated":"2016-03-04 14:52:15.000000000","message":"Need to add a testcase for this exception path.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                \"was already deleted from Swift. Error: %(err)s\"),"},{"line_number":199,"context_line":"            {\u0027associated_with_msg\u0027: (\"associated with %s \" % associated_with"},{"line_number":200,"context_line":"                                     if associated_with else \"\"), \u0027err\u0027: e})"},{"line_number":201,"context_line":"    except exception.SwiftOperationError as e:"},{"line_number":202,"context_line":"        LOG.exception("},{"line_number":203,"context_line":"            _LE(\"Error while deleting temporary swift object %(object_name)s \""},{"line_number":204,"context_line":"                \"%(associated_with_msg)s from %(container)s. Error: %(err)s\"),"}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_f0435840","line":201,"range":{"start_line":201,"start_character":4,"end_line":201,"end_character":46},"in_reply_to":"7af24918_de4c13a0","updated":"2016-03-10 09:30:47.000000000","message":"Done","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":362,"context_line":"    :raises: ImageUploadFailed, if copying the source file to the"},{"line_number":363,"context_line":"             web server fails."},{"line_number":364,"context_line":"    :raises: SwiftOperationError, if any operation with Swift fails."},{"line_number":365,"context_line":"    :returns: the http image URL or the Swift temp url for the floppy image."},{"line_number":366,"context_line":"    \"\"\""},{"line_number":367,"context_line":"    with tempfile.NamedTemporaryFile("},{"line_number":368,"context_line":"            dir\u003dCONF.tempdir) as vfat_image_tmpfile_obj:"}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_004d7b99","line":365,"range":{"start_line":365,"start_character":18,"end_line":365,"end_character":22},"updated":"2016-03-04 14:52:15.000000000","message":"nit: s/http/HTTP/","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":362,"context_line":"    :raises: ImageUploadFailed, if copying the source file to the"},{"line_number":363,"context_line":"             web server fails."},{"line_number":364,"context_line":"    :raises: SwiftOperationError, if any operation with Swift fails."},{"line_number":365,"context_line":"    :returns: the http image URL or the Swift temp url for the floppy image."},{"line_number":366,"context_line":"    \"\"\""},{"line_number":367,"context_line":"    with tempfile.NamedTemporaryFile("},{"line_number":368,"context_line":"            dir\u003dCONF.tempdir) as vfat_image_tmpfile_obj:"}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_13fb697a","line":365,"range":{"start_line":365,"start_character":18,"end_line":365,"end_character":22},"in_reply_to":"7af24918_004d7b99","updated":"2016-03-10 09:30:47.000000000","message":"Done","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":714,"context_line":"        for location in file_location:"},{"line_number":715,"context_line":"            ironic_utils.unlink_without_raise(location)"},{"line_number":716,"context_line":"    # file_location is a single file path"},{"line_number":717,"context_line":"    elif isinstance(file_location, six.string_types):"},{"line_number":718,"context_line":"        ironic_utils.unlink_without_raise(file_location)"},{"line_number":719,"context_line":""},{"line_number":720,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_7e005f02","line":717,"range":{"start_line":717,"start_character":0,"end_line":717,"end_character":53},"updated":"2016-03-04 14:52:15.000000000","message":"Need to add testcase for this path","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":714,"context_line":"        for location in file_location:"},{"line_number":715,"context_line":"            ironic_utils.unlink_without_raise(location)"},{"line_number":716,"context_line":"    # file_location is a single file path"},{"line_number":717,"context_line":"    elif isinstance(file_location, six.string_types):"},{"line_number":718,"context_line":"        ironic_utils.unlink_without_raise(file_location)"},{"line_number":719,"context_line":""},{"line_number":720,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_130fe937","line":717,"range":{"start_line":717,"start_character":0,"end_line":717,"end_character":53},"in_reply_to":"7af24918_7e005f02","updated":"2016-03-10 09:30:47.000000000","message":"Done","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"}],"ironic/drivers/modules/ilo/firmware_processor.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"363a31f353cc0a06dff388f95c9fe26f53c99366","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 Hewlett-Packard Development Company, L.P."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_f9b657f8","line":1,"updated":"2015-08-10 14:01:33.000000000","message":"2015","commit_id":"26f55b78a4ccf02a8e81878c75bf080ecad20832"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca010f932c361a33336c1abca0ae9ea4cb6624af","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 Hewlett-Packard Development Company, L.P."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_de367d50","line":1,"in_reply_to":"1a4dcd0f_f9b657f8","updated":"2015-08-12 14:58:11.000000000","message":"Done","commit_id":"26f55b78a4ccf02a8e81878c75bf080ecad20832"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"363a31f353cc0a06dff388f95c9fe26f53c99366","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    fw_processor \u003d FirmwareProcessor(url)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    if url.startswith(\u0027file:\u0027):"},{"line_number":46,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":47,"context_line":"            _download_file_based_fw_to, fw_processor)"},{"line_number":48,"context_line":"    elif url.startswith(\u0027http:\u0027):"},{"line_number":49,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_f97e5769","line":46,"updated":"2015-08-10 14:01:33.000000000","message":"Just wondering, why do you do this? You could add this logic to class constructor or just use functions.","commit_id":"26f55b78a4ccf02a8e81878c75bf080ecad20832"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca010f932c361a33336c1abca0ae9ea4cb6624af","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    fw_processor \u003d FirmwareProcessor(url)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    if url.startswith(\u0027file:\u0027):"},{"line_number":46,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":47,"context_line":"            _download_file_based_fw_to, fw_processor)"},{"line_number":48,"context_line":"    elif url.startswith(\u0027http:\u0027):"},{"line_number":49,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_ee52a612","line":46,"in_reply_to":"1a4dcd0f_f97e5769","updated":"2015-08-12 14:58:11.000000000","message":"the initial thought process was to keep the ``get_fw_processor`` as classmethod of FirmwareProcessor and mandating every user of this class to get hold of its instance via that method. Also implemented it in that fashion, but later on realized that mandating the object creation via a static method wouldn\u0027t be a good idea owing to various reasons, one of them being to have the fw_processor object to be initialized for some other purpose apart from ``process_fw_on``. Can\u0027t really predict that the sole purpose of this class will be to have only one method in its entire lifetime. So in case other methods get added to this class and in order to use those methods the users might not even have the need to override ``_download_fw_to`` method attribute. Hence, that\u0027s the reason for which I didn\u0027t intend to add that download decision making part as part of c\u0027tor. \n\nusing functions was another alternative. but again, wanted to have access of the url attribute of the fw_processor object inside the function. agree that it could have been passed on as a parameter. just as a matter of choice, i have taken that approach. do let me know if there is any advantage you see using functions .. will definitely give it a rethought.\n\nalso thought of using different classes based on swift/file/http based fw downloads, but again restrained myself as it may just superficially look a mini explosion of classes for a comparatively trivial purpose.","commit_id":"26f55b78a4ccf02a8e81878c75bf080ecad20832"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"363a31f353cc0a06dff388f95c9fe26f53c99366","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    \"\"\"File based firmware file downloader"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    Need to copy the file (url) to temporary location and then extract."},{"line_number":88,"context_line":"    Input is expected in the format \"file://tmp/..\""},{"line_number":89,"context_line":"    :param target_file: destination for download"},{"line_number":90,"context_line":"    \"\"\""},{"line_number":91,"context_line":"    starting_pos \u003d len(\u0027file:/\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_76f7b659","line":88,"updated":"2015-08-10 14:01:33.000000000","message":"It\u0027s usually file:///tmp/...","commit_id":"26f55b78a4ccf02a8e81878c75bf080ecad20832"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca010f932c361a33336c1abca0ae9ea4cb6624af","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    \"\"\"File based firmware file downloader"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    Need to copy the file (url) to temporary location and then extract."},{"line_number":88,"context_line":"    Input is expected in the format \"file://tmp/..\""},{"line_number":89,"context_line":"    :param target_file: destination for download"},{"line_number":90,"context_line":"    \"\"\""},{"line_number":91,"context_line":"    starting_pos \u003d len(\u0027file:/\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_1e1865d2","line":88,"in_reply_to":"1a4dcd0f_76f7b659","updated":"2015-08-12 14:58:11.000000000","message":"just missed it :) Done.","commit_id":"26f55b78a4ccf02a8e81878c75bf080ecad20832"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"363a31f353cc0a06dff388f95c9fe26f53c99366","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    url \u003d self.url.rstrip(\u0027/\u0027)"},{"line_number":118,"context_line":"    container, objectname \u003d url.split(\u0027/\u0027)[2:]"},{"line_number":119,"context_line":"    # TODO(deray)"},{"line_number":120,"context_line":"    timeout \u003d 5  # CONF.ilo.swift_object_expiry_timeout"},{"line_number":121,"context_line":"    # Generate temp url"},{"line_number":122,"context_line":"    tempurl \u003d swift.SwiftAPI().get_temp_url(container, objectname, timeout)"},{"line_number":123,"context_line":"    # set that to url attribute and delegate it to http_based downloader"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_bc9e7d52","line":120,"updated":"2015-08-10 14:01:33.000000000","message":"Why is it 5 now?","commit_id":"26f55b78a4ccf02a8e81878c75bf080ecad20832"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca010f932c361a33336c1abca0ae9ea4cb6624af","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    url \u003d self.url.rstrip(\u0027/\u0027)"},{"line_number":118,"context_line":"    container, objectname \u003d url.split(\u0027/\u0027)[2:]"},{"line_number":119,"context_line":"    # TODO(deray)"},{"line_number":120,"context_line":"    timeout \u003d 5  # CONF.ilo.swift_object_expiry_timeout"},{"line_number":121,"context_line":"    # Generate temp url"},{"line_number":122,"context_line":"    tempurl \u003d swift.SwiftAPI().get_temp_url(container, objectname, timeout)"},{"line_number":123,"context_line":"    # set that to url attribute and delegate it to http_based downloader"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_8e220253","line":120,"in_reply_to":"1a4dcd0f_bc9e7d52","updated":"2015-08-12 14:58:11.000000000","message":"no any reason as such. my fault, overlooked that part. changed it to refer to the configured value (900).","commit_id":"26f55b78a4ccf02a8e81878c75bf080ecad20832"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    \"\"\"Gets the firmware processor object fine-tuned for the specified url"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    :param url: firmware url"},{"line_number":40,"context_line":"    :raises: IloInvalidInputError, for unsupported firmware url"},{"line_number":41,"context_line":"    :returns: FirmwareProcessor object"},{"line_number":42,"context_line":"    \"\"\""},{"line_number":43,"context_line":"    fw_processor \u003d FirmwareProcessor(url)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_11dba6ed","line":40,"range":{"start_line":40,"start_character":13,"end_line":40,"end_character":33},"updated":"2015-12-21 06:56:47.000000000","message":"Need to be Ironic exception.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    \"\"\"Gets the firmware processor object fine-tuned for the specified url"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    :param url: firmware url"},{"line_number":40,"context_line":"    :raises: IloInvalidInputError, for unsupported firmware url"},{"line_number":41,"context_line":"    :returns: FirmwareProcessor object"},{"line_number":42,"context_line":"    \"\"\""},{"line_number":43,"context_line":"    fw_processor \u003d FirmwareProcessor(url)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_9f4b8cb0","line":40,"range":{"start_line":40,"start_character":13,"end_line":40,"end_character":33},"in_reply_to":"1a7b0d38_8e7b7b7b","updated":"2015-12-23 11:29:03.000000000","message":"going to address in the new patch set.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"07767172a23e59adcb7a133f65f5dbfabed7ebc1","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    \"\"\"Gets the firmware processor object fine-tuned for the specified url"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    :param url: firmware url"},{"line_number":40,"context_line":"    :raises: IloInvalidInputError, for unsupported firmware url"},{"line_number":41,"context_line":"    :returns: FirmwareProcessor object"},{"line_number":42,"context_line":"    \"\"\""},{"line_number":43,"context_line":"    fw_processor \u003d FirmwareProcessor(url)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_8e7b7b7b","line":40,"range":{"start_line":40,"start_character":13,"end_line":40,"end_character":33},"in_reply_to":"3a7e1126_11dba6ed","updated":"2015-12-22 15:13:15.000000000","message":"++ you should raise only ironic exceptions.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    \"\"\"Gets the firmware processor object fine-tuned for the specified url"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    :param url: firmware url"},{"line_number":40,"context_line":"    :raises: IloInvalidInputError, for unsupported firmware url"},{"line_number":41,"context_line":"    :returns: FirmwareProcessor object"},{"line_number":42,"context_line":"    \"\"\""},{"line_number":43,"context_line":"    fw_processor \u003d FirmwareProcessor(url)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_c0b71583","line":40,"range":{"start_line":40,"start_character":13,"end_line":40,"end_character":33},"in_reply_to":"3a7e1126_11dba6ed","updated":"2015-12-23 11:29:03.000000000","message":"Done. Please see the below comment.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"85d707cab710aac21bdfa584f59a9d1fa16f1e89","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    \"\"\""},{"line_number":43,"context_line":"    fw_processor \u003d FirmwareProcessor(url)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    if url.startswith(\u0027file:\u0027):"},{"line_number":46,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":47,"context_line":"            _download_file_based_fw_to, fw_processor)"},{"line_number":48,"context_line":"    elif url.startswith(\u0027http:\u0027):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_747aa7be","line":45,"range":{"start_line":45,"start_character":27,"end_line":45,"end_character":31},"updated":"2015-12-22 11:02:20.000000000","message":"concern: not sure should we support uppercase for protocol schema or not?","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    \"\"\""},{"line_number":43,"context_line":"    fw_processor \u003d FirmwareProcessor(url)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    if url.startswith(\u0027file:\u0027):"},{"line_number":46,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":47,"context_line":"            _download_file_based_fw_to, fw_processor)"},{"line_number":48,"context_line":"    elif url.startswith(\u0027http:\u0027):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_bbe8fab3","line":45,"range":{"start_line":45,"start_character":27,"end_line":45,"end_character":31},"in_reply_to":"3a7e1126_747aa7be","updated":"2015-12-23 11:29:03.000000000","message":"Now that I have going to move the parsing logic to urlparse (thanks to vdrok\u0027s comment), it will be taken care, i suppose.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"85d707cab710aac21bdfa584f59a9d1fa16f1e89","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    if url.startswith(\u0027file:\u0027):"},{"line_number":46,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":47,"context_line":"            _download_file_based_fw_to, fw_processor)"},{"line_number":48,"context_line":"    elif url.startswith(\u0027http:\u0027):"},{"line_number":49,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":50,"context_line":"            _download_http_based_fw_to, fw_processor)"},{"line_number":51,"context_line":"    elif url.startswith(\u0027swift:\u0027):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_34809f8a","line":48,"range":{"start_line":48,"start_character":29,"end_line":48,"end_character":33},"updated":"2015-12-22 11:02:20.000000000","message":"how about https?","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    if url.startswith(\u0027file:\u0027):"},{"line_number":46,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":47,"context_line":"            _download_file_based_fw_to, fw_processor)"},{"line_number":48,"context_line":"    elif url.startswith(\u0027http:\u0027):"},{"line_number":49,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":50,"context_line":"            _download_http_based_fw_to, fw_processor)"},{"line_number":51,"context_line":"    elif url.startswith(\u0027swift:\u0027):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_1bf10e95","line":48,"range":{"start_line":48,"start_character":29,"end_line":48,"end_character":33},"in_reply_to":"3a7e1126_34809f8a","updated":"2015-12-23 11:29:03.000000000","message":"have added it.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"07767172a23e59adcb7a133f65f5dbfabed7ebc1","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    elif url.startswith(\u0027http:\u0027):"},{"line_number":49,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":50,"context_line":"            _download_http_based_fw_to, fw_processor)"},{"line_number":51,"context_line":"    elif url.startswith(\u0027swift:\u0027):"},{"line_number":52,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":53,"context_line":"            _download_swift_based_fw_to, fw_processor)"},{"line_number":54,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_cea0a3a8","line":51,"updated":"2015-12-22 15:13:15.000000000","message":"I think it\u0027s better to use urlparse in this function instead of .startswith","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    elif url.startswith(\u0027http:\u0027):"},{"line_number":49,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":50,"context_line":"            _download_http_based_fw_to, fw_processor)"},{"line_number":51,"context_line":"    elif url.startswith(\u0027swift:\u0027):"},{"line_number":52,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":53,"context_line":"            _download_swift_based_fw_to, fw_processor)"},{"line_number":54,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_3a186684","line":51,"in_reply_to":"1a7b0d38_cea0a3a8","updated":"2015-12-23 11:29:03.000000000","message":"Nice. Thank you :)","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"85d707cab710aac21bdfa584f59a9d1fa16f1e89","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":53,"context_line":"            _download_swift_based_fw_to, fw_processor)"},{"line_number":54,"context_line":"    else:"},{"line_number":55,"context_line":"        raise ilo_error.IloInvalidInputError("},{"line_number":56,"context_line":"            _(\u0027Unexpected firmware url type: %s\u0027) % url)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    return fw_processor"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_5443ebae","line":55,"range":{"start_line":55,"start_character":44,"end_line":55,"end_character":45},"updated":"2015-12-22 11:02:20.000000000","message":"Do not think this is iLO special exception, should be ProtocolNotSupport exceptions?","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":53,"context_line":"            _download_swift_based_fw_to, fw_processor)"},{"line_number":54,"context_line":"    else:"},{"line_number":55,"context_line":"        raise ilo_error.IloInvalidInputError("},{"line_number":56,"context_line":"            _(\u0027Unexpected firmware url type: %s\u0027) % url)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    return fw_processor"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_11540651","line":55,"range":{"start_line":55,"start_character":24,"end_line":55,"end_character":44},"updated":"2015-12-21 06:56:47.000000000","message":"Need to catch iLO exception and raise Ironic exception.\nHowever, all these things happen locally and not on iLO, isn\u0027t it?","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":53,"context_line":"            _download_swift_based_fw_to, fw_processor)"},{"line_number":54,"context_line":"    else:"},{"line_number":55,"context_line":"        raise ilo_error.IloInvalidInputError("},{"line_number":56,"context_line":"            _(\u0027Unexpected firmware url type: %s\u0027) % url)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    return fw_processor"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_7b3ff2b3","line":55,"range":{"start_line":55,"start_character":24,"end_line":55,"end_character":44},"in_reply_to":"3a7e1126_11540651","updated":"2015-12-23 11:29:03.000000000","message":"Have created a new exception `IloInvalidParameterValue` and have raised it. Done.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":53,"context_line":"            _download_swift_based_fw_to, fw_processor)"},{"line_number":54,"context_line":"    else:"},{"line_number":55,"context_line":"        raise ilo_error.IloInvalidInputError("},{"line_number":56,"context_line":"            _(\u0027Unexpected firmware url type: %s\u0027) % url)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    return fw_processor"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_9b6c1ed1","line":55,"range":{"start_line":55,"start_character":44,"end_line":55,"end_character":45},"in_reply_to":"3a7e1126_5443ebae","updated":"2015-12-23 11:29:03.000000000","message":"Have created a new exception `IloInvalidParameterValue` and have raised it. Done.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"85d707cab710aac21bdfa584f59a9d1fa16f1e89","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            _download_swift_based_fw_to, fw_processor)"},{"line_number":54,"context_line":"    else:"},{"line_number":55,"context_line":"        raise ilo_error.IloInvalidInputError("},{"line_number":56,"context_line":"            _(\u0027Unexpected firmware url type: %s\u0027) % url)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    return fw_processor"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_148ec32d","line":56,"range":{"start_line":56,"start_character":55,"end_line":56,"end_character":56},"updated":"2015-12-22 11:02:20.000000000","message":"nit: from Line 45 to 55, it is better that we have a method to run these logic to check if url schema is support or not, that will be more clear and easy to extend more protocol support, such as ftp/nfs/ftp, any thoughts?","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            _download_swift_based_fw_to, fw_processor)"},{"line_number":54,"context_line":"    else:"},{"line_number":55,"context_line":"        raise ilo_error.IloInvalidInputError("},{"line_number":56,"context_line":"            _(\u0027Unexpected firmware url type: %s\u0027) % url)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    return fw_processor"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_3b708a3f","line":56,"range":{"start_line":56,"start_character":55,"end_line":56,"end_character":56},"in_reply_to":"3a7e1126_148ec32d","updated":"2015-12-23 11:29:03.000000000","message":"This method itself acts as the factory to return the Firmware processor object based upon the url type. Hence, as and when more options like ftp/nfs/sftp come along, they can be added in here in this part. wdyt?","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    return fw_processor"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class FirmwareProcessor(object):"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def __init__(self, url):"},{"line_number":64,"context_line":"        self.url \u003d url"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_59eb9478","line":61,"updated":"2015-12-21 06:56:47.000000000","message":"Add docstring for class.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    return fw_processor"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class FirmwareProcessor(object):"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def __init__(self, url):"},{"line_number":64,"context_line":"        self.url \u003d url"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_16e6c343","line":61,"in_reply_to":"3a7e1126_59eb9478","updated":"2015-12-23 11:29:03.000000000","message":"Done","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    def process_fw_on(self, node):"},{"line_number":67,"context_line":"        \"\"\"Processes the firmware file from url"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        Downloads the firmware file from url and extracts the firmware"},{"line_number":70,"context_line":"        file, if in compact format, and makes it ready for firmware update"},{"line_number":71,"context_line":"        operation."},{"line_number":72,"context_line":"        :raises: IloInvalidInputError, if firmware file not found or invalid"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_03b27d4c","line":69,"range":{"start_line":69,"start_character":36,"end_line":69,"end_character":70},"updated":"2015-12-21 06:56:47.000000000","message":"nit: s/ \u0027from url and extracts the firmware file, if in compact format\u0027/ \n\u0027from url, extracts the firmware (if in compact format)","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    def process_fw_on(self, node):"},{"line_number":67,"context_line":"        \"\"\"Processes the firmware file from url"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        Downloads the firmware file from url and extracts the firmware"},{"line_number":70,"context_line":"        file, if in compact format, and makes it ready for firmware update"},{"line_number":71,"context_line":"        operation."},{"line_number":72,"context_line":"        :raises: IloInvalidInputError, if firmware file not found or invalid"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_364f3f35","line":69,"range":{"start_line":69,"start_character":36,"end_line":69,"end_character":70},"in_reply_to":"3a7e1126_03b27d4c","updated":"2015-12-23 11:29:03.000000000","message":"have added this to the docstring of the class. Done.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"85d707cab710aac21bdfa584f59a9d1fa16f1e89","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        Downloads the firmware file from url and extracts the firmware"},{"line_number":70,"context_line":"        file, if in compact format, and makes it ready for firmware update"},{"line_number":71,"context_line":"        operation."},{"line_number":72,"context_line":"        :raises: IloInvalidInputError, if firmware file not found or invalid"},{"line_number":73,"context_line":"        :raises: IloError, for other internal errors"},{"line_number":74,"context_line":"        :returns: the raw firmware file with the complete path"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_3405ff12","line":71,"range":{"start_line":71,"start_character":17,"end_line":71,"end_character":18},"updated":"2015-12-22 11:02:20.000000000","message":"missing:\n:param node: ...","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        Downloads the firmware file from url and extracts the firmware"},{"line_number":70,"context_line":"        file, if in compact format, and makes it ready for firmware update"},{"line_number":71,"context_line":"        operation."},{"line_number":72,"context_line":"        :raises: IloInvalidInputError, if firmware file not found or invalid"},{"line_number":73,"context_line":"        :raises: IloError, for other internal errors"},{"line_number":74,"context_line":"        :returns: the raw firmware file with the complete path"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_56d1ab21","line":71,"range":{"start_line":71,"start_character":17,"end_line":71,"end_character":18},"in_reply_to":"3a7e1126_3405ff12","updated":"2015-12-23 11:29:03.000000000","message":"Done","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        Downloads the firmware file from url and extracts the firmware"},{"line_number":70,"context_line":"        file, if in compact format, and makes it ready for firmware update"},{"line_number":71,"context_line":"        operation."},{"line_number":72,"context_line":"        :raises: IloInvalidInputError, if firmware file not found or invalid"},{"line_number":73,"context_line":"        :raises: IloError, for other internal errors"},{"line_number":74,"context_line":"        :returns: the raw firmware file with the complete path"},{"line_number":75,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_43a9658f","line":72,"range":{"start_line":72,"start_character":17,"end_line":72,"end_character":37},"updated":"2015-12-21 06:56:47.000000000","message":"ditto. Should be Ironic exception.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        Downloads the firmware file from url and extracts the firmware"},{"line_number":70,"context_line":"        file, if in compact format, and makes it ready for firmware update"},{"line_number":71,"context_line":"        operation."},{"line_number":72,"context_line":"        :raises: IloInvalidInputError, if firmware file not found or invalid"},{"line_number":73,"context_line":"        :raises: IloError, for other internal errors"},{"line_number":74,"context_line":"        :returns: the raw firmware file with the complete path"},{"line_number":75,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_525d3447","line":72,"range":{"start_line":72,"start_character":17,"end_line":72,"end_character":37},"in_reply_to":"3a7e1126_43a9658f","updated":"2015-12-23 11:29:03.000000000","message":"Done","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        file, if in compact format, and makes it ready for firmware update"},{"line_number":71,"context_line":"        operation."},{"line_number":72,"context_line":"        :raises: IloInvalidInputError, if firmware file not found or invalid"},{"line_number":73,"context_line":"        :raises: IloError, for other internal errors"},{"line_number":74,"context_line":"        :returns: the raw firmware file with the complete path"},{"line_number":75,"context_line":"        \"\"\""},{"line_number":76,"context_line":"        filename \u003d os.path.basename(self.url)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_a38fe928","line":73,"range":{"start_line":73,"start_character":17,"end_line":73,"end_character":25},"updated":"2015-12-21 06:56:47.000000000","message":"ditto.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        file, if in compact format, and makes it ready for firmware update"},{"line_number":71,"context_line":"        operation."},{"line_number":72,"context_line":"        :raises: IloInvalidInputError, if firmware file not found or invalid"},{"line_number":73,"context_line":"        :raises: IloError, for other internal errors"},{"line_number":74,"context_line":"        :returns: the raw firmware file with the complete path"},{"line_number":75,"context_line":"        \"\"\""},{"line_number":76,"context_line":"        filename \u003d os.path.basename(self.url)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_725ab052","line":73,"range":{"start_line":73,"start_character":17,"end_line":73,"end_character":25},"in_reply_to":"3a7e1126_a38fe928","updated":"2015-12-23 11:29:03.000000000","message":"Done","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        operation."},{"line_number":72,"context_line":"        :raises: IloInvalidInputError, if firmware file not found or invalid"},{"line_number":73,"context_line":"        :raises: IloError, for other internal errors"},{"line_number":74,"context_line":"        :returns: the raw firmware file with the complete path"},{"line_number":75,"context_line":"        \"\"\""},{"line_number":76,"context_line":"        filename \u003d os.path.basename(self.url)"},{"line_number":77,"context_line":"        target_file \u003d os.path.join(tempfile.mkdtemp(), filename)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_8628bb87","line":74,"updated":"2015-12-21 06:56:47.000000000","message":"nit: Convention in docstring is to have param, returns and then exception. Move \u0027returns\u0027 above \u0027raises\u0027.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        operation."},{"line_number":72,"context_line":"        :raises: IloInvalidInputError, if firmware file not found or invalid"},{"line_number":73,"context_line":"        :raises: IloError, for other internal errors"},{"line_number":74,"context_line":"        :returns: the raw firmware file with the complete path"},{"line_number":75,"context_line":"        \"\"\""},{"line_number":76,"context_line":"        filename \u003d os.path.basename(self.url)"},{"line_number":77,"context_line":"        target_file \u003d os.path.join(tempfile.mkdtemp(), filename)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_b6ac8f9f","line":74,"in_reply_to":"3a7e1126_8628bb87","updated":"2015-12-23 11:29:03.000000000","message":"Done","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":84,"context_line":"def _download_file_based_fw_to(self, target_file):"},{"line_number":85,"context_line":"    \"\"\"File based firmware file downloader"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    Need to copy the file (url) to temporary location and then extract."},{"line_number":88,"context_line":"    Input is expected in the format \"file:///tmp/..\""},{"line_number":89,"context_line":"    :param target_file: destination for download"},{"line_number":90,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_a63857f0","line":87,"updated":"2015-12-21 06:56:47.000000000","message":"Need to extract only if it is in a compact format, right?","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":84,"context_line":"def _download_file_based_fw_to(self, target_file):"},{"line_number":85,"context_line":"    \"\"\"File based firmware file downloader"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    Need to copy the file (url) to temporary location and then extract."},{"line_number":88,"context_line":"    Input is expected in the format \"file:///tmp/..\""},{"line_number":89,"context_line":"    :param target_file: destination for download"},{"line_number":90,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_d248448d","line":87,"in_reply_to":"3a7e1126_a63857f0","updated":"2015-12-23 11:29:03.000000000","message":"extraction is not run here. its just the copying of the original firmware file to a temporary location in case of file based firmware file.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    \"\"\"File based firmware file downloader"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    Need to copy the file (url) to temporary location and then extract."},{"line_number":88,"context_line":"    Input is expected in the format \"file:///tmp/..\""},{"line_number":89,"context_line":"    :param target_file: destination for download"},{"line_number":90,"context_line":"    \"\"\""},{"line_number":91,"context_line":"    starting_pos \u003d len(\u0027file://\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_3907a819","line":88,"updated":"2015-12-21 06:56:47.000000000","message":"nit: Isn\u0027t it \u0027file://\u0027 ?","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    \"\"\"File based firmware file downloader"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    Need to copy the file (url) to temporary location and then extract."},{"line_number":88,"context_line":"    Input is expected in the format \"file:///tmp/..\""},{"line_number":89,"context_line":"    :param target_file: destination for download"},{"line_number":90,"context_line":"    \"\"\""},{"line_number":91,"context_line":"    starting_pos \u003d len(\u0027file://\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_164d63c3","line":88,"in_reply_to":"3a7e1126_3907a819","updated":"2015-12-23 11:29:03.000000000","message":"no, i guess. there should be triple forward slashes after the `file` word and before the colon. https://review.openstack.org/#/c/211019/1/ironic/drivers/modules/ilo/firmware_processor.py@88","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"07767172a23e59adcb7a133f65f5dbfabed7ebc1","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    \"\"\""},{"line_number":91,"context_line":"    starting_pos \u003d len(\u0027file://\u0027)"},{"line_number":92,"context_line":"    src_file \u003d self.url[starting_pos:]"},{"line_number":93,"context_line":"    shutil.copyfile(src_file, target_file)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"def _download_http_based_fw_to(self, target_file):"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_ce0423c8","line":93,"updated":"2015-12-22 15:13:15.000000000","message":"sendfile works faster, not sure if it\u0027s worth changing to it.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":90,"context_line":"    \"\"\""},{"line_number":91,"context_line":"    starting_pos \u003d len(\u0027file://\u0027)"},{"line_number":92,"context_line":"    src_file \u003d self.url[starting_pos:]"},{"line_number":93,"context_line":"    shutil.copyfile(src_file, target_file)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"def _download_http_based_fw_to(self, target_file):"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_55d50541","line":93,"in_reply_to":"1a7b0d38_ce0423c8","updated":"2015-12-23 11:29:03.000000000","message":"i plan to use the common.image_service.FileImageService. Does that make sense here?","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"def _download_http_based_fw_to(self, target_file):"},{"line_number":97,"context_line":"    \"\"\"Http based firmware file downloader"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    Downloads the firmware from its url to the target file."},{"line_number":100,"context_line":"    Input is expected in the format \"http://..\""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_79df700d","line":97,"updated":"2015-12-21 06:56:47.000000000","message":"nit: s/ \u0027Http\u0027 / \u0027HTTP\u0027","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"def _download_http_based_fw_to(self, target_file):"},{"line_number":97,"context_line":"    \"\"\"Http based firmware file downloader"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    Downloads the firmware from its url to the target file."},{"line_number":100,"context_line":"    Input is expected in the format \"http://..\""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_f6f3f770","line":97,"in_reply_to":"3a7e1126_79df700d","updated":"2015-12-23 11:29:03.000000000","message":"Done","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    Downloads the firmware from its url to the target file."},{"line_number":100,"context_line":"    Input is expected in the format \"http://..\""},{"line_number":101,"context_line":"    :param target_file: destination for download"},{"line_number":102,"context_line":"    \"\"\""},{"line_number":103,"context_line":"    with open(target_file, \u0027wb\u0027) as fd:"},{"line_number":104,"context_line":"        image_service.HttpImageService().download(self.url, fd)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_f97920c9","line":101,"updated":"2015-12-21 06:56:47.000000000","message":"Add exceptions that could get raised.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"85d707cab710aac21bdfa584f59a9d1fa16f1e89","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    Downloads the firmware from its url to the target file."},{"line_number":100,"context_line":"    Input is expected in the format \"http://..\""},{"line_number":101,"context_line":"    :param target_file: destination for download"},{"line_number":102,"context_line":"    \"\"\""},{"line_number":103,"context_line":"    with open(target_file, \u0027wb\u0027) as fd:"},{"line_number":104,"context_line":"        image_service.HttpImageService().download(self.url, fd)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_c7216f9f","line":101,"range":{"start_line":101,"start_character":40,"end_line":101,"end_character":48},"updated":"2015-12-22 11:02:20.000000000","message":"It is better that we have clear docstring here, is the destination a file or folder, and how about the path format?","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    Downloads the firmware from its url to the target file."},{"line_number":100,"context_line":"    Input is expected in the format \"http://..\""},{"line_number":101,"context_line":"    :param target_file: destination for download"},{"line_number":102,"context_line":"    \"\"\""},{"line_number":103,"context_line":"    with open(target_file, \u0027wb\u0027) as fd:"},{"line_number":104,"context_line":"        image_service.HttpImageService().download(self.url, fd)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_7564dae4","line":101,"range":{"start_line":101,"start_character":40,"end_line":101,"end_character":48},"in_reply_to":"3a7e1126_c7216f9f","updated":"2015-12-23 11:29:03.000000000","message":"i agree. will address this as part of my next patch set. let me know if that is clear enough.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    Downloads the firmware from its url to the target file."},{"line_number":100,"context_line":"    Input is expected in the format \"http://..\""},{"line_number":101,"context_line":"    :param target_file: destination for download"},{"line_number":102,"context_line":"    \"\"\""},{"line_number":103,"context_line":"    with open(target_file, \u0027wb\u0027) as fd:"},{"line_number":104,"context_line":"        image_service.HttpImageService().download(self.url, fd)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_d5990ed2","line":101,"in_reply_to":"3a7e1126_f97920c9","updated":"2015-12-23 11:29:03.000000000","message":"Done","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"85d707cab710aac21bdfa584f59a9d1fa16f1e89","unresolved":false,"context_lines":[{"line_number":111,"context_line":"    and then downloads the firmware file via http based downloader"},{"line_number":112,"context_line":"    to the target file."},{"line_number":113,"context_line":"    Expecting url as swift://containername/objectname"},{"line_number":114,"context_line":"    :param target_file: destination for download"},{"line_number":115,"context_line":"    \"\"\""},{"line_number":116,"context_line":"    # Extract container name and object name"},{"line_number":117,"context_line":"    url \u003d self.url.rstrip(\u0027/\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_273393f7","line":114,"range":{"start_line":114,"start_character":40,"end_line":114,"end_character":48},"updated":"2015-12-22 11:02:20.000000000","message":"ditto","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":111,"context_line":"    and then downloads the firmware file via http based downloader"},{"line_number":112,"context_line":"    to the target file."},{"line_number":113,"context_line":"    Expecting url as swift://containername/objectname"},{"line_number":114,"context_line":"    :param target_file: destination for download"},{"line_number":115,"context_line":"    \"\"\""},{"line_number":116,"context_line":"    # Extract container name and object name"},{"line_number":117,"context_line":"    url \u003d self.url.rstrip(\u0027/\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_15cf7db1","line":114,"range":{"start_line":114,"start_character":40,"end_line":114,"end_character":48},"in_reply_to":"3a7e1126_273393f7","updated":"2015-12-23 11:29:03.000000000","message":"Done","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"07767172a23e59adcb7a133f65f5dbfabed7ebc1","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    \"\"\""},{"line_number":116,"context_line":"    # Extract container name and object name"},{"line_number":117,"context_line":"    url \u003d self.url.rstrip(\u0027/\u0027)"},{"line_number":118,"context_line":"    container, objectname \u003d url.split(\u0027/\u0027)[2:]"},{"line_number":119,"context_line":"    timeout \u003d ilo_common.CONF.ilo.swift_object_expiry_timeout"},{"line_number":120,"context_line":"    # Generate temp url"},{"line_number":121,"context_line":"    tempurl \u003d swift.SwiftAPI().get_temp_url(container, objectname, timeout)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_ee16bfa6","line":118,"updated":"2015-12-22 15:13:15.000000000","message":"ditto, you should use urlparse here.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    \"\"\""},{"line_number":116,"context_line":"    # Extract container name and object name"},{"line_number":117,"context_line":"    url \u003d self.url.rstrip(\u0027/\u0027)"},{"line_number":118,"context_line":"    container, objectname \u003d url.split(\u0027/\u0027)[2:]"},{"line_number":119,"context_line":"    timeout \u003d ilo_common.CONF.ilo.swift_object_expiry_timeout"},{"line_number":120,"context_line":"    # Generate temp url"},{"line_number":121,"context_line":"    tempurl \u003d swift.SwiftAPI().get_temp_url(container, objectname, timeout)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_353719b2","line":118,"in_reply_to":"1a7b0d38_ee16bfa6","updated":"2015-12-23 11:29:03.000000000","message":"Done","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    container, objectname \u003d url.split(\u0027/\u0027)[2:]"},{"line_number":119,"context_line":"    timeout \u003d ilo_common.CONF.ilo.swift_object_expiry_timeout"},{"line_number":120,"context_line":"    # Generate temp url"},{"line_number":121,"context_line":"    tempurl \u003d swift.SwiftAPI().get_temp_url(container, objectname, timeout)"},{"line_number":122,"context_line":"    # set that to url attribute and delegate it to http_based downloader"},{"line_number":123,"context_line":"    self.url \u003d tempurl"},{"line_number":124,"context_line":"    return _download_http_based_fw_to(self, target_file)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_6f3214f4","line":121,"range":{"start_line":121,"start_character":20,"end_line":121,"end_character":28},"updated":"2015-12-21 06:56:47.000000000","message":"Why dont we directly download from the swift instead of creating tempurl for the same? We could use get_objcte() call from Swift Client.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    container, objectname \u003d url.split(\u0027/\u0027)[2:]"},{"line_number":119,"context_line":"    timeout \u003d ilo_common.CONF.ilo.swift_object_expiry_timeout"},{"line_number":120,"context_line":"    # Generate temp url"},{"line_number":121,"context_line":"    tempurl \u003d swift.SwiftAPI().get_temp_url(container, objectname, timeout)"},{"line_number":122,"context_line":"    # set that to url attribute and delegate it to http_based downloader"},{"line_number":123,"context_line":"    self.url \u003d tempurl"},{"line_number":124,"context_line":"    return _download_http_based_fw_to(self, target_file)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_321668f2","line":121,"range":{"start_line":121,"start_character":20,"end_line":121,"end_character":28},"in_reply_to":"3a7e1126_6f3214f4","updated":"2015-12-23 11:29:03.000000000","message":"I didn\u0027t get any `get_object` method in SwiftAPI class. Which method are you referring to?","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"07767172a23e59adcb7a133f65f5dbfabed7ebc1","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    return _download_http_based_fw_to(self, target_file)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"def _extract_fw(node, target_file):"},{"line_number":128,"context_line":"    \"\"\"Extracts firmware image file."},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    Extracts the firmware image file thru proliantutils and"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_6b23a106","line":127,"range":{"start_line":127,"start_character":4,"end_line":127,"end_character":15},"updated":"2015-12-22 15:13:15.000000000","message":"Naming is a bit confusing, it appears as you extract fw from node to target file. Maybe _extract_fw_from_file(node, fw_file)?","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"85d707cab710aac21bdfa584f59a9d1fa16f1e89","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    return _download_http_based_fw_to(self, target_file)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"def _extract_fw(node, target_file):"},{"line_number":128,"context_line":"    \"\"\"Extracts firmware image file."},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    Extracts the firmware image file thru proliantutils and"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_873fe7b2","line":127,"range":{"start_line":127,"start_character":33,"end_line":127,"end_character":35},"updated":"2015-12-22 11:02:20.000000000","message":"it is better that we have self argument as first one","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    return _download_http_based_fw_to(self, target_file)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"def _extract_fw(node, target_file):"},{"line_number":128,"context_line":"    \"\"\"Extracts firmware image file."},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    Extracts the firmware image file thru proliantutils and"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_6b34e2dd","line":127,"range":{"start_line":127,"start_character":4,"end_line":127,"end_character":15},"in_reply_to":"1a7b0d38_6b23a106","updated":"2015-12-23 11:29:03.000000000","message":"Agreed. Done.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    return _download_http_based_fw_to(self, target_file)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"def _extract_fw(node, target_file):"},{"line_number":128,"context_line":"    \"\"\"Extracts firmware image file."},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    Extracts the firmware image file thru proliantutils and"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_4c1fdf09","line":127,"range":{"start_line":127,"start_character":33,"end_line":127,"end_character":35},"in_reply_to":"3a7e1126_873fe7b2","updated":"2015-12-23 11:29:03.000000000","message":"i thought of keeping this method outside the FirmwareProcessor class and invoking this a function (especially if there is any need to have this function getting used from outside the file) and not as an object method. So, didn\u0027t add the self argument. This is same with the set of ``_download_XXX_based_fw_to`` methods, only that those are getting added to the object as methods on the fly (base on the firmware url), the self argument has been added to each one of them. Any other thoughts you had fo this? Am I able to answer your query?","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    :param node: an Ironic node object."},{"line_number":133,"context_line":"    :param target_file: firmware file to be extracted from"},{"line_number":134,"context_line":"    :returns: path to the file the firmware image is copied to."},{"line_number":135,"context_line":"    :raises: ImageDownloadFailed, if download of the image failed."},{"line_number":136,"context_line":"    \"\"\""},{"line_number":137,"context_line":"    ilo_object \u003d ilo_common.get_ilo_object(node)"},{"line_number":138,"context_line":"    fw_image_location, to_upload \u003d ("}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_e68e5fcf","line":135,"updated":"2015-12-21 06:56:47.000000000","message":"Need to change iLO exception to Ironic exception","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    :param node: an Ironic node object."},{"line_number":133,"context_line":"    :param target_file: firmware file to be extracted from"},{"line_number":134,"context_line":"    :returns: path to the file the firmware image is copied to."},{"line_number":135,"context_line":"    :raises: ImageDownloadFailed, if download of the image failed."},{"line_number":136,"context_line":"    \"\"\""},{"line_number":137,"context_line":"    ilo_object \u003d ilo_common.get_ilo_object(node)"},{"line_number":138,"context_line":"    fw_image_location, to_upload \u003d ("}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_f261c0a9","line":135,"in_reply_to":"3a7e1126_e68e5fcf","updated":"2015-12-23 11:29:03.000000000","message":"Done","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    :raises: ImageDownloadFailed, if download of the image failed."},{"line_number":136,"context_line":"    \"\"\""},{"line_number":137,"context_line":"    ilo_object \u003d ilo_common.get_ilo_object(node)"},{"line_number":138,"context_line":"    fw_image_location, to_upload \u003d ("},{"line_number":139,"context_line":"        ilo_object.process_firmware_image(target_file))"},{"line_number":140,"context_line":"    if to_upload:"},{"line_number":141,"context_line":"        # upload firmware image file to conductor webserver"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_06de0bdd","line":138,"updated":"2015-12-21 06:56:47.000000000","message":"In what cases to_upload would be True?","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    :raises: ImageDownloadFailed, if download of the image failed."},{"line_number":136,"context_line":"    \"\"\""},{"line_number":137,"context_line":"    ilo_object \u003d ilo_common.get_ilo_object(node)"},{"line_number":138,"context_line":"    fw_image_location, to_upload \u003d ("},{"line_number":139,"context_line":"        ilo_object.process_firmware_image(target_file))"},{"line_number":140,"context_line":"    if to_upload:"},{"line_number":141,"context_line":"        # upload firmware image file to conductor webserver"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_325188d9","line":138,"in_reply_to":"3a7e1126_06de0bdd","updated":"2015-12-23 11:29:03.000000000","message":"In case of RIS the image has to be uploaded. For RIBCL operation, it will be a file location on the conductor.\n\nhttps://review.openstack.org/#/c/203543/9/proliantutils/ilo/client.py","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"036dc77817ddb3afc267703ccad79e97e0d1b4cb","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"ilo_error \u003d importutils.try_import(\u0027proliantutils.exception\u0027)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def get_fw_processor(url):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a7b0d38_b878b52c","line":34,"range":{"start_line":34,"start_character":59,"end_line":34,"end_character":61},"updated":"2015-12-24 05:30:44.000000000","message":"concern: can not understanding here, so where we define such \u0027proliantutils.exception\u0027, is the code out of Ironic, why this external exception is required?","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"c69eef289018a3ec1d8c646af203c3607d4658df","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"ilo_error \u003d importutils.try_import(\u0027proliantutils.exception\u0027)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def get_fw_processor(url):"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_91e10201","line":34,"range":{"start_line":34,"start_character":59,"end_line":34,"end_character":61},"in_reply_to":"1a7b0d38_b878b52c","updated":"2016-01-06 04:34:42.000000000","message":"yes, Haomeng, the code is out of Ironic. And that code throws an exception which is not understandable by Ironic. Hence, this has to be caught and an Ironic understandable exception is thrown from there.","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"036dc77817ddb3afc267703ccad79e97e0d1b4cb","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    else:"},{"line_number":58,"context_line":"        raise exception.IloInvalidParameterValue("},{"line_number":59,"context_line":"            param_name\u003durl, reason\u003d(\"The supported firmware url schemes are: \""},{"line_number":60,"context_line":"                                    \"file, http/s \u0026 swift.\"))"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    return fw_processor"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a7b0d38_57f2c4d3","line":60,"range":{"start_line":60,"start_character":57,"end_line":60,"end_character":61},"updated":"2015-12-24 05:30:44.000000000","message":"nit: how about this reason string?\n\n\"Invalid scheme %s, the supported firmware url schemes are: file/ http/https/swift.\") % url_scheme","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"c69eef289018a3ec1d8c646af203c3607d4658df","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    else:"},{"line_number":58,"context_line":"        raise exception.IloInvalidParameterValue("},{"line_number":59,"context_line":"            param_name\u003durl, reason\u003d(\"The supported firmware url schemes are: \""},{"line_number":60,"context_line":"                                    \"file, http/s \u0026 swift.\"))"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    return fw_processor"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_71b1eee0","line":60,"range":{"start_line":60,"start_character":57,"end_line":60,"end_character":61},"in_reply_to":"1a7b0d38_57f2c4d3","updated":"2016-01-06 04:34:42.000000000","message":"Done","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"3dc6ffdb1785da33e6a2415ad36a1288d97d761f","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        :raises: IloOperationError, on failure to process firmware file."},{"line_number":86,"context_line":"        \"\"\""},{"line_number":87,"context_line":"        filename \u003d os.path.basename(self.parsed_url.path)"},{"line_number":88,"context_line":"        target_file \u003d os.path.join(tempfile.mkdtemp(), filename)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        self._download_fw_to(target_file)"},{"line_number":91,"context_line":"        location \u003d _extract_fw_from_file(node, target_file)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a7b0d38_3e56ded2","line":88,"updated":"2015-12-24 14:48:08.000000000","message":"When we remove this temporary file?","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"c69eef289018a3ec1d8c646af203c3607d4658df","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        :raises: IloOperationError, on failure to process firmware file."},{"line_number":86,"context_line":"        \"\"\""},{"line_number":87,"context_line":"        filename \u003d os.path.basename(self.parsed_url.path)"},{"line_number":88,"context_line":"        target_file \u003d os.path.join(tempfile.mkdtemp(), filename)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        self._download_fw_to(target_file)"},{"line_number":91,"context_line":"        location \u003d _extract_fw_from_file(node, target_file)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_d63df0dd","line":88,"in_reply_to":"1a7b0d38_3e56ded2","updated":"2016-01-06 04:34:42.000000000","message":"Good catch. Thx. Have put in the changes. Have a look, please.","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"036dc77817ddb3afc267703ccad79e97e0d1b4cb","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        filename \u003d os.path.basename(self.parsed_url.path)"},{"line_number":88,"context_line":"        target_file \u003d os.path.join(tempfile.mkdtemp(), filename)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        self._download_fw_to(target_file)"},{"line_number":91,"context_line":"        location \u003d _extract_fw_from_file(node, target_file)"},{"line_number":92,"context_line":"        return location"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a7b0d38_d8fee16a","line":90,"range":{"start_line":90,"start_character":40,"end_line":90,"end_character":41},"updated":"2015-12-24 05:30:44.000000000","message":"should we have logic here, to check/verify if the FW which is downloaded has same checksum to make sure it is correct FW can be applied to systems?","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"c69eef289018a3ec1d8c646af203c3607d4658df","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        filename \u003d os.path.basename(self.parsed_url.path)"},{"line_number":88,"context_line":"        target_file \u003d os.path.join(tempfile.mkdtemp(), filename)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        self._download_fw_to(target_file)"},{"line_number":91,"context_line":"        location \u003d _extract_fw_from_file(node, target_file)"},{"line_number":92,"context_line":"        return location"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_54cb7872","line":90,"range":{"start_line":90,"start_character":40,"end_line":90,"end_character":41},"in_reply_to":"1a7b0d38_d8fee16a","updated":"2016-01-06 04:34:42.000000000","message":"Good point. Thanks. Had done some internal query and study to reply to this. The management processor (iLO) of HPE servers have the capability to check/validate the firmware images before applying that on the system. Generally, it accepts files which are digitally signed with only HP Secure Digital Signature to proceed with the update/upgrade. Hence, I believe that it will be completely secure to avoid such checks here, given that the baremetal controller component takes care of this validation. It also has the ability to revert to earlier setting if the present update/upgrade fails.","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"036dc77817ddb3afc267703ccad79e97e0d1b4cb","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    src_file \u003d self.parsed_url.path"},{"line_number":106,"context_line":"    with open(target_file, \u0027wb\u0027) as fd:"},{"line_number":107,"context_line":"        try:"},{"line_number":108,"context_line":"            image_service.FileImageService().download(src_file, fd)"},{"line_number":109,"context_line":"        except exception.ImageDownloadFailed as exc:"},{"line_number":110,"context_line":"            operation \u003d _(\"Firmware file copying as part \""},{"line_number":111,"context_line":"                          \"of manual cleaning\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a7b0d38_f8b39de7","line":108,"range":{"start_line":108,"start_character":66,"end_line":108,"end_character":67},"updated":"2015-12-24 05:30:44.000000000","message":"should we check the FW file checksum to make sure the FW bin file is fine, else, once the incomplete FW file is applied to system, not sure the system behavior.","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"c69eef289018a3ec1d8c646af203c3607d4658df","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    src_file \u003d self.parsed_url.path"},{"line_number":106,"context_line":"    with open(target_file, \u0027wb\u0027) as fd:"},{"line_number":107,"context_line":"        try:"},{"line_number":108,"context_line":"            image_service.FileImageService().download(src_file, fd)"},{"line_number":109,"context_line":"        except exception.ImageDownloadFailed as exc:"},{"line_number":110,"context_line":"            operation \u003d _(\"Firmware file copying as part \""},{"line_number":111,"context_line":"                          \"of manual cleaning\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_5479382e","line":108,"range":{"start_line":108,"start_character":66,"end_line":108,"end_character":67},"in_reply_to":"1a7b0d38_f8b39de7","updated":"2016-01-06 04:34:42.000000000","message":"Please see my reply above.","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"036dc77817ddb3afc267703ccad79e97e0d1b4cb","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    with open(target_file, \u0027wb\u0027) as fd:"},{"line_number":126,"context_line":"        try:"},{"line_number":127,"context_line":"            image_service.HttpImageService().download(self.parsed_url.geturl(),"},{"line_number":128,"context_line":"                                                      fd)"},{"line_number":129,"context_line":"        except exception.ImageDownloadFailed as exc:"},{"line_number":130,"context_line":"            operation \u003d _(\"Firmware file download as part \""},{"line_number":131,"context_line":"                          \"of manual cleaning\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a7b0d38_98cb7953","line":128,"range":{"start_line":128,"start_character":56,"end_line":128,"end_character":57},"updated":"2015-12-24 05:30:44.000000000","message":"ditto","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"c69eef289018a3ec1d8c646af203c3607d4658df","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    with open(target_file, \u0027wb\u0027) as fd:"},{"line_number":126,"context_line":"        try:"},{"line_number":127,"context_line":"            image_service.HttpImageService().download(self.parsed_url.geturl(),"},{"line_number":128,"context_line":"                                                      fd)"},{"line_number":129,"context_line":"        except exception.ImageDownloadFailed as exc:"},{"line_number":130,"context_line":"            operation \u003d _(\"Firmware file download as part \""},{"line_number":131,"context_line":"                          \"of manual cleaning\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_f4770c38","line":128,"range":{"start_line":128,"start_character":56,"end_line":128,"end_character":57},"in_reply_to":"1a7b0d38_98cb7953","updated":"2016-01-06 04:34:42.000000000","message":"Please see my reply above.","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"036dc77817ddb3afc267703ccad79e97e0d1b4cb","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    timeout \u003d ilo_common.CONF.ilo.swift_object_expiry_timeout"},{"line_number":149,"context_line":"    try:"},{"line_number":150,"context_line":"        # Generate temp url"},{"line_number":151,"context_line":"        tempurl \u003d swift.SwiftAPI().get_temp_url(container, objectname, timeout)"},{"line_number":152,"context_line":"    except exception.SwiftOperationError as exc:"},{"line_number":153,"context_line":"            operation \u003d _(\"Firmware file download as part \""},{"line_number":154,"context_line":"                          \"of manual cleaning\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a7b0d38_b8c67547","line":151,"range":{"start_line":151,"start_character":78,"end_line":151,"end_character":79},"updated":"2015-12-24 05:30:44.000000000","message":"ditto","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"c69eef289018a3ec1d8c646af203c3607d4658df","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    timeout \u003d ilo_common.CONF.ilo.swift_object_expiry_timeout"},{"line_number":149,"context_line":"    try:"},{"line_number":150,"context_line":"        # Generate temp url"},{"line_number":151,"context_line":"        tempurl \u003d swift.SwiftAPI().get_temp_url(container, objectname, timeout)"},{"line_number":152,"context_line":"    except exception.SwiftOperationError as exc:"},{"line_number":153,"context_line":"            operation \u003d _(\"Firmware file download as part \""},{"line_number":154,"context_line":"                          \"of manual cleaning\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_749a3c65","line":151,"range":{"start_line":151,"start_character":78,"end_line":151,"end_character":79},"in_reply_to":"1a7b0d38_b8c67547","updated":"2016-01-06 04:34:42.000000000","message":"Please see my reply above.","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"036dc77817ddb3afc267703ccad79e97e0d1b4cb","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    try:"},{"line_number":176,"context_line":"        fw_image_location, to_upload \u003d ("},{"line_number":177,"context_line":"            ilo_object.process_firmware_image(target_file))"},{"line_number":178,"context_line":"    except ilo_error.IloError as ilo_exception:"},{"line_number":179,"context_line":"            operation \u003d _(\"Firmware file extracting as part \""},{"line_number":180,"context_line":"                          \"of manual cleaning\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a7b0d38_58c5113a","line":177,"range":{"start_line":177,"start_character":57,"end_line":177,"end_character":59},"updated":"2015-12-24 05:30:44.000000000","message":"ditto","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"c69eef289018a3ec1d8c646af203c3607d4658df","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    try:"},{"line_number":176,"context_line":"        fw_image_location, to_upload \u003d ("},{"line_number":177,"context_line":"            ilo_object.process_firmware_image(target_file))"},{"line_number":178,"context_line":"    except ilo_error.IloError as ilo_exception:"},{"line_number":179,"context_line":"            operation \u003d _(\"Firmware file extracting as part \""},{"line_number":180,"context_line":"                          \"of manual cleaning\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_34a5a4a1","line":177,"range":{"start_line":177,"start_character":57,"end_line":177,"end_character":59},"in_reply_to":"1a7b0d38_58c5113a","updated":"2016-01-06 04:34:42.000000000","message":"Please see my reply above.","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"129a8f802b5d1c1b9cde5c303e8efadb36f48864","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":57,"context_line":"            _download_swift_based_fw_to, fw_processor)"},{"line_number":58,"context_line":"    else:"},{"line_number":59,"context_line":"        raise exception.IloInvalidParameterValue("},{"line_number":60,"context_line":"            param_name\u003durl,"},{"line_number":61,"context_line":"            reason\u003d(\"Invalid scheme %s, the supported firmware url schemes \""},{"line_number":62,"context_line":"                    \"are: file/http/https/swift\") % url_scheme)"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_28a727ab","line":59,"range":{"start_line":59,"start_character":24,"end_line":59,"end_character":48},"updated":"2016-01-06 09:53:51.000000000","message":"This should have been InvalidParameterValue instead of IloInvalidParameterValue.\nI think we should use vendor specific Ironic exceptions to translate exceptions generated from vendor specific external modules e.g. proliantutils. This one is being raised from Ironic code itself.","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ae6586a99ac07b3cd93ee92b2c5861cd07e4d7a1","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":57,"context_line":"            _download_swift_based_fw_to, fw_processor)"},{"line_number":58,"context_line":"    else:"},{"line_number":59,"context_line":"        raise exception.IloInvalidParameterValue("},{"line_number":60,"context_line":"            param_name\u003durl,"},{"line_number":61,"context_line":"            reason\u003d(\"Invalid scheme %s, the supported firmware url schemes \""},{"line_number":62,"context_line":"                    \"are: file/http/https/swift\") % url_scheme)"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_89d940f5","line":59,"range":{"start_line":59,"start_character":24,"end_line":59,"end_character":48},"in_reply_to":"fa69d971_28a727ab","updated":"2016-01-08 07:06:29.000000000","message":"Correct. Thanks for clarifying, Shiv. Done.","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"129a8f802b5d1c1b9cde5c303e8efadb36f48864","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    else:"},{"line_number":59,"context_line":"        raise exception.IloInvalidParameterValue("},{"line_number":60,"context_line":"            param_name\u003durl,"},{"line_number":61,"context_line":"            reason\u003d(\"Invalid scheme %s, the supported firmware url schemes \""},{"line_number":62,"context_line":"                    \"are: file/http/https/swift\") % url_scheme)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    return fw_processor"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_68af5f7d","line":61,"range":{"start_line":61,"start_character":63,"end_line":61,"end_character":66},"updated":"2016-01-06 09:53:51.000000000","message":"s/ url/ URL","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ae6586a99ac07b3cd93ee92b2c5861cd07e4d7a1","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    else:"},{"line_number":59,"context_line":"        raise exception.IloInvalidParameterValue("},{"line_number":60,"context_line":"            param_name\u003durl,"},{"line_number":61,"context_line":"            reason\u003d(\"Invalid scheme %s, the supported firmware url schemes \""},{"line_number":62,"context_line":"                    \"are: file/http/https/swift\") % url_scheme)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    return fw_processor"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_2cc38239","line":61,"range":{"start_line":61,"start_character":63,"end_line":61,"end_character":66},"in_reply_to":"fa69d971_68af5f7d","updated":"2016-01-08 07:06:29.000000000","message":"Done","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"129a8f802b5d1c1b9cde5c303e8efadb36f48864","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        raise exception.IloInvalidParameterValue("},{"line_number":60,"context_line":"            param_name\u003durl,"},{"line_number":61,"context_line":"            reason\u003d(\"Invalid scheme %s, the supported firmware url schemes \""},{"line_number":62,"context_line":"                    \"are: file/http/https/swift\") % url_scheme)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    return fw_processor"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_c8e3ebd7","line":62,"range":{"start_line":62,"start_character":30,"end_line":62,"end_character":31},"updated":"2016-01-06 09:53:51.000000000","message":"s/ \"are: file/http/https/swift\" / \" are \u0027file\u0027, \u0027http\u0027, \u0027https\u0027 and \u0027swift\u0027\"","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ae6586a99ac07b3cd93ee92b2c5861cd07e4d7a1","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        raise exception.IloInvalidParameterValue("},{"line_number":60,"context_line":"            param_name\u003durl,"},{"line_number":61,"context_line":"            reason\u003d(\"Invalid scheme %s, the supported firmware url schemes \""},{"line_number":62,"context_line":"                    \"are: file/http/https/swift\") % url_scheme)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    return fw_processor"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_8cc86e56","line":62,"range":{"start_line":62,"start_character":30,"end_line":62,"end_character":31},"in_reply_to":"fa69d971_c8e3ebd7","updated":"2016-01-08 07:06:29.000000000","message":"Done","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"129a8f802b5d1c1b9cde5c303e8efadb36f48864","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        # blindly delete the firmware file which gets passed on to extraction"},{"line_number":102,"context_line":"        # operation after successful extract. Check whether the file is same"},{"line_number":103,"context_line":"        # or not and then go ahead deleting it."},{"line_number":104,"context_line":"        if not os.path.samefile(fw_image_location, target_file):"},{"line_number":105,"context_line":"            # delete the entire downloaded content along with temp dir."},{"line_number":106,"context_line":"            shutil.rmtree(temp_dir, ignore_errors\u003dTrue)"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_f72ecaa3","line":104,"range":{"start_line":104,"start_character":18,"end_line":104,"end_character":22},"updated":"2016-01-06 09:53:51.000000000","message":"INstead of this file check, would it be better to have additional boolean return value from _extract_fw_from_file() to indicate if file hosted else where.\nIt may be useful to log the information if its being hosted elsewhere.","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ae6586a99ac07b3cd93ee92b2c5861cd07e4d7a1","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        # blindly delete the firmware file which gets passed on to extraction"},{"line_number":102,"context_line":"        # operation after successful extract. Check whether the file is same"},{"line_number":103,"context_line":"        # or not and then go ahead deleting it."},{"line_number":104,"context_line":"        if not os.path.samefile(fw_image_location, target_file):"},{"line_number":105,"context_line":"            # delete the entire downloaded content along with temp dir."},{"line_number":106,"context_line":"            shutil.rmtree(temp_dir, ignore_errors\u003dTrue)"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_626bc1b7","line":104,"range":{"start_line":104,"start_character":18,"end_line":104,"end_character":22},"in_reply_to":"fa69d971_f72ecaa3","updated":"2016-01-08 07:06:29.000000000","message":"yeah it makes sense. Have taken care of this now. plz chk once.","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"129a8f802b5d1c1b9cde5c303e8efadb36f48864","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        except exception.ImageDownloadFailed as exc:"},{"line_number":126,"context_line":"            operation \u003d _(\"Firmware file copying as part \""},{"line_number":127,"context_line":"                          \"of manual cleaning\")"},{"line_number":128,"context_line":"            raise exception.IloOperationError(operation\u003doperation, error\u003dexc)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"def _download_http_based_fw_to(self, target_file):"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_e92cae9a","line":128,"range":{"start_line":128,"start_character":28,"end_line":128,"end_character":45},"updated":"2016-01-06 09:53:51.000000000","message":"Do we need to convert this exception to IloOperationError ? Raising ImageDownloadFailed looks fine, as no iLO operation was done.","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ae6586a99ac07b3cd93ee92b2c5861cd07e4d7a1","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        except exception.ImageDownloadFailed as exc:"},{"line_number":126,"context_line":"            operation \u003d _(\"Firmware file copying as part \""},{"line_number":127,"context_line":"                          \"of manual cleaning\")"},{"line_number":128,"context_line":"            raise exception.IloOperationError(operation\u003doperation, error\u003dexc)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"def _download_http_based_fw_to(self, target_file):"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_5829d0e4","line":128,"range":{"start_line":128,"start_character":28,"end_line":128,"end_character":45},"in_reply_to":"fa69d971_e92cae9a","updated":"2016-01-08 07:06:29.000000000","message":"Done","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"129a8f802b5d1c1b9cde5c303e8efadb36f48864","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        except exception.ImageDownloadFailed as exc:"},{"line_number":146,"context_line":"            operation \u003d _(\"Firmware file download as part \""},{"line_number":147,"context_line":"                          \"of manual cleaning\")"},{"line_number":148,"context_line":"            raise exception.IloOperationError(operation\u003doperation, error\u003dexc)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"def _download_swift_based_fw_to(self, target_file):"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_e9cd8e31","line":148,"range":{"start_line":148,"start_character":28,"end_line":148,"end_character":45},"updated":"2016-01-06 09:53:51.000000000","message":"ditto","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ae6586a99ac07b3cd93ee92b2c5861cd07e4d7a1","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        except exception.ImageDownloadFailed as exc:"},{"line_number":146,"context_line":"            operation \u003d _(\"Firmware file download as part \""},{"line_number":147,"context_line":"                          \"of manual cleaning\")"},{"line_number":148,"context_line":"            raise exception.IloOperationError(operation\u003doperation, error\u003dexc)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"def _download_swift_based_fw_to(self, target_file):"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_d87b80f3","line":148,"range":{"start_line":148,"start_character":28,"end_line":148,"end_character":45},"in_reply_to":"fa69d971_e9cd8e31","updated":"2016-01-08 07:06:29.000000000","message":"Done","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"129a8f802b5d1c1b9cde5c303e8efadb36f48864","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        # upload firmware image file to conductor webserver"},{"line_number":202,"context_line":"        fw_image_filename \u003d os.path.basename(fw_image_location)"},{"line_number":203,"context_line":"        try:"},{"line_number":204,"context_line":"            fw_image_uploaded_location \u003d ilo_common.copy_image_to_web_server("},{"line_number":205,"context_line":"                fw_image_location, fw_image_filename)"},{"line_number":206,"context_line":"        except exception.ImageUploadFailed as exc:"},{"line_number":207,"context_line":"            operation \u003d _(\"Firmware file uploading as part \""}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_dc2c0d9b","line":204,"range":{"start_line":204,"start_character":52,"end_line":204,"end_character":76},"updated":"2016-01-06 09:53:51.000000000","message":"Copying to web server should be conditional as it depends on \nconfiguration \nilo-\u003euse_web_server_for_images\n\nCan\u0027t this be stored in swift as well, if webserver is not configured?","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ae6586a99ac07b3cd93ee92b2c5861cd07e4d7a1","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        # upload firmware image file to conductor webserver"},{"line_number":202,"context_line":"        fw_image_filename \u003d os.path.basename(fw_image_location)"},{"line_number":203,"context_line":"        try:"},{"line_number":204,"context_line":"            fw_image_uploaded_location \u003d ilo_common.copy_image_to_web_server("},{"line_number":205,"context_line":"                fw_image_location, fw_image_filename)"},{"line_number":206,"context_line":"        except exception.ImageUploadFailed as exc:"},{"line_number":207,"context_line":"            operation \u003d _(\"Firmware file uploading as part \""}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_4d7b4d2a","line":204,"range":{"start_line":204,"start_character":52,"end_line":204,"end_character":76},"in_reply_to":"fa69d971_dc2c0d9b","updated":"2016-01-08 07:06:29.000000000","message":"Have refactored the ilo/common.py file a bit a part of this. Done.","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"d5b9c2a1c25482de1f499be20bee1bf2cd625e7c","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    :raises: IloOperationError, on failure to copy the original file."},{"line_number":135,"context_line":"    \"\"\""},{"line_number":136,"context_line":"    src_file \u003d self.parsed_url.path"},{"line_number":137,"context_line":"    with open(target_file, \u0027wb\u0027) as fd:"},{"line_number":138,"context_line":"        try:"},{"line_number":139,"context_line":"            image_service.FileImageService().download(src_file, fd)"},{"line_number":140,"context_line":"        except exception.ImageDownloadFailed as exc:"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_1ac854a5","line":137,"updated":"2016-01-06 15:55:19.000000000","message":"The file openings are not wrapped in except blocks, is it by purpose? I guess this should be handled too.","commit_id":"d4498f422e829e3b6be44a40cb895055995f0d2d"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"1eb079a6a19dc76845fc31211492244903c7dc6f","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    :raises: IloOperationError, on failure to copy the original file."},{"line_number":135,"context_line":"    \"\"\""},{"line_number":136,"context_line":"    src_file \u003d self.parsed_url.path"},{"line_number":137,"context_line":"    with open(target_file, \u0027wb\u0027) as fd:"},{"line_number":138,"context_line":"        try:"},{"line_number":139,"context_line":"            image_service.FileImageService().download(src_file, fd)"},{"line_number":140,"context_line":"        except exception.ImageDownloadFailed as exc:"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_b1aedf7f","line":137,"in_reply_to":"fa69d971_1ac854a5","updated":"2016-01-08 07:00:35.000000000","message":"wouldn\u0027t context manager like ``with`` take care of that?\nJust for your ref: https://www.python.org/dev/peps/pep-0343/\nDid I answer your comment? or am I missing something here?","commit_id":"d4498f422e829e3b6be44a40cb895055995f0d2d"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"d5b9c2a1c25482de1f499be20bee1bf2cd625e7c","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                        file."},{"line_number":154,"context_line":"    :raises: IloOperationError, on failure to download the original file."},{"line_number":155,"context_line":"    \"\"\""},{"line_number":156,"context_line":"    with open(target_file, \u0027wb\u0027) as fd:"},{"line_number":157,"context_line":"        try:"},{"line_number":158,"context_line":"            image_service.HttpImageService().download(self.parsed_url.geturl(),"},{"line_number":159,"context_line":"                                                      fd)"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_dabddc02","line":156,"updated":"2016-01-06 15:55:19.000000000","message":"ditto","commit_id":"d4498f422e829e3b6be44a40cb895055995f0d2d"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"1eb079a6a19dc76845fc31211492244903c7dc6f","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                        file."},{"line_number":154,"context_line":"    :raises: IloOperationError, on failure to download the original file."},{"line_number":155,"context_line":"    \"\"\""},{"line_number":156,"context_line":"    with open(target_file, \u0027wb\u0027) as fd:"},{"line_number":157,"context_line":"        try:"},{"line_number":158,"context_line":"            image_service.HttpImageService().download(self.parsed_url.geturl(),"},{"line_number":159,"context_line":"                                                      fd)"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_31c3cf3a","line":156,"in_reply_to":"fa69d971_dabddc02","updated":"2016-01-08 07:00:35.000000000","message":"Please see my reply above.","commit_id":"d4498f422e829e3b6be44a40cb895055995f0d2d"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"d5b9c2a1c25482de1f499be20bee1bf2cd625e7c","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        # Generate temp url using swift API"},{"line_number":182,"context_line":"        tempurl \u003d swift.SwiftAPI().get_temp_url(container, objectname, timeout)"},{"line_number":183,"context_line":"    except exception.SwiftOperationError as exc:"},{"line_number":184,"context_line":"            operation \u003d _(\"Firmware file download as part \""},{"line_number":185,"context_line":"                          \"of manual cleaning\")"},{"line_number":186,"context_line":"            raise exception.IloOperationError(operation\u003doperation, error\u003dexc)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_d97bb1bc","line":184,"updated":"2016-01-06 15:55:19.000000000","message":"these 3 lines are overindented.","commit_id":"d4498f422e829e3b6be44a40cb895055995f0d2d"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"1eb079a6a19dc76845fc31211492244903c7dc6f","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        # Generate temp url using swift API"},{"line_number":182,"context_line":"        tempurl \u003d swift.SwiftAPI().get_temp_url(container, objectname, timeout)"},{"line_number":183,"context_line":"    except exception.SwiftOperationError as exc:"},{"line_number":184,"context_line":"            operation \u003d _(\"Firmware file download as part \""},{"line_number":185,"context_line":"                          \"of manual cleaning\")"},{"line_number":186,"context_line":"            raise exception.IloOperationError(operation\u003doperation, error\u003dexc)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_d1ea73ac","line":184,"in_reply_to":"fa69d971_d97bb1bc","updated":"2016-01-08 07:00:35.000000000","message":"Will amend.","commit_id":"d4498f422e829e3b6be44a40cb895055995f0d2d"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"d5b9c2a1c25482de1f499be20bee1bf2cd625e7c","unresolved":false,"context_lines":[{"line_number":204,"context_line":"    ilo_object \u003d ilo_common.get_ilo_object(node)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    try:"},{"line_number":207,"context_line":"        fw_image_location, to_upload \u003d ("},{"line_number":208,"context_line":"            ilo_object.process_firmware_image(target_file))"},{"line_number":209,"context_line":"    except ilo_error.IloError as ilo_exception:"},{"line_number":210,"context_line":"            operation \u003d _(\"Firmware file extracting as part \""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_39b52d7d","line":207,"updated":"2016-01-06 15:55:19.000000000","message":"Would be nice to add a comment when/why to_upload is True or False.","commit_id":"d4498f422e829e3b6be44a40cb895055995f0d2d"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"1eb079a6a19dc76845fc31211492244903c7dc6f","unresolved":false,"context_lines":[{"line_number":204,"context_line":"    ilo_object \u003d ilo_common.get_ilo_object(node)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    try:"},{"line_number":207,"context_line":"        fw_image_location, to_upload \u003d ("},{"line_number":208,"context_line":"            ilo_object.process_firmware_image(target_file))"},{"line_number":209,"context_line":"    except ilo_error.IloError as ilo_exception:"},{"line_number":210,"context_line":"            operation \u003d _(\"Firmware file extracting as part \""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_713e272b","line":207,"in_reply_to":"fa69d971_39b52d7d","updated":"2016-01-08 07:00:35.000000000","message":"Done. Let me know if its clear.","commit_id":"d4498f422e829e3b6be44a40cb895055995f0d2d"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"d5b9c2a1c25482de1f499be20bee1bf2cd625e7c","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        fw_image_location, to_upload \u003d ("},{"line_number":208,"context_line":"            ilo_object.process_firmware_image(target_file))"},{"line_number":209,"context_line":"    except ilo_error.IloError as ilo_exception:"},{"line_number":210,"context_line":"            operation \u003d _(\"Firmware file extracting as part \""},{"line_number":211,"context_line":"                          \"of manual cleaning\")"},{"line_number":212,"context_line":"            raise exception.IloOperationError(operation\u003doperation,"},{"line_number":213,"context_line":"                                              error\u003dilo_exception)"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_3a4af826","line":210,"updated":"2016-01-06 15:55:19.000000000","message":"ditto overindent","commit_id":"d4498f422e829e3b6be44a40cb895055995f0d2d"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"1eb079a6a19dc76845fc31211492244903c7dc6f","unresolved":false,"context_lines":[{"line_number":207,"context_line":"        fw_image_location, to_upload \u003d ("},{"line_number":208,"context_line":"            ilo_object.process_firmware_image(target_file))"},{"line_number":209,"context_line":"    except ilo_error.IloError as ilo_exception:"},{"line_number":210,"context_line":"            operation \u003d _(\"Firmware file extracting as part \""},{"line_number":211,"context_line":"                          \"of manual cleaning\")"},{"line_number":212,"context_line":"            raise exception.IloOperationError(operation\u003doperation,"},{"line_number":213,"context_line":"                                              error\u003dilo_exception)"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_f110d7ad","line":210,"in_reply_to":"fa69d971_3a4af826","updated":"2016-01-08 07:00:35.000000000","message":"Will amend. Done","commit_id":"d4498f422e829e3b6be44a40cb895055995f0d2d"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"db98c84eaa153d235c30aea21ddc39e312b98649","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        temp_dir \u003d tempfile.mkdtemp()"},{"line_number":104,"context_line":"        target_file \u003d os.path.join(temp_dir, filename)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        # download..."},{"line_number":107,"context_line":"        # the firmware file to this target file"},{"line_number":108,"context_line":"        try:"},{"line_number":109,"context_line":"            self._download_fw_to(target_file)"},{"line_number":110,"context_line":"        except (exception.SwiftOperationError,"},{"line_number":111,"context_line":"                exception.ImageDownloadFailed) as exc:"},{"line_number":112,"context_line":"            # delete the target file along with temp dir and"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa69d971_11d94757","line":109,"range":{"start_line":106,"start_character":0,"end_line":109,"end_character":45},"updated":"2016-01-11 14:22:48.000000000","message":"I absolutely believe there needs to be some sort of file authentication here.  I saw the previous comments regarding files potentially being signed, and I honestly worry that is insufficient in the long term should those signing credentials be compromised, or for some reason the iLO chooses not to attempt any sort of file verification.\n\nI think the best thing to do is require the administrator to submit the checksum along with the file name, which allows the administrator to have some assurance that the file they have chosen has (a) not been updated and potentially contains new features, or changed functionality or (b) that an attacher has not replaced the file.","commit_id":"212b06e12eb91e2d96d272d23aab2844749d02da"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"2a40f39ee5abde3a115e7adabb5fa8ff032444ef","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        temp_dir \u003d tempfile.mkdtemp()"},{"line_number":104,"context_line":"        target_file \u003d os.path.join(temp_dir, filename)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        # download..."},{"line_number":107,"context_line":"        # the firmware file to this target file"},{"line_number":108,"context_line":"        try:"},{"line_number":109,"context_line":"            self._download_fw_to(target_file)"},{"line_number":110,"context_line":"        except (exception.SwiftOperationError,"},{"line_number":111,"context_line":"                exception.ImageDownloadFailed) as exc:"},{"line_number":112,"context_line":"            # delete the target file along with temp dir and"}],"source_content_type":"text/x-python","patch_set":14,"id":"da6ed579_fddcea47","line":109,"range":{"start_line":106,"start_character":0,"end_line":109,"end_character":45},"in_reply_to":"da6ed579_6f49ae5f","updated":"2016-01-18 14:45:40.000000000","message":"Thank you for explaining. Have provided the checksum functionality a part of patch set #16. Please check.","commit_id":"212b06e12eb91e2d96d272d23aab2844749d02da"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"7c4ca9c97fcb1b0e62d8d3df6517abc4696c9674","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        temp_dir \u003d tempfile.mkdtemp()"},{"line_number":104,"context_line":"        target_file \u003d os.path.join(temp_dir, filename)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        # download..."},{"line_number":107,"context_line":"        # the firmware file to this target file"},{"line_number":108,"context_line":"        try:"},{"line_number":109,"context_line":"            self._download_fw_to(target_file)"},{"line_number":110,"context_line":"        except (exception.SwiftOperationError,"},{"line_number":111,"context_line":"                exception.ImageDownloadFailed) as exc:"},{"line_number":112,"context_line":"            # delete the target file along with temp dir and"}],"source_content_type":"text/x-python","patch_set":14,"id":"da6ed579_6f49ae5f","line":109,"range":{"start_line":106,"start_character":0,"end_line":109,"end_character":45},"in_reply_to":"da6ed579_d0c0d6e2","updated":"2016-01-14 17:41:09.000000000","message":"I think to be more in line with the existing requirements of supplying an image_checksum for  image_source if it is an HTTP url.  The user must submit the checksum directly to the API so it becomes a value that is known to the conductor that can be used to verify the downloaded file.  The risk of placing a checksum along side of a file that could be tampered with is that the checksum could naturally be tampered with.  I think regardless of where the file is stored, the behavior should be the same that way the administrator still has the level of assurance they need.","commit_id":"212b06e12eb91e2d96d272d23aab2844749d02da"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"2c494d795b5b1e14c09bff3ed686fcb1bab132ef","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        temp_dir \u003d tempfile.mkdtemp()"},{"line_number":104,"context_line":"        target_file \u003d os.path.join(temp_dir, filename)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        # download..."},{"line_number":107,"context_line":"        # the firmware file to this target file"},{"line_number":108,"context_line":"        try:"},{"line_number":109,"context_line":"            self._download_fw_to(target_file)"},{"line_number":110,"context_line":"        except (exception.SwiftOperationError,"},{"line_number":111,"context_line":"                exception.ImageDownloadFailed) as exc:"},{"line_number":112,"context_line":"            # delete the target file along with temp dir and"}],"source_content_type":"text/x-python","patch_set":14,"id":"da6ed579_d0c0d6e2","line":109,"range":{"start_line":106,"start_character":0,"end_line":109,"end_character":45},"in_reply_to":"fa69d971_11d94757","updated":"2016-01-13 13:06:34.000000000","message":"I fully agree with you about the purpose to validate the integrity of a file,so downloaded, that may have been corrupted or tampered with. As suggested by you, now in order to include the MD5/SHA-1 checksum, which needs to be compared to the file you just downloaded, I plan to make the operator provide another file containing the checksum (checksum file will be placed/uploaded in the same place alongside the firmware file) and that will be used to check the identity. But what if the operator provides a firmware image file of swift url scheme, then can she provide a file path for the checksum file? Or she has to provide a swift path even for the checksum file as well? Or the checksum file, whatever the url scheme may be, has to be a file path (and wouldn\u0027t require an explicit download)?\n\nI am kind of being after the implementation of such a functionality, but would like to get others\u0027 opinion as well. Is there any place in ironic or somewhere we are already employing such technique/s to have a good reference of? Will ask in the community IRC as well. Would highly appreciate if you have any more suggestions. Thank you.","commit_id":"212b06e12eb91e2d96d272d23aab2844749d02da"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9055b88b012d120291317fa2f5cf092e288dd0bd","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            shutil.rmtree(temp_dir, ignore_errors\u003dTrue)"},{"line_number":128,"context_line":"            raise exc"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        # in case of raw (no need for extraction) firmware files, the same"},{"line_number":131,"context_line":"        # firmware file is returned from the extract method. Hence, don\u0027t"},{"line_number":132,"context_line":"        # blindly delete the firmware file which gets passed on to extraction"},{"line_number":133,"context_line":"        # operation after successful extract. Check whether the file is same"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_202e6543","line":130,"range":{"start_line":130,"start_character":0,"end_line":130,"end_character":8},"updated":"2016-01-14 18:26:29.000000000","message":"Generally we tend to try and indicate that something is a NOTE and who originally wrote the note so other developers can gain context and know who to reach out to if they needed an answer.","commit_id":"3d5024f51d491d73ad5683fde22e6dcc54bdd0e6"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"dd319c171c5551c962923189b3f27dc4ca6d6940","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            shutil.rmtree(temp_dir, ignore_errors\u003dTrue)"},{"line_number":128,"context_line":"            raise exc"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        # in case of raw (no need for extraction) firmware files, the same"},{"line_number":131,"context_line":"        # firmware file is returned from the extract method. Hence, don\u0027t"},{"line_number":132,"context_line":"        # blindly delete the firmware file which gets passed on to extraction"},{"line_number":133,"context_line":"        # operation after successful extract. Check whether the file is same"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_bdd192fd","line":130,"range":{"start_line":130,"start_character":0,"end_line":130,"end_character":8},"in_reply_to":"da6ed579_202e6543","updated":"2016-01-18 14:45:17.000000000","message":"Done","commit_id":"3d5024f51d491d73ad5683fde22e6dcc54bdd0e6"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"1118bd34fac44cbb709d4f9fdd905a7f817ae16d","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"CONF \u003d cfg.CONF"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"CONF.import_opt(\u0027swift_object_expiry_timeout\u0027,"},{"line_number":46,"context_line":"                \u0027ironic.drivers.modules.ilo.common\u0027, group\u003d\u0027ilo\u0027)"},{"line_number":47,"context_line":"CONF.import_opt(\u0027use_web_server_for_images\u0027,"},{"line_number":48,"context_line":"                \u0027ironic.drivers.modules.ilo.common\u0027, group\u003d\u0027ilo\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_88d121fe","line":45,"updated":"2016-01-20 17:51:48.000000000","message":"No need to import_opt as you import the whole ilo.common module","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"CONF \u003d cfg.CONF"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"CONF.import_opt(\u0027swift_object_expiry_timeout\u0027,"},{"line_number":46,"context_line":"                \u0027ironic.drivers.modules.ilo.common\u0027, group\u003d\u0027ilo\u0027)"},{"line_number":47,"context_line":"CONF.import_opt(\u0027use_web_server_for_images\u0027,"},{"line_number":48,"context_line":"                \u0027ironic.drivers.modules.ilo.common\u0027, group\u003d\u0027ilo\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_346aab1b","line":45,"in_reply_to":"9a68dd71_88d121fe","updated":"2016-01-29 14:54:05.000000000","message":"But wont it work as a check for the global config, if it doesn\u0027t exist (or the name might get changed, the config option might get removed etc.)? It will throw the error (NoSuchOptError) at the time of loading this module. Looking fwd to your comment on this.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"1118bd34fac44cbb709d4f9fdd905a7f817ae16d","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    LOG.info(_LI(\"Validating firmware image info: %s\"), firmware_image_info)"},{"line_number":67,"context_line":"    for field in FIRMWARE_IMAGE_INFO_FIELDS:"},{"line_number":68,"context_line":"        if field not in image_info:"},{"line_number":69,"context_line":"            msg \u003d (_(\"Firmware image is missing \u0027{%s}\u0027 field.\") % field)"},{"line_number":70,"context_line":"            LOG.error(msg)"},{"line_number":71,"context_line":"            raise exception.MissingParameterValue(msg)"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_a87425cf","line":69,"updated":"2016-01-20 17:51:48.000000000","message":"It\u0027s better to check them all and then output an array of missing fields.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    LOG.info(_LI(\"Validating firmware image info: %s\"), firmware_image_info)"},{"line_number":67,"context_line":"    for field in FIRMWARE_IMAGE_INFO_FIELDS:"},{"line_number":68,"context_line":"        if field not in image_info:"},{"line_number":69,"context_line":"            msg \u003d (_(\"Firmware image is missing \u0027{%s}\u0027 field.\") % field)"},{"line_number":70,"context_line":"            LOG.error(msg)"},{"line_number":71,"context_line":"            raise exception.MissingParameterValue(msg)"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_286a4c1b","line":69,"in_reply_to":"9a68dd71_a87425cf","updated":"2016-01-29 14:54:05.000000000","message":"Done","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"1118bd34fac44cbb709d4f9fdd905a7f817ae16d","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            LOG.error(msg)"},{"line_number":71,"context_line":"            raise exception.MissingParameterValue(msg)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    url \u003d image_info.get(\u0027url\u0027)"},{"line_number":74,"context_line":"    checksum \u003d image_info.get(\u0027checksum\u0027)"},{"line_number":75,"context_line":"    component \u003d image_info.get(\u0027component\u0027)"},{"line_number":76,"context_line":"    if not url or not checksum or not component:"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_f30d2e38","line":73,"updated":"2016-01-20 17:51:48.000000000","message":"You\u0027ve checked that it is present, you can use image_info[\u0027url\u0027], ditto for others.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            LOG.error(msg)"},{"line_number":71,"context_line":"            raise exception.MissingParameterValue(msg)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    url \u003d image_info.get(\u0027url\u0027)"},{"line_number":74,"context_line":"    checksum \u003d image_info.get(\u0027checksum\u0027)"},{"line_number":75,"context_line":"    component \u003d image_info.get(\u0027component\u0027)"},{"line_number":76,"context_line":"    if not url or not checksum or not component:"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_f2841e0c","line":73,"in_reply_to":"9a68dd71_f30d2e38","updated":"2016-01-29 14:54:05.000000000","message":"Just out of curiosity, I have done some benchmarking on the ``get`` method and subscript operator of dict. Had used an 100 elements\u0027 dict object with 100000 number of test iteration. fyr:\n\n  test_dict_subscript --\u003e  2.38241195679\n  test_dict_get --\u003e  4.28606319427\n\nso, subscript operator of dict is almost 2 times faster for 100000 iterations and 100 elements\u0027 dict compared to its `get` method. So, it is recommended to use `[]` over `get` when you don\u0027t expect any error throw (e.g. KeyError) condition. `get` to be used only in case of no-throw and default-value-set-if-not-present situations. Will change. Thanks for pointing this out.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"1118bd34fac44cbb709d4f9fdd905a7f817ae16d","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    url \u003d image_info.get(\u0027url\u0027)"},{"line_number":74,"context_line":"    checksum \u003d image_info.get(\u0027checksum\u0027)"},{"line_number":75,"context_line":"    component \u003d image_info.get(\u0027component\u0027)"},{"line_number":76,"context_line":"    if not url or not checksum or not component:"},{"line_number":77,"context_line":"        msg \u003d (_(\"Firmware image is missing value for any field.\"))"},{"line_number":78,"context_line":"        LOG.error(msg)"},{"line_number":79,"context_line":"        raise exception.MissingParameterValue(msg)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_73485e5c","line":76,"updated":"2016-01-20 17:51:48.000000000","message":"Hm, another check? It might be better to consider empty value as missing on l68, smth like\n\n if field not in image_info or not image_info[field]:","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    url \u003d image_info.get(\u0027url\u0027)"},{"line_number":74,"context_line":"    checksum \u003d image_info.get(\u0027checksum\u0027)"},{"line_number":75,"context_line":"    component \u003d image_info.get(\u0027component\u0027)"},{"line_number":76,"context_line":"    if not url or not checksum or not component:"},{"line_number":77,"context_line":"        msg \u003d (_(\"Firmware image is missing value for any field.\"))"},{"line_number":78,"context_line":"        LOG.error(msg)"},{"line_number":79,"context_line":"        raise exception.MissingParameterValue(msg)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_72ed8eb6","line":76,"in_reply_to":"9a68dd71_73485e5c","updated":"2016-01-29 14:54:05.000000000","message":"Had employed the ``difference`` method of `set` to accumulate the missing fields in I68. So, had to keep this as is. Any better way you have in your mind to avoid this?","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"1118bd34fac44cbb709d4f9fdd905a7f817ae16d","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                Exception):"},{"line_number":160,"context_line":"            # delete the target file along with temp dir and"},{"line_number":161,"context_line":"            # re-raise the exception"},{"line_number":162,"context_line":"            shutil.rmtree(temp_dir, ignore_errors\u003dTrue)"},{"line_number":163,"context_line":"            raise"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        # verify the checksum of the downloaded file"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_2e04bd13","line":162,"updated":"2016-01-20 17:51:48.000000000","message":"I see this piece of code 3 times, why not just do the following?\n\n try:\n   self._download_fw_to(target_file)\n   LOG.info(_LI(\"Verifying checksum of file: %s\"), target_file)\n   ilo_common.verify_image_checksum(target_file, expected_checksum)\n   fw_image_location, is_different_file \u003d (_extract_fw_from_file(node, target_file))\n finally:\n   shutil.rmtree(temp_dir, ignore_errors\u003dTrue)\n\nAs you don\u0027t do any handling apart from removing tempdir this would do the same thing.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"96644fbfc6a4abc4a757b8742ce6c5ba94744b3b","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                Exception):"},{"line_number":160,"context_line":"            # delete the target file along with temp dir and"},{"line_number":161,"context_line":"            # re-raise the exception"},{"line_number":162,"context_line":"            shutil.rmtree(temp_dir, ignore_errors\u003dTrue)"},{"line_number":163,"context_line":"            raise"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        # verify the checksum of the downloaded file"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_c600aa04","line":162,"in_reply_to":"9a68dd71_2e04bd13","updated":"2016-01-25 13:29:49.000000000","message":"Agreed, something like this will be a lot cleaner, and if your concerned about contextual understanding of steps, inline notes should work quite nicely between each method call.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                Exception):"},{"line_number":160,"context_line":"            # delete the target file along with temp dir and"},{"line_number":161,"context_line":"            # re-raise the exception"},{"line_number":162,"context_line":"            shutil.rmtree(temp_dir, ignore_errors\u003dTrue)"},{"line_number":163,"context_line":"            raise"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        # verify the checksum of the downloaded file"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_3298761b","line":162,"in_reply_to":"9a68dd71_2e04bd13","updated":"2016-01-29 14:54:05.000000000","message":"My fault. Completely missed out on this. Done.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                Exception):"},{"line_number":160,"context_line":"            # delete the target file along with temp dir and"},{"line_number":161,"context_line":"            # re-raise the exception"},{"line_number":162,"context_line":"            shutil.rmtree(temp_dir, ignore_errors\u003dTrue)"},{"line_number":163,"context_line":"            raise"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        # verify the checksum of the downloaded file"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_b28466b1","line":162,"in_reply_to":"9a68dd71_c600aa04","updated":"2016-01-29 14:54:05.000000000","message":"Done :)","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"87b1780116d16d5cb8f72d7d46eee956273b75d3","unresolved":false,"context_lines":[{"line_number":253,"context_line":"    objectname \u003d os.path.basename(self.parsed_url.path)"},{"line_number":254,"context_line":"    timeout \u003d CONF.ilo.swift_object_expiry_timeout"},{"line_number":255,"context_line":"    # Generate temp url using swift API"},{"line_number":256,"context_line":"    tempurl \u003d swift.SwiftAPI().get_temp_url(container, objectname, timeout)"},{"line_number":257,"context_line":"    # set the parsed_url attribute to the newly created tempurl from swift and"},{"line_number":258,"context_line":"    # delegate the dowloading job to the http_based downloader"},{"line_number":259,"context_line":"    self.parsed_url \u003d urlparse.urlparse(tempurl)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_559c2769","line":256,"range":{"start_line":256,"start_character":31,"end_line":256,"end_character":43},"updated":"2016-01-20 16:20:54.000000000","message":"might be better to use the function what we already have in place here: see https://github.com/openstack/ironic/blob/master/ironic/common/swift.py#L120","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"96644fbfc6a4abc4a757b8742ce6c5ba94744b3b","unresolved":false,"context_lines":[{"line_number":253,"context_line":"    objectname \u003d os.path.basename(self.parsed_url.path)"},{"line_number":254,"context_line":"    timeout \u003d CONF.ilo.swift_object_expiry_timeout"},{"line_number":255,"context_line":"    # Generate temp url using swift API"},{"line_number":256,"context_line":"    tempurl \u003d swift.SwiftAPI().get_temp_url(container, objectname, timeout)"},{"line_number":257,"context_line":"    # set the parsed_url attribute to the newly created tempurl from swift and"},{"line_number":258,"context_line":"    # delegate the dowloading job to the http_based downloader"},{"line_number":259,"context_line":"    self.parsed_url \u003d urlparse.urlparse(tempurl)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_7ab62efa","line":256,"range":{"start_line":256,"start_character":31,"end_line":256,"end_character":43},"in_reply_to":"9a68dd71_559c2769","updated":"2016-01-25 13:29:49.000000000","message":"Agree with Chris, would be better to use the internal wrapper method.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":253,"context_line":"    objectname \u003d os.path.basename(self.parsed_url.path)"},{"line_number":254,"context_line":"    timeout \u003d CONF.ilo.swift_object_expiry_timeout"},{"line_number":255,"context_line":"    # Generate temp url using swift API"},{"line_number":256,"context_line":"    tempurl \u003d swift.SwiftAPI().get_temp_url(container, objectname, timeout)"},{"line_number":257,"context_line":"    # set the parsed_url attribute to the newly created tempurl from swift and"},{"line_number":258,"context_line":"    # delegate the dowloading job to the http_based downloader"},{"line_number":259,"context_line":"    self.parsed_url \u003d urlparse.urlparse(tempurl)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a5de9d1_116f39c6","line":256,"range":{"start_line":256,"start_character":31,"end_line":256,"end_character":43},"in_reply_to":"9a68dd71_559c2769","updated":"2016-01-29 14:54:05.000000000","message":"have used this method only. ``swift`` used here is imported as:\n\n  from ironic.common import swift","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":253,"context_line":"    objectname \u003d os.path.basename(self.parsed_url.path)"},{"line_number":254,"context_line":"    timeout \u003d CONF.ilo.swift_object_expiry_timeout"},{"line_number":255,"context_line":"    # Generate temp url using swift API"},{"line_number":256,"context_line":"    tempurl \u003d swift.SwiftAPI().get_temp_url(container, objectname, timeout)"},{"line_number":257,"context_line":"    # set the parsed_url attribute to the newly created tempurl from swift and"},{"line_number":258,"context_line":"    # delegate the dowloading job to the http_based downloader"},{"line_number":259,"context_line":"    self.parsed_url \u003d urlparse.urlparse(tempurl)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a5de9d1_b15e6510","line":256,"range":{"start_line":256,"start_character":31,"end_line":256,"end_character":43},"in_reply_to":"9a68dd71_7ab62efa","updated":"2016-01-29 14:54:05.000000000","message":"Used the internal wrapper method only. See above comment from me.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"87b1780116d16d5cb8f72d7d46eee956273b75d3","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        # location. If it has to be a http/https location, then conductor"},{"line_number":285,"context_line":"        # will take care of uploading the firmware file to web server or"},{"line_number":286,"context_line":"        # swift (providing a temp url)."},{"line_number":287,"context_line":"        LOG.info(_LI(\"Extracting firmware file: %s ...\"), target_file)"},{"line_number":288,"context_line":"        fw_image_location, to_upload, is_extracted \u003d ("},{"line_number":289,"context_line":"            ilo_object.process_firmware_image(target_file))"},{"line_number":290,"context_line":"        LOG.info(_LI(\"Extracting firmware file: %(target_file)s ... done. \""}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_354e53c2","line":287,"range":{"start_line":287,"start_character":12,"end_line":287,"end_character":16},"updated":"2016-01-20 16:20:54.000000000","message":"I think debug level here might be better.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        # location. If it has to be a http/https location, then conductor"},{"line_number":285,"context_line":"        # will take care of uploading the firmware file to web server or"},{"line_number":286,"context_line":"        # swift (providing a temp url)."},{"line_number":287,"context_line":"        LOG.info(_LI(\"Extracting firmware file: %s ...\"), target_file)"},{"line_number":288,"context_line":"        fw_image_location, to_upload, is_extracted \u003d ("},{"line_number":289,"context_line":"            ilo_object.process_firmware_image(target_file))"},{"line_number":290,"context_line":"        LOG.info(_LI(\"Extracting firmware file: %(target_file)s ... done. \""}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_b5d8d080","line":287,"range":{"start_line":287,"start_character":12,"end_line":287,"end_character":16},"in_reply_to":"9a68dd71_354e53c2","updated":"2016-01-29 14:54:05.000000000","message":"Done. Also increased the verbosity level to DEBUG for most of the logging statements.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"87b1780116d16d5cb8f72d7d46eee956273b75d3","unresolved":false,"context_lines":[{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    is_different_file \u003d is_extracted"},{"line_number":300,"context_line":"    if to_upload:"},{"line_number":301,"context_line":"        LOG.info(_LI(\"Uploading firmware file: %s ... \"), fw_image_location)"},{"line_number":302,"context_line":"        fw_image_filename \u003d os.path.basename(fw_image_location)"},{"line_number":303,"context_line":"        try:"},{"line_number":304,"context_line":"            if CONF.ilo.use_web_server_for_images:"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_b50b237d","line":301,"range":{"start_line":301,"start_character":12,"end_line":301,"end_character":16},"updated":"2016-01-20 16:20:54.000000000","message":"I think debug level here might be better.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    is_different_file \u003d is_extracted"},{"line_number":300,"context_line":"    if to_upload:"},{"line_number":301,"context_line":"        LOG.info(_LI(\"Uploading firmware file: %s ... \"), fw_image_location)"},{"line_number":302,"context_line":"        fw_image_filename \u003d os.path.basename(fw_image_location)"},{"line_number":303,"context_line":"        try:"},{"line_number":304,"context_line":"            if CONF.ilo.use_web_server_for_images:"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a5de9d1_51837156","line":301,"range":{"start_line":301,"start_character":12,"end_line":301,"end_character":16},"in_reply_to":"9a68dd71_b50b237d","updated":"2016-01-29 14:54:05.000000000","message":"Done","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"6bff64e8315e1612a38dd77a02ebed1a6f5de38f","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"CONF \u003d cfg.CONF"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"CONF.import_opt(\u0027swift_object_expiry_timeout\u0027,"},{"line_number":46,"context_line":"                \u0027ironic.drivers.modules.ilo.common\u0027, group\u003d\u0027ilo\u0027)"},{"line_number":47,"context_line":"CONF.import_opt(\u0027use_web_server_for_images\u0027,"},{"line_number":48,"context_line":"                \u0027ironic.drivers.modules.ilo.common\u0027, group\u003d\u0027ilo\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_cd5475cb","line":45,"updated":"2016-02-24 11:32:42.000000000","message":"You import the whole ilo.common module, these opts will be imported automatically.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"CONF \u003d cfg.CONF"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"CONF.import_opt(\u0027swift_object_expiry_timeout\u0027,"},{"line_number":46,"context_line":"                \u0027ironic.drivers.modules.ilo.common\u0027, group\u003d\u0027ilo\u0027)"},{"line_number":47,"context_line":"CONF.import_opt(\u0027use_web_server_for_images\u0027,"},{"line_number":48,"context_line":"                \u0027ironic.drivers.modules.ilo.common\u0027, group\u003d\u0027ilo\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_da17fea0","line":45,"in_reply_to":"bae84128_cd5475cb","updated":"2016-02-26 14:46:24.000000000","message":"Okay :) removed those.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"38fd256f7c20dac906dff00cd616a0347cff988f","unresolved":false,"context_lines":[{"line_number":52,"context_line":"ilo_error \u003d importutils.try_import(\u0027proliantutils.exception\u0027)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def get_and_validate_firmware_image_info(firmware_image_info\u003dNone):"},{"line_number":56,"context_line":"    \"\"\"Validates the firmware image info and returns the retrieved values."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    :param firmware_image_info: dict object containing the firmware image info"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_7660d1cf","line":55,"updated":"2016-02-23 14:29:08.000000000","message":"What is use case for firmware_image_info is None?","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":52,"context_line":"ilo_error \u003d importutils.try_import(\u0027proliantutils.exception\u0027)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def get_and_validate_firmware_image_info(firmware_image_info\u003dNone):"},{"line_number":56,"context_line":"    \"\"\"Validates the firmware image info and returns the retrieved values."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    :param firmware_image_info: dict object containing the firmware image info"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_1a6fa6fc","line":55,"in_reply_to":"bae84128_7660d1cf","updated":"2016-02-26 14:46:24.000000000","message":":) Got rid of it.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"6bff64e8315e1612a38dd77a02ebed1a6f5de38f","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    url \u003d image_info[\u0027url\u0027]"},{"line_number":77,"context_line":"    checksum \u003d image_info[\u0027checksum\u0027]"},{"line_number":78,"context_line":"    component \u003d image_info[\u0027component\u0027]"},{"line_number":79,"context_line":"    if not url or not checksum or not component:"},{"line_number":80,"context_line":"        msg \u003d (_(\"Firmware image is missing value for one or more of the \""},{"line_number":81,"context_line":"                 \"field/s.\"))"},{"line_number":82,"context_line":"        LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_adec91bb","line":79,"updated":"2016-02-24 11:32:42.000000000","message":"This seems to me as some duplication of the check on L68. Could we just leave only this check? With doing get instead of [] like\n\n missing_fields \u003d []\n for field in FIRMWARE_IMAGE_INFO_FIELDS:\n   if not image_info.get(field):\n     missing_fields.append(field)\n if missing_fields:\n   msg \u003d (_(\"Firmware image info: %(image_info)s is missing the \"\n            \"required %(missing)s field/s.\") %\n          {\u0027image_info\u0027: image_info,\n           \u0027missing\u0027: \", \".join(missing_fields)})\n   LOG.error(msg)\n   raise exception.MissingParameterValue(msg)\n ...\n return image_info[\u0027url\u0027], image_info[\u0027checksum\u0027], image_info[\u0027component\u0027]","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    url \u003d image_info[\u0027url\u0027]"},{"line_number":77,"context_line":"    checksum \u003d image_info[\u0027checksum\u0027]"},{"line_number":78,"context_line":"    component \u003d image_info[\u0027component\u0027]"},{"line_number":79,"context_line":"    if not url or not checksum or not component:"},{"line_number":80,"context_line":"        msg \u003d (_(\"Firmware image is missing value for one or more of the \""},{"line_number":81,"context_line":"                 \"field/s.\"))"},{"line_number":82,"context_line":"        LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_55ad7fe7","line":79,"in_reply_to":"bae84128_adec91bb","updated":"2016-02-26 14:46:24.000000000","message":"cool. :) Done. Thank you very much.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    return url, checksum, component"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"def get_fw_processor(url):"},{"line_number":98,"context_line":"    \"\"\"Gets the firmware processor object fine-tuned for the specified url"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    :param url: url for firmware file"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_f0d5c11b","line":97,"range":{"start_line":97,"start_character":4,"end_line":97,"end_character":20},"updated":"2016-02-26 14:46:24.000000000","message":"yuriyz, vdrok: Please have a look. I have changed the flow as suggested.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"38fd256f7c20dac906dff00cd616a0347cff988f","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    fw_processor \u003d FirmwareProcessor(parsed_url)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    url_scheme \u003d parsed_url.scheme"},{"line_number":109,"context_line":"    if url_scheme \u003d\u003d \u0027file\u0027:"},{"line_number":110,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":111,"context_line":"            _download_file_based_fw_to, fw_processor)"},{"line_number":112,"context_line":"    elif url_scheme in (\u0027http\u0027, \u0027https\u0027):"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_76e3b1a4","line":109,"updated":"2016-02-23 14:29:08.000000000","message":"Better to move this logic to FirmwareProcessor.__init__()","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    fw_processor \u003d FirmwareProcessor(parsed_url)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    url_scheme \u003d parsed_url.scheme"},{"line_number":109,"context_line":"    if url_scheme \u003d\u003d \u0027file\u0027:"},{"line_number":110,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":111,"context_line":"            _download_file_based_fw_to, fw_processor)"},{"line_number":112,"context_line":"    elif url_scheme in (\u0027http\u0027, \u0027https\u0027):"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_b5020bb2","line":109,"in_reply_to":"bae84128_2d14014b","updated":"2016-02-26 14:46:24.000000000","message":"Done","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"6bff64e8315e1612a38dd77a02ebed1a6f5de38f","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    fw_processor \u003d FirmwareProcessor(parsed_url)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    url_scheme \u003d parsed_url.scheme"},{"line_number":109,"context_line":"    if url_scheme \u003d\u003d \u0027file\u0027:"},{"line_number":110,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":111,"context_line":"            _download_file_based_fw_to, fw_processor)"},{"line_number":112,"context_line":"    elif url_scheme in (\u0027http\u0027, \u0027https\u0027):"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_2d14014b","line":109,"in_reply_to":"bae84128_76e3b1a4","updated":"2016-02-24 11:32:42.000000000","message":"++","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    fw_processor \u003d FirmwareProcessor(parsed_url)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    url_scheme \u003d parsed_url.scheme"},{"line_number":109,"context_line":"    if url_scheme \u003d\u003d \u0027file\u0027:"},{"line_number":110,"context_line":"        fw_processor._download_fw_to \u003d types.MethodType("},{"line_number":111,"context_line":"            _download_file_based_fw_to, fw_processor)"},{"line_number":112,"context_line":"    elif url_scheme in (\u0027http\u0027, \u0027https\u0027):"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_15113704","line":109,"in_reply_to":"bae84128_76e3b1a4","updated":"2016-02-26 14:46:24.000000000","message":"Done","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"6bff64e8315e1612a38dd77a02ebed1a6f5de38f","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    required to extend functionality for different firmware file types."},{"line_number":135,"context_line":"    \"\"\""},{"line_number":136,"context_line":"    def __init__(self, parsed_url):"},{"line_number":137,"context_line":"        self.parsed_url \u003d parsed_url"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def process_fw_on(self, node, expected_checksum):"},{"line_number":140,"context_line":"        \"\"\"Processes the firmware file from the url"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_18ecd928","line":137,"updated":"2016-02-24 11:32:42.000000000","message":"Might be worth mentioning that it is structure returned by urlparse.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    required to extend functionality for different firmware file types."},{"line_number":135,"context_line":"    \"\"\""},{"line_number":136,"context_line":"    def __init__(self, parsed_url):"},{"line_number":137,"context_line":"        self.parsed_url \u003d parsed_url"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def process_fw_on(self, node, expected_checksum):"},{"line_number":140,"context_line":"        \"\"\"Processes the firmware file from the url"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_5070ed71","line":137,"in_reply_to":"bae84128_18ecd928","updated":"2016-02-26 14:46:24.000000000","message":"Have changed the logic now. Also mentioned this.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"38fd256f7c20dac906dff00cd616a0347cff988f","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                node, target_file))"},{"line_number":175,"context_line":"        except (exception.SwiftOperationError, exception.ImageDownloadFailed,"},{"line_number":176,"context_line":"                exception.IloOperationError, exception.ImageUploadFailed,"},{"line_number":177,"context_line":"                exception.ImageRefValidationFailed, Exception):"},{"line_number":178,"context_line":"            # delete the target file along with temp dir and"},{"line_number":179,"context_line":"            # re-raise the exception"},{"line_number":180,"context_line":"            shutil.rmtree(temp_dir, ignore_errors\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_ccd310d4","line":177,"updated":"2016-02-23 14:29:08.000000000","message":"If base Exception is here all others are not needed.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                node, target_file))"},{"line_number":175,"context_line":"        except (exception.SwiftOperationError, exception.ImageDownloadFailed,"},{"line_number":176,"context_line":"                exception.IloOperationError, exception.ImageUploadFailed,"},{"line_number":177,"context_line":"                exception.ImageRefValidationFailed, Exception):"},{"line_number":178,"context_line":"            # delete the target file along with temp dir and"},{"line_number":179,"context_line":"            # re-raise the exception"},{"line_number":180,"context_line":"            shutil.rmtree(temp_dir, ignore_errors\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_9680ae8c","line":177,"in_reply_to":"bae84128_ccd310d4","updated":"2016-02-26 14:46:24.000000000","message":"have made it to::\n\n  try:\n    ...\n  except (exception.IronicException, Exception):\n    ...\n    raise","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"38fd256f7c20dac906dff00cd616a0347cff988f","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            # delete the target file along with temp dir and"},{"line_number":179,"context_line":"            # re-raise the exception"},{"line_number":180,"context_line":"            shutil.rmtree(temp_dir, ignore_errors\u003dTrue)"},{"line_number":181,"context_line":"            raise"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        # Note(deray): In case of raw (no need for extraction) firmware files,"},{"line_number":184,"context_line":"        # the same firmware file is returned from the extract method."}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_0c8858c4","line":181,"updated":"2016-02-23 14:29:08.000000000","message":"Please use excutils.save_and_reraise_exception() instead (read it docstring for detail).","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            # delete the target file along with temp dir and"},{"line_number":179,"context_line":"            # re-raise the exception"},{"line_number":180,"context_line":"            shutil.rmtree(temp_dir, ignore_errors\u003dTrue)"},{"line_number":181,"context_line":"            raise"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"        # Note(deray): In case of raw (no need for extraction) firmware files,"},{"line_number":184,"context_line":"        # the same firmware file is returned from the extract method."}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_5c6be7b6","line":181,"in_reply_to":"bae84128_0c8858c4","updated":"2016-02-26 14:46:24.000000000","message":"Done. Thx.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"6bff64e8315e1612a38dd77a02ebed1a6f5de38f","unresolved":false,"context_lines":[{"line_number":205,"context_line":"    \"\"\""},{"line_number":206,"context_line":"    src_file \u003d self.parsed_url.path"},{"line_number":207,"context_line":"    with open(target_file, \u0027wb\u0027) as fd:"},{"line_number":208,"context_line":"        LOG.debug(\"Downloading firmware file %(src_file)s to: \""},{"line_number":209,"context_line":"                  \"%(target_file)s ...\","},{"line_number":210,"context_line":"                  {\u0027src_file\u0027: src_file, \u0027target_file\u0027: target_file})"},{"line_number":211,"context_line":"        image_service.FileImageService().download(src_file, fd)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_1877b9a0","line":208,"updated":"2016-02-24 11:32:42.000000000","message":"I\u0027d rather move this logging out of with block.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":205,"context_line":"    \"\"\""},{"line_number":206,"context_line":"    src_file \u003d self.parsed_url.path"},{"line_number":207,"context_line":"    with open(target_file, \u0027wb\u0027) as fd:"},{"line_number":208,"context_line":"        LOG.debug(\"Downloading firmware file %(src_file)s to: \""},{"line_number":209,"context_line":"                  \"%(target_file)s ...\","},{"line_number":210,"context_line":"                  {\u0027src_file\u0027: src_file, \u0027target_file\u0027: target_file})"},{"line_number":211,"context_line":"        image_service.FileImageService().download(src_file, fd)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_b60a12d0","line":208,"in_reply_to":"bae84128_1877b9a0","updated":"2016-02-26 14:46:24.000000000","message":"Done","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"6bff64e8315e1612a38dd77a02ebed1a6f5de38f","unresolved":false,"context_lines":[{"line_number":223,"context_line":"    \"\"\""},{"line_number":224,"context_line":"    src_file \u003d self.parsed_url.geturl()"},{"line_number":225,"context_line":"    with open(target_file, \u0027wb\u0027) as fd:"},{"line_number":226,"context_line":"        LOG.debug(\"Downloading firmware file %(src_file)s to: \""},{"line_number":227,"context_line":"                  \"%(target_file)s ...\","},{"line_number":228,"context_line":"                  {\u0027src_file\u0027: src_file, \u0027target_file\u0027: target_file})"},{"line_number":229,"context_line":"        image_service.HttpImageService().download(src_file, fd)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_7866c5ed","line":226,"updated":"2016-02-24 11:32:42.000000000","message":"ditto","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":223,"context_line":"    \"\"\""},{"line_number":224,"context_line":"    src_file \u003d self.parsed_url.geturl()"},{"line_number":225,"context_line":"    with open(target_file, \u0027wb\u0027) as fd:"},{"line_number":226,"context_line":"        LOG.debug(\"Downloading firmware file %(src_file)s to: \""},{"line_number":227,"context_line":"                  \"%(target_file)s ...\","},{"line_number":228,"context_line":"                  {\u0027src_file\u0027: src_file, \u0027target_file\u0027: target_file})"},{"line_number":229,"context_line":"        image_service.HttpImageService().download(src_file, fd)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_160e5ee4","line":226,"in_reply_to":"bae84128_7866c5ed","updated":"2016-02-26 14:46:24.000000000","message":"Done","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"6bff64e8315e1612a38dd77a02ebed1a6f5de38f","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                    fw_image_location, fw_image_filename)"},{"line_number":308,"context_line":"        finally:"},{"line_number":309,"context_line":"            if is_extracted:"},{"line_number":310,"context_line":"                # remove the file `fw_image_location` on successful uploading"},{"line_number":311,"context_line":"                ilo_common.remove_single_or_list_of_files(fw_image_location)"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"        is_different_file \u003d True"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_182fb93f","line":310,"updated":"2016-02-24 11:32:42.000000000","message":"It will be removed in case of unsuccessful upload too.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                    fw_image_location, fw_image_filename)"},{"line_number":308,"context_line":"        finally:"},{"line_number":309,"context_line":"            if is_extracted:"},{"line_number":310,"context_line":"                # remove the file `fw_image_location` on successful uploading"},{"line_number":311,"context_line":"                ilo_common.remove_single_or_list_of_files(fw_image_location)"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"        is_different_file \u003d True"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_9c48cfcd","line":310,"in_reply_to":"bae84128_182fb93f","updated":"2016-02-26 14:46:24.000000000","message":"Yes. Thx for pointing this out. The intention is to also remove that (be it successful or failure to upload) and only if is_extracted is set to True. Will change the comment.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"bf113c53a05164aa4d35e83deb2528e953868efb","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                     \"\u0027ilo\u0027 is the only supported firmware update mode.\")"},{"line_number":72,"context_line":"                   % {\u0027mode\u0027: firmware_update_mode})"},{"line_number":73,"context_line":"            LOG.error(msg)"},{"line_number":74,"context_line":"            show_firmware_update_args_help_link()"},{"line_number":75,"context_line":"            raise exception.InvalidParameterValue(msg)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        if not firmware_images:"}],"source_content_type":"text/x-python","patch_set":19,"id":"7af24918_40411c0b","line":74,"updated":"2016-03-01 15:41:35.000000000","message":"This function not needed at all IMO, log is not documentation.","commit_id":"5db8757ab4b983960450f027e81f70e75635d679"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"59cc3e2afa22cc87ef44510d3e486d6483906af7","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                     \"\u0027ilo\u0027 is the only supported firmware update mode.\")"},{"line_number":72,"context_line":"                   % {\u0027mode\u0027: firmware_update_mode})"},{"line_number":73,"context_line":"            LOG.error(msg)"},{"line_number":74,"context_line":"            show_firmware_update_args_help_link()"},{"line_number":75,"context_line":"            raise exception.InvalidParameterValue(msg)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        if not firmware_images:"}],"source_content_type":"text/x-python","patch_set":19,"id":"7af24918_78f2d3d3","line":74,"in_reply_to":"7af24918_40411c0b","updated":"2016-03-02 13:32:41.000000000","message":"I had added that as part of addressing this comment: https://review.openstack.org/#/c/211019/16/ironic/drivers/modules/ilo/management.py@350\n\nRemoved now.","commit_id":"5db8757ab4b983960450f027e81f70e75635d679"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"bf113c53a05164aa4d35e83deb2528e953868efb","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        if not firmware_images:"},{"line_number":78,"context_line":"            msg \u003d _(\"Firmware images cannot be an empty list or None. \")"},{"line_number":79,"context_line":"            LOG.error(msg)"},{"line_number":80,"context_line":"            show_firmware_update_args_help_link()"},{"line_number":81,"context_line":"            raise exception.InvalidParameterValue(msg)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        return func(self, task, **kwargs)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7af24918_005ef4e8","line":80,"updated":"2016-03-01 15:41:35.000000000","message":"Ditto.","commit_id":"5db8757ab4b983960450f027e81f70e75635d679"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"59cc3e2afa22cc87ef44510d3e486d6483906af7","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        if not firmware_images:"},{"line_number":78,"context_line":"            msg \u003d _(\"Firmware images cannot be an empty list or None. \")"},{"line_number":79,"context_line":"            LOG.error(msg)"},{"line_number":80,"context_line":"            show_firmware_update_args_help_link()"},{"line_number":81,"context_line":"            raise exception.InvalidParameterValue(msg)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        return func(self, task, **kwargs)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7af24918_38cfab80","line":80,"in_reply_to":"7af24918_005ef4e8","updated":"2016-03-02 13:32:41.000000000","message":"Done","commit_id":"5db8757ab4b983960450f027e81f70e75635d679"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"bf113c53a05164aa4d35e83deb2528e953868efb","unresolved":false,"context_lines":[{"line_number":108,"context_line":"               {\u0027image_info\u0027: image_info,"},{"line_number":109,"context_line":"                \u0027missing\u0027: \", \".join(missing_fields)})"},{"line_number":110,"context_line":"        LOG.error(msg)"},{"line_number":111,"context_line":"        show_firmware_update_args_help_link()"},{"line_number":112,"context_line":"        raise exception.MissingParameterValue(msg)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    component \u003d image_info[\u0027component\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"7af24918_20e21004","line":111,"updated":"2016-03-01 15:41:35.000000000","message":"ditto","commit_id":"5db8757ab4b983960450f027e81f70e75635d679"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"59cc3e2afa22cc87ef44510d3e486d6483906af7","unresolved":false,"context_lines":[{"line_number":108,"context_line":"               {\u0027image_info\u0027: image_info,"},{"line_number":109,"context_line":"                \u0027missing\u0027: \", \".join(missing_fields)})"},{"line_number":110,"context_line":"        LOG.error(msg)"},{"line_number":111,"context_line":"        show_firmware_update_args_help_link()"},{"line_number":112,"context_line":"        raise exception.MissingParameterValue(msg)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    component \u003d image_info[\u0027component\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"7af24918_58c4375e","line":111,"in_reply_to":"7af24918_20e21004","updated":"2016-03-02 13:32:41.000000000","message":"Done","commit_id":"5db8757ab4b983960450f027e81f70e75635d679"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"bf113c53a05164aa4d35e83deb2528e953868efb","unresolved":false,"context_lines":[{"line_number":120,"context_line":"               {\u0027component\u0027: component, \u0027supported_components\u0027: ("},{"line_number":121,"context_line":"                \", \".join(SUPPORTED_FIRMWARE_UPDATE_COMPONENTS))})"},{"line_number":122,"context_line":"        LOG.error(msg)"},{"line_number":123,"context_line":"        show_firmware_update_args_help_link()"},{"line_number":124,"context_line":"        raise exception.InvalidParameterValue(msg)"},{"line_number":125,"context_line":"    LOG.debug(\"Validating firmware image info: %s ... done\", image_info)"},{"line_number":126,"context_line":"    return image_info[\u0027url\u0027], image_info[\u0027checksum\u0027], component"}],"source_content_type":"text/x-python","patch_set":19,"id":"7af24918_a0ee20ea","line":123,"updated":"2016-03-01 15:41:35.000000000","message":"ditto","commit_id":"5db8757ab4b983960450f027e81f70e75635d679"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"59cc3e2afa22cc87ef44510d3e486d6483906af7","unresolved":false,"context_lines":[{"line_number":120,"context_line":"               {\u0027component\u0027: component, \u0027supported_components\u0027: ("},{"line_number":121,"context_line":"                \", \".join(SUPPORTED_FIRMWARE_UPDATE_COMPONENTS))})"},{"line_number":122,"context_line":"        LOG.error(msg)"},{"line_number":123,"context_line":"        show_firmware_update_args_help_link()"},{"line_number":124,"context_line":"        raise exception.InvalidParameterValue(msg)"},{"line_number":125,"context_line":"    LOG.debug(\"Validating firmware image info: %s ... done\", image_info)"},{"line_number":126,"context_line":"    return image_info[\u0027url\u0027], image_info[\u0027checksum\u0027], component"}],"source_content_type":"text/x-python","patch_set":19,"id":"7af24918_b8a1fbab","line":123,"in_reply_to":"7af24918_a0ee20ea","updated":"2016-03-02 13:32:41.000000000","message":"Done","commit_id":"5db8757ab4b983960450f027e81f70e75635d679"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"bf113c53a05164aa4d35e83deb2528e953868efb","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            self._download_fw_to \u003d types.MethodType("},{"line_number":159,"context_line":"                _download_swift_based_fw_to, self)"},{"line_number":160,"context_line":"        else:"},{"line_number":161,"context_line":"            show_firmware_update_args_help_link()"},{"line_number":162,"context_line":"            raise exception.InvalidParameterValue("},{"line_number":163,"context_line":"                _(\u0027This method does not support URL scheme %(url_scheme)s. \u0027"},{"line_number":164,"context_line":"                  \u0027Invalid URL %(url)s. The supported firmware URL schemes \u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"7af24918_008f1424","line":161,"updated":"2016-03-01 15:41:35.000000000","message":"ditto","commit_id":"5db8757ab4b983960450f027e81f70e75635d679"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"59cc3e2afa22cc87ef44510d3e486d6483906af7","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            self._download_fw_to \u003d types.MethodType("},{"line_number":159,"context_line":"                _download_swift_based_fw_to, self)"},{"line_number":160,"context_line":"        else:"},{"line_number":161,"context_line":"            show_firmware_update_args_help_link()"},{"line_number":162,"context_line":"            raise exception.InvalidParameterValue("},{"line_number":163,"context_line":"                _(\u0027This method does not support URL scheme %(url_scheme)s. \u0027"},{"line_number":164,"context_line":"                  \u0027Invalid URL %(url)s. The supported firmware URL schemes \u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"7af24918_d8ae8797","line":161,"in_reply_to":"7af24918_008f1424","updated":"2016-03-02 13:32:41.000000000","message":"Done","commit_id":"5db8757ab4b983960450f027e81f70e75635d679"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"f93be7c85c2eb757aafa6fd4304a74e47abafcaf","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Hewlett-Packard Development Company, L.P."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_6310065a","line":1,"range":{"start_line":1,"start_character":57,"end_line":1,"end_character":58},"updated":"2016-03-03 14:36:03.000000000","message":"Is this the correct copyright?","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e0c7adfa6399294f401c9e2196557be7024294ec","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Hewlett-Packard Development Company, L.P."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_b366aeb8","line":1,"range":{"start_line":1,"start_character":57,"end_line":1,"end_character":58},"in_reply_to":"7af24918_6310065a","updated":"2016-03-04 11:51:51.000000000","message":"Fixed it.","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"f93be7c85c2eb757aafa6fd4304a74e47abafcaf","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        #    3. Extract the raw firmware file from its compact format"},{"line_number":190,"context_line":"        #"},{"line_number":191,"context_line":"        try:"},{"line_number":192,"context_line":"            LOG.debug(\"Downloading firmware file %(src_file)s to: \""},{"line_number":193,"context_line":"                      \"%(target_file)s ...\","},{"line_number":194,"context_line":"                      {\u0027src_file\u0027: self.parsed_url.geturl(),"},{"line_number":195,"context_line":"                       \u0027target_file\u0027: target_file})"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_63f12601","line":192,"range":{"start_line":192,"start_character":22,"end_line":192,"end_character":23},"updated":"2016-03-03 14:36:03.000000000","message":"Nit: Same as the nit below.","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e0c7adfa6399294f401c9e2196557be7024294ec","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        #    3. Extract the raw firmware file from its compact format"},{"line_number":190,"context_line":"        #"},{"line_number":191,"context_line":"        try:"},{"line_number":192,"context_line":"            LOG.debug(\"Downloading firmware file %(src_file)s to: \""},{"line_number":193,"context_line":"                      \"%(target_file)s ...\","},{"line_number":194,"context_line":"                      {\u0027src_file\u0027: self.parsed_url.geturl(),"},{"line_number":195,"context_line":"                       \u0027target_file\u0027: target_file})"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_b3718e0e","line":192,"range":{"start_line":192,"start_character":22,"end_line":192,"end_character":23},"in_reply_to":"7af24918_63f12601","updated":"2016-03-04 11:51:51.000000000","message":"Done","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"f93be7c85c2eb757aafa6fd4304a74e47abafcaf","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                      {\u0027src_file\u0027: self.parsed_url.geturl(),"},{"line_number":195,"context_line":"                       \u0027target_file\u0027: target_file})"},{"line_number":196,"context_line":"            self._download_fw_to(target_file)"},{"line_number":197,"context_line":"            LOG.debug(\"Verifying checksum of file: %s ...\", target_file)"},{"line_number":198,"context_line":"            ilo_common.verify_image_checksum(target_file, expected_checksum)"},{"line_number":199,"context_line":"            # Extracting raw firmware file from target_file ..."},{"line_number":200,"context_line":"            fw_image_location_obj, is_different_file \u003d (_extract_fw_from_file("}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_c3b47a36","line":197,"range":{"start_line":197,"start_character":21,"end_line":197,"end_character":23},"updated":"2016-03-03 14:36:03.000000000","message":"Nit: Might be good to indicate what process is checking the checksum of the file.","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e0c7adfa6399294f401c9e2196557be7024294ec","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                      {\u0027src_file\u0027: self.parsed_url.geturl(),"},{"line_number":195,"context_line":"                       \u0027target_file\u0027: target_file})"},{"line_number":196,"context_line":"            self._download_fw_to(target_file)"},{"line_number":197,"context_line":"            LOG.debug(\"Verifying checksum of file: %s ...\", target_file)"},{"line_number":198,"context_line":"            ilo_common.verify_image_checksum(target_file, expected_checksum)"},{"line_number":199,"context_line":"            # Extracting raw firmware file from target_file ..."},{"line_number":200,"context_line":"            fw_image_location_obj, is_different_file \u003d (_extract_fw_from_file("}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_13632243","line":197,"range":{"start_line":197,"start_character":21,"end_line":197,"end_character":23},"in_reply_to":"7af24918_c3b47a36","updated":"2016-03-04 11:51:51.000000000","message":"Done","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"734f72622d2e752503d32f1da5714489767d6ff0","unresolved":false,"context_lines":[{"line_number":269,"context_line":"    # set the parsed_url attribute to the newly created tempurl from swift and"},{"line_number":270,"context_line":"    # delegate the dowloading job to the http_based downloader"},{"line_number":271,"context_line":"    self.parsed_url \u003d urlparse.urlparse(tempurl)"},{"line_number":272,"context_line":"    return _download_http_based_fw_to(self, target_file)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"def _extract_fw_from_file(node, target_file):"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_3a98c31b","line":272,"updated":"2016-03-03 23:42:18.000000000","message":"No need for return here.","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e0c7adfa6399294f401c9e2196557be7024294ec","unresolved":false,"context_lines":[{"line_number":269,"context_line":"    # set the parsed_url attribute to the newly created tempurl from swift and"},{"line_number":270,"context_line":"    # delegate the dowloading job to the http_based downloader"},{"line_number":271,"context_line":"    self.parsed_url \u003d urlparse.urlparse(tempurl)"},{"line_number":272,"context_line":"    return _download_http_based_fw_to(self, target_file)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"def _extract_fw_from_file(node, target_file):"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_d3e41aad","line":272,"in_reply_to":"7af24918_3a98c31b","updated":"2016-03-04 11:51:51.000000000","message":"My bad. Done.","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"f93be7c85c2eb757aafa6fd4304a74e47abafcaf","unresolved":false,"context_lines":[{"line_number":340,"context_line":"                # takes care of handling the deletion of the file."},{"line_number":341,"context_line":"                ilo_common.remove_single_or_list_of_files(fw_image_location)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        LOG.debug(\"Hosting firmware file: %(fw_image_location)s ... done. \""},{"line_number":344,"context_line":"                  \"Hosted firmware file: %(fw_image_uploaded_url)s\","},{"line_number":345,"context_line":"                  {\u0027fw_image_location\u0027: fw_image_location,"},{"line_number":346,"context_line":"                   \u0027fw_image_uploaded_url\u0027: fw_image_uploaded_url})"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_c3ec7af5","line":343,"range":{"start_line":343,"start_character":18,"end_line":343,"end_character":19},"updated":"2016-03-03 14:36:03.000000000","message":"Nit: Along the same line as the prior nits, it might just be useful","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e0c7adfa6399294f401c9e2196557be7024294ec","unresolved":false,"context_lines":[{"line_number":340,"context_line":"                # takes care of handling the deletion of the file."},{"line_number":341,"context_line":"                ilo_common.remove_single_or_list_of_files(fw_image_location)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        LOG.debug(\"Hosting firmware file: %(fw_image_location)s ... done. \""},{"line_number":344,"context_line":"                  \"Hosted firmware file: %(fw_image_uploaded_url)s\","},{"line_number":345,"context_line":"                  {\u0027fw_image_location\u0027: fw_image_location,"},{"line_number":346,"context_line":"                   \u0027fw_image_uploaded_url\u0027: fw_image_uploaded_url})"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_d3809a8d","line":343,"range":{"start_line":343,"start_character":18,"end_line":343,"end_character":19},"in_reply_to":"7af24918_c3ec7af5","updated":"2016-03-04 11:51:51.000000000","message":"Done","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"f93be7c85c2eb757aafa6fd4304a74e47abafcaf","unresolved":false,"context_lines":[{"line_number":402,"context_line":"    except exception.NodeCleaningFailure:"},{"line_number":403,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":404,"context_line":"            LOG.error(_LE(\"Firmware update ... failed\"))"},{"line_number":405,"context_line":"    finally:"},{"line_number":406,"context_line":"        for location_obj, c in fw_image_location_objs_n_component:"},{"line_number":407,"context_line":"            location_obj.remove()"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_43a22a4c","line":405,"updated":"2016-03-03 14:36:03.000000000","message":"Nit: I feel like I would want to know what node failed when I see this log entry, however looking at the information available in the method, I realize that is not really possible.  Maybe move the logging of such a failure elsewhere?","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"b8c0e0140bafd8989f162212db83a8ff8ab9ba37","unresolved":false,"context_lines":[{"line_number":402,"context_line":"    except exception.NodeCleaningFailure:"},{"line_number":403,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":404,"context_line":"            LOG.error(_LE(\"Firmware update ... failed\"))"},{"line_number":405,"context_line":"    finally:"},{"line_number":406,"context_line":"        for location_obj, c in fw_image_location_objs_n_component:"},{"line_number":407,"context_line":"            location_obj.remove()"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_8940d335","line":405,"in_reply_to":"7af24918_43a22a4c","updated":"2016-03-03 14:49:19.000000000","message":"+1","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e0c7adfa6399294f401c9e2196557be7024294ec","unresolved":false,"context_lines":[{"line_number":402,"context_line":"    except exception.NodeCleaningFailure:"},{"line_number":403,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":404,"context_line":"            LOG.error(_LE(\"Firmware update ... failed\"))"},{"line_number":405,"context_line":"    finally:"},{"line_number":406,"context_line":"        for location_obj, c in fw_image_location_objs_n_component:"},{"line_number":407,"context_line":"            location_obj.remove()"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_5e98116a","line":405,"in_reply_to":"7af24918_43a22a4c","updated":"2016-03-04 11:51:51.000000000","message":"Plan to relocate this logic in management again after vdrok\u0027s latest comment: https://review.openstack.org/#/c/211019/20/ironic/drivers/modules/ilo/management.py@380","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e0c7adfa6399294f401c9e2196557be7024294ec","unresolved":false,"context_lines":[{"line_number":402,"context_line":"    except exception.NodeCleaningFailure:"},{"line_number":403,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":404,"context_line":"            LOG.error(_LE(\"Firmware update ... failed\"))"},{"line_number":405,"context_line":"    finally:"},{"line_number":406,"context_line":"        for location_obj, c in fw_image_location_objs_n_component:"},{"line_number":407,"context_line":"            location_obj.remove()"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_febf5dcd","line":405,"in_reply_to":"7af24918_8940d335","updated":"2016-03-04 11:51:51.000000000","message":"ditto","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        firmware_images \u003d kwargs.get(\u0027firmware_images\u0027)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        if firmware_update_mode !\u003d \u0027ilo\u0027:"},{"line_number":67,"context_line":"            msg \u003d (_(\"Invalid firmware update mode: %(mode)s. \""},{"line_number":68,"context_line":"                     \"\u0027ilo\u0027 is the only supported firmware update mode.\")"},{"line_number":69,"context_line":"                   % {\u0027mode\u0027: firmware_update_mode})"},{"line_number":70,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_dbe268d4","line":67,"range":{"start_line":67,"start_character":22,"end_line":67,"end_character":63},"updated":"2016-03-04 14:52:15.000000000","message":"add node uuid in the error message.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        firmware_images \u003d kwargs.get(\u0027firmware_images\u0027)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        if firmware_update_mode !\u003d \u0027ilo\u0027:"},{"line_number":67,"context_line":"            msg \u003d (_(\"Invalid firmware update mode: %(mode)s. \""},{"line_number":68,"context_line":"                     \"\u0027ilo\u0027 is the only supported firmware update mode.\")"},{"line_number":69,"context_line":"                   % {\u0027mode\u0027: firmware_update_mode})"},{"line_number":70,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_911bf072","line":67,"range":{"start_line":67,"start_character":22,"end_line":67,"end_character":63},"in_reply_to":"7af24918_dbe268d4","updated":"2016-03-10 09:30:47.000000000","message":"Done","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                 \"required %(missing)s field/s.\") %"},{"line_number":103,"context_line":"               {\u0027image_info\u0027: image_info,"},{"line_number":104,"context_line":"                \u0027missing\u0027: \", \".join(missing_fields)})"},{"line_number":105,"context_line":"        LOG.error(msg)"},{"line_number":106,"context_line":"        raise exception.MissingParameterValue(msg)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    component \u003d image_info[\u0027component\u0027]"}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_2cdb4d7d","line":105,"range":{"start_line":105,"start_character":8,"end_line":105,"end_character":22},"updated":"2016-03-04 14:52:15.000000000","message":"This is not mocked in any of its testcases.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                 \"required %(missing)s field/s.\") %"},{"line_number":103,"context_line":"               {\u0027image_info\u0027: image_info,"},{"line_number":104,"context_line":"                \u0027missing\u0027: \", \".join(missing_fields)})"},{"line_number":105,"context_line":"        LOG.error(msg)"},{"line_number":106,"context_line":"        raise exception.MissingParameterValue(msg)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    component \u003d image_info[\u0027component\u0027]"}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_cb8e5d2d","line":105,"range":{"start_line":105,"start_character":8,"end_line":105,"end_character":22},"in_reply_to":"7af24918_2cdb4d7d","updated":"2016-03-10 09:30:47.000000000","message":"No problem. In the test environment the log messages will be outputted to fixture lib\u0027s StringStream handler. Please refer: https://github.com/openstack/ironic/blob/master/ironic/tests/base.py#L98","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                 \"%(supported_components)s\") %"},{"line_number":114,"context_line":"               {\u0027component\u0027: component, \u0027supported_components\u0027: ("},{"line_number":115,"context_line":"                \", \".join(SUPPORTED_FIRMWARE_UPDATE_COMPONENTS))})"},{"line_number":116,"context_line":"        LOG.error(msg)"},{"line_number":117,"context_line":"        raise exception.InvalidParameterValue(msg)"},{"line_number":118,"context_line":"    LOG.debug(\"Validating firmware image info: %s ... done\", image_info)"},{"line_number":119,"context_line":"    return image_info[\u0027url\u0027], image_info[\u0027checksum\u0027], component"}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_6cb8b511","line":116,"range":{"start_line":116,"start_character":8,"end_line":116,"end_character":22},"updated":"2016-03-04 14:52:15.000000000","message":"This is not mocked in any of its testcases.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                 \"%(supported_components)s\") %"},{"line_number":114,"context_line":"               {\u0027component\u0027: component, \u0027supported_components\u0027: ("},{"line_number":115,"context_line":"                \", \".join(SUPPORTED_FIRMWARE_UPDATE_COMPONENTS))})"},{"line_number":116,"context_line":"        LOG.error(msg)"},{"line_number":117,"context_line":"        raise exception.InvalidParameterValue(msg)"},{"line_number":118,"context_line":"    LOG.debug(\"Validating firmware image info: %s ... done\", image_info)"},{"line_number":119,"context_line":"    return image_info[\u0027url\u0027], image_info[\u0027checksum\u0027], component"}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_4ba24d9a","line":116,"range":{"start_line":116,"start_character":8,"end_line":116,"end_character":22},"in_reply_to":"7af24918_6cb8b511","updated":"2016-03-10 09:30:47.000000000","message":"ditto. as above.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"1e90b84576438657cc9378dfc239db756bae3979","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Hewlett Packard Enterprise Development Company, L.P."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":22,"id":"7af24918_55df39d5","line":1,"range":{"start_line":1,"start_character":44,"end_line":1,"end_character":55},"updated":"2016-03-04 15:49:10.000000000","message":"The approved text has no comma nor periods.  \"Hewlett Packard Enterprise Development Company LP\"","commit_id":"da972342c6dbde98da8a9f27375349678e73fd7e"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f0cd1bbf56ac5903520ee0359aca85adb6093257","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Hewlett Packard Enterprise Development Company, L.P."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":22,"id":"5aef4532_995c937e","line":1,"range":{"start_line":1,"start_character":44,"end_line":1,"end_character":55},"in_reply_to":"7af24918_55df39d5","updated":"2016-03-10 09:32:33.000000000","message":"Done","commit_id":"da972342c6dbde98da8a9f27375349678e73fd7e"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"3638d4b32b53ad7e4485c280eda72a723c397b01","unresolved":false,"context_lines":[{"line_number":310,"context_line":"                                                  fw_image_filename)"},{"line_number":311,"context_line":"    if to_upload:"},{"line_number":312,"context_line":"        is_different_file \u003d True"},{"line_number":313,"context_line":"        LOG.debug(\"For firmware update, hosting firmware file: %s ... \","},{"line_number":314,"context_line":"                  fw_image_location)"},{"line_number":315,"context_line":"        # fw_image_filename \u003d os.path.basename(fw_image_location)"},{"line_number":316,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":22,"id":"7af24918_12349c48","line":313,"range":{"start_line":313,"start_character":8,"end_line":313,"end_character":17},"updated":"2016-03-04 18:55:08.000000000","message":"easily addressed with a follow up patch, but would like the node_uuid here so this can be linked to a node.","commit_id":"da972342c6dbde98da8a9f27375349678e73fd7e"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f0cd1bbf56ac5903520ee0359aca85adb6093257","unresolved":false,"context_lines":[{"line_number":310,"context_line":"                                                  fw_image_filename)"},{"line_number":311,"context_line":"    if to_upload:"},{"line_number":312,"context_line":"        is_different_file \u003d True"},{"line_number":313,"context_line":"        LOG.debug(\"For firmware update, hosting firmware file: %s ... \","},{"line_number":314,"context_line":"                  fw_image_location)"},{"line_number":315,"context_line":"        # fw_image_filename \u003d os.path.basename(fw_image_location)"},{"line_number":316,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":22,"id":"5aef4532_b41fd659","line":313,"range":{"start_line":313,"start_character":8,"end_line":313,"end_character":17},"in_reply_to":"7af24918_12349c48","updated":"2016-03-10 09:32:33.000000000","message":"Done","commit_id":"da972342c6dbde98da8a9f27375349678e73fd7e"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"3638d4b32b53ad7e4485c280eda72a723c397b01","unresolved":false,"context_lines":[{"line_number":339,"context_line":"                # takes care of handling the deletion of the file."},{"line_number":340,"context_line":"                ilo_common.remove_single_or_list_of_files(fw_image_location)"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        LOG.debug(\"For firmware update, hosting firmware file: \""},{"line_number":343,"context_line":"                  \"%(fw_image_location)s ... done. Hosted firmware file: \""},{"line_number":344,"context_line":"                  \"%(fw_image_uploaded_url)s\","},{"line_number":345,"context_line":"                  {\u0027fw_image_location\u0027: fw_image_location,"}],"source_content_type":"text/x-python","patch_set":22,"id":"7af24918_323b983a","line":342,"range":{"start_line":342,"start_character":8,"end_line":342,"end_character":17},"updated":"2016-03-04 18:55:08.000000000","message":"same here","commit_id":"da972342c6dbde98da8a9f27375349678e73fd7e"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f0cd1bbf56ac5903520ee0359aca85adb6093257","unresolved":false,"context_lines":[{"line_number":339,"context_line":"                # takes care of handling the deletion of the file."},{"line_number":340,"context_line":"                ilo_common.remove_single_or_list_of_files(fw_image_location)"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        LOG.debug(\"For firmware update, hosting firmware file: \""},{"line_number":343,"context_line":"                  \"%(fw_image_location)s ... done. Hosted firmware file: \""},{"line_number":344,"context_line":"                  \"%(fw_image_uploaded_url)s\","},{"line_number":345,"context_line":"                  {\u0027fw_image_location\u0027: fw_image_location,"}],"source_content_type":"text/x-python","patch_set":22,"id":"5aef4532_f43ddec4","line":342,"range":{"start_line":342,"start_character":8,"end_line":342,"end_character":17},"in_reply_to":"7af24918_323b983a","updated":"2016-03-10 09:32:33.000000000","message":"Done","commit_id":"da972342c6dbde98da8a9f27375349678e73fd7e"}],"ironic/drivers/modules/ilo/management.py":[{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":306,"context_line":"    @base.clean_step(priority\u003d0, abortable\u003dFalse, argsinfo\u003d{"},{"line_number":307,"context_line":"        \u0027firmware_update_method\u0027: {"},{"line_number":308,"context_line":"            \u0027description\u0027: ("},{"line_number":309,"context_line":"                \u0027This argument indicates the mechanism of OOB \u0027"},{"line_number":310,"context_line":"                \u0027firmware update procedure. The 2 possible values are \u0027"},{"line_number":311,"context_line":"                \u0027`ilo` and `hpsum` (only `ilo` is currently supported.)\u0027"},{"line_number":312,"context_line":"            ),"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_ef54c4fe","line":309,"range":{"start_line":309,"start_character":58,"end_line":309,"end_character":61},"updated":"2015-12-21 06:56:47.000000000","message":"Expand acronym OOB","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":306,"context_line":"    @base.clean_step(priority\u003d0, abortable\u003dFalse, argsinfo\u003d{"},{"line_number":307,"context_line":"        \u0027firmware_update_method\u0027: {"},{"line_number":308,"context_line":"            \u0027description\u0027: ("},{"line_number":309,"context_line":"                \u0027This argument indicates the mechanism of OOB \u0027"},{"line_number":310,"context_line":"                \u0027firmware update procedure. The 2 possible values are \u0027"},{"line_number":311,"context_line":"                \u0027`ilo` and `hpsum` (only `ilo` is currently supported.)\u0027"},{"line_number":312,"context_line":"            ),"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_cb8e5527","line":309,"range":{"start_line":309,"start_character":58,"end_line":309,"end_character":61},"in_reply_to":"3a7e1126_ef54c4fe","updated":"2015-12-23 11:29:03.000000000","message":"Done","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":308,"context_line":"            \u0027description\u0027: ("},{"line_number":309,"context_line":"                \u0027This argument indicates the mechanism of OOB \u0027"},{"line_number":310,"context_line":"                \u0027firmware update procedure. The 2 possible values are \u0027"},{"line_number":311,"context_line":"                \u0027`ilo` and `hpsum` (only `ilo` is currently supported.)\u0027"},{"line_number":312,"context_line":"            ),"},{"line_number":313,"context_line":"            \u0027required\u0027: True"},{"line_number":314,"context_line":"        },"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_0f86f0da","line":311,"range":{"start_line":311,"start_character":28,"end_line":311,"end_character":33},"updated":"2015-12-21 06:56:47.000000000","message":"Why do you want to capture \u0027hpsum\u0027 here? It is not being supported currently.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":308,"context_line":"            \u0027description\u0027: ("},{"line_number":309,"context_line":"                \u0027This argument indicates the mechanism of OOB \u0027"},{"line_number":310,"context_line":"                \u0027firmware update procedure. The 2 possible values are \u0027"},{"line_number":311,"context_line":"                \u0027`ilo` and `hpsum` (only `ilo` is currently supported.)\u0027"},{"line_number":312,"context_line":"            ),"},{"line_number":313,"context_line":"            \u0027required\u0027: True"},{"line_number":314,"context_line":"        },"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_cbb5f5d0","line":311,"range":{"start_line":311,"start_character":28,"end_line":311,"end_character":33},"in_reply_to":"3a7e1126_0f86f0da","updated":"2015-12-23 11:29:03.000000000","message":"just wanted to keep this documented. and also added code here.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        },"},{"line_number":315,"context_line":"        \u0027firmware_urls\u0027: {"},{"line_number":316,"context_line":"            \u0027description\u0027: ("},{"line_number":317,"context_line":"                \u0027The ordered list of firmware urls to be updated. \u0027"},{"line_number":318,"context_line":"                \u0027`ilo` update method supports these type of firmware urls: \u0027"},{"line_number":319,"context_line":"                \u0027iLO, CPLD, Power PIC and ROM.\u0027"},{"line_number":320,"context_line":"            ),"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_4fd7184b","line":317,"range":{"start_line":317,"start_character":37,"end_line":317,"end_character":45},"updated":"2015-12-21 06:56:47.000000000","message":"Probably you mean \u0027The ordered list of URLs to the firmwares to be applied to the baremetal.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        },"},{"line_number":315,"context_line":"        \u0027firmware_urls\u0027: {"},{"line_number":316,"context_line":"            \u0027description\u0027: ("},{"line_number":317,"context_line":"                \u0027The ordered list of firmware urls to be updated. \u0027"},{"line_number":318,"context_line":"                \u0027`ilo` update method supports these type of firmware urls: \u0027"},{"line_number":319,"context_line":"                \u0027iLO, CPLD, Power PIC and ROM.\u0027"},{"line_number":320,"context_line":"            ),"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_4b6d8531","line":317,"range":{"start_line":317,"start_character":37,"end_line":317,"end_character":45},"in_reply_to":"3a7e1126_4fd7184b","updated":"2015-12-23 11:29:03.000000000","message":"Done","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        \u0027firmware_urls\u0027: {"},{"line_number":316,"context_line":"            \u0027description\u0027: ("},{"line_number":317,"context_line":"                \u0027The ordered list of firmware urls to be updated. \u0027"},{"line_number":318,"context_line":"                \u0027`ilo` update method supports these type of firmware urls: \u0027"},{"line_number":319,"context_line":"                \u0027iLO, CPLD, Power PIC and ROM.\u0027"},{"line_number":320,"context_line":"            ),"},{"line_number":321,"context_line":"            \u0027required\u0027: True"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_cfaea8e5","line":318,"range":{"start_line":318,"start_character":51,"end_line":318,"end_character":52},"updated":"2015-12-21 06:56:47.000000000","message":"I think these are ty pe of Firmwares patching supported by iLO and not type of URLs. You probably need to explain the kind of URLs supported here http/https/swift etc.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        \u0027firmware_urls\u0027: {"},{"line_number":316,"context_line":"            \u0027description\u0027: ("},{"line_number":317,"context_line":"                \u0027The ordered list of firmware urls to be updated. \u0027"},{"line_number":318,"context_line":"                \u0027`ilo` update method supports these type of firmware urls: \u0027"},{"line_number":319,"context_line":"                \u0027iLO, CPLD, Power PIC and ROM.\u0027"},{"line_number":320,"context_line":"            ),"},{"line_number":321,"context_line":"            \u0027required\u0027: True"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_2b825a53","line":318,"range":{"start_line":318,"start_character":51,"end_line":318,"end_character":52},"in_reply_to":"3a7e1126_cfaea8e5","updated":"2015-12-23 11:29:03.000000000","message":"Done","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        \"\"\"Updates the firmware."},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        :param task: a TaskManager object."},{"line_number":328,"context_line":"        :raises: InvalidParameterValue if update method is neither"},{"line_number":329,"context_line":"                 \u0027ilo\u0027 nor \u0027hpsum\u0027."},{"line_number":330,"context_line":"        \"\"\""},{"line_number":331,"context_line":"        firmware_update_method \u003d kwargs.get(\u0027firmware_update_method\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_0f291037","line":328,"range":{"start_line":328,"start_character":42,"end_line":328,"end_character":48},"updated":"2015-12-21 06:56:47.000000000","message":"s/update/ firmware_update_method","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        \"\"\"Updates the firmware."},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        :param task: a TaskManager object."},{"line_number":328,"context_line":"        :raises: InvalidParameterValue if update method is neither"},{"line_number":329,"context_line":"                 \u0027ilo\u0027 nor \u0027hpsum\u0027."},{"line_number":330,"context_line":"        \"\"\""},{"line_number":331,"context_line":"        firmware_update_method \u003d kwargs.get(\u0027firmware_update_method\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_eb7bf279","line":328,"range":{"start_line":328,"start_character":42,"end_line":328,"end_character":48},"in_reply_to":"3a7e1126_0f291037","updated":"2015-12-23 11:29:03.000000000","message":"Done","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"07767172a23e59adcb7a133f65f5dbfabed7ebc1","unresolved":false,"context_lines":[{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        if firmware_update_method not in (\u0027ilo\u0027, \u0027hpsum\u0027):"},{"line_number":335,"context_line":"            msg \u003d ("},{"line_number":336,"context_line":"                _(\"Invalid firmware update method - (method)s.\")"},{"line_number":337,"context_line":"                % {\u0027method\u0027: firmware_update_method}"},{"line_number":338,"context_line":"            )"},{"line_number":339,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_6b5ba155","line":336,"updated":"2015-12-22 15:13:15.000000000","message":"Should be %(method)s","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        if firmware_update_method not in (\u0027ilo\u0027, \u0027hpsum\u0027):"},{"line_number":335,"context_line":"            msg \u003d ("},{"line_number":336,"context_line":"                _(\"Invalid firmware update method - (method)s.\")"},{"line_number":337,"context_line":"                % {\u0027method\u0027: firmware_update_method}"},{"line_number":338,"context_line":"            )"},{"line_number":339,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_6b906296","line":336,"in_reply_to":"1a7b0d38_6b5ba155","updated":"2015-12-23 11:29:03.000000000","message":"ah.. missed it.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            )"},{"line_number":339,"context_line":"            LOG.error(msg)"},{"line_number":340,"context_line":"            raise exception.InvalidParameterValue(msg)"},{"line_number":341,"context_line":"        elif firmware_update_method !\u003d \u0027ilo\u0027:"},{"line_number":342,"context_line":"            LOG.warn("},{"line_number":343,"context_line":"                _(\"Firmware update method - (method)s is currently not \""},{"line_number":344,"context_line":"                  \"supported. Returning..\"),"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_2f62cc3e","line":341,"range":{"start_line":341,"start_character":13,"end_line":341,"end_character":35},"updated":"2015-12-21 06:56:47.000000000","message":"Having value of \u0027hpsum\u0027 should also be invalid value.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            )"},{"line_number":339,"context_line":"            LOG.error(msg)"},{"line_number":340,"context_line":"            raise exception.InvalidParameterValue(msg)"},{"line_number":341,"context_line":"        elif firmware_update_method !\u003d \u0027ilo\u0027:"},{"line_number":342,"context_line":"            LOG.warn("},{"line_number":343,"context_line":"                _(\"Firmware update method - (method)s is currently not \""},{"line_number":344,"context_line":"                  \"supported. Returning..\"),"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_6b9f0260","line":341,"range":{"start_line":341,"start_character":13,"end_line":341,"end_character":35},"in_reply_to":"3a7e1126_2f62cc3e","updated":"2015-12-23 11:29:03.000000000","message":"Done. instead of returning silently, raised an exception.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"85d707cab710aac21bdfa584f59a9d1fa16f1e89","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            LOG.error(msg)"},{"line_number":340,"context_line":"            raise exception.InvalidParameterValue(msg)"},{"line_number":341,"context_line":"        elif firmware_update_method !\u003d \u0027ilo\u0027:"},{"line_number":342,"context_line":"            LOG.warn("},{"line_number":343,"context_line":"                _(\"Firmware update method - (method)s is currently not \""},{"line_number":344,"context_line":"                  \"supported. Returning..\"),"},{"line_number":345,"context_line":"                {\u0027method\u0027: firmware_update_method})"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_47fd7faf","line":342,"range":{"start_line":342,"start_character":12,"end_line":342,"end_character":20},"updated":"2015-12-22 11:02:20.000000000","message":"Replace deprecated LOG.warn() with LOG.warning()","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            LOG.error(msg)"},{"line_number":340,"context_line":"            raise exception.InvalidParameterValue(msg)"},{"line_number":341,"context_line":"        elif firmware_update_method !\u003d \u0027ilo\u0027:"},{"line_number":342,"context_line":"            LOG.warn("},{"line_number":343,"context_line":"                _(\"Firmware update method - (method)s is currently not \""},{"line_number":344,"context_line":"                  \"supported. Returning..\"),"},{"line_number":345,"context_line":"                {\u0027method\u0027: firmware_update_method})"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_2b4b59b2","line":342,"range":{"start_line":342,"start_character":12,"end_line":342,"end_character":20},"in_reply_to":"3a7e1126_47fd7faf","updated":"2015-12-23 11:29:03.000000000","message":"Done","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            raise exception.InvalidParameterValue(msg)"},{"line_number":341,"context_line":"        elif firmware_update_method !\u003d \u0027ilo\u0027:"},{"line_number":342,"context_line":"            LOG.warn("},{"line_number":343,"context_line":"                _(\"Firmware update method - (method)s is currently not \""},{"line_number":344,"context_line":"                  \"supported. Returning..\"),"},{"line_number":345,"context_line":"                {\u0027method\u0027: firmware_update_method})"},{"line_number":346,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_6ff0d491","line":343,"range":{"start_line":343,"start_character":16,"end_line":343,"end_character":18},"updated":"2015-12-21 06:56:47.000000000","message":"s/_ / _LW","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            raise exception.InvalidParameterValue(msg)"},{"line_number":341,"context_line":"        elif firmware_update_method !\u003d \u0027ilo\u0027:"},{"line_number":342,"context_line":"            LOG.warn("},{"line_number":343,"context_line":"                _(\"Firmware update method - (method)s is currently not \""},{"line_number":344,"context_line":"                  \"supported. Returning..\"),"},{"line_number":345,"context_line":"                {\u0027method\u0027: firmware_update_method})"},{"line_number":346,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_eb98d26c","line":343,"range":{"start_line":343,"start_character":16,"end_line":343,"end_character":18},"in_reply_to":"3a7e1126_6ff0d491","updated":"2015-12-23 11:29:03.000000000","message":"changed it to _LE","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"85d707cab710aac21bdfa584f59a9d1fa16f1e89","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        node \u003d task.node"},{"line_number":349,"context_line":"        if not firmware_urls:"},{"line_number":350,"context_line":"            LOG.warn("},{"line_number":351,"context_line":"                _(\"Firmware url/s not given as part of update. Returning..\"))"},{"line_number":352,"context_line":"            return"},{"line_number":353,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_27f073c8","line":350,"range":{"start_line":350,"start_character":20,"end_line":350,"end_character":21},"updated":"2015-12-22 11:02:20.000000000","message":"ditto","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        node \u003d task.node"},{"line_number":349,"context_line":"        if not firmware_urls:"},{"line_number":350,"context_line":"            LOG.warn("},{"line_number":351,"context_line":"                _(\"Firmware url/s not given as part of update. Returning..\"))"},{"line_number":352,"context_line":"            return"},{"line_number":353,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_0b4e9dc1","line":350,"range":{"start_line":350,"start_character":20,"end_line":350,"end_character":21},"in_reply_to":"3a7e1126_27f073c8","updated":"2015-12-23 11:29:03.000000000","message":"Done","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        node \u003d task.node"},{"line_number":349,"context_line":"        if not firmware_urls:"},{"line_number":350,"context_line":"            LOG.warn("},{"line_number":351,"context_line":"                _(\"Firmware url/s not given as part of update. Returning..\"))"},{"line_number":352,"context_line":"            return"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        firmware_locations \u003d []"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_4f67184d","line":351,"range":{"start_line":351,"start_character":16,"end_line":351,"end_character":17},"updated":"2015-12-21 06:56:47.000000000","message":"s/ _/ _LW","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        node \u003d task.node"},{"line_number":349,"context_line":"        if not firmware_urls:"},{"line_number":350,"context_line":"            LOG.warn("},{"line_number":351,"context_line":"                _(\"Firmware url/s not given as part of update. Returning..\"))"},{"line_number":352,"context_line":"            return"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        firmware_locations \u003d []"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_6b4e22c3","line":351,"range":{"start_line":351,"start_character":16,"end_line":351,"end_character":17},"in_reply_to":"3a7e1126_4f67184d","updated":"2015-12-23 11:29:03.000000000","message":"changed it to error. had taken care of this comment.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":349,"context_line":"        if not firmware_urls:"},{"line_number":350,"context_line":"            LOG.warn("},{"line_number":351,"context_line":"                _(\"Firmware url/s not given as part of update. Returning..\"))"},{"line_number":352,"context_line":"            return"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        firmware_locations \u003d []"},{"line_number":355,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_8fe0a097","line":352,"range":{"start_line":352,"start_character":12,"end_line":352,"end_character":18},"updated":"2015-12-21 06:56:47.000000000","message":"It cannot be just warning as this is a \u0027required\u0027 parameter. Need to throw exception. Also you need to validate that the URLs are in syntactically correct.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":349,"context_line":"        if not firmware_urls:"},{"line_number":350,"context_line":"            LOG.warn("},{"line_number":351,"context_line":"                _(\"Firmware url/s not given as part of update. Returning..\"))"},{"line_number":352,"context_line":"            return"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        firmware_locations \u003d []"},{"line_number":355,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_0b03de74","line":352,"range":{"start_line":352,"start_character":12,"end_line":352,"end_character":18},"in_reply_to":"3a7e1126_8fe0a097","updated":"2015-12-23 11:29:03.000000000","message":"Error msg logged and exception thrown. The validation of each url will be taken care by the firmware processing logic iteratively.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"23a94230f8942edd2da82de51f0d15702a8b2a67","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        except ilo_error.IloError as ilo_exception:"},{"line_number":362,"context_line":"            operation \u003d _(\"Firmware file processing as part \""},{"line_number":363,"context_line":"                          \"of manual cleaning\")"},{"line_number":364,"context_line":"            raise exception.IloOperationError(operation\u003doperation,"},{"line_number":365,"context_line":"                                              error\u003dilo_exception)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        for loc in firmware_locations:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a7e1126_4f3878ef","line":364,"range":{"start_line":364,"start_character":28,"end_line":364,"end_character":45},"updated":"2015-12-21 06:56:47.000000000","message":"It cannot be IloOperationError. We have not performed any operation on iLO here.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca8e544da04705cfeeb77413909a5424d24d88bb","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        except ilo_error.IloError as ilo_exception:"},{"line_number":362,"context_line":"            operation \u003d _(\"Firmware file processing as part \""},{"line_number":363,"context_line":"                          \"of manual cleaning\")"},{"line_number":364,"context_line":"            raise exception.IloOperationError(operation\u003doperation,"},{"line_number":365,"context_line":"                                              error\u003dilo_exception)"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        for loc in firmware_locations:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a7b0d38_cb6ab61a","line":364,"range":{"start_line":364,"start_character":28,"end_line":364,"end_character":45},"in_reply_to":"3a7e1126_4f3878ef","updated":"2015-12-23 11:29:03.000000000","message":"shouldn\u0027t extraction of the firmware image be considered as part of the update operation? agreed that we still haven\u0027t done any operation on iLO. so, should we raise any exception like ImageUnacceptable/ImageConvertFailed or so? Let me know, will change it accordingly.","commit_id":"4cb597795406bd8bf27082badc5752a3c025cf67"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"036dc77817ddb3afc267703ccad79e97e0d1b4cb","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        :raises: InvalidParameterValue if update firmware method is neither"},{"line_number":330,"context_line":"                 \u0027ilo\u0027 nor \u0027hpsum\u0027."},{"line_number":331,"context_line":"        :raises: IloOperationError, on failure to update firmware."},{"line_number":332,"context_line":"        :raises: NodeCleaningFailure, on failure to execute step."},{"line_number":333,"context_line":"        \"\"\""},{"line_number":334,"context_line":"        firmware_update_method \u003d kwargs.get(\u0027firmware_update_method\u0027)"},{"line_number":335,"context_line":"        firmware_urls \u003d kwargs.get(\u0027firmware_urls\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a7b0d38_38be05d5","line":332,"range":{"start_line":332,"start_character":64,"end_line":332,"end_character":65},"updated":"2015-12-24 05:30:44.000000000","message":"also raise InvalidParameterValue for invalid input cases.","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"c69eef289018a3ec1d8c646af203c3607d4658df","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        :raises: InvalidParameterValue if update firmware method is neither"},{"line_number":330,"context_line":"                 \u0027ilo\u0027 nor \u0027hpsum\u0027."},{"line_number":331,"context_line":"        :raises: IloOperationError, on failure to update firmware."},{"line_number":332,"context_line":"        :raises: NodeCleaningFailure, on failure to execute step."},{"line_number":333,"context_line":"        \"\"\""},{"line_number":334,"context_line":"        firmware_update_method \u003d kwargs.get(\u0027firmware_update_method\u0027)"},{"line_number":335,"context_line":"        firmware_urls \u003d kwargs.get(\u0027firmware_urls\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_b91dcf63","line":332,"range":{"start_line":332,"start_character":64,"end_line":332,"end_character":65},"in_reply_to":"1a7b0d38_38be05d5","updated":"2016-01-06 04:34:42.000000000","message":"Thx. You mean in the docstring, right? yes, missed it.","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"036dc77817ddb3afc267703ccad79e97e0d1b4cb","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        \"\"\""},{"line_number":334,"context_line":"        firmware_update_method \u003d kwargs.get(\u0027firmware_update_method\u0027)"},{"line_number":335,"context_line":"        firmware_urls \u003d kwargs.get(\u0027firmware_urls\u0027)"},{"line_number":336,"context_line":"        # import pdb; pdb.set_trace()"},{"line_number":337,"context_line":"        if firmware_update_method not in (\u0027ilo\u0027, \u0027hpsum\u0027):"},{"line_number":338,"context_line":"            msg \u003d (_LE(\"Invalid firmware update method - %(method)s.\")"},{"line_number":339,"context_line":"                   % {\u0027method\u0027: firmware_update_method})"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a7b0d38_d8b4a1f3","line":336,"range":{"start_line":336,"start_character":35,"end_line":336,"end_character":37},"updated":"2015-12-24 05:30:44.000000000","message":"missing to remove such debug code.","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"c69eef289018a3ec1d8c646af203c3607d4658df","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        \"\"\""},{"line_number":334,"context_line":"        firmware_update_method \u003d kwargs.get(\u0027firmware_update_method\u0027)"},{"line_number":335,"context_line":"        firmware_urls \u003d kwargs.get(\u0027firmware_urls\u0027)"},{"line_number":336,"context_line":"        # import pdb; pdb.set_trace()"},{"line_number":337,"context_line":"        if firmware_update_method not in (\u0027ilo\u0027, \u0027hpsum\u0027):"},{"line_number":338,"context_line":"            msg \u003d (_LE(\"Invalid firmware update method - %(method)s.\")"},{"line_number":339,"context_line":"                   % {\u0027method\u0027: firmware_update_method})"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_d90be322","line":336,"range":{"start_line":336,"start_character":35,"end_line":336,"end_character":37},"in_reply_to":"1a7b0d38_d8b4a1f3","updated":"2016-01-06 04:34:42.000000000","message":"Done","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"3dc6ffdb1785da33e6a2415ad36a1288d97d761f","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        firmware_urls \u003d kwargs.get(\u0027firmware_urls\u0027)"},{"line_number":336,"context_line":"        # import pdb; pdb.set_trace()"},{"line_number":337,"context_line":"        if firmware_update_method not in (\u0027ilo\u0027, \u0027hpsum\u0027):"},{"line_number":338,"context_line":"            msg \u003d (_LE(\"Invalid firmware update method - %(method)s.\")"},{"line_number":339,"context_line":"                   % {\u0027method\u0027: firmware_update_method})"},{"line_number":340,"context_line":"            LOG.error(msg)"},{"line_number":341,"context_line":"            raise exception.InvalidParameterValue(msg)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a7b0d38_1e51a20e","line":338,"updated":"2015-12-24 14:48:08.000000000","message":"Please do not use \"_LE\" if message also used in exception, use \"_\" instead.","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"c69eef289018a3ec1d8c646af203c3607d4658df","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        firmware_urls \u003d kwargs.get(\u0027firmware_urls\u0027)"},{"line_number":336,"context_line":"        # import pdb; pdb.set_trace()"},{"line_number":337,"context_line":"        if firmware_update_method not in (\u0027ilo\u0027, \u0027hpsum\u0027):"},{"line_number":338,"context_line":"            msg \u003d (_LE(\"Invalid firmware update method - %(method)s.\")"},{"line_number":339,"context_line":"                   % {\u0027method\u0027: firmware_update_method})"},{"line_number":340,"context_line":"            LOG.error(msg)"},{"line_number":341,"context_line":"            raise exception.InvalidParameterValue(msg)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_59e29330","line":338,"in_reply_to":"1a7b0d38_1e51a20e","updated":"2016-01-06 04:34:42.000000000","message":"Done. Can you please clarify or educate me on this?","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"3dc6ffdb1785da33e6a2415ad36a1288d97d761f","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            LOG.error(msg)"},{"line_number":341,"context_line":"            raise exception.InvalidParameterValue(msg)"},{"line_number":342,"context_line":"        elif firmware_update_method !\u003d \u0027ilo\u0027:"},{"line_number":343,"context_line":"            msg \u003d (_LE(\"Firmware update method - %(method)s is currently not \""},{"line_number":344,"context_line":"                       \"supported.\") % {\u0027method\u0027: firmware_update_method})"},{"line_number":345,"context_line":"            LOG.error(msg)"},{"line_number":346,"context_line":"            raise exception.InvalidParameterValue(msg)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a7b0d38_de5a3a2a","line":343,"updated":"2015-12-24 14:48:08.000000000","message":"ditto l338","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"c69eef289018a3ec1d8c646af203c3607d4658df","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            LOG.error(msg)"},{"line_number":341,"context_line":"            raise exception.InvalidParameterValue(msg)"},{"line_number":342,"context_line":"        elif firmware_update_method !\u003d \u0027ilo\u0027:"},{"line_number":343,"context_line":"            msg \u003d (_LE(\"Firmware update method - %(method)s is currently not \""},{"line_number":344,"context_line":"                       \"supported.\") % {\u0027method\u0027: firmware_update_method})"},{"line_number":345,"context_line":"            LOG.error(msg)"},{"line_number":346,"context_line":"            raise exception.InvalidParameterValue(msg)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_99e6cb13","line":343,"in_reply_to":"1a7b0d38_de5a3a2a","updated":"2016-01-06 04:34:42.000000000","message":"Done","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"3dc6ffdb1785da33e6a2415ad36a1288d97d761f","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        node \u003d task.node"},{"line_number":349,"context_line":"        if not firmware_urls:"},{"line_number":350,"context_line":"            msg \u003d (_LE(\"Firmware url/s cannot be an empty list or None. \""},{"line_number":351,"context_line":"                       \"Provided value %(firmware_urls)s.\")"},{"line_number":352,"context_line":"                   % {\u0027firmware_urls\u0027: firmware_urls})"},{"line_number":353,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a7b0d38_3e4c9e6f","line":350,"updated":"2015-12-24 14:48:08.000000000","message":"ditto l338","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"c69eef289018a3ec1d8c646af203c3607d4658df","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        node \u003d task.node"},{"line_number":349,"context_line":"        if not firmware_urls:"},{"line_number":350,"context_line":"            msg \u003d (_LE(\"Firmware url/s cannot be an empty list or None. \""},{"line_number":351,"context_line":"                       \"Provided value %(firmware_urls)s.\")"},{"line_number":352,"context_line":"                   % {\u0027firmware_urls\u0027: firmware_urls})"},{"line_number":353,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_39ef9fea","line":350,"in_reply_to":"1a7b0d38_3e4c9e6f","updated":"2016-01-06 04:34:42.000000000","message":"Done","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"036dc77817ddb3afc267703ccad79e97e0d1b4cb","unresolved":false,"context_lines":[{"line_number":367,"context_line":"                                              error\u003dilo_op_exception)"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        for loc in firmware_locations:"},{"line_number":370,"context_line":"            _execute_ilo_clean_step(node, \u0027update_firmware\u0027, loc)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a7b0d38_b8caf56c","line":370,"range":{"start_line":370,"start_character":64,"end_line":370,"end_character":65},"updated":"2015-12-24 05:30:44.000000000","message":"and it is better that we have more LOG message on INFO level to indicate the FW updating is processed for normal case.","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"c69eef289018a3ec1d8c646af203c3607d4658df","unresolved":false,"context_lines":[{"line_number":367,"context_line":"                                              error\u003dilo_op_exception)"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        for loc in firmware_locations:"},{"line_number":370,"context_line":"            _execute_ilo_clean_step(node, \u0027update_firmware\u0027, loc)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_b9386fef","line":370,"range":{"start_line":370,"start_character":64,"end_line":370,"end_character":65},"in_reply_to":"1a7b0d38_b8caf56c","updated":"2016-01-06 04:34:42.000000000","message":"Done","commit_id":"4e8e42ea38af77357089486002a92efbd72d0d27"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"129a8f802b5d1c1b9cde5c303e8efadb36f48864","unresolved":false,"context_lines":[{"line_number":308,"context_line":"            \u0027description\u0027: ("},{"line_number":309,"context_line":"                \u0027This argument indicates the mechanism of Out-of-Band (OOB)\u0027"},{"line_number":310,"context_line":"                \u0027firmware update procedure. The 2 possible values are \u0027"},{"line_number":311,"context_line":"                \u0027`ilo` and `hpsum` (only `ilo` is currently supported.)\u0027"},{"line_number":312,"context_line":"            ),"},{"line_number":313,"context_line":"            \u0027required\u0027: True"},{"line_number":314,"context_line":"        },"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_8caf407c","line":311,"range":{"start_line":311,"start_character":28,"end_line":311,"end_character":33},"updated":"2016-01-06 09:53:51.000000000","message":"I\u0027m not sure we need to pre-enable \u0027hpsum\u0027 here. We normally do not make any forward looking statements.","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ae6586a99ac07b3cd93ee92b2c5861cd07e4d7a1","unresolved":false,"context_lines":[{"line_number":308,"context_line":"            \u0027description\u0027: ("},{"line_number":309,"context_line":"                \u0027This argument indicates the mechanism of Out-of-Band (OOB)\u0027"},{"line_number":310,"context_line":"                \u0027firmware update procedure. The 2 possible values are \u0027"},{"line_number":311,"context_line":"                \u0027`ilo` and `hpsum` (only `ilo` is currently supported.)\u0027"},{"line_number":312,"context_line":"            ),"},{"line_number":313,"context_line":"            \u0027required\u0027: True"},{"line_number":314,"context_line":"        },"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_aab98f7b","line":311,"range":{"start_line":311,"start_character":28,"end_line":311,"end_character":33},"in_reply_to":"fa69d971_8caf407c","updated":"2016-01-08 07:06:29.000000000","message":"Done","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"129a8f802b5d1c1b9cde5c303e8efadb36f48864","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        firmware_update_method \u003d kwargs.get(\u0027firmware_update_method\u0027)"},{"line_number":334,"context_line":"        firmware_urls \u003d kwargs.get(\u0027firmware_urls\u0027)"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        if firmware_update_method not in (\u0027ilo\u0027, \u0027hpsum\u0027):"},{"line_number":337,"context_line":"            msg \u003d (_(\"Invalid firmware update method - %(method)s.\")"},{"line_number":338,"context_line":"                   % {\u0027method\u0027: firmware_update_method})"},{"line_number":339,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_ece35cd7","line":336,"range":{"start_line":336,"start_character":50,"end_line":336,"end_character":55},"updated":"2016-01-06 09:53:51.000000000","message":"Should remove code related to hpsum as its not getting enabled in this release.","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ae6586a99ac07b3cd93ee92b2c5861cd07e4d7a1","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        firmware_update_method \u003d kwargs.get(\u0027firmware_update_method\u0027)"},{"line_number":334,"context_line":"        firmware_urls \u003d kwargs.get(\u0027firmware_urls\u0027)"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"        if firmware_update_method not in (\u0027ilo\u0027, \u0027hpsum\u0027):"},{"line_number":337,"context_line":"            msg \u003d (_(\"Invalid firmware update method - %(method)s.\")"},{"line_number":338,"context_line":"                   % {\u0027method\u0027: firmware_update_method})"},{"line_number":339,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_ca616313","line":336,"range":{"start_line":336,"start_character":50,"end_line":336,"end_character":55},"in_reply_to":"fa69d971_ece35cd7","updated":"2016-01-08 07:06:29.000000000","message":"Done","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"d5b9c2a1c25482de1f499be20bee1bf2cd625e7c","unresolved":false,"context_lines":[{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        except (exception.IloInvalidParameterValue,"},{"line_number":363,"context_line":"                exception.IloOperationError) as ilo_exc:"},{"line_number":364,"context_line":"            # delete all the files from the hitherto extracted list and"},{"line_number":365,"context_line":"            # re-raise the exception"},{"line_number":366,"context_line":"            operation \u003d _(\"Firmware file processing as part \""},{"line_number":367,"context_line":"                          \"of manual cleaning\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_64853858","line":364,"range":{"start_line":364,"start_character":44,"end_line":364,"end_character":52},"updated":"2016-01-06 15:55:19.000000000","message":"What does it mean? :)","commit_id":"d4498f422e829e3b6be44a40cb895055995f0d2d"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"1eb079a6a19dc76845fc31211492244903c7dc6f","unresolved":false,"context_lines":[{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        except (exception.IloInvalidParameterValue,"},{"line_number":363,"context_line":"                exception.IloOperationError) as ilo_exc:"},{"line_number":364,"context_line":"            # delete all the files from the hitherto extracted list and"},{"line_number":365,"context_line":"            # re-raise the exception"},{"line_number":366,"context_line":"            operation \u003d _(\"Firmware file processing as part \""},{"line_number":367,"context_line":"                          \"of manual cleaning\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_1151eb0e","line":364,"range":{"start_line":364,"start_character":44,"end_line":364,"end_character":52},"in_reply_to":"fa69d971_64853858","updated":"2016-01-08 07:00:35.000000000","message":"I actually meant \"as yet\" or \"so far\".\nWordweb shows this:\n\"Used in negative statement to describe a situation that has existed up to this point or up to the present time\"\n\nI might have chosen a wrong word. Have changed this. :)","commit_id":"d4498f422e829e3b6be44a40cb895055995f0d2d"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"db98c84eaa153d235c30aea21ddc39e312b98649","unresolved":false,"context_lines":[{"line_number":313,"context_line":"            ),"},{"line_number":314,"context_line":"            \u0027required\u0027: True"},{"line_number":315,"context_line":"        },"},{"line_number":316,"context_line":"        \u0027firmware_urls\u0027: {"},{"line_number":317,"context_line":"            \u0027description\u0027: ("},{"line_number":318,"context_line":"                \u0027The ordered list of urls to the firmware to be applied to \u0027"},{"line_number":319,"context_line":"                \u0027the baremetal. `ilo` update method supports these type of \u0027"},{"line_number":320,"context_line":"                \u0027firmware url schemes: file, http/s \u0026 swift.\u0027"},{"line_number":321,"context_line":"            ),"},{"line_number":322,"context_line":"            \u0027required\u0027: True"},{"line_number":323,"context_line":"        }"},{"line_number":324,"context_line":"    })"},{"line_number":325,"context_line":"    def update_firmware(self, task, **kwargs):"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa69d971_315fab10","line":322,"range":{"start_line":316,"start_character":1,"end_line":322,"end_character":28},"updated":"2016-01-11 14:22:48.000000000","message":"What order should the list be in?  I think this a solid reason documentation for this feature would need to be included with the revision.","commit_id":"212b06e12eb91e2d96d272d23aab2844749d02da"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"2a40f39ee5abde3a115e7adabb5fa8ff032444ef","unresolved":false,"context_lines":[{"line_number":313,"context_line":"            ),"},{"line_number":314,"context_line":"            \u0027required\u0027: True"},{"line_number":315,"context_line":"        },"},{"line_number":316,"context_line":"        \u0027firmware_urls\u0027: {"},{"line_number":317,"context_line":"            \u0027description\u0027: ("},{"line_number":318,"context_line":"                \u0027The ordered list of urls to the firmware to be applied to \u0027"},{"line_number":319,"context_line":"                \u0027the baremetal. `ilo` update method supports these type of \u0027"},{"line_number":320,"context_line":"                \u0027firmware url schemes: file, http/s \u0026 swift.\u0027"},{"line_number":321,"context_line":"            ),"},{"line_number":322,"context_line":"            \u0027required\u0027: True"},{"line_number":323,"context_line":"        }"},{"line_number":324,"context_line":"    })"},{"line_number":325,"context_line":"    def update_firmware(self, task, **kwargs):"}],"source_content_type":"text/x-python","patch_set":14,"id":"da6ed579_3d8fe224","line":322,"range":{"start_line":316,"start_character":1,"end_line":322,"end_character":28},"in_reply_to":"da6ed579_6f9d2e65","updated":"2016-01-18 14:45:40.000000000","message":"Will be providing the detailed documentation as part of the next patch set. Thanks.","commit_id":"212b06e12eb91e2d96d272d23aab2844749d02da"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"7c4ca9c97fcb1b0e62d8d3df6517abc4696c9674","unresolved":false,"context_lines":[{"line_number":313,"context_line":"            ),"},{"line_number":314,"context_line":"            \u0027required\u0027: True"},{"line_number":315,"context_line":"        },"},{"line_number":316,"context_line":"        \u0027firmware_urls\u0027: {"},{"line_number":317,"context_line":"            \u0027description\u0027: ("},{"line_number":318,"context_line":"                \u0027The ordered list of urls to the firmware to be applied to \u0027"},{"line_number":319,"context_line":"                \u0027the baremetal. `ilo` update method supports these type of \u0027"},{"line_number":320,"context_line":"                \u0027firmware url schemes: file, http/s \u0026 swift.\u0027"},{"line_number":321,"context_line":"            ),"},{"line_number":322,"context_line":"            \u0027required\u0027: True"},{"line_number":323,"context_line":"        }"},{"line_number":324,"context_line":"    })"},{"line_number":325,"context_line":"    def update_firmware(self, task, **kwargs):"}],"source_content_type":"text/x-python","patch_set":14,"id":"da6ed579_6f9d2e65","line":322,"range":{"start_line":316,"start_character":1,"end_line":322,"end_character":28},"in_reply_to":"da6ed579_70d24ad4","updated":"2016-01-14 17:41:09.000000000","message":"Thank you, I was more speaking in general, will reply in more depth to your detailed reply.","commit_id":"212b06e12eb91e2d96d272d23aab2844749d02da"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"2c494d795b5b1e14c09bff3ed686fcb1bab132ef","unresolved":false,"context_lines":[{"line_number":313,"context_line":"            ),"},{"line_number":314,"context_line":"            \u0027required\u0027: True"},{"line_number":315,"context_line":"        },"},{"line_number":316,"context_line":"        \u0027firmware_urls\u0027: {"},{"line_number":317,"context_line":"            \u0027description\u0027: ("},{"line_number":318,"context_line":"                \u0027The ordered list of urls to the firmware to be applied to \u0027"},{"line_number":319,"context_line":"                \u0027the baremetal. `ilo` update method supports these type of \u0027"},{"line_number":320,"context_line":"                \u0027firmware url schemes: file, http/s \u0026 swift.\u0027"},{"line_number":321,"context_line":"            ),"},{"line_number":322,"context_line":"            \u0027required\u0027: True"},{"line_number":323,"context_line":"        }"},{"line_number":324,"context_line":"    })"},{"line_number":325,"context_line":"    def update_firmware(self, task, **kwargs):"}],"source_content_type":"text/x-python","patch_set":14,"id":"da6ed579_70d24ad4","line":322,"range":{"start_line":316,"start_character":1,"end_line":322,"end_character":28},"in_reply_to":"fa69d971_315fab10","updated":"2016-01-13 13:06:34.000000000","message":"Please find my comments in the general comments section. Also, I have updated this description to depict that in brief. Feel free to change the words to convey the message properly and post. Thank you.","commit_id":"212b06e12eb91e2d96d272d23aab2844749d02da"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9055b88b012d120291317fa2f5cf092e288dd0bd","unresolved":false,"context_lines":[{"line_number":357,"context_line":"        node \u003d task.node"},{"line_number":358,"context_line":"        firmware_file_locations \u003d []"},{"line_number":359,"context_line":"        # ################################"},{"line_number":360,"context_line":"        # Processing of firmware file urls"},{"line_number":361,"context_line":"        # ################################"},{"line_number":362,"context_line":"        try:"},{"line_number":363,"context_line":"            for url, component_type in firmware_image_urls:"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_c57bdb26","line":360,"range":{"start_line":360,"start_character":9,"end_line":360,"end_character":10},"updated":"2016-01-14 18:26:29.000000000","message":"I\u0027d prefer this to be more of the inline note format.\n\n# Note(name): Xyz thing happens here.","commit_id":"3d5024f51d491d73ad5683fde22e6dcc54bdd0e6"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"dd319c171c5551c962923189b3f27dc4ca6d6940","unresolved":false,"context_lines":[{"line_number":357,"context_line":"        node \u003d task.node"},{"line_number":358,"context_line":"        firmware_file_locations \u003d []"},{"line_number":359,"context_line":"        # ################################"},{"line_number":360,"context_line":"        # Processing of firmware file urls"},{"line_number":361,"context_line":"        # ################################"},{"line_number":362,"context_line":"        try:"},{"line_number":363,"context_line":"            for url, component_type in firmware_image_urls:"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_9d1b6eca","line":360,"range":{"start_line":360,"start_character":9,"end_line":360,"end_character":10},"in_reply_to":"da6ed579_c57bdb26","updated":"2016-01-18 14:45:17.000000000","message":"Changed this as accordingly. Done.","commit_id":"3d5024f51d491d73ad5683fde22e6dcc54bdd0e6"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9055b88b012d120291317fa2f5cf092e288dd0bd","unresolved":false,"context_lines":[{"line_number":389,"context_line":"            raise exception.NodeCleaningFailure(node\u003dnode.uuid, reason\u003dilo_exc)"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"        # ##############################"},{"line_number":392,"context_line":"        # Updating of firmware file urls"},{"line_number":393,"context_line":"        # ##############################"},{"line_number":394,"context_line":"        for firmware_file_location, component_type in firmware_file_locations:"},{"line_number":395,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_85bf23a9","line":392,"range":{"start_line":392,"start_character":9,"end_line":392,"end_character":10},"updated":"2016-01-14 18:26:29.000000000","message":"Same as above.","commit_id":"3d5024f51d491d73ad5683fde22e6dcc54bdd0e6"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"dd319c171c5551c962923189b3f27dc4ca6d6940","unresolved":false,"context_lines":[{"line_number":389,"context_line":"            raise exception.NodeCleaningFailure(node\u003dnode.uuid, reason\u003dilo_exc)"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"        # ##############################"},{"line_number":392,"context_line":"        # Updating of firmware file urls"},{"line_number":393,"context_line":"        # ##############################"},{"line_number":394,"context_line":"        for firmware_file_location, component_type in firmware_file_locations:"},{"line_number":395,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_3d7922fd","line":392,"range":{"start_line":392,"start_character":9,"end_line":392,"end_character":10},"in_reply_to":"da6ed579_85bf23a9","updated":"2016-01-18 14:45:17.000000000","message":"Done","commit_id":"3d5024f51d491d73ad5683fde22e6dcc54bdd0e6"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"96644fbfc6a4abc4a757b8742ce6c5ba94744b3b","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        \u0027firmware_images\u0027: {"},{"line_number":317,"context_line":"            \u0027description\u0027: ("},{"line_number":318,"context_line":"                \u0027This argument represents the ordered list of dict items of \u0027"},{"line_number":319,"context_line":"                \u0027firmware image url, its checksum and its component type. \u0027"},{"line_number":320,"context_line":"                \u0027The firmware images will be applied (in the order given) \u0027"},{"line_number":321,"context_line":"                \u0027one by one to the baremetal server. The different types of \u0027"},{"line_number":322,"context_line":"                \u0027firmware url schemes supported are: \u0027"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_fd1a18c5","line":319,"range":{"start_line":319,"start_character":41,"end_line":319,"end_character":49},"updated":"2016-01-25 13:29:49.000000000","message":"Type of checksum supported should be indicated here.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        \u0027firmware_images\u0027: {"},{"line_number":317,"context_line":"            \u0027description\u0027: ("},{"line_number":318,"context_line":"                \u0027This argument represents the ordered list of dict items of \u0027"},{"line_number":319,"context_line":"                \u0027firmware image url, its checksum and its component type. \u0027"},{"line_number":320,"context_line":"                \u0027The firmware images will be applied (in the order given) \u0027"},{"line_number":321,"context_line":"                \u0027one by one to the baremetal server. The different types of \u0027"},{"line_number":322,"context_line":"                \u0027firmware url schemes supported are: \u0027"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a5de9d1_b1d745ec","line":319,"range":{"start_line":319,"start_character":41,"end_line":319,"end_character":49},"in_reply_to":"9a68dd71_fd1a18c5","updated":"2016-01-29 14:54:05.000000000","message":"Done","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"96644fbfc6a4abc4a757b8742ce6c5ba94744b3b","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        if not firmware_images:"},{"line_number":349,"context_line":"            msg \u003d (_(\"Firmware images cannot be an empty list or None. \""},{"line_number":350,"context_line":"                     \"Provided value %(firmware_images)s.\")"},{"line_number":351,"context_line":"                   % {\u0027firmware_images\u0027: firmware_images})"},{"line_number":352,"context_line":"            LOG.error(msg)"},{"line_number":353,"context_line":"            raise exception.InvalidParameterValue(msg)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_ddf074cb","line":350,"range":{"start_line":350,"start_character":22,"end_line":350,"end_character":56},"updated":"2016-01-25 13:29:49.000000000","message":"It does not make sense to provide what would only be a value of None back to the user, while it might make sense to instead provide them an example dictionary object that is expected.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        if not firmware_images:"},{"line_number":349,"context_line":"            msg \u003d (_(\"Firmware images cannot be an empty list or None. \""},{"line_number":350,"context_line":"                     \"Provided value %(firmware_images)s.\")"},{"line_number":351,"context_line":"                   % {\u0027firmware_images\u0027: firmware_images})"},{"line_number":352,"context_line":"            LOG.error(msg)"},{"line_number":353,"context_line":"            raise exception.InvalidParameterValue(msg)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a5de9d1_d3719b45","line":350,"range":{"start_line":350,"start_character":22,"end_line":350,"end_character":56},"in_reply_to":"9a68dd71_ddf074cb","updated":"2016-01-29 14:54:05.000000000","message":"Nice suggestion. Have provided a new method ``log_update_firmware_args_help`` which will take care of this.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"e082c5dbf759dc3e76248850819bccafc0772758","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                url, checksum, component \u003d ("},{"line_number":362,"context_line":"                    firmware_processor.get_and_validate_firmware_image_info("},{"line_number":363,"context_line":"                        firmware_image_info))"},{"line_number":364,"context_line":"                LOG.info(_LI(\"Processing of firmware file: %s ... \""},{"line_number":365,"context_line":"                             \"in progress\"), url)"},{"line_number":366,"context_line":"                fw_processor \u003d firmware_processor.get_fw_processor(url)"},{"line_number":367,"context_line":"                location \u003d fw_processor.process_fw_on(node, checksum)"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_081655a7","line":364,"range":{"start_line":364,"start_character":20,"end_line":364,"end_character":24},"updated":"2016-01-19 21:51:29.000000000","message":"Maybe better as debug here.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                url, checksum, component \u003d ("},{"line_number":362,"context_line":"                    firmware_processor.get_and_validate_firmware_image_info("},{"line_number":363,"context_line":"                        firmware_image_info))"},{"line_number":364,"context_line":"                LOG.info(_LI(\"Processing of firmware file: %s ... \""},{"line_number":365,"context_line":"                             \"in progress\"), url)"},{"line_number":366,"context_line":"                fw_processor \u003d firmware_processor.get_fw_processor(url)"},{"line_number":367,"context_line":"                location \u003d fw_processor.process_fw_on(node, checksum)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a5de9d1_6cbed2d5","line":364,"range":{"start_line":364,"start_character":20,"end_line":364,"end_character":24},"in_reply_to":"ba63e191_081655a7","updated":"2016-01-29 14:54:05.000000000","message":"Done. Have changed the verbosity of almost all the log messages to DEBUG.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"96644fbfc6a4abc4a757b8742ce6c5ba94744b3b","unresolved":false,"context_lines":[{"line_number":384,"context_line":"        # Updating of firmware images happen here."},{"line_number":385,"context_line":"        for firmware_file_location, component in firmware_file_locations:"},{"line_number":386,"context_line":"            try:"},{"line_number":387,"context_line":"                LOG.info(_LI(\"Firmware update for %s ... in progress\"),"},{"line_number":388,"context_line":"                         firmware_file_location)"},{"line_number":389,"context_line":"                _execute_ilo_clean_step(node, \u0027update_firmware\u0027,"},{"line_number":390,"context_line":"                                        firmware_file_location, component)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_7d006866","line":387,"range":{"start_line":387,"start_character":57,"end_line":387,"end_character":68},"updated":"2016-01-25 13:29:49.000000000","message":"This should ideally indicate what node is in progress.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"e082c5dbf759dc3e76248850819bccafc0772758","unresolved":false,"context_lines":[{"line_number":384,"context_line":"        # Updating of firmware images happen here."},{"line_number":385,"context_line":"        for firmware_file_location, component in firmware_file_locations:"},{"line_number":386,"context_line":"            try:"},{"line_number":387,"context_line":"                LOG.info(_LI(\"Firmware update for %s ... in progress\"),"},{"line_number":388,"context_line":"                         firmware_file_location)"},{"line_number":389,"context_line":"                _execute_ilo_clean_step(node, \u0027update_firmware\u0027,"},{"line_number":390,"context_line":"                                        firmware_file_location, component)"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_4873ed15","line":387,"range":{"start_line":387,"start_character":20,"end_line":387,"end_character":24},"updated":"2016-01-19 21:51:29.000000000","message":"maybe debug or even trace here.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":384,"context_line":"        # Updating of firmware images happen here."},{"line_number":385,"context_line":"        for firmware_file_location, component in firmware_file_locations:"},{"line_number":386,"context_line":"            try:"},{"line_number":387,"context_line":"                LOG.info(_LI(\"Firmware update for %s ... in progress\"),"},{"line_number":388,"context_line":"                         firmware_file_location)"},{"line_number":389,"context_line":"                _execute_ilo_clean_step(node, \u0027update_firmware\u0027,"},{"line_number":390,"context_line":"                                        firmware_file_location, component)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a5de9d1_994cafc9","line":387,"range":{"start_line":387,"start_character":57,"end_line":387,"end_character":68},"in_reply_to":"9a68dd71_7d006866","updated":"2016-01-29 14:54:05.000000000","message":"Done. Have added the node.uuid information in the log messages.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":384,"context_line":"        # Updating of firmware images happen here."},{"line_number":385,"context_line":"        for firmware_file_location, component in firmware_file_locations:"},{"line_number":386,"context_line":"            try:"},{"line_number":387,"context_line":"                LOG.info(_LI(\"Firmware update for %s ... in progress\"),"},{"line_number":388,"context_line":"                         firmware_file_location)"},{"line_number":389,"context_line":"                _execute_ilo_clean_step(node, \u0027update_firmware\u0027,"},{"line_number":390,"context_line":"                                        firmware_file_location, component)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a5de9d1_f9536369","line":387,"range":{"start_line":387,"start_character":20,"end_line":387,"end_character":24},"in_reply_to":"ba63e191_4873ed15","updated":"2016-01-29 14:54:05.000000000","message":"Done","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"96644fbfc6a4abc4a757b8742ce6c5ba94744b3b","unresolved":false,"context_lines":[{"line_number":393,"context_line":"                # re-raise the exception"},{"line_number":394,"context_line":"                ilo_common.remove_single_or_list_of_files("},{"line_number":395,"context_line":"                    firmware_file_locations)"},{"line_number":396,"context_line":"                LOG.error(_LE(\"Firmware update operation ... failed\"))"},{"line_number":397,"context_line":"                raise exc"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"            ilo_common.remove_single_or_list_of_files(firmware_file_location)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_5d348448","line":396,"range":{"start_line":396,"start_character":61,"end_line":396,"end_character":67},"updated":"2016-01-25 13:29:49.000000000","message":"This should indicate what node failed to update in the log.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":393,"context_line":"                # re-raise the exception"},{"line_number":394,"context_line":"                ilo_common.remove_single_or_list_of_files("},{"line_number":395,"context_line":"                    firmware_file_locations)"},{"line_number":396,"context_line":"                LOG.error(_LE(\"Firmware update operation ... failed\"))"},{"line_number":397,"context_line":"                raise exc"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"            ilo_common.remove_single_or_list_of_files(firmware_file_location)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a5de9d1_59c95725","line":396,"range":{"start_line":396,"start_character":61,"end_line":396,"end_character":67},"in_reply_to":"9a68dd71_5d348448","updated":"2016-01-29 14:54:05.000000000","message":"Done","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"e082c5dbf759dc3e76248850819bccafc0772758","unresolved":false,"context_lines":[{"line_number":400,"context_line":"            LOG.info(_LI(\"Firmware update for %s ... done\"),"},{"line_number":401,"context_line":"                     firmware_file_location)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"        LOG.info(_LI(\"Firmware update operation ... successful\"))"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_28fd593a","line":403,"range":{"start_line":403,"start_character":22,"end_line":403,"end_character":62},"updated":"2016-01-19 21:51:29.000000000","message":"maybe change to \"All Firmware operations completed successfully for node %s.\" here.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":400,"context_line":"            LOG.info(_LI(\"Firmware update for %s ... done\"),"},{"line_number":401,"context_line":"                     firmware_file_location)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"        LOG.info(_LI(\"Firmware update operation ... successful\"))"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a5de9d1_b9e08b97","line":403,"range":{"start_line":403,"start_character":22,"end_line":403,"end_character":62},"in_reply_to":"9a68dd71_fdbe98ac","updated":"2016-01-29 14:54:05.000000000","message":"Done","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"96644fbfc6a4abc4a757b8742ce6c5ba94744b3b","unresolved":false,"context_lines":[{"line_number":400,"context_line":"            LOG.info(_LI(\"Firmware update for %s ... done\"),"},{"line_number":401,"context_line":"                     firmware_file_location)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"        LOG.info(_LI(\"Firmware update operation ... successful\"))"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_fdbe98ac","line":403,"range":{"start_line":403,"start_character":22,"end_line":403,"end_character":62},"in_reply_to":"ba63e191_28fd593a","updated":"2016-01-25 13:29:49.000000000","message":"Context of which node is vital if this is performed as some sort of multi-node batch operation, and as such I agree with Chris.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":400,"context_line":"            LOG.info(_LI(\"Firmware update for %s ... done\"),"},{"line_number":401,"context_line":"                     firmware_file_location)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"        LOG.info(_LI(\"Firmware update operation ... successful\"))"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a5de9d1_59f07767","line":403,"range":{"start_line":403,"start_character":22,"end_line":403,"end_character":62},"in_reply_to":"ba63e191_28fd593a","updated":"2016-01-29 14:54:05.000000000","message":"Done","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"38fd256f7c20dac906dff00cd616a0347cff988f","unresolved":false,"context_lines":[{"line_number":374,"context_line":"        except (exception.InvalidParameterValue, exception.IloOperationError,"},{"line_number":375,"context_line":"                exception.ImageDownloadFailed, exception.SwiftOperationError,"},{"line_number":376,"context_line":"                exception.ImageUploadFailed, exception.MissingParameterValue,"},{"line_number":377,"context_line":"                exception.ImageRefValidationFailed, Exception) as ilo_exc:"},{"line_number":378,"context_line":"            # delete all the files extracted so far from the extracted list"},{"line_number":379,"context_line":"            # and re-raise the exception"},{"line_number":380,"context_line":"            ilo_common.remove_single_or_list_of_files(firmware_file_locations)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_73a8e320","line":377,"updated":"2016-02-23 14:29:08.000000000","message":"If base Exception is here all others are not needed.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":374,"context_line":"        except (exception.InvalidParameterValue, exception.IloOperationError,"},{"line_number":375,"context_line":"                exception.ImageDownloadFailed, exception.SwiftOperationError,"},{"line_number":376,"context_line":"                exception.ImageUploadFailed, exception.MissingParameterValue,"},{"line_number":377,"context_line":"                exception.ImageRefValidationFailed, Exception) as ilo_exc:"},{"line_number":378,"context_line":"            # delete all the files extracted so far from the extracted list"},{"line_number":379,"context_line":"            # and re-raise the exception"},{"line_number":380,"context_line":"            ilo_common.remove_single_or_list_of_files(firmware_file_locations)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_ae7272ab","line":377,"in_reply_to":"bae84128_73a8e320","updated":"2016-02-26 14:46:24.000000000","message":"yes. I have made it this way now::\n\n  try:\n    ...\n  except exception.IronicException as ilo_exc:\n    ...","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"38fd256f7c20dac906dff00cd616a0347cff988f","unresolved":false,"context_lines":[{"line_number":403,"context_line":"                              \"node: %(node)s ... failed\"),"},{"line_number":404,"context_line":"                          {\u0027firmware_file\u0027: firmware_file_location,"},{"line_number":405,"context_line":"                           \u0027node\u0027: node.uuid})"},{"line_number":406,"context_line":"                raise"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"            ilo_common.remove_single_or_list_of_files(firmware_file_location)"},{"line_number":409,"context_line":"            LOG.debug(\"Firmware update for %(firmware_file)s on \""}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_a9131eb7","line":406,"updated":"2016-02-23 14:29:08.000000000","message":"Please use excutils.save_and_reraise_exception() instead (read it docstring for detail).","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":403,"context_line":"                              \"node: %(node)s ... failed\"),"},{"line_number":404,"context_line":"                          {\u0027firmware_file\u0027: firmware_file_location,"},{"line_number":405,"context_line":"                           \u0027node\u0027: node.uuid})"},{"line_number":406,"context_line":"                raise"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"            ilo_common.remove_single_or_list_of_files(firmware_file_location)"},{"line_number":409,"context_line":"            LOG.debug(\"Firmware update for %(firmware_file)s on \""}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_6e3b4a9d","line":406,"in_reply_to":"bae84128_a9131eb7","updated":"2016-02-26 14:46:24.000000000","message":"Have used a custom context manager to handle this. Please review.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"38fd256f7c20dac906dff00cd616a0347cff988f","unresolved":false,"context_lines":[{"line_number":405,"context_line":"                           \u0027node\u0027: node.uuid})"},{"line_number":406,"context_line":"                raise"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"            ilo_common.remove_single_or_list_of_files(firmware_file_location)"},{"line_number":409,"context_line":"            LOG.debug(\"Firmware update for %(firmware_file)s on \""},{"line_number":410,"context_line":"                      \"node: %(node)s ... done\","},{"line_number":411,"context_line":"                      {\u0027firmware_file\u0027: firmware_file_location,"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_ec41b464","line":408,"updated":"2016-02-23 14:29:08.000000000","message":"instead of l400, l408\n finally:\n     ilo_common.remove...","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":405,"context_line":"                           \u0027node\u0027: node.uuid})"},{"line_number":406,"context_line":"                raise"},{"line_number":407,"context_line":""},{"line_number":408,"context_line":"            ilo_common.remove_single_or_list_of_files(firmware_file_location)"},{"line_number":409,"context_line":"            LOG.debug(\"Firmware update for %(firmware_file)s on \""},{"line_number":410,"context_line":"                      \"node: %(node)s ... done\","},{"line_number":411,"context_line":"                      {\u0027firmware_file\u0027: firmware_file_location,"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_8e5deeee","line":408,"in_reply_to":"bae84128_ec41b464","updated":"2016-02-26 14:46:24.000000000","message":"ditto","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"38fd256f7c20dac906dff00cd616a0347cff988f","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                       \u0027node\u0027: node.uuid})"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        LOG.debug(\"All Firmware update/s on node: %(node)s ... successfully \""},{"line_number":415,"context_line":"                  \"completed.\", {\u0027node\u0027: node.uuid})"},{"line_number":416,"context_line":"        LOG.info(_LI(\"All Firmware operations completed successfully for \""},{"line_number":417,"context_line":"                     \"node %s.\"), node.uuid)"},{"line_number":418,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_734c63c8","line":415,"updated":"2016-02-23 14:29:08.000000000","message":"This is double of next logging.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                       \u0027node\u0027: node.uuid})"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        LOG.debug(\"All Firmware update/s on node: %(node)s ... successfully \""},{"line_number":415,"context_line":"                  \"completed.\", {\u0027node\u0027: node.uuid})"},{"line_number":416,"context_line":"        LOG.info(_LI(\"All Firmware operations completed successfully for \""},{"line_number":417,"context_line":"                     \"node %s.\"), node.uuid)"},{"line_number":418,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_8e04cec6","line":415,"in_reply_to":"bae84128_734c63c8","updated":"2016-02-26 14:46:24.000000000","message":"Removed","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"38fd256f7c20dac906dff00cd616a0347cff988f","unresolved":false,"context_lines":[{"line_number":446,"context_line":"            \"}\\n\""},{"line_number":447,"context_line":"            \"---------------------------------------------------------------\\n\""},{"line_number":448,"context_line":"        )"},{"line_number":449,"context_line":"        LOG.debug(update_firmware_usage_msg)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_d30e0f8b","line":449,"updated":"2016-02-23 14:29:08.000000000","message":"This is help for user? Looks strange that it\u0027s logged in debug mode. IMO better do not log any documentation.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"6bff64e8315e1612a38dd77a02ebed1a6f5de38f","unresolved":false,"context_lines":[{"line_number":446,"context_line":"            \"}\\n\""},{"line_number":447,"context_line":"            \"---------------------------------------------------------------\\n\""},{"line_number":448,"context_line":"        )"},{"line_number":449,"context_line":"        LOG.debug(update_firmware_usage_msg)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_f3e2f6d3","line":449,"in_reply_to":"bae84128_d30e0f8b","updated":"2016-02-24 11:32:42.000000000","message":"++ I think it is not needed. If some required arguments are missing, conductor will print them with descriptions in the log, if the values are incorrect, the exceptions will be printed out explaining what\u0027s wrong on L342-354. The example of how it should look like better fits to documentation, not to logs.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":446,"context_line":"            \"}\\n\""},{"line_number":447,"context_line":"            \"---------------------------------------------------------------\\n\""},{"line_number":448,"context_line":"        )"},{"line_number":449,"context_line":"        LOG.debug(update_firmware_usage_msg)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_291adc6e","line":449,"in_reply_to":"bae84128_d30e0f8b","updated":"2016-02-26 14:46:24.000000000","message":"I have changed it this way to point to the link::\n\n  def show_firmware_update_args_help():\n    LOG.info(\"http://docs.openstack.org/.../ilo.html#...\")\n\nWill this be fine? I can\u0027t remember, but one review comment was to give the user a usage doc for this in case of validation failures. So, thought of adding it.. but now it seems to be better to provide the link.\n\nhttps://review.openstack.org/#/c/276765/3/doc/source/drivers/ilo.rst@1260","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"378c3b2fbd6c0c9e82f64d36a1604dd66eddb4a0","unresolved":false,"context_lines":[{"line_number":446,"context_line":"            \"}\\n\""},{"line_number":447,"context_line":"            \"---------------------------------------------------------------\\n\""},{"line_number":448,"context_line":"        )"},{"line_number":449,"context_line":"        LOG.debug(update_firmware_usage_msg)"}],"source_content_type":"text/x-python","patch_set":18,"id":"bae84128_899a08c4","line":449,"in_reply_to":"bae84128_f3e2f6d3","updated":"2016-02-26 14:46:24.000000000","message":"Agreed, vdrok. Please see my comments above. Let me know if you still insist to remove this.","commit_id":"e22806d4f8907bcd0cde9f7e4e9fd7a120783b38"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"bf113c53a05164aa4d35e83deb2528e953868efb","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            # delete all the files extracted so far from the extracted list"},{"line_number":369,"context_line":"            # and re-raise the exception"},{"line_number":370,"context_line":"            for fw_location_obj, c in fw_location_objs_n_components:"},{"line_number":371,"context_line":"                fw_location_obj.remove()"},{"line_number":372,"context_line":"            LOG.error(_LE(\"Processing of firmware image: %(firmware_image)s \""},{"line_number":373,"context_line":"                          \"on node: %(node)s ... failed\"),"},{"line_number":374,"context_line":"                      {\u0027firmware_image\u0027: firmware_image_info,"}],"source_content_type":"text/x-python","patch_set":19,"id":"7af24918_1ba4a955","line":371,"updated":"2016-03-01 15:41:35.000000000","message":"unused \"c\" is not needed.\n\n for component in fw_location_objs_n_components:\n     component[0].remove()","commit_id":"5db8757ab4b983960450f027e81f70e75635d679"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"59cc3e2afa22cc87ef44510d3e486d6483906af7","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            # delete all the files extracted so far from the extracted list"},{"line_number":369,"context_line":"            # and re-raise the exception"},{"line_number":370,"context_line":"            for fw_location_obj, c in fw_location_objs_n_components:"},{"line_number":371,"context_line":"                fw_location_obj.remove()"},{"line_number":372,"context_line":"            LOG.error(_LE(\"Processing of firmware image: %(firmware_image)s \""},{"line_number":373,"context_line":"                          \"on node: %(node)s ... failed\"),"},{"line_number":374,"context_line":"                      {\u0027firmware_image\u0027: firmware_image_info,"}],"source_content_type":"text/x-python","patch_set":19,"id":"7af24918_b918dd85","line":371,"in_reply_to":"7af24918_1ba4a955","updated":"2016-03-02 13:32:41.000000000","message":"Done","commit_id":"5db8757ab4b983960450f027e81f70e75635d679"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"734f72622d2e752503d32f1da5714489767d6ff0","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        \u0027firmware_update_mode\u0027: {"},{"line_number":309,"context_line":"            \u0027description\u0027: ("},{"line_number":310,"context_line":"                \u0027This argument indicates the mode (or mechanism) of \u0027"},{"line_number":311,"context_line":"                \u0027Out-of-Band (OOB) firmware update procedure.\u0027"},{"line_number":312,"context_line":"                \u0027Currently, the only supported value is `ilo`.\u0027"},{"line_number":313,"context_line":"            ),"},{"line_number":314,"context_line":"            \u0027required\u0027: True"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_9d94718b","line":311,"updated":"2016-03-03 23:42:18.000000000","message":"nit - missing space","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e0c7adfa6399294f401c9e2196557be7024294ec","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        \u0027firmware_update_mode\u0027: {"},{"line_number":309,"context_line":"            \u0027description\u0027: ("},{"line_number":310,"context_line":"                \u0027This argument indicates the mode (or mechanism) of \u0027"},{"line_number":311,"context_line":"                \u0027Out-of-Band (OOB) firmware update procedure.\u0027"},{"line_number":312,"context_line":"                \u0027Currently, the only supported value is `ilo`.\u0027"},{"line_number":313,"context_line":"            ),"},{"line_number":314,"context_line":"            \u0027required\u0027: True"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_f094ac37","line":311,"in_reply_to":"7af24918_9d94718b","updated":"2016-03-04 11:51:51.000000000","message":"Done","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"734f72622d2e752503d32f1da5714489767d6ff0","unresolved":false,"context_lines":[{"line_number":377,"context_line":""},{"line_number":378,"context_line":"        # Updating of firmware images happen here."},{"line_number":379,"context_line":"        fw_update_ctxt_mgr \u003d firmware_processor.update_firmware_with_teardown"},{"line_number":380,"context_line":"        with fw_update_ctxt_mgr(fw_location_objs_n_components) as fw_locs_n_comps:  # noqa"},{"line_number":381,"context_line":"            for fw_location, component in fw_locs_n_comps:"},{"line_number":382,"context_line":"                LOG.debug(\"Firmware update for %(firmware_file)s on \""},{"line_number":383,"context_line":"                          \"node: %(node)s ... in progress\","}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_fdac958d","line":380,"updated":"2016-03-03 23:42:18.000000000","message":"I think it is overcomplicated. Why not just use an ordinary loop here?\n\ntry:\n  for fw_location, component in fw_location_objs_n_components:\n    ...\nexcept exception.NodeCleaningFailure:\n  with excutils.save_and_reraise_exception():\n    LOG.error(_LE(\"Firmware update ... failed\"))\nfinally:\n  for location_obj, c in fw_location_objs_n_components:\n    location_obj.remove()","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e0c7adfa6399294f401c9e2196557be7024294ec","unresolved":false,"context_lines":[{"line_number":377,"context_line":""},{"line_number":378,"context_line":"        # Updating of firmware images happen here."},{"line_number":379,"context_line":"        fw_update_ctxt_mgr \u003d firmware_processor.update_firmware_with_teardown"},{"line_number":380,"context_line":"        with fw_update_ctxt_mgr(fw_location_objs_n_components) as fw_locs_n_comps:  # noqa"},{"line_number":381,"context_line":"            for fw_location, component in fw_locs_n_comps:"},{"line_number":382,"context_line":"                LOG.debug(\"Firmware update for %(firmware_file)s on \""},{"line_number":383,"context_line":"                          \"node: %(node)s ... in progress\","}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_39b8bf74","line":380,"in_reply_to":"7af24918_fdac958d","updated":"2016-03-04 11:51:51.000000000","message":"Thank you, Vdrok, for taking time to see through the logic. My motive was to hide all the cross cutting concerns (arg-validation, checksum verification, processing, temp-file removals etc.) barring the logging statements from this ``management::update_firmware`` method. I could achieve that for arg-validation (``@firmware_processor.verify_firmware_update_args``), temp-file removal (post processing f/w file update) but couldn\u0027t completely for processing, checksum validation. As you can see file removals are still visible here:\nhttps://review.openstack.org/#/c/211019/20/ironic/drivers/modules/ilo/management.py@371\nvis a vis it\u0027 not as part of updating (or flashing):\nhttps://review.openstack.org/#/c/211019/20/ironic/drivers/modules/ilo/management.py@386\nWith the gradual evolving of the code here in management.py file my goal was to make this as tidy, clean and beautiful to read and the plumbing jobs (like temp-file removal) to move to the background (``firmware_processor`` file). But, anyways in order to maintain consistency I plan to go ahead with your suggestion for the time being. May be, later, I will post a follow up patch to refactor it to make this portion as legible as possible. wdyt? btw, sorry for this long post :(","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        \u0027firmware_update_mode\u0027: {"},{"line_number":341,"context_line":"            \u0027description\u0027: ("},{"line_number":342,"context_line":"                \u0027This argument indicates the mode (or mechanism) of \u0027"},{"line_number":343,"context_line":"                \u0027Out-of-Band (OOB) firmware update procedure. \u0027"},{"line_number":344,"context_line":"                \u0027Currently, the only supported value is `ilo`.\u0027"},{"line_number":345,"context_line":"            ),"},{"line_number":346,"context_line":"            \u0027required\u0027: True"}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_385c2f4a","line":343,"range":{"start_line":343,"start_character":17,"end_line":343,"end_character":35},"updated":"2016-03-04 14:52:15.000000000","message":"s/\u0027Out-of-Band (OOB)\u0027 / /\n\nThere is only one oob mechanism of firmware update. Other mechanism is in-band.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        \u0027firmware_update_mode\u0027: {"},{"line_number":341,"context_line":"            \u0027description\u0027: ("},{"line_number":342,"context_line":"                \u0027This argument indicates the mode (or mechanism) of \u0027"},{"line_number":343,"context_line":"                \u0027Out-of-Band (OOB) firmware update procedure. \u0027"},{"line_number":344,"context_line":"                \u0027Currently, the only supported value is `ilo`.\u0027"},{"line_number":345,"context_line":"            ),"},{"line_number":346,"context_line":"            \u0027required\u0027: True"}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_f0098585","line":343,"range":{"start_line":343,"start_character":17,"end_line":343,"end_character":35},"in_reply_to":"7af24918_385c2f4a","updated":"2016-03-10 09:30:47.000000000","message":"Done","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":341,"context_line":"            \u0027description\u0027: ("},{"line_number":342,"context_line":"                \u0027This argument indicates the mode (or mechanism) of \u0027"},{"line_number":343,"context_line":"                \u0027Out-of-Band (OOB) firmware update procedure. \u0027"},{"line_number":344,"context_line":"                \u0027Currently, the only supported value is `ilo`.\u0027"},{"line_number":345,"context_line":"            ),"},{"line_number":346,"context_line":"            \u0027required\u0027: True"},{"line_number":347,"context_line":"        },"}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_7b17d144","line":344,"range":{"start_line":344,"start_character":17,"end_line":344,"end_character":55},"updated":"2016-03-04 14:52:15.000000000","message":"s/\u0027Currently, the only supported value is \u0027/\u0027Supported value is \u0027/","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":341,"context_line":"            \u0027description\u0027: ("},{"line_number":342,"context_line":"                \u0027This argument indicates the mode (or mechanism) of \u0027"},{"line_number":343,"context_line":"                \u0027Out-of-Band (OOB) firmware update procedure. \u0027"},{"line_number":344,"context_line":"                \u0027Currently, the only supported value is `ilo`.\u0027"},{"line_number":345,"context_line":"            ),"},{"line_number":346,"context_line":"            \u0027required\u0027: True"},{"line_number":347,"context_line":"        },"}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_d00e098b","line":344,"range":{"start_line":344,"start_character":17,"end_line":344,"end_character":55},"in_reply_to":"7af24918_7b17d144","updated":"2016-03-10 09:30:47.000000000","message":"Done","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":347,"context_line":"        },"},{"line_number":348,"context_line":"        \u0027firmware_images\u0027: {"},{"line_number":349,"context_line":"            \u0027description\u0027: ("},{"line_number":350,"context_line":"                \u0027This argument represents the ordered list of dictionaries of \u0027"},{"line_number":351,"context_line":"                \u0027firmware image url, its checksum (md5) and component type. \u0027"},{"line_number":352,"context_line":"                \u0027The firmware images will be applied (in the order given) \u0027"},{"line_number":353,"context_line":"                \u0027one by one on the baremetal server. The different types of \u0027"},{"line_number":354,"context_line":"                \u0027firmware url schemes supported are: \u0027"},{"line_number":355,"context_line":"                \u0027`file`, `http`, `https` \u0026 `swift`. \u0027"},{"line_number":356,"context_line":"                \u0027And the different firmware components that can be updated \u0027"},{"line_number":357,"context_line":"                \u0027are: \u0027"},{"line_number":358,"context_line":"                \u0027`ilo`, `cpld`, `power_pic`, `bios` \u0026 `chassis`.\u0027"},{"line_number":359,"context_line":"            ),"},{"line_number":360,"context_line":"            \u0027required\u0027: True"},{"line_number":361,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_5bd495ea","line":358,"range":{"start_line":350,"start_character":14,"end_line":358,"end_character":65},"updated":"2016-03-04 14:52:15.000000000","message":"Can we simplify this description... Ex:-\n\u0027This argument represents the ordered list of JSON dictionaries of firmware images. Each firmware image dictionary consists of three mandatory fields namely, \u0027url\u0027, \u0027checksum\u0027 and \u0027component\u0027. These fields represents firmware image location URL, md5 checksum of image file and firmware component type respectively. The supported values for \u0027url\u0027 are \u0027`file`, `http`, `https` and `swift`. The supported values for \u0027component\u0027 are `ilo`, `cpld`, `power_pic`, `bios` and `chassis`.\u0027\n\nAlso would it be helpful if we add a \u0027firmware_images\u0027 dictionary example in the description?","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":347,"context_line":"        },"},{"line_number":348,"context_line":"        \u0027firmware_images\u0027: {"},{"line_number":349,"context_line":"            \u0027description\u0027: ("},{"line_number":350,"context_line":"                \u0027This argument represents the ordered list of dictionaries of \u0027"},{"line_number":351,"context_line":"                \u0027firmware image url, its checksum (md5) and component type. \u0027"},{"line_number":352,"context_line":"                \u0027The firmware images will be applied (in the order given) \u0027"},{"line_number":353,"context_line":"                \u0027one by one on the baremetal server. The different types of \u0027"},{"line_number":354,"context_line":"                \u0027firmware url schemes supported are: \u0027"},{"line_number":355,"context_line":"                \u0027`file`, `http`, `https` \u0026 `swift`. \u0027"},{"line_number":356,"context_line":"                \u0027And the different firmware components that can be updated \u0027"},{"line_number":357,"context_line":"                \u0027are: \u0027"},{"line_number":358,"context_line":"                \u0027`ilo`, `cpld`, `power_pic`, `bios` \u0026 `chassis`.\u0027"},{"line_number":359,"context_line":"            ),"},{"line_number":360,"context_line":"            \u0027required\u0027: True"},{"line_number":361,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_8e745e36","line":358,"range":{"start_line":350,"start_character":14,"end_line":358,"end_character":65},"in_reply_to":"7af24918_5bd495ea","updated":"2016-03-10 09:30:47.000000000","message":"I have modified this mostly in-line with your suggestion. Also, provided the doc link instead of example here. Please check.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        except exception.NodeCleaningFailure:"},{"line_number":425,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":426,"context_line":"                LOG.error(_LE(\"Firmware update for %(firmware_file)s on \""},{"line_number":427,"context_line":"                              \"node: %(node)s ... failed\"),"},{"line_number":428,"context_line":"                          {\u0027firmware_file\u0027: fw_location, \u0027node\u0027: node.uuid})"},{"line_number":429,"context_line":"        finally:"},{"line_number":430,"context_line":"            for fw_loc_obj_n_comp_tup in fw_location_objs_n_components:"}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_5e23e355","line":427,"range":{"start_line":427,"start_character":33,"end_line":427,"end_character":51},"updated":"2016-03-04 14:52:15.000000000","message":"I think in Ironic we do not have this type of formatting of message with \u0027...\u0027. May be it is better to follow same format so that user sees messages in a consistent format.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        except exception.NodeCleaningFailure:"},{"line_number":425,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":426,"context_line":"                LOG.error(_LE(\"Firmware update for %(firmware_file)s on \""},{"line_number":427,"context_line":"                              \"node: %(node)s ... failed\"),"},{"line_number":428,"context_line":"                          {\u0027firmware_file\u0027: fw_location, \u0027node\u0027: node.uuid})"},{"line_number":429,"context_line":"        finally:"},{"line_number":430,"context_line":"            for fw_loc_obj_n_comp_tup in fw_location_objs_n_components:"}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_4e56d65c","line":427,"range":{"start_line":427,"start_character":33,"end_line":427,"end_character":51},"in_reply_to":"7af24918_5e23e355","updated":"2016-03-10 09:30:47.000000000","message":"Done","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            for fw_loc_obj_n_comp_tup in fw_location_objs_n_components:"},{"line_number":431,"context_line":"                fw_loc_obj_n_comp_tup[0].remove()"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"        LOG.info(_LI(\"All Firmware operations completed successfully for \""},{"line_number":434,"context_line":"                     \"node: %s.\"), node.uuid)"}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_9ebd6b04","line":433,"range":{"start_line":433,"start_character":35,"end_line":433,"end_character":45},"updated":"2016-03-04 14:52:15.000000000","message":"s/ \u0027operations\u0027/ \u0027update operations\u0027 /","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            for fw_loc_obj_n_comp_tup in fw_location_objs_n_components:"},{"line_number":431,"context_line":"                fw_loc_obj_n_comp_tup[0].remove()"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"        LOG.info(_LI(\"All Firmware operations completed successfully for \""},{"line_number":434,"context_line":"                     \"node: %s.\"), node.uuid)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_ce9666ef","line":433,"range":{"start_line":433,"start_character":35,"end_line":433,"end_character":45},"in_reply_to":"7af24918_9ebd6b04","updated":"2016-03-10 09:30:47.000000000","message":"Done","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"}],"ironic/tests/drivers/ilo/test_firmware_processor.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"363a31f353cc0a06dff388f95c9fe26f53c99366","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        super(FirmwareProcessorTestCase, self).setUp()"},{"line_number":37,"context_line":"        self.any_url \u003d \u0027http://any_url\u0027"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        def fw_processor_fake():"},{"line_number":40,"context_line":"            pass"},{"line_number":41,"context_line":"        fw_processor_fake.url \u003d \u0027set it as required\u0027"},{"line_number":42,"context_line":"        self.fw_processor_fake \u003d fw_processor_fake"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_797c87b5","line":39,"updated":"2015-08-10 14:01:33.000000000","message":"Why do you use this function, maybe Mock instance would be better?","commit_id":"26f55b78a4ccf02a8e81878c75bf080ecad20832"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca010f932c361a33336c1abca0ae9ea4cb6624af","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        super(FirmwareProcessorTestCase, self).setUp()"},{"line_number":37,"context_line":"        self.any_url \u003d \u0027http://any_url\u0027"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        def fw_processor_fake():"},{"line_number":40,"context_line":"            pass"},{"line_number":41,"context_line":"        fw_processor_fake.url \u003d \u0027set it as required\u0027"},{"line_number":42,"context_line":"        self.fw_processor_fake \u003d fw_processor_fake"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_7efac9be","line":39,"in_reply_to":"1a4dcd0f_797c87b5","updated":"2015-08-12 14:58:11.000000000","message":"Done","commit_id":"26f55b78a4ccf02a8e81878c75bf080ecad20832"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"363a31f353cc0a06dff388f95c9fe26f53c99366","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                          ilo_fw_processor.get_fw_processor,"},{"line_number":131,"context_line":"                          any_invalid_firmware_url)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    @mock.patch("},{"line_number":134,"context_line":"        \u0027ironic.drivers.modules.ilo.firmware_processor.os\u0027, autospec\u003dTrue)"},{"line_number":135,"context_line":"    @mock.patch.object(ilo_fw_processor, \u0027_extract_fw\u0027, autospec\u003dTrue)"},{"line_number":136,"context_line":"    def test_process_fw_on_calls__download_fw_to_in_turn("}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_b9abef1d","line":133,"updated":"2015-08-10 14:01:33.000000000","message":"Please use mock.patch.object","commit_id":"26f55b78a4ccf02a8e81878c75bf080ecad20832"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"ca010f932c361a33336c1abca0ae9ea4cb6624af","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                          ilo_fw_processor.get_fw_processor,"},{"line_number":131,"context_line":"                          any_invalid_firmware_url)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    @mock.patch("},{"line_number":134,"context_line":"        \u0027ironic.drivers.modules.ilo.firmware_processor.os\u0027, autospec\u003dTrue)"},{"line_number":135,"context_line":"    @mock.patch.object(ilo_fw_processor, \u0027_extract_fw\u0027, autospec\u003dTrue)"},{"line_number":136,"context_line":"    def test_process_fw_on_calls__download_fw_to_in_turn("}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_5efd8daf","line":133,"in_reply_to":"1a4dcd0f_b9abef1d","updated":"2015-08-12 14:58:11.000000000","message":"Done","commit_id":"26f55b78a4ccf02a8e81878c75bf080ecad20832"}],"ironic/tests/unit/drivers/modules/ilo/test_common.py":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9055b88b012d120291317fa2f5cf092e288dd0bd","unresolved":false,"context_lines":[{"line_number":722,"context_line":"    @mock.patch.object(ilo_common, \u0027LOG\u0027)"},{"line_number":723,"context_line":"    def test_copy_image_to_swift(self, LOG_mock, swift_api_mock):"},{"line_number":724,"context_line":"        # ---------------------------------------------------------------------"},{"line_number":725,"context_line":"        # GIVEN"},{"line_number":726,"context_line":"        # ---------------------------------------------------------------------"},{"line_number":727,"context_line":"        self.config(swift_ilo_container\u003d\u0027ilo_container\u0027, group\u003d\u0027ilo\u0027)"},{"line_number":728,"context_line":"        self.config(swift_object_expiry_timeout\u003d1, group\u003d\u0027ilo\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_40bd99b5","line":725,"range":{"start_line":725,"start_character":0,"end_line":725,"end_character":8},"updated":"2016-01-14 18:26:29.000000000","message":"These contextual notes not the code style of the rest of the file.","commit_id":"3d5024f51d491d73ad5683fde22e6dcc54bdd0e6"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"dd319c171c5551c962923189b3f27dc4ca6d6940","unresolved":false,"context_lines":[{"line_number":722,"context_line":"    @mock.patch.object(ilo_common, \u0027LOG\u0027)"},{"line_number":723,"context_line":"    def test_copy_image_to_swift(self, LOG_mock, swift_api_mock):"},{"line_number":724,"context_line":"        # ---------------------------------------------------------------------"},{"line_number":725,"context_line":"        # GIVEN"},{"line_number":726,"context_line":"        # ---------------------------------------------------------------------"},{"line_number":727,"context_line":"        self.config(swift_ilo_container\u003d\u0027ilo_container\u0027, group\u003d\u0027ilo\u0027)"},{"line_number":728,"context_line":"        self.config(swift_object_expiry_timeout\u003d1, group\u003d\u0027ilo\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_7034a1dd","line":725,"range":{"start_line":725,"start_character":0,"end_line":725,"end_character":8},"in_reply_to":"da6ed579_40bd99b5","updated":"2016-01-18 14:45:17.000000000","message":"Have removed the #------ lines. For me, it feels easy to update the test cases with the given-when-then context as and when I need to update it as part of refactoring (or modification). So, changed that to:\n\n  # | GIVEN |\n  ... given conditions ...\n  # | WHEN |\n  ... when method under test is invoked ...\n  # | THEN |\n  ... assert for conditions ...\n\nLet me know if it still bothers as a reader of the code. Thank you.","commit_id":"3d5024f51d491d73ad5683fde22e6dcc54bdd0e6"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"e082c5dbf759dc3e76248850819bccafc0772758","unresolved":false,"context_lines":[{"line_number":724,"context_line":"    def test_copy_image_to_swift(self, LOG_mock, swift_api_mock):"},{"line_number":725,"context_line":"        # ---------------------------------------------------------------------"},{"line_number":726,"context_line":"        # GIVEN"},{"line_number":727,"context_line":"        # ---------------------------------------------------------------------"},{"line_number":728,"context_line":"        self.config(swift_ilo_container\u003d\u0027ilo_container\u0027, group\u003d\u0027ilo\u0027)"},{"line_number":729,"context_line":"        self.config(swift_object_expiry_timeout\u003d1, group\u003d\u0027ilo\u0027)"},{"line_number":730,"context_line":"        container \u003d CONF.ilo.swift_ilo_container"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba63e191_c8aefd97","line":727,"range":{"start_line":727,"start_character":10,"end_line":727,"end_character":79},"updated":"2016-01-19 21:51:29.000000000","message":"while nice for readability this is inconsistent with how other test look.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":724,"context_line":"    def test_copy_image_to_swift(self, LOG_mock, swift_api_mock):"},{"line_number":725,"context_line":"        # ---------------------------------------------------------------------"},{"line_number":726,"context_line":"        # GIVEN"},{"line_number":727,"context_line":"        # ---------------------------------------------------------------------"},{"line_number":728,"context_line":"        self.config(swift_ilo_container\u003d\u0027ilo_container\u0027, group\u003d\u0027ilo\u0027)"},{"line_number":729,"context_line":"        self.config(swift_object_expiry_timeout\u003d1, group\u003d\u0027ilo\u0027)"},{"line_number":730,"context_line":"        container \u003d CONF.ilo.swift_ilo_container"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_a469e9fa","line":727,"range":{"start_line":727,"start_character":10,"end_line":727,"end_character":79},"in_reply_to":"ba63e191_c8aefd97","updated":"2016-01-29 14:54:05.000000000","message":"can i have something of this sort in order to retain the readability aspect of it partially compromising on the consistency part?\n\n  | GIVEN | / | WHEN | / | THEN |\n\nSee this for reference:\nhttps://review.openstack.org/#/c/211019/16/ironic/tests/unit/drivers/modules/ilo/test_common.py:I833","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"96644fbfc6a4abc4a757b8742ce6c5ba94744b3b","unresolved":false,"context_lines":[{"line_number":830,"context_line":"    @mock.patch.object(ironic_utils, \u0027unlink_without_raise\u0027, spec_set\u003dTrue,"},{"line_number":831,"context_line":"                       autospec\u003dTrue)"},{"line_number":832,"context_line":"    def test_remove_single_or_list_of_files(self, unlink_mock):"},{"line_number":833,"context_line":"        # | GIVEN |"},{"line_number":834,"context_line":"        file_list \u003d [\u0027/any_path1/any_file1\u0027,"},{"line_number":835,"context_line":"                     \u0027/any_path2/any_file2\u0027,"},{"line_number":836,"context_line":"                     \u0027/any_path3/any_file3\u0027]"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_bdcd8032","line":833,"range":{"start_line":833,"start_character":7,"end_line":833,"end_character":19},"updated":"2016-01-25 13:29:49.000000000","message":"Same as Chris\u0027s comment above.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"33cb8bee141c65fa5f68177a15973669c052f69a","unresolved":false,"context_lines":[{"line_number":830,"context_line":"    @mock.patch.object(ironic_utils, \u0027unlink_without_raise\u0027, spec_set\u003dTrue,"},{"line_number":831,"context_line":"                       autospec\u003dTrue)"},{"line_number":832,"context_line":"    def test_remove_single_or_list_of_files(self, unlink_mock):"},{"line_number":833,"context_line":"        # | GIVEN |"},{"line_number":834,"context_line":"        file_list \u003d [\u0027/any_path1/any_file1\u0027,"},{"line_number":835,"context_line":"                     \u0027/any_path2/any_file2\u0027,"},{"line_number":836,"context_line":"                     \u0027/any_path3/any_file3\u0027]"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_fa84760b","line":833,"range":{"start_line":833,"start_character":7,"end_line":833,"end_character":19},"in_reply_to":"9a68dd71_6446917c","updated":"2016-02-06 15:43:03.000000000","message":"I\u0027m not going to argue with it, I do kind of like it and think it would be awesome to clean up our unit tests across the project to be more readable.    I think we\u0027re only really pointing it out because it doesn\u0027t really conform to the way the rest of the unit tests are across the project.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":830,"context_line":"    @mock.patch.object(ironic_utils, \u0027unlink_without_raise\u0027, spec_set\u003dTrue,"},{"line_number":831,"context_line":"                       autospec\u003dTrue)"},{"line_number":832,"context_line":"    def test_remove_single_or_list_of_files(self, unlink_mock):"},{"line_number":833,"context_line":"        # | GIVEN |"},{"line_number":834,"context_line":"        file_list \u003d [\u0027/any_path1/any_file1\u0027,"},{"line_number":835,"context_line":"                     \u0027/any_path2/any_file2\u0027,"},{"line_number":836,"context_line":"                     \u0027/any_path3/any_file3\u0027]"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_6446917c","line":833,"range":{"start_line":833,"start_character":7,"end_line":833,"end_character":19},"in_reply_to":"9a68dd71_bdcd8032","updated":"2016-01-29 14:54:05.000000000","message":"could i retain such markers in order to increase the readability aspect of it, may be partially compromising on the consistency part?\n\n  | GIVEN | / | WHEN | / | THEN |","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"96644fbfc6a4abc4a757b8742ce6c5ba94744b3b","unresolved":false,"context_lines":[{"line_number":842,"context_line":"                 mock.call(\u0027/any_path3/any_file3\u0027)]"},{"line_number":843,"context_line":"        unlink_mock.assert_has_calls(calls)"},{"line_number":844,"context_line":""},{"line_number":845,"context_line":"    def test_verify_image_checksum(self):"},{"line_number":846,"context_line":"        # | GIVEN |"},{"line_number":847,"context_line":"        data \u003d b\u0027Yankee Doodle went to town riding on a pony;\u0027"},{"line_number":848,"context_line":"        file_like_object \u003d six.BytesIO(data)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_10d593e6","line":845,"range":{"start_line":845,"start_character":7,"end_line":845,"end_character":40},"updated":"2016-01-25 13:29:49.000000000","message":"The checksum method should be unit tested with an actual file.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"8169afbba5dc807fcb6a0686dee8a6af45d79059","unresolved":false,"context_lines":[{"line_number":842,"context_line":"                 mock.call(\u0027/any_path3/any_file3\u0027)]"},{"line_number":843,"context_line":"        unlink_mock.assert_has_calls(calls)"},{"line_number":844,"context_line":""},{"line_number":845,"context_line":"    def test_verify_image_checksum(self):"},{"line_number":846,"context_line":"        # | GIVEN |"},{"line_number":847,"context_line":"        data \u003d b\u0027Yankee Doodle went to town riding on a pony;\u0027"},{"line_number":848,"context_line":"        file_like_object \u003d six.BytesIO(data)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_1dc1e780","line":845,"range":{"start_line":845,"start_character":7,"end_line":845,"end_character":40},"in_reply_to":"5a5ae5dd_fa0eb68a","updated":"2016-02-09 15:26:21.000000000","message":"Ok. Point taken. Have updated the ``verify_image_checksum`` method to accept only file paths (and not file like objects anymore).","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":842,"context_line":"                 mock.call(\u0027/any_path3/any_file3\u0027)]"},{"line_number":843,"context_line":"        unlink_mock.assert_has_calls(calls)"},{"line_number":844,"context_line":""},{"line_number":845,"context_line":"    def test_verify_image_checksum(self):"},{"line_number":846,"context_line":"        # | GIVEN |"},{"line_number":847,"context_line":"        data \u003d b\u0027Yankee Doodle went to town riding on a pony;\u0027"},{"line_number":848,"context_line":"        file_like_object \u003d six.BytesIO(data)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_44590d8d","line":845,"range":{"start_line":845,"start_character":7,"end_line":845,"end_character":40},"in_reply_to":"9a68dd71_10d593e6","updated":"2016-01-29 14:54:05.000000000","message":"A little bit different perspective I hold:\n\nThe method ``verify_image_checksum`` invokes the ``ir_common.utils.hash_file`` method to achieve its desired task. So, I feel the checksum validation over an actual file will already be part of the UT of that method under test (hash_file). So, here I feel it would have sufficed if we would have faked ``hash_file`` method to return the desired one (or returning a mismatched one) and match against the passing one as part of the UT of this method.\n\nWdyt?","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"33cb8bee141c65fa5f68177a15973669c052f69a","unresolved":false,"context_lines":[{"line_number":842,"context_line":"                 mock.call(\u0027/any_path3/any_file3\u0027)]"},{"line_number":843,"context_line":"        unlink_mock.assert_has_calls(calls)"},{"line_number":844,"context_line":""},{"line_number":845,"context_line":"    def test_verify_image_checksum(self):"},{"line_number":846,"context_line":"        # | GIVEN |"},{"line_number":847,"context_line":"        data \u003d b\u0027Yankee Doodle went to town riding on a pony;\u0027"},{"line_number":848,"context_line":"        file_like_object \u003d six.BytesIO(data)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_fa0eb68a","line":845,"range":{"start_line":845,"start_character":7,"end_line":845,"end_character":40},"in_reply_to":"9a68dd71_44590d8d","updated":"2016-02-06 15:43:03.000000000","message":"You raise a valid point regarding hash_file\u0027s unit test, however because the checksum method has a conditional check to see if the object can be read, and then the file is opened, which is your prime logic path that needs to be tested to ensure that if someone touches that portion of code, that the behavior does not change.  Personally, I\u0027d like to see verify_image_checksum with just one logic path.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"cb90c4052c9aacb9c10d4d16d306103c4e5edf23","unresolved":false,"context_lines":[{"line_number":838,"context_line":"        file_like_object \u003d six.BytesIO(data)"},{"line_number":839,"context_line":"        actual_hash \u003d hashlib.sha1(data).hexdigest()"},{"line_number":840,"context_line":"        # | WHEN |"},{"line_number":841,"context_line":"        ilo_common.verify_image_checksum(file_like_object, actual_hash)"},{"line_number":842,"context_line":"        # | THEN |"},{"line_number":843,"context_line":"        # no any exception thrown"},{"line_number":844,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a5ae5dd_1a7b92f6","line":841,"range":{"start_line":841,"start_character":40,"end_line":841,"end_character":57},"updated":"2016-02-06 15:45:42.000000000","message":"See comment on change set 16, I feel that this unit test ought to test the prime logic path, which involves a file being opened.  Granted, a file doesn\u0027t actually have to be created, it could be completely mocked.","commit_id":"53135d3884faad80487d56fe16b930ed6b34d1c9"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"763b5586d2b68c482a70365bcc08bd589246c7a1","unresolved":false,"context_lines":[{"line_number":838,"context_line":"        file_like_object \u003d six.BytesIO(data)"},{"line_number":839,"context_line":"        actual_hash \u003d hashlib.sha1(data).hexdigest()"},{"line_number":840,"context_line":"        # | WHEN |"},{"line_number":841,"context_line":"        ilo_common.verify_image_checksum(file_like_object, actual_hash)"},{"line_number":842,"context_line":"        # | THEN |"},{"line_number":843,"context_line":"        # no any exception thrown"},{"line_number":844,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5a5ae5dd_ddc02f2d","line":841,"range":{"start_line":841,"start_character":40,"end_line":841,"end_character":57},"in_reply_to":"5a5ae5dd_1a7b92f6","updated":"2016-02-09 15:25:48.000000000","message":"``verify_image_checksum`` takes only one logic path now. It accepts only file path. See my comment in:\nhttps://review.openstack.org/#/c/211019/16/ironic/tests/unit/drivers/modules/ilo/test_common.py :I845","commit_id":"53135d3884faad80487d56fe16b930ed6b34d1c9"}],"ironic/tests/unit/drivers/modules/ilo/test_firmware_processor.py":[{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"09abcf5317564d1c9a01e42e3eceb1a371791c31","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        # -----------------------------------------------------------------------"},{"line_number":50,"context_line":"        # THEN"},{"line_number":51,"context_line":"        # -----------------------------------------------------------------------"},{"line_number":52,"context_line":"        self.assertEqual(fw_processor.parsed_url.geturl(), self.any_url)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @mock.patch.object("},{"line_number":55,"context_line":"        ilo_fw_processor, \u0027_download_file_based_fw_to\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_05ec8cf1","line":52,"range":{"start_line":52,"start_character":71,"end_line":52,"end_character":72},"updated":"2016-01-06 05:14:40.000000000","message":"nit: assertEqual() first param should be the reference value we expected, and 2nd is the actual one.","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"fa7d54bcba9e097c10237a5296e78bd686d88bc2","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        # -----------------------------------------------------------------------"},{"line_number":50,"context_line":"        # THEN"},{"line_number":51,"context_line":"        # -----------------------------------------------------------------------"},{"line_number":52,"context_line":"        self.assertEqual(fw_processor.parsed_url.geturl(), self.any_url)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @mock.patch.object("},{"line_number":55,"context_line":"        ilo_fw_processor, \u0027_download_file_based_fw_to\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_6898bf6a","line":52,"range":{"start_line":52,"start_character":71,"end_line":52,"end_character":72},"in_reply_to":"fa69d971_05ec8cf1","updated":"2016-01-06 11:06:16.000000000","message":"Done","commit_id":"49f379172fcb7471c6c04de727430bca30f6bb78"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9055b88b012d120291317fa2f5cf092e288dd0bd","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def test_get_fw_processor_sets_the_parsed_url_attrib_of_fw_processor(self):"},{"line_number":43,"context_line":"        # get_fw_processor will set the parsed_url attribute of"},{"line_number":44,"context_line":"        # FirmwareProcessor object so created"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        # -----------------------------------------------------------------------"},{"line_number":47,"context_line":"        # WHEN"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_a0fa5573","line":44,"range":{"start_line":44,"start_character":9,"end_line":44,"end_character":10},"updated":"2016-01-14 18:26:29.000000000","message":"if these are needed, please change to docstring format.","commit_id":"3d5024f51d491d73ad5683fde22e6dcc54bdd0e6"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"dd319c171c5551c962923189b3f27dc4ca6d6940","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def test_get_fw_processor_sets_the_parsed_url_attrib_of_fw_processor(self):"},{"line_number":43,"context_line":"        # get_fw_processor will set the parsed_url attribute of"},{"line_number":44,"context_line":"        # FirmwareProcessor object so created"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        # -----------------------------------------------------------------------"},{"line_number":47,"context_line":"        # WHEN"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_b068d9bb","line":44,"range":{"start_line":44,"start_character":9,"end_line":44,"end_character":10},"in_reply_to":"da6ed579_a0fa5573","updated":"2016-01-18 14:45:17.000000000","message":"Have removed this. Done.","commit_id":"3d5024f51d491d73ad5683fde22e6dcc54bdd0e6"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9055b88b012d120291317fa2f5cf092e288dd0bd","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        ilo_fw_processor, \u0027_download_file_based_fw_to\u0027, autospec\u003dTrue)"},{"line_number":57,"context_line":"    def test__download_file_based_fw_to_gets_invoked_for_file_based_firmware("},{"line_number":58,"context_line":"            self, _download_file_based_fw_to_mock):"},{"line_number":59,"context_line":"        # _download_file_based_fw_to gets invoked when"},{"line_number":60,"context_line":"        # fw_processor is initialized with file-based firmware file"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        # -----------------------------------------------------------------------"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_c03e6927","line":59,"range":{"start_line":59,"start_character":10,"end_line":59,"end_character":36},"updated":"2016-01-14 18:26:29.000000000","message":"same as above","commit_id":"3d5024f51d491d73ad5683fde22e6dcc54bdd0e6"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"dd319c171c5551c962923189b3f27dc4ca6d6940","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        ilo_fw_processor, \u0027_download_file_based_fw_to\u0027, autospec\u003dTrue)"},{"line_number":57,"context_line":"    def test__download_file_based_fw_to_gets_invoked_for_file_based_firmware("},{"line_number":58,"context_line":"            self, _download_file_based_fw_to_mock):"},{"line_number":59,"context_line":"        # _download_file_based_fw_to gets invoked when"},{"line_number":60,"context_line":"        # fw_processor is initialized with file-based firmware file"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        # -----------------------------------------------------------------------"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_905d9517","line":59,"range":{"start_line":59,"start_character":10,"end_line":59,"end_character":36},"in_reply_to":"da6ed579_c03e6927","updated":"2016-01-18 14:45:17.000000000","message":"ditto","commit_id":"3d5024f51d491d73ad5683fde22e6dcc54bdd0e6"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9055b88b012d120291317fa2f5cf092e288dd0bd","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    def test__download_http_based_fw_to_gets_invoked_for_http_based_firmware("},{"line_number":80,"context_line":"            self, _download_http_based_fw_to_mock):"},{"line_number":81,"context_line":"        # _download_http_based_fw_to gets invoked when"},{"line_number":82,"context_line":"        # fw_processor is initialized with http-based firmware file"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        # -----------------------------------------------------------------------"},{"line_number":85,"context_line":"        # GIVEN"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_c0250909","line":82,"range":{"start_line":82,"start_character":10,"end_line":82,"end_character":22},"updated":"2016-01-14 18:26:29.000000000","message":"Same","commit_id":"3d5024f51d491d73ad5683fde22e6dcc54bdd0e6"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"dd319c171c5551c962923189b3f27dc4ca6d6940","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    def test__download_http_based_fw_to_gets_invoked_for_http_based_firmware("},{"line_number":80,"context_line":"            self, _download_http_based_fw_to_mock):"},{"line_number":81,"context_line":"        # _download_http_based_fw_to gets invoked when"},{"line_number":82,"context_line":"        # fw_processor is initialized with http-based firmware file"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        # -----------------------------------------------------------------------"},{"line_number":85,"context_line":"        # GIVEN"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_509e3db9","line":82,"range":{"start_line":82,"start_character":10,"end_line":82,"end_character":22},"in_reply_to":"da6ed579_c0250909","updated":"2016-01-18 14:45:17.000000000","message":"ditto","commit_id":"3d5024f51d491d73ad5683fde22e6dcc54bdd0e6"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9055b88b012d120291317fa2f5cf092e288dd0bd","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        ilo_fw_processor, \u0027_download_swift_based_fw_to\u0027, autospec\u003dTrue)"},{"line_number":103,"context_line":"    def test__download_swift_based_fw_to_gets_invoked_for_swift_based_firmware("},{"line_number":104,"context_line":"            self, _download_swift_based_fw_to_mock):"},{"line_number":105,"context_line":"        # _download_swift_based_fw_to gets invoked when"},{"line_number":106,"context_line":"        # fw_processor is initialized with swift-based firmware file"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        # -----------------------------------------------------------------------"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_e0804dc1","line":105,"updated":"2016-01-14 18:26:29.000000000","message":"Same","commit_id":"3d5024f51d491d73ad5683fde22e6dcc54bdd0e6"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"dd319c171c5551c962923189b3f27dc4ca6d6940","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        ilo_fw_processor, \u0027_download_swift_based_fw_to\u0027, autospec\u003dTrue)"},{"line_number":103,"context_line":"    def test__download_swift_based_fw_to_gets_invoked_for_swift_based_firmware("},{"line_number":104,"context_line":"            self, _download_swift_based_fw_to_mock):"},{"line_number":105,"context_line":"        # _download_swift_based_fw_to gets invoked when"},{"line_number":106,"context_line":"        # fw_processor is initialized with swift-based firmware file"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        # -----------------------------------------------------------------------"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_90b4b535","line":105,"in_reply_to":"da6ed579_e0804dc1","updated":"2016-01-18 14:45:17.000000000","message":"ditto","commit_id":"3d5024f51d491d73ad5683fde22e6dcc54bdd0e6"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"96644fbfc6a4abc4a757b8742ce6c5ba94744b3b","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from six.moves import builtins as __builtin__"},{"line_number":21,"context_line":"import six.moves.urllib.parse as urlparse"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"if six.PY3:"},{"line_number":24,"context_line":"    import io"},{"line_number":25,"context_line":"    file \u003d io.BytesIO"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from ironic.common import exception"},{"line_number":28,"context_line":"from ironic.drivers.modules.ilo import common as ilo_common"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_5098eb69","line":25,"range":{"start_line":23,"start_character":0,"end_line":25,"end_character":21},"updated":"2016-01-25 13:29:49.000000000","message":"This seems unused?","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"33cb8bee141c65fa5f68177a15973669c052f69a","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from six.moves import builtins as __builtin__"},{"line_number":21,"context_line":"import six.moves.urllib.parse as urlparse"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"if six.PY3:"},{"line_number":24,"context_line":"    import io"},{"line_number":25,"context_line":"    file \u003d io.BytesIO"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from ironic.common import exception"},{"line_number":28,"context_line":"from ironic.drivers.modules.ilo import common as ilo_common"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_5a910af0","line":25,"range":{"start_line":23,"start_character":0,"end_line":25,"end_character":21},"in_reply_to":"7a5de9d1_3056e8ce","updated":"2016-02-06 15:43:03.000000000","message":"Okay, I see it now, sorry for the noise.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from six.moves import builtins as __builtin__"},{"line_number":21,"context_line":"import six.moves.urllib.parse as urlparse"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"if six.PY3:"},{"line_number":24,"context_line":"    import io"},{"line_number":25,"context_line":"    file \u003d io.BytesIO"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from ironic.common import exception"},{"line_number":28,"context_line":"from ironic.drivers.modules.ilo import common as ilo_common"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a5de9d1_3056e8ce","line":25,"range":{"start_line":23,"start_character":0,"end_line":25,"end_character":21},"in_reply_to":"9a68dd71_5098eb69","updated":"2016-01-29 14:54:05.000000000","message":"It gets used in I251 and I270 of:\nhttps://review.openstack.org/#/c/211019/16/ironic/tests/unit/drivers/modules/ilo/test_firmware_processor.py","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"96644fbfc6a4abc4a757b8742ce6c5ba94744b3b","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                       spec_set\u003dTrue, autospec\u003dTrue)"},{"line_number":190,"context_line":"    @mock.patch.object("},{"line_number":191,"context_line":"        ilo_fw_processor, \u0027_extract_fw_from_file\u0027, autospec\u003dTrue)"},{"line_number":192,"context_line":"    def test_process_fw_on_verifies_checksum_of_downloaded_fw_file("},{"line_number":193,"context_line":"            self, _extract_fw_from_file_mock, verify_checksum_mock,"},{"line_number":194,"context_line":"            shutil_mock, os_mock, tempfile_mock):"},{"line_number":195,"context_line":"        # | GIVEN |"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_9d1bdc80","line":192,"updated":"2016-01-25 13:29:49.000000000","message":"Out of curiosity, I see these checksum tests, but where are we testing that an invalid checksum value, from the value of a file submitted, actually raises an exception at this level?","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                       spec_set\u003dTrue, autospec\u003dTrue)"},{"line_number":190,"context_line":"    @mock.patch.object("},{"line_number":191,"context_line":"        ilo_fw_processor, \u0027_extract_fw_from_file\u0027, autospec\u003dTrue)"},{"line_number":192,"context_line":"    def test_process_fw_on_verifies_checksum_of_downloaded_fw_file("},{"line_number":193,"context_line":"            self, _extract_fw_from_file_mock, verify_checksum_mock,"},{"line_number":194,"context_line":"            shutil_mock, os_mock, tempfile_mock):"},{"line_number":195,"context_line":"        # | GIVEN |"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a5de9d1_cb46c54e","line":192,"in_reply_to":"9a68dd71_9d1bdc80","updated":"2016-01-29 14:54:05.000000000","message":"Added that test case.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"f93be7c85c2eb757aafa6fd4304a74e47abafcaf","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Hewlett-Packard Development Company, L.P."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_8376f2d4","line":1,"range":{"start_line":1,"start_character":57,"end_line":1,"end_character":58},"updated":"2016-03-03 14:36:03.000000000","message":"Is this the correct copyright?  Given 3 months of last year would have been Hewlett Packard Enterprise Development Company LP, and it is in a commit in 2016. :)","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e0c7adfa6399294f401c9e2196557be7024294ec","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2015 Hewlett-Packard Development Company, L.P."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":20,"id":"7af24918_b9c20f51","line":1,"range":{"start_line":1,"start_character":57,"end_line":1,"end_character":58},"in_reply_to":"7af24918_8376f2d4","updated":"2016-03-04 11:51:51.000000000","message":"Although it seems nit, it matters. Thanks. Done.","commit_id":"cc12c46f239d8665229eea20bf220d5f86964166"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    def test_get_and_validate_firmware_image_info(self):"},{"line_number":77,"context_line":"        # | GIVEN |"},{"line_number":78,"context_line":"        firmware_image_info \u003d {"},{"line_number":79,"context_line":"            \u0027url\u0027: \u0027any_valid_url\u0027,"},{"line_number":80,"context_line":"            \u0027checksum\u0027: \u0027b64c8f7799cfbb553d384d34dc43fafe336cc889\u0027,"},{"line_number":81,"context_line":"            \u0027component\u0027: \u0027BIOS\u0027"},{"line_number":82,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_01845a08","line":79,"range":{"start_line":79,"start_character":20,"end_line":79,"end_character":33},"updated":"2016-03-04 14:52:15.000000000","message":"Better to use real valid URL syntax. Ex: http://a.b.c/file\nSame for all other testcases","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    def test_get_and_validate_firmware_image_info(self):"},{"line_number":77,"context_line":"        # | GIVEN |"},{"line_number":78,"context_line":"        firmware_image_info \u003d {"},{"line_number":79,"context_line":"            \u0027url\u0027: \u0027any_valid_url\u0027,"},{"line_number":80,"context_line":"            \u0027checksum\u0027: \u0027b64c8f7799cfbb553d384d34dc43fafe336cc889\u0027,"},{"line_number":81,"context_line":"            \u0027component\u0027: \u0027BIOS\u0027"},{"line_number":82,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_e5236e54","line":79,"range":{"start_line":79,"start_character":20,"end_line":79,"end_character":33},"in_reply_to":"7af24918_01845a08","updated":"2016-03-10 09:30:47.000000000","message":"Done","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            \u0027component\u0027: \u0027bios\u0027"},{"line_number":98,"context_line":"        }"},{"line_number":99,"context_line":"        # | WHEN | \u0026 | THEN |"},{"line_number":100,"context_line":"        self.assertRaises("},{"line_number":101,"context_line":"            exception.MissingParameterValue,"},{"line_number":102,"context_line":"            ilo_fw_processor.get_and_validate_firmware_image_info,"},{"line_number":103,"context_line":"            invalid_firmware_image_info)"}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_0c565105","line":100,"range":{"start_line":100,"start_character":8,"end_line":100,"end_character":26},"updated":"2016-03-04 14:52:15.000000000","message":"Since we have MissingParameterValue exception at multiple places within this method it would be helpful if we use:-\n\nself.assertRaisesRegexp(exception.MissingParameterValue, \"Firmware image info\", ilo_fw_processor.get_and_validate_firmware_image_info,invalid_firmware_image_info)","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            \u0027component\u0027: \u0027bios\u0027"},{"line_number":98,"context_line":"        }"},{"line_number":99,"context_line":"        # | WHEN | \u0026 | THEN |"},{"line_number":100,"context_line":"        self.assertRaises("},{"line_number":101,"context_line":"            exception.MissingParameterValue,"},{"line_number":102,"context_line":"            ilo_fw_processor.get_and_validate_firmware_image_info,"},{"line_number":103,"context_line":"            invalid_firmware_image_info)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_a5d046ca","line":100,"range":{"start_line":100,"start_character":8,"end_line":100,"end_character":26},"in_reply_to":"7af24918_0c565105","updated":"2016-03-10 09:30:47.000000000","message":"Done. Please check.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        self.assertRaises(exception.ImageRefValidationFailed,"},{"line_number":277,"context_line":"                          fw_processor.process_fw_on,"},{"line_number":278,"context_line":"                          node_mock,"},{"line_number":279,"context_line":"                          checksum_fake)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    @mock.patch.object(ilo_fw_processor, \u0027tempfile\u0027, autospec\u003dTrue)"},{"line_number":282,"context_line":"    @mock.patch.object(ilo_fw_processor, \u0027os\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_4c28599a","line":279,"updated":"2016-03-04 14:52:15.000000000","message":"Need to validate shutil_mock is called once.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        self.assertRaises(exception.ImageRefValidationFailed,"},{"line_number":277,"context_line":"                          fw_processor.process_fw_on,"},{"line_number":278,"context_line":"                          node_mock,"},{"line_number":279,"context_line":"                          checksum_fake)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    @mock.patch.object(ilo_fw_processor, \u0027tempfile\u0027, autospec\u003dTrue)"},{"line_number":282,"context_line":"    @mock.patch.object(ilo_fw_processor, \u0027os\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_4537c2fe","line":279,"in_reply_to":"7af24918_4c28599a","updated":"2016-03-10 09:30:47.000000000","message":"Done","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        self.assertEqual(expected_return_location.fw_image_location,"},{"line_number":310,"context_line":"                         actual_return_location.fw_image_location)"},{"line_number":311,"context_line":"        self.assertEqual(expected_return_location.fw_image_filename,"},{"line_number":312,"context_line":"                         actual_return_location.fw_image_filename)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    @mock.patch.object(__builtin__, \u0027open\u0027, autospec\u003dTrue)"},{"line_number":315,"context_line":"    @mock.patch.object("}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_67b8ce11","line":312,"updated":"2016-03-04 14:52:15.000000000","message":"Need to validate that shutil_mock is called once.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":309,"context_line":"        self.assertEqual(expected_return_location.fw_image_location,"},{"line_number":310,"context_line":"                         actual_return_location.fw_image_location)"},{"line_number":311,"context_line":"        self.assertEqual(expected_return_location.fw_image_filename,"},{"line_number":312,"context_line":"                         actual_return_location.fw_image_filename)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    @mock.patch.object(__builtin__, \u0027open\u0027, autospec\u003dTrue)"},{"line_number":315,"context_line":"    @mock.patch.object("}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_082f8f88","line":312,"in_reply_to":"7af24918_67b8ce11","updated":"2016-03-10 09:30:47.000000000","message":"Done","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":366,"context_line":"                                                     any_target_file)"},{"line_number":367,"context_line":"        # | THEN |"},{"line_number":368,"context_line":"        swift_mock.SwiftAPI().get_temp_url.assert_called_once_with("},{"line_number":369,"context_line":"            \u0027containername\u0027, \u0027objectname\u0027, mock.ANY)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    @mock.patch.object(urlparse, \u0027urlparse\u0027, autospec\u003dTrue)"},{"line_number":372,"context_line":"    @mock.patch.object("}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_e7acdea0","line":369,"updated":"2016-03-04 14:52:15.000000000","message":"Need to validate that _download_http_based_fw_to_mock and urlparse_mock are called once.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":366,"context_line":"                                                     any_target_file)"},{"line_number":367,"context_line":"        # | THEN |"},{"line_number":368,"context_line":"        swift_mock.SwiftAPI().get_temp_url.assert_called_once_with("},{"line_number":369,"context_line":"            \u0027containername\u0027, \u0027objectname\u0027, mock.ANY)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    @mock.patch.object(urlparse, \u0027urlparse\u0027, autospec\u003dTrue)"},{"line_number":372,"context_line":"    @mock.patch.object("}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_e82983e7","line":369,"in_reply_to":"7af24918_e7acdea0","updated":"2016-03-10 09:30:47.000000000","message":"asserting the call to ``_download_http_based_fw_to`` is done as per the next text case: https://review.openstack.org/#/c/211019/21/ironic/tests/unit/drivers/modules/ilo/test_firmware_processor.py@375\n\n``urlparse_mock`` call is added as part of the next test case.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":400,"context_line":"        any_target_file \u003d \u0027any_target_file\u0027"},{"line_number":401,"context_line":"        ilo_object_mock \u003d ilo_common_mock.get_ilo_object.return_value"},{"line_number":402,"context_line":"        utils_mock.process_firmware_image.return_value \u003d (\u0027some_location\u0027,"},{"line_number":403,"context_line":"                                                          True, True)"},{"line_number":404,"context_line":"        # | WHEN |"},{"line_number":405,"context_line":"        ilo_fw_processor._extract_fw_from_file(node_mock, any_target_file)"},{"line_number":406,"context_line":"        # | THEN |"}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_a7f3f671","line":403,"updated":"2016-03-04 14:52:15.000000000","message":"There are more methods called when \u0027to_upload\u0027 is returned True by process_firmware_image()","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":400,"context_line":"        any_target_file \u003d \u0027any_target_file\u0027"},{"line_number":401,"context_line":"        ilo_object_mock \u003d ilo_common_mock.get_ilo_object.return_value"},{"line_number":402,"context_line":"        utils_mock.process_firmware_image.return_value \u003d (\u0027some_location\u0027,"},{"line_number":403,"context_line":"                                                          True, True)"},{"line_number":404,"context_line":"        # | WHEN |"},{"line_number":405,"context_line":"        ilo_fw_processor._extract_fw_from_file(node_mock, any_target_file)"},{"line_number":406,"context_line":"        # | THEN |"}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_999bf365","line":403,"in_reply_to":"7af24918_a7f3f671","updated":"2016-03-10 09:30:47.000000000","message":"These, I feel, are taken care of as part of the latest code base.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"c09fc7be216b52f5d075d42eca7f712a9decebf1","unresolved":false,"context_lines":[{"line_number":437,"context_line":"            ilo_fw_processor._extract_fw_from_file(node_mock, any_target_file))"},{"line_number":438,"context_line":"        location_obj.remove()"},{"line_number":439,"context_line":"        # | THEN |"},{"line_number":440,"context_line":"        _remove_mock.assert_called_once_with(location_obj)"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"    @mock.patch.object(ilo_fw_processor, \u0027ilo_common\u0027, autospec\u003dTrue)"},{"line_number":443,"context_line":"    @mock.patch.object(ilo_fw_processor, \u0027CONF\u0027)"}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_d28a421a","line":440,"updated":"2016-03-04 14:52:15.000000000","message":"Assert that utils_mock is called.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"e68a9b3ab595dc94ec3c0ca88e20900637649038","unresolved":false,"context_lines":[{"line_number":437,"context_line":"            ilo_fw_processor._extract_fw_from_file(node_mock, any_target_file))"},{"line_number":438,"context_line":"        location_obj.remove()"},{"line_number":439,"context_line":"        # | THEN |"},{"line_number":440,"context_line":"        _remove_mock.assert_called_once_with(location_obj)"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"    @mock.patch.object(ilo_fw_processor, \u0027ilo_common\u0027, autospec\u003dTrue)"},{"line_number":443,"context_line":"    @mock.patch.object(ilo_fw_processor, \u0027CONF\u0027)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5aef4532_f942f7ac","line":440,"in_reply_to":"7af24918_d28a421a","updated":"2016-03-10 09:30:47.000000000","message":"Going by this test method, does it need to assert the call to ``utils_mock``? I have setup the mock ``utils_mock.process_firmware_image`` to return my desired result as part of GIVEN condition.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"3880f90aa031551491e503959f2f9df8dd32f771","unresolved":false,"context_lines":[{"line_number":449,"context_line":"        any_target_file \u003d \u0027any_target_file\u0027"},{"line_number":450,"context_line":"        utils_mock.process_firmware_image.return_value \u003d ("},{"line_number":451,"context_line":"            \u0027some_location/some_fw_file\u0027, True, True)"},{"line_number":452,"context_line":"        CONG_mock.ilo.use_web_server_for_images \u003d True"},{"line_number":453,"context_line":"        # | WHEN |"},{"line_number":454,"context_line":"        ilo_fw_processor._extract_fw_from_file(node_mock, any_target_file)"},{"line_number":455,"context_line":"        # | THEN |"}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_008bbb1f","line":452,"updated":"2016-03-04 12:18:12.000000000","message":"Instead of mocking, you could just do\n\n self.config(...)\n\nsee other tests for reference.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"4914f628d84fded1acdad2cc063600300fb7decd","unresolved":false,"context_lines":[{"line_number":449,"context_line":"        any_target_file \u003d \u0027any_target_file\u0027"},{"line_number":450,"context_line":"        utils_mock.process_firmware_image.return_value \u003d ("},{"line_number":451,"context_line":"            \u0027some_location/some_fw_file\u0027, True, True)"},{"line_number":452,"context_line":"        CONG_mock.ilo.use_web_server_for_images \u003d True"},{"line_number":453,"context_line":"        # | WHEN |"},{"line_number":454,"context_line":"        ilo_fw_processor._extract_fw_from_file(node_mock, any_target_file)"},{"line_number":455,"context_line":"        # | THEN |"}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_365721cb","line":452,"in_reply_to":"7af24918_008bbb1f","updated":"2016-03-04 13:49:33.000000000","message":"Done","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"1e90b84576438657cc9378dfc239db756bae3979","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Hewlett Packard Enterprise Development Company, L.P."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":22,"id":"7af24918_95c1c1e6","line":1,"range":{"start_line":1,"start_character":64,"end_line":1,"end_character":65},"updated":"2016-03-04 15:49:10.000000000","message":"no comma or periods.","commit_id":"da972342c6dbde98da8a9f27375349678e73fd7e"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f0cd1bbf56ac5903520ee0359aca85adb6093257","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Hewlett Packard Enterprise Development Company, L.P."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":22,"id":"5aef4532_19e08395","line":1,"range":{"start_line":1,"start_character":64,"end_line":1,"end_character":65},"in_reply_to":"7af24918_95c1c1e6","updated":"2016-03-10 09:32:33.000000000","message":"Done","commit_id":"da972342c6dbde98da8a9f27375349678e73fd7e"}],"ironic/tests/unit/drivers/modules/ilo/test_management.py":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"96644fbfc6a4abc4a757b8742ce6c5ba94744b3b","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":"from oslo_config import cfg"},{"line_number":19,"context_line":"from oslo_utils import importutils"},{"line_number":20,"context_line":"import six"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"if six.PY3:"},{"line_number":23,"context_line":"    import io"},{"line_number":24,"context_line":"    file \u003d io.BytesIO"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from ironic.common import boot_devices"},{"line_number":27,"context_line":"from ironic.common import exception"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a68dd71_d054dbca","line":24,"range":{"start_line":20,"start_character":0,"end_line":24,"end_character":21},"updated":"2016-01-25 13:29:49.000000000","message":"This seems unrelated to the tests added.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f6a122d483b8f05a3db5c3e4630c39fd9006a1b4","unresolved":false,"context_lines":[{"line_number":17,"context_line":"import mock"},{"line_number":18,"context_line":"from oslo_config import cfg"},{"line_number":19,"context_line":"from oslo_utils import importutils"},{"line_number":20,"context_line":"import six"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"if six.PY3:"},{"line_number":23,"context_line":"    import io"},{"line_number":24,"context_line":"    file \u003d io.BytesIO"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from ironic.common import boot_devices"},{"line_number":27,"context_line":"from ironic.common import exception"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a5de9d1_3d1ec05f","line":24,"range":{"start_line":20,"start_character":0,"end_line":24,"end_character":21},"in_reply_to":"9a68dd71_d054dbca","updated":"2016-01-29 14:54:05.000000000","message":"removed this. Thanks.","commit_id":"027d50533a844c2c801d6169c3a5fb25cc7f0a5f"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"3880f90aa031551491e503959f2f9df8dd32f771","unresolved":false,"context_lines":[{"line_number":447,"context_line":"                       spec_set\u003dTrue, autospec\u003dTrue)"},{"line_number":448,"context_line":"    @mock.patch.object(ilo_management.firmware_processor, \u0027FirmwareProcessor\u0027,"},{"line_number":449,"context_line":"                       spec_set\u003dTrue, autospec\u003dTrue)"},{"line_number":450,"context_line":"    def test_update_firmware_doesnt_update_any_if_processing_on_any_url_fails("},{"line_number":451,"context_line":"            self, FirmwareProcessor_mock, clean_step_mock):"},{"line_number":452,"context_line":"        \"\"\"update_firmware throws error for failure in processing any url"},{"line_number":453,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_400b037d","line":450,"updated":"2016-03-04 12:18:12.000000000","message":"Might be also worth adding a test where _execute_ilo_clean_step raises NodeCleaningFailure, log.error is called and files are cleaned up.","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"4914f628d84fded1acdad2cc063600300fb7decd","unresolved":false,"context_lines":[{"line_number":447,"context_line":"                       spec_set\u003dTrue, autospec\u003dTrue)"},{"line_number":448,"context_line":"    @mock.patch.object(ilo_management.firmware_processor, \u0027FirmwareProcessor\u0027,"},{"line_number":449,"context_line":"                       spec_set\u003dTrue, autospec\u003dTrue)"},{"line_number":450,"context_line":"    def test_update_firmware_doesnt_update_any_if_processing_on_any_url_fails("},{"line_number":451,"context_line":"            self, FirmwareProcessor_mock, clean_step_mock):"},{"line_number":452,"context_line":"        \"\"\"update_firmware throws error for failure in processing any url"},{"line_number":453,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"7af24918_bb8dd932","line":450,"in_reply_to":"7af24918_400b037d","updated":"2016-03-04 13:49:33.000000000","message":"Done","commit_id":"b24cbc4ed2dc42c6f10a16cc3bb243f1b6458e44"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"3638d4b32b53ad7e4485c280eda72a723c397b01","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        with task_manager.acquire(self.context, self.node.uuid,"},{"line_number":338,"context_line":"                                  shared\u003dFalse) as task:"},{"line_number":339,"context_line":"            # | GIVEN |"},{"line_number":340,"context_line":"            firmware_images \u003d ["},{"line_number":341,"context_line":"                {"},{"line_number":342,"context_line":"                    \u0027url\u0027: \u0027file:///any_path\u0027,"},{"line_number":343,"context_line":"                    \u0027checksum\u0027: \u0027xxxx\u0027,"}],"source_content_type":"text/x-python","patch_set":22,"id":"7af24918_6d68a188","line":340,"range":{"start_line":340,"start_character":12,"end_line":340,"end_character":27},"updated":"2016-03-04 18:55:08.000000000","message":"may be over kill but I would also like to see cases for:\ncomponents: power_pic and chassis\nand https urls \nMainly so that we can be assured that this support is not affected by a future patch.","commit_id":"da972342c6dbde98da8a9f27375349678e73fd7e"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"f0cd1bbf56ac5903520ee0359aca85adb6093257","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        with task_manager.acquire(self.context, self.node.uuid,"},{"line_number":338,"context_line":"                                  shared\u003dFalse) as task:"},{"line_number":339,"context_line":"            # | GIVEN |"},{"line_number":340,"context_line":"            firmware_images \u003d ["},{"line_number":341,"context_line":"                {"},{"line_number":342,"context_line":"                    \u0027url\u0027: \u0027file:///any_path\u0027,"},{"line_number":343,"context_line":"                    \u0027checksum\u0027: \u0027xxxx\u0027,"}],"source_content_type":"text/x-python","patch_set":22,"id":"5aef4532_6e011206","line":340,"range":{"start_line":340,"start_character":12,"end_line":340,"end_character":27},"in_reply_to":"7af24918_6d68a188","updated":"2016-03-10 09:32:33.000000000","message":"Done","commit_id":"da972342c6dbde98da8a9f27375349678e73fd7e"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"e94fd3f60f1b59a4cca886a6a029463fe2ecd133","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            firmware_images \u003d ["},{"line_number":341,"context_line":"                {"},{"line_number":342,"context_line":"                    \u0027url\u0027: \u0027file:///any_path\u0027,"},{"line_number":343,"context_line":"                    \u0027checksum\u0027: \u0027xxxx\u0027,"},{"line_number":344,"context_line":"                    \u0027component\u0027: \u0027ilo\u0027"},{"line_number":345,"context_line":"                },"},{"line_number":346,"context_line":"                {"}],"source_content_type":"text/x-python","patch_set":23,"id":"7af24918_8c36bae5","line":343,"range":{"start_line":343,"start_character":33,"end_line":343,"end_character":37},"updated":"2016-03-05 14:03:04.000000000","message":"nit: use real seeming checksum values.","commit_id":"3e113386ce3cf5c1faacccc9b27b9b62353eaf4c"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"e94fd3f60f1b59a4cca886a6a029463fe2ecd133","unresolved":false,"context_lines":[{"line_number":403,"context_line":"            firmware_update_args \u003d {\u0027firmware_update_mode\u0027: \u0027invalid_mode\u0027,"},{"line_number":404,"context_line":"                                    \u0027firmware_images\u0027: None}"},{"line_number":405,"context_line":"            # | WHEN \u0026 THEN |"},{"line_number":406,"context_line":"            self.assertRaises(exception.InvalidParameterValue,"},{"line_number":407,"context_line":"                              task.driver.management.update_firmware,"},{"line_number":408,"context_line":"                              task,"},{"line_number":409,"context_line":"                              **firmware_update_args)"}],"source_content_type":"text/x-python","patch_set":23,"id":"7af24918_2704dfc4","line":406,"updated":"2016-03-05 14:03:04.000000000","message":"Shouldn\u0027t this be NodeCleaningFailure exception?","commit_id":"3e113386ce3cf5c1faacccc9b27b9b62353eaf4c"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"e94fd3f60f1b59a4cca886a6a029463fe2ecd133","unresolved":false,"context_lines":[{"line_number":406,"context_line":"            self.assertRaises(exception.InvalidParameterValue,"},{"line_number":407,"context_line":"                              task.driver.management.update_firmware,"},{"line_number":408,"context_line":"                              task,"},{"line_number":409,"context_line":"                              **firmware_update_args)"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    def test_update_firmware_throws_error_for_no_firmware_url(self):"},{"line_number":412,"context_line":"        with task_manager.acquire(self.context, self.node.uuid,"}],"source_content_type":"text/x-python","patch_set":23,"id":"7af24918_0709e3dd","line":409,"updated":"2016-03-05 14:03:04.000000000","message":"Validate that _execute_ilo_clean_step() method should not get called.","commit_id":"3e113386ce3cf5c1faacccc9b27b9b62353eaf4c"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"e94fd3f60f1b59a4cca886a6a029463fe2ecd133","unresolved":false,"context_lines":[{"line_number":415,"context_line":"            firmware_update_args \u003d {\u0027firmware_update_mode\u0027: \u0027ilo\u0027,"},{"line_number":416,"context_line":"                                    \u0027firmware_images\u0027: []}"},{"line_number":417,"context_line":"            # | WHEN \u0026 THEN |"},{"line_number":418,"context_line":"            self.assertRaises(exception.InvalidParameterValue,"},{"line_number":419,"context_line":"                              task.driver.management.update_firmware,"},{"line_number":420,"context_line":"                              task,"},{"line_number":421,"context_line":"                              **firmware_update_args)"}],"source_content_type":"text/x-python","patch_set":23,"id":"7af24918_670ee7e6","line":418,"updated":"2016-03-05 14:03:04.000000000","message":"Shouldn\u0027t this be NodeCleaningFailure exception?","commit_id":"3e113386ce3cf5c1faacccc9b27b9b62353eaf4c"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"e94fd3f60f1b59a4cca886a6a029463fe2ecd133","unresolved":false,"context_lines":[{"line_number":418,"context_line":"            self.assertRaises(exception.InvalidParameterValue,"},{"line_number":419,"context_line":"                              task.driver.management.update_firmware,"},{"line_number":420,"context_line":"                              task,"},{"line_number":421,"context_line":"                              **firmware_update_args)"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"    def test_update_firmware_throws_error_for_invalid_component_type(self):"},{"line_number":424,"context_line":"        with task_manager.acquire(self.context, self.node.uuid,"}],"source_content_type":"text/x-python","patch_set":23,"id":"7af24918_4713eb0d","line":421,"updated":"2016-03-05 14:03:04.000000000","message":"Validate that _execute_ilo_clean_step() method should not get called.","commit_id":"3e113386ce3cf5c1faacccc9b27b9b62353eaf4c"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"e94fd3f60f1b59a4cca886a6a029463fe2ecd133","unresolved":false,"context_lines":[{"line_number":436,"context_line":"            self.assertRaises(exception.NodeCleaningFailure,"},{"line_number":437,"context_line":"                              task.driver.management.update_firmware,"},{"line_number":438,"context_line":"                              task,"},{"line_number":439,"context_line":"                              **firmware_update_args)"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"    @mock.patch.object(ilo_management, \u0027LOG\u0027)"},{"line_number":442,"context_line":"    @mock.patch.object(ilo_management.firmware_processor.FirmwareProcessor,"}],"source_content_type":"text/x-python","patch_set":23,"id":"7af24918_a7f8efc5","line":439,"updated":"2016-03-05 14:03:04.000000000","message":"Validate that _execute_ilo_clean_step() method should not get called.","commit_id":"3e113386ce3cf5c1faacccc9b27b9b62353eaf4c"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"e94fd3f60f1b59a4cca886a6a029463fe2ecd133","unresolved":false,"context_lines":[{"line_number":459,"context_line":"            self.assertRaises(exception.NodeCleaningFailure,"},{"line_number":460,"context_line":"                              task.driver.management.update_firmware,"},{"line_number":461,"context_line":"                              task,"},{"line_number":462,"context_line":"                              **firmware_update_args)"},{"line_number":463,"context_line":""},{"line_number":464,"context_line":"    @mock.patch.object(ilo_management, \u0027_execute_ilo_clean_step\u0027,"},{"line_number":465,"context_line":"                       spec_set\u003dTrue, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":23,"id":"7af24918_87f5f3cc","line":462,"updated":"2016-03-05 14:03:04.000000000","message":"Validate that _execute_ilo_clean_step() method should not get called.","commit_id":"3e113386ce3cf5c1faacccc9b27b9b62353eaf4c"}],"releasenotes/notes/ilo-firmware-update-manual-clean-step-e6763dc6dc0d441b.yaml":[{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"e94fd3f60f1b59a4cca886a6a029463fe2ecd133","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---\r"},{"line_number":2,"context_line":"features:\r"},{"line_number":3,"context_line":"  - iLO drivers now provide out-of-band firmware update as a manual cleaning\r"},{"line_number":4,"context_line":"    step, for supported hardware components.\r"}],"source_content_type":"text/x-yaml","patch_set":23,"id":"7af24918_47e12bfe","line":4,"range":{"start_line":4,"start_character":4,"end_line":4,"end_character":44},"updated":"2016-03-05 14:03:04.000000000","message":"Should mention :-\n1. Step name\n2. Supported firmware components","commit_id":"3e113386ce3cf5c1faacccc9b27b9b62353eaf4c"}]}
