)]}'
{"proliantutils/hpsum.py":[{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"d0bd7e315898e0df7bfc692423d81ad623156f0b","unresolved":false,"context_lines":[{"line_number":31,"context_line":"HPSUM_LOCATION \u003d \u0027hp/swpackages/hpsum\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def _return_code_mapping(exit_code):"},{"line_number":35,"context_line":"    \"\"\"Maps the exit code with the status.\"\"\""},{"line_number":36,"context_line":"    return_code \u003d {"},{"line_number":37,"context_line":"        0: \"The smart component was installed successfully.\","}],"source_content_type":"text/x-python","patch_set":3,"id":"5a3905b3_6016f8a8","line":34,"range":{"start_line":34,"start_character":4,"end_line":34,"end_character":24},"updated":"2017-01-25 10:11:45.000000000","message":"s/_return_code_mapping/_get_string_for(exit_code)","commit_id":"07774b8953fa89f6de3d09cb855c5a23ac9062f3"}],"proliantutils/hpsum/hpsum_controller.py":[{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"2e75fe5063cbb5fa800612852f81caa6bf4fd6c7","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    \"\"\""},{"line_number":69,"context_line":"    cmd \u003d \"\""},{"line_number":70,"context_line":"    if components:"},{"line_number":71,"context_line":"        components \u003d components.split(\u0027,\u0027)"},{"line_number":72,"context_line":"        for item in components:"},{"line_number":73,"context_line":"            cmd \u003d cmd + \" --c \" + str(item)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a461143_c40f6d2c","line":71,"range":{"start_line":71,"start_character":8,"end_line":71,"end_character":42},"updated":"2017-01-27 17:47:37.000000000","message":"don\u0027t we need some more validation logic here?","commit_id":"95feddaed67f4186dc17cb888bd5f4223c994147"},{"author":{"_account_id":15074,"name":"Aparna","email":"aparnavtce@gmail.com","username":"Aparna"},"change_message_id":"adcbe3f18cff5645d6358626c626e1757ce23381","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    \"\"\""},{"line_number":69,"context_line":"    cmd \u003d \"\""},{"line_number":70,"context_line":"    if components:"},{"line_number":71,"context_line":"        components \u003d components.split(\u0027,\u0027)"},{"line_number":72,"context_line":"        for item in components:"},{"line_number":73,"context_line":"            cmd \u003d cmd + \" --c \" + str(item)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a461143_544140a8","line":71,"range":{"start_line":71,"start_character":8,"end_line":71,"end_character":42},"in_reply_to":"3a461143_c40f6d2c","updated":"2017-01-30 12:30:37.000000000","message":"Added to the parent patch.","commit_id":"95feddaed67f4186dc17cb888bd5f4223c994147"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"2e75fe5063cbb5fa800612852f81caa6bf4fd6c7","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        stdout, stderr \u003d processutils.execute(hpsum_file_path, \"--s\","},{"line_number":77,"context_line":"                                              \"--romonly\", cmd)"},{"line_number":78,"context_line":"    except processutils.ProcessExecutionError as e:"},{"line_number":79,"context_line":"        if e.exit_code \u003e\u003d 0 and e.exit_code \u003c\u003d 7:"},{"line_number":80,"context_line":"            msg \u003d _get_string_for(e.exit_code)"},{"line_number":81,"context_line":"        else:"},{"line_number":82,"context_line":"            msg \u003d \"Unable to perform hpsum firmware update on the node.\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a461143_8110f7a9","line":79,"range":{"start_line":79,"start_character":26,"end_line":79,"end_character":27},"updated":"2017-01-27 17:47:37.000000000","message":"Even for successful execution of hpsum f/w update operation (assuming exit code to be 0 on SUCCESS), will it hit the ``processutils.ProcessExecutionError`` error?","commit_id":"95feddaed67f4186dc17cb888bd5f4223c994147"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"2e75fe5063cbb5fa800612852f81caa6bf4fd6c7","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        stdout, stderr \u003d processutils.execute(hpsum_file_path, \"--s\","},{"line_number":77,"context_line":"                                              \"--romonly\", cmd)"},{"line_number":78,"context_line":"    except processutils.ProcessExecutionError as e:"},{"line_number":79,"context_line":"        if e.exit_code \u003e\u003d 0 and e.exit_code \u003c\u003d 7:"},{"line_number":80,"context_line":"            msg \u003d _get_string_for(e.exit_code)"},{"line_number":81,"context_line":"        else:"},{"line_number":82,"context_line":"            msg \u003d \"Unable to perform hpsum firmware update on the node.\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a461143_c1f4bf88","line":79,"range":{"start_line":79,"start_character":11,"end_line":79,"end_character":48},"updated":"2017-01-27 17:47:37.000000000","message":"using interval comparison you can also do (I suppose):\n\n  if 0 \u003c\u003d e.exit_code \u003c\u003d 7:\n    ...","commit_id":"95feddaed67f4186dc17cb888bd5f4223c994147"},{"author":{"_account_id":15074,"name":"Aparna","email":"aparnavtce@gmail.com","username":"Aparna"},"change_message_id":"adcbe3f18cff5645d6358626c626e1757ce23381","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        stdout, stderr \u003d processutils.execute(hpsum_file_path, \"--s\","},{"line_number":77,"context_line":"                                              \"--romonly\", cmd)"},{"line_number":78,"context_line":"    except processutils.ProcessExecutionError as e:"},{"line_number":79,"context_line":"        if e.exit_code \u003e\u003d 0 and e.exit_code \u003c\u003d 7:"},{"line_number":80,"context_line":"            msg \u003d _get_string_for(e.exit_code)"},{"line_number":81,"context_line":"        else:"},{"line_number":82,"context_line":"            msg \u003d \"Unable to perform hpsum firmware update on the node.\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a461143_5a45f0b0","line":79,"range":{"start_line":79,"start_character":26,"end_line":79,"end_character":27},"in_reply_to":"3a461143_8110f7a9","updated":"2017-01-30 12:30:37.000000000","message":"Yes, Even when the updation is success, it will raise processutils exception","commit_id":"95feddaed67f4186dc17cb888bd5f4223c994147"},{"author":{"_account_id":15074,"name":"Aparna","email":"aparnavtce@gmail.com","username":"Aparna"},"change_message_id":"adcbe3f18cff5645d6358626c626e1757ce23381","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        stdout, stderr \u003d processutils.execute(hpsum_file_path, \"--s\","},{"line_number":77,"context_line":"                                              \"--romonly\", cmd)"},{"line_number":78,"context_line":"    except processutils.ProcessExecutionError as e:"},{"line_number":79,"context_line":"        if e.exit_code \u003e\u003d 0 and e.exit_code \u003c\u003d 7:"},{"line_number":80,"context_line":"            msg \u003d _get_string_for(e.exit_code)"},{"line_number":81,"context_line":"        else:"},{"line_number":82,"context_line":"            msg \u003d \"Unable to perform hpsum firmware update on the node.\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a461143_5a733015","line":79,"range":{"start_line":79,"start_character":11,"end_line":79,"end_character":48},"in_reply_to":"3a461143_c1f4bf88","updated":"2017-01-30 12:30:37.000000000","message":"Done","commit_id":"95feddaed67f4186dc17cb888bd5f4223c994147"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"2e75fe5063cbb5fa800612852f81caa6bf4fd6c7","unresolved":false,"context_lines":[{"line_number":193,"context_line":"    vmedia_mount_point \u003d tempfile.mkdtemp()"},{"line_number":194,"context_line":"    try:"},{"line_number":195,"context_line":"        try:"},{"line_number":196,"context_line":"            stdout, stderr \u003d processutils.execute(\"mount\", vmedia_device_file,"},{"line_number":197,"context_line":"                                                  vmedia_mount_point)"},{"line_number":198,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":199,"context_line":"            msg \u003d (\"Unable to mount virtual media device %(device)s: \""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a461143_616eab02","line":196,"range":{"start_line":196,"start_character":12,"end_line":196,"end_character":29},"updated":"2017-01-27 17:47:37.000000000","message":"if you are using these variables, then better not capture those.","commit_id":"95feddaed67f4186dc17cb888bd5f4223c994147"},{"author":{"_account_id":15074,"name":"Aparna","email":"aparnavtce@gmail.com","username":"Aparna"},"change_message_id":"adcbe3f18cff5645d6358626c626e1757ce23381","unresolved":false,"context_lines":[{"line_number":193,"context_line":"    vmedia_mount_point \u003d tempfile.mkdtemp()"},{"line_number":194,"context_line":"    try:"},{"line_number":195,"context_line":"        try:"},{"line_number":196,"context_line":"            stdout, stderr \u003d processutils.execute(\"mount\", vmedia_device_file,"},{"line_number":197,"context_line":"                                                  vmedia_mount_point)"},{"line_number":198,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":199,"context_line":"            msg \u003d (\"Unable to mount virtual media device %(device)s: \""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a461143_641cd5c1","line":196,"range":{"start_line":196,"start_character":12,"end_line":196,"end_character":29},"in_reply_to":"3a461143_616eab02","updated":"2017-01-30 12:30:37.000000000","message":"Done","commit_id":"95feddaed67f4186dc17cb888bd5f4223c994147"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"2e75fe5063cbb5fa800612852f81caa6bf4fd6c7","unresolved":false,"context_lines":[{"line_number":201,"context_line":"            raise exception.HpsumOperationError(msg)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        hpsum_file_path \u003d os.path.join(vmedia_mount_point, HPSUM_LOCATION)"},{"line_number":204,"context_line":"        components \u003d _get_clean_arg_value(node, \u0027component\u0027)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        stdout \u003d _execute_hpsum(hpsum_file_path, components)"},{"line_number":207,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a461143_a126d3cb","line":204,"range":{"start_line":204,"start_character":8,"end_line":204,"end_character":18},"updated":"2017-01-27 17:47:37.000000000","message":"is this a comma separated list of components(filenames)?","commit_id":"95feddaed67f4186dc17cb888bd5f4223c994147"},{"author":{"_account_id":15074,"name":"Aparna","email":"aparnavtce@gmail.com","username":"Aparna"},"change_message_id":"adcbe3f18cff5645d6358626c626e1757ce23381","unresolved":false,"context_lines":[{"line_number":201,"context_line":"            raise exception.HpsumOperationError(msg)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        hpsum_file_path \u003d os.path.join(vmedia_mount_point, HPSUM_LOCATION)"},{"line_number":204,"context_line":"        components \u003d _get_clean_arg_value(node, \u0027component\u0027)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        stdout \u003d _execute_hpsum(hpsum_file_path, components)"},{"line_number":207,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a461143_c4074916","line":204,"range":{"start_line":204,"start_character":8,"end_line":204,"end_character":18},"in_reply_to":"3a461143_a126d3cb","updated":"2017-01-30 12:30:37.000000000","message":"yes it is.","commit_id":"95feddaed67f4186dc17cb888bd5f4223c994147"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"2e75fe5063cbb5fa800612852f81caa6bf4fd6c7","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        hpsum_file_path \u003d os.path.join(vmedia_mount_point, HPSUM_LOCATION)"},{"line_number":204,"context_line":"        components \u003d _get_clean_arg_value(node, \u0027component\u0027)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        stdout \u003d _execute_hpsum(hpsum_file_path, components)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        details \u003d _parse_hpsum_ouput()"},{"line_number":209,"context_line":"        result \u003d (\"Summary: %(stdout)s. Details: %(output)s\" %"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a461143_e1e61bb3","line":206,"range":{"start_line":206,"start_character":8,"end_line":206,"end_character":14},"updated":"2017-01-27 17:47:37.000000000","message":"s/stdout/result_msg (or something of that sort)","commit_id":"95feddaed67f4186dc17cb888bd5f4223c994147"},{"author":{"_account_id":15074,"name":"Aparna","email":"aparnavtce@gmail.com","username":"Aparna"},"change_message_id":"adcbe3f18cff5645d6358626c626e1757ce23381","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        hpsum_file_path \u003d os.path.join(vmedia_mount_point, HPSUM_LOCATION)"},{"line_number":204,"context_line":"        components \u003d _get_clean_arg_value(node, \u0027component\u0027)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        stdout \u003d _execute_hpsum(hpsum_file_path, components)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        details \u003d _parse_hpsum_ouput()"},{"line_number":209,"context_line":"        result \u003d (\"Summary: %(stdout)s. Details: %(output)s\" %"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a461143_1a544851","line":206,"range":{"start_line":206,"start_character":8,"end_line":206,"end_character":14},"in_reply_to":"3a461143_e1e61bb3","updated":"2017-01-30 12:30:37.000000000","message":"Done","commit_id":"95feddaed67f4186dc17cb888bd5f4223c994147"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"2e75fe5063cbb5fa800612852f81caa6bf4fd6c7","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        result \u003d (\"Summary: %(stdout)s. Details: %(output)s\" %"},{"line_number":210,"context_line":"                  {\u0027stdout\u0027: stdout, \u0027output\u0027: details})"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        stdout, stderr \u003d processutils.trycmd(\"umount\","},{"line_number":213,"context_line":"                                             vmedia_mount_point)"},{"line_number":214,"context_line":"    finally:"},{"line_number":215,"context_line":"        shutil.rmtree(vmedia_mount_point, ignore_errors\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a461143_c1859fad","line":212,"range":{"start_line":212,"start_character":8,"end_line":212,"end_character":25},"updated":"2017-01-27 17:47:37.000000000","message":"ditto","commit_id":"95feddaed67f4186dc17cb888bd5f4223c994147"},{"author":{"_account_id":15074,"name":"Aparna","email":"aparnavtce@gmail.com","username":"Aparna"},"change_message_id":"adcbe3f18cff5645d6358626c626e1757ce23381","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        result \u003d (\"Summary: %(stdout)s. Details: %(output)s\" %"},{"line_number":210,"context_line":"                  {\u0027stdout\u0027: stdout, \u0027output\u0027: details})"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        stdout, stderr \u003d processutils.trycmd(\"umount\","},{"line_number":213,"context_line":"                                             vmedia_mount_point)"},{"line_number":214,"context_line":"    finally:"},{"line_number":215,"context_line":"        shutil.rmtree(vmedia_mount_point, ignore_errors\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a461143_847b81f4","line":212,"range":{"start_line":212,"start_character":8,"end_line":212,"end_character":25},"in_reply_to":"3a461143_c1859fad","updated":"2017-01-30 12:30:37.000000000","message":"Done","commit_id":"95feddaed67f4186dc17cb888bd5f4223c994147"},{"author":{"_account_id":16635,"name":"deray","email":"debayan.ray@gmail.com","username":"deray"},"change_message_id":"cc842741dcafd5f47d1de0d71cb597702dcd4b83","unresolved":false,"context_lines":[{"line_number":32,"context_line":"HPSUM_LOCATION \u003d \u0027hp/swpackages/hpsum\u0027"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def _get_string_for(exit_code):"},{"line_number":36,"context_line":"    \"\"\"Maps the exit code with the status.\"\"\""},{"line_number":37,"context_line":"    return_code \u003d {"},{"line_number":38,"context_line":"        0: \"The smart component was installed successfully.\","}],"source_content_type":"text/x-python","patch_set":5,"id":"3a461143_81693e28","line":35,"range":{"start_line":35,"start_character":4,"end_line":35,"end_character":19},"updated":"2017-02-01 19:33:33.000000000","message":"I don\u0027t think you need a function for this. A simple file scope dict would do the job for you.\n\nEXIT_CODE_TO_STRING \u003d {\n\t\t0: \"The smart component was installed successfully.\",\n\t\t1: (\"The smart component was installed successfully, but the system \"\n\t\t\t\"must be restarted.\"),\n\t\t2: (\"The installation was not attempted because the required hardware \"\n\t\t\t\"is not present, the software is current, or there is nothing to \"\n\t\t\t\"install.\"),\n\t\t3: (\"The smart component was not installed. Node is already \"\n\t\t\t\"up-to-date.\"),\n\t\t5: (\"A user canceled the installation before anything could be \"\n\t\t\t\"installed.\"),\n\t\t6: (\"The installer cannot run because of an unmet dependency or \"\n\t\t\t\"installation tool failure.\"),\n\t\t7: (\"The actual installation operation (not the installation tool) \"\n\t\t\t\"failed.\"),\n\t\t-3: \"The installation of the component failed.\"\n\t}\n\nand from the invocation point just do this:\n\n    EXIT_CODE_TO_STRING.get(exit_code)","commit_id":"aa622e2995fe57351b76f8bce30d1ec441ae12c8"},{"author":{"_account_id":15074,"name":"Aparna","email":"aparnavtce@gmail.com","username":"Aparna"},"change_message_id":"ec106794f0f1a9cdc2d87c288e48fa880aa4438a","unresolved":false,"context_lines":[{"line_number":32,"context_line":"HPSUM_LOCATION \u003d \u0027hp/swpackages/hpsum\u0027"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def _get_string_for(exit_code):"},{"line_number":36,"context_line":"    \"\"\"Maps the exit code with the status.\"\"\""},{"line_number":37,"context_line":"    return_code \u003d {"},{"line_number":38,"context_line":"        0: \"The smart component was installed successfully.\","}],"source_content_type":"text/x-python","patch_set":5,"id":"3a461143_a439d643","line":35,"range":{"start_line":35,"start_character":4,"end_line":35,"end_character":19},"in_reply_to":"3a461143_81693e28","updated":"2017-02-02 12:04:27.000000000","message":"Done","commit_id":"aa622e2995fe57351b76f8bce30d1ec441ae12c8"}],"proliantutils/ilo/hpsum.py":[{"author":{"_account_id":18781,"name":"vinay50muddu","email":"vinay50muddu@yahoo.com","username":"vmud213"},"change_message_id":"e675ede1e452c4e8318b1cda066c0b7437b81b8e","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from proliantutils.ilo import client"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def _return_code_mapping(exit_code):"},{"line_number":29,"context_line":"    return_code \u003d {"},{"line_number":30,"context_line":"        0: \"The smart component was installed successfully.\","},{"line_number":31,"context_line":"        1: (\"The smart component was installed successfully, but the system \""},{"line_number":32,"context_line":"            \"must be restarted.\"),"},{"line_number":33,"context_line":"        2: (\"The installation was not attempted because the required hardware \""},{"line_number":34,"context_line":"            \"is not present, the software is current, or there is nothing to \""},{"line_number":35,"context_line":"            \"install.\"),"},{"line_number":36,"context_line":"        3: (\"The smart component was not installed. Node is already \""},{"line_number":37,"context_line":"            \"up-to-date.\"),"},{"line_number":38,"context_line":"        5: (\"A user canceled the installation before anything could be \""},{"line_number":39,"context_line":"            \"installed.\"),"},{"line_number":40,"context_line":"        6: (\"The installer cannot run because of an unmet dependency or \""},{"line_number":41,"context_line":"            \"installation tool failure.\"),"},{"line_number":42,"context_line":"        7: (\"The actual installation operation (not the installation tool) \""},{"line_number":43,"context_line":"            \"failed.\")}"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    return return_code.get(exit_code, None)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def _execute_hpsum(hpsum_file_path, components):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_8fa8e878","line":45,"range":{"start_line":28,"start_character":0,"end_line":45,"end_character":43},"updated":"2017-01-23 12:06:16.000000000","message":"A better way would be define a dictionary at global level and access it. Creating a function is a overhead, though I am not particular about the change.","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8e5067952ae5cc145d79fe056c33465c9a24a013","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    return return_code.get(exit_code, None)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def _execute_hpsum(hpsum_file_path, components):"},{"line_number":49,"context_line":"    \"\"\"Executes the hpsum firmware update command."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    This method executes the hpsum firmware update command with the list"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_c070d50d","line":48,"range":{"start_line":48,"start_character":36,"end_line":48,"end_character":46},"updated":"2017-01-24 06:19:22.000000000","message":"This may be optional as we would be updating all the components.","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":15074,"name":"Aparna","email":"aparnavtce@gmail.com","username":"Aparna"},"change_message_id":"6abfafda3ad0def0dc3ad90c58e55e7d7cdb205f","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    return return_code.get(exit_code, None)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def _execute_hpsum(hpsum_file_path, components):"},{"line_number":49,"context_line":"    \"\"\"Executes the hpsum firmware update command."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    This method executes the hpsum firmware update command with the list"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_d6040816","line":48,"range":{"start_line":48,"start_character":36,"end_line":48,"end_character":46},"in_reply_to":"5a3905b3_c070d50d","updated":"2017-01-24 15:03:13.000000000","message":"Done","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8e5067952ae5cc145d79fe056c33465c9a24a013","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    :param hpsum_file_path: A string with the path to the hpsum binary to be"},{"line_number":56,"context_line":"        executed"},{"line_number":57,"context_line":"    :param components: A list of components to be updated, if any."},{"line_number":58,"context_line":"    :returns: A tuple containing stdout and stderr after running the process."},{"line_number":59,"context_line":"    :raises: HpsumOperationError, when the hpsum firmware update operation on"},{"line_number":60,"context_line":"        the node fails."},{"line_number":61,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_c0d455ed","line":58,"range":{"start_line":58,"start_character":4,"end_line":58,"end_character":77},"updated":"2017-01-24 06:19:22.000000000","message":"It does not return tuple but a string","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":15074,"name":"Aparna","email":"aparnavtce@gmail.com","username":"Aparna"},"change_message_id":"6abfafda3ad0def0dc3ad90c58e55e7d7cdb205f","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    :param hpsum_file_path: A string with the path to the hpsum binary to be"},{"line_number":56,"context_line":"        executed"},{"line_number":57,"context_line":"    :param components: A list of components to be updated, if any."},{"line_number":58,"context_line":"    :returns: A tuple containing stdout and stderr after running the process."},{"line_number":59,"context_line":"    :raises: HpsumOperationError, when the hpsum firmware update operation on"},{"line_number":60,"context_line":"        the node fails."},{"line_number":61,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_962e008a","line":58,"range":{"start_line":58,"start_character":4,"end_line":58,"end_character":77},"in_reply_to":"5a3905b3_c0d455ed","updated":"2017-01-24 15:03:13.000000000","message":"Done","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"fb0447cd9d0faadff0cd437accdd0abd1f6afc47","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                                              \"--romonly\", cmd)"},{"line_number":69,"context_line":"    except processutils.ProcessExecutionError as e:"},{"line_number":70,"context_line":"        if e.exit_code \u003e\u003d 0:"},{"line_number":71,"context_line":"            msg \u003d _return_code_mapping(e.exit_code)"},{"line_number":72,"context_line":"        else:"},{"line_number":73,"context_line":"            msg \u003d \"Unable to perform hpsum firmware update on the node.\""},{"line_number":74,"context_line":"            output_file \u003d \u0027/var/hp/log/localhost/hpsum_log.txt\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_9efe60ac","line":71,"range":{"start_line":71,"start_character":0,"end_line":71,"end_character":51},"updated":"2017-01-23 10:50:51.000000000","message":"Dont you need to parse hpsum output file here as well?","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":15074,"name":"Aparna","email":"aparnavtce@gmail.com","username":"Aparna"},"change_message_id":"7b8ecb9a49e40c9a1fa7eb9fa4d3e595e8c664db","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                                              \"--romonly\", cmd)"},{"line_number":69,"context_line":"    except processutils.ProcessExecutionError as e:"},{"line_number":70,"context_line":"        if e.exit_code \u003e\u003d 0:"},{"line_number":71,"context_line":"            msg \u003d _return_code_mapping(e.exit_code)"},{"line_number":72,"context_line":"        else:"},{"line_number":73,"context_line":"            msg \u003d \"Unable to perform hpsum firmware update on the node.\""},{"line_number":74,"context_line":"            output_file \u003d \u0027/var/hp/log/localhost/hpsum_log.txt\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_199c4a5c","line":71,"range":{"start_line":71,"start_character":0,"end_line":71,"end_character":51},"in_reply_to":"5a3905b3_9efe60ac","updated":"2017-01-23 11:11:11.000000000","message":"Since it is not going to raise an exception, the parsing of hpsum output is done at Line 225","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8e5067952ae5cc145d79fe056c33465c9a24a013","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            msg \u003d _return_code_mapping(e.exit_code)"},{"line_number":72,"context_line":"        else:"},{"line_number":73,"context_line":"            msg \u003d \"Unable to perform hpsum firmware update on the node.\""},{"line_number":74,"context_line":"            output_file \u003d \u0027/var/hp/log/localhost/hpsum_log.txt\u0027"},{"line_number":75,"context_line":"            if os.path.exists(output_file):"},{"line_number":76,"context_line":"                result \u003d _parse_hpsum_ouput()"},{"line_number":77,"context_line":"                msg \u003d msg + str(result)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_606481b8","line":74,"range":{"start_line":74,"start_character":26,"end_line":74,"end_character":63},"updated":"2017-01-24 06:19:22.000000000","message":"Can you define this as a const at top. This is used @ L116 as well.","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":15074,"name":"Aparna","email":"aparnavtce@gmail.com","username":"Aparna"},"change_message_id":"6abfafda3ad0def0dc3ad90c58e55e7d7cdb205f","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            msg \u003d _return_code_mapping(e.exit_code)"},{"line_number":72,"context_line":"        else:"},{"line_number":73,"context_line":"            msg \u003d \"Unable to perform hpsum firmware update on the node.\""},{"line_number":74,"context_line":"            output_file \u003d \u0027/var/hp/log/localhost/hpsum_log.txt\u0027"},{"line_number":75,"context_line":"            if os.path.exists(output_file):"},{"line_number":76,"context_line":"                result \u003d _parse_hpsum_ouput()"},{"line_number":77,"context_line":"                msg \u003d msg + str(result)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_f65584f9","line":74,"range":{"start_line":74,"start_character":26,"end_line":74,"end_character":63},"in_reply_to":"5a3905b3_606481b8","updated":"2017-01-24 15:03:13.000000000","message":"Done","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8e5067952ae5cc145d79fe056c33465c9a24a013","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                msg \u003d msg + str(e)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"            raise exception.HpsumOperationError(msg)"},{"line_number":82,"context_line":"    return msg"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def _get_clean_arg_value(node, key):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_80fded6f","line":82,"range":{"start_line":82,"start_character":3,"end_line":82,"end_character":14},"updated":"2017-01-24 06:19:22.000000000","message":"This will be None in success path. Something missing","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":15074,"name":"Aparna","email":"aparnavtce@gmail.com","username":"Aparna"},"change_message_id":"6abfafda3ad0def0dc3ad90c58e55e7d7cdb205f","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                msg \u003d msg + str(e)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"            raise exception.HpsumOperationError(msg)"},{"line_number":82,"context_line":"    return msg"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def _get_clean_arg_value(node, key):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_36fc6cb7","line":82,"range":{"start_line":82,"start_character":3,"end_line":82,"end_character":14},"in_reply_to":"5a3905b3_80fded6f","updated":"2017-01-24 15:03:13.000000000","message":"hpsum raises the exception with exit code which decides whether the process is success or failure. In success case, it comes to L71 and returns the return code status.","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8e5067952ae5cc145d79fe056c33465c9a24a013","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        node."},{"line_number":91,"context_line":"    :returns: A string value."},{"line_number":92,"context_line":"    \"\"\""},{"line_number":93,"context_line":"    clean_steps \u003d node[\u0027driver_internal_info\u0027][\u0027clean_steps\u0027]"},{"line_number":94,"context_line":"    for step in clean_steps:"},{"line_number":95,"context_line":"        if step[\u0027step\u0027] \u003d\u003d \u0027hpsum_firmware_update\u0027:"},{"line_number":96,"context_line":"            if key in step[\u0027args\u0027]:"},{"line_number":97,"context_line":"                return step[\u0027args\u0027][key]"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_c0d1b524","line":95,"range":{"start_line":93,"start_character":4,"end_line":95,"end_character":51},"updated":"2017-01-24 06:19:22.000000000","message":"We can use node.clean_step instead","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":15074,"name":"Aparna","email":"aparnavtce@gmail.com","username":"Aparna"},"change_message_id":"6abfafda3ad0def0dc3ad90c58e55e7d7cdb205f","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        node."},{"line_number":91,"context_line":"    :returns: A string value."},{"line_number":92,"context_line":"    \"\"\""},{"line_number":93,"context_line":"    clean_steps \u003d node[\u0027driver_internal_info\u0027][\u0027clean_steps\u0027]"},{"line_number":94,"context_line":"    for step in clean_steps:"},{"line_number":95,"context_line":"        if step[\u0027step\u0027] \u003d\u003d \u0027hpsum_firmware_update\u0027:"},{"line_number":96,"context_line":"            if key in step[\u0027args\u0027]:"},{"line_number":97,"context_line":"                return step[\u0027args\u0027][key]"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_16df703a","line":95,"range":{"start_line":93,"start_character":4,"end_line":95,"end_character":51},"in_reply_to":"5a3905b3_c0d1b524","updated":"2017-01-24 15:03:13.000000000","message":"Done","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8e5067952ae5cc145d79fe056c33465c9a24a013","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    return {list[0]: list[1]}"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"def _parse_hpsum_ouput():"},{"line_number":106,"context_line":"    \"\"\"Parse the hpsum output log file."},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    This method parse through the hpsum log file in the"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_0081fd8e","line":105,"range":{"start_line":105,"start_character":4,"end_line":105,"end_character":22},"updated":"2017-01-24 06:19:22.000000000","message":"Need to add tests for this","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":15074,"name":"Aparna","email":"aparnavtce@gmail.com","username":"Aparna"},"change_message_id":"6abfafda3ad0def0dc3ad90c58e55e7d7cdb205f","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    return {list[0]: list[1]}"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"def _parse_hpsum_ouput():"},{"line_number":106,"context_line":"    \"\"\"Parse the hpsum output log file."},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    This method parse through the hpsum log file in the"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_56e57806","line":105,"range":{"start_line":105,"start_character":4,"end_line":105,"end_character":22},"in_reply_to":"5a3905b3_0081fd8e","updated":"2017-01-24 15:03:13.000000000","message":"Done","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8e5067952ae5cc145d79fe056c33465c9a24a013","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    :raises: HpsumOperationError, when the hpsum log file does not"},{"line_number":114,"context_line":"        exists."},{"line_number":115,"context_line":"    \"\"\""},{"line_number":116,"context_line":"    output_file \u003d \u0027/var/hp/log/localhost/hpsum_log.txt\u0027"},{"line_number":117,"context_line":"    if os.path.exists(output_file):"},{"line_number":118,"context_line":"        with open(output_file, \u0027r\u0027) as f:"},{"line_number":119,"context_line":"            output_data \u003d f.read()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_40a4e5b8","line":116,"range":{"start_line":116,"start_character":4,"end_line":116,"end_character":55},"updated":"2017-01-24 06:19:22.000000000","message":"ditto","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":15074,"name":"Aparna","email":"aparnavtce@gmail.com","username":"Aparna"},"change_message_id":"6abfafda3ad0def0dc3ad90c58e55e7d7cdb205f","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    :raises: HpsumOperationError, when the hpsum log file does not"},{"line_number":114,"context_line":"        exists."},{"line_number":115,"context_line":"    \"\"\""},{"line_number":116,"context_line":"    output_file \u003d \u0027/var/hp/log/localhost/hpsum_log.txt\u0027"},{"line_number":117,"context_line":"    if os.path.exists(output_file):"},{"line_number":118,"context_line":"        with open(output_file, \u0027r\u0027) as f:"},{"line_number":119,"context_line":"            output_data \u003d f.read()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_b6bcdcdc","line":116,"range":{"start_line":116,"start_character":4,"end_line":116,"end_character":55},"in_reply_to":"5a3905b3_40a4e5b8","updated":"2017-01-24 15:03:13.000000000","message":"Done","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8e5067952ae5cc145d79fe056c33465c9a24a013","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                        result[key] \u003d temp_result"},{"line_number":136,"context_line":"                        temp_result \u003d {}"},{"line_number":137,"context_line":"                except KeyError as e:"},{"line_number":138,"context_line":"                    msg \u003d (\"_parse_hpsum_output failes with error: %s\""},{"line_number":139,"context_line":"                           % str(e))"},{"line_number":140,"context_line":"                    raise exception.HpsumOperationError(msg)"},{"line_number":141,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_408b051f","line":138,"range":{"start_line":138,"start_character":28,"end_line":138,"end_character":48},"updated":"2017-01-24 06:19:22.000000000","message":"Need to give more user friendly message instead of mentioning the method name.","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":15074,"name":"Aparna","email":"aparnavtce@gmail.com","username":"Aparna"},"change_message_id":"6abfafda3ad0def0dc3ad90c58e55e7d7cdb205f","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                        result[key] \u003d temp_result"},{"line_number":136,"context_line":"                        temp_result \u003d {}"},{"line_number":137,"context_line":"                except KeyError as e:"},{"line_number":138,"context_line":"                    msg \u003d (\"_parse_hpsum_output failes with error: %s\""},{"line_number":139,"context_line":"                           % str(e))"},{"line_number":140,"context_line":"                    raise exception.HpsumOperationError(msg)"},{"line_number":141,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_f6b2e404","line":138,"range":{"start_line":138,"start_character":28,"end_line":138,"end_character":48},"in_reply_to":"5a3905b3_408b051f","updated":"2017-01-24 15:03:13.000000000","message":"Done","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8e5067952ae5cc145d79fe056c33465c9a24a013","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        update_components \u003d _get_clean_arg_value(node, \u0027update_components\u0027)"},{"line_number":211,"context_line":"        stdout \u003d _execute_hpsum(hpsum_file_path, update_components)"},{"line_number":212,"context_line":"        result \u003d {\"STATUS\": stdout}"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        try:"},{"line_number":215,"context_line":"            stdout, stderr \u003d processutils.execute(\"umount\","}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_e0007136","line":212,"range":{"start_line":212,"start_character":8,"end_line":212,"end_character":35},"updated":"2017-01-24 06:19:22.000000000","message":"The status given through hpsum o/p would be a long one. can we summarize it?","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8e5067952ae5cc145d79fe056c33465c9a24a013","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        except Exception as e:"},{"line_number":223,"context_line":"            pass"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    result.update({\"DETAILS\": _parse_hpsum_ouput()})"},{"line_number":226,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_c061b506","line":225,"range":{"start_line":225,"start_character":18,"end_line":225,"end_character":30},"updated":"2017-01-24 06:19:22.000000000","message":"What is difference in data given in STATUS and DETAILS?","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"},{"author":{"_account_id":15074,"name":"Aparna","email":"aparnavtce@gmail.com","username":"Aparna"},"change_message_id":"6abfafda3ad0def0dc3ad90c58e55e7d7cdb205f","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        except Exception as e:"},{"line_number":223,"context_line":"            pass"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"    result.update({\"DETAILS\": _parse_hpsum_ouput()})"},{"line_number":226,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a3905b3_367f0c16","line":225,"range":{"start_line":225,"start_character":18,"end_line":225,"end_character":30},"in_reply_to":"5a3905b3_c061b506","updated":"2017-01-24 15:03:13.000000000","message":"\u0027STATUS\u0027: status return by the return code.\n\u0027DETAIL\u0027: parsed data from the hpsum output file","commit_id":"b673be3b7203ff96c8a927d571ab7fa9c93cc461"}]}
