)]}'
{"ironic/drivers/modules/ssh.py":[{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"463491b2e75bd5a22de811b5e913bc7ba5a37d51","unresolved":false,"context_lines":[{"line_number":168,"context_line":"    :param driver_info: information for accessing the node."},{"line_number":169,"context_line":"    :returns: one of ironic.common.states POWER_OFF, POWER_ON."},{"line_number":170,"context_line":"    :raises: NodeNotFound"},{"line_number":171,"context_line":"    :raises: SSHCommandFailed on an error from ssh."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    \"\"\""},{"line_number":174,"context_line":"    power_state \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FPL0%3D","line":171,"updated":"2014-01-16 02:56:39.000000000","message":"The SSHCommandFailed exception is raised from _ssh_execute() method, not from this _get_power_status method, we just call _ssh_execute() method and forward the SSHCommandFailed if raised, so no need to list all the  exceptions can be raised from all callee method\u0027s I think.","commit_id":"991b1bec536bfce65fb7f226a23417df4fb1f496"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"902a2eb14f28fd0bdec6501059f491c1d7715135","unresolved":false,"context_lines":[{"line_number":168,"context_line":"    :param driver_info: information for accessing the node."},{"line_number":169,"context_line":"    :returns: one of ironic.common.states POWER_OFF, POWER_ON."},{"line_number":170,"context_line":"    :raises: NodeNotFound"},{"line_number":171,"context_line":"    :raises: SSHCommandFailed on an error from ssh."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    \"\"\""},{"line_number":174,"context_line":"    power_state \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B50o%3D","line":171,"in_reply_to":"AAAAUH%2F%2FMwg%3D","updated":"2014-01-20 22:03:56.000000000","message":"I would discourage collapsing the doc string\u0027s exception list, particularly on private methods.\n\nIMO, calling out all the possible exceptions isn\u0027t necessary in a private method, but is in a public method. I would doc just the one which this one raises here, and adjust the docs for validate(), change_power_state(), etc, which it looks like you already did.","commit_id":"991b1bec536bfce65fb7f226a23417df4fb1f496"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"f224b6396587387e3dd0b06fcf712bc7cabc2c06","unresolved":false,"context_lines":[{"line_number":168,"context_line":"    :param driver_info: information for accessing the node."},{"line_number":169,"context_line":"    :returns: one of ironic.common.states POWER_OFF, POWER_ON."},{"line_number":170,"context_line":"    :raises: NodeNotFound"},{"line_number":171,"context_line":"    :raises: SSHCommandFailed on an error from ssh."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    \"\"\""},{"line_number":174,"context_line":"    power_state \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FMwg%3D","line":171,"in_reply_to":"AAAAUH%2F%2FPL0%3D","updated":"2014-01-16 14:11:45.000000000","message":"I actually added the docstrings because I was trying to figure out what exceptions were being raised. I\u0027m not actually sure what/if there is a convention that openstack or python dev uses? It just seemed to me that if I were to make a call to this method, that I\u0027d look at the docn (not read the code) to see what exceptions might be raised by it, so that I could maybe catch them at a higher level.\n\nI am fine removing it if this is confusing for people.\n\nI could also change/collapse it to one line with a general \u0027IronicException\u0027?\n\n(Same reply to all your ditto comments below.)","commit_id":"991b1bec536bfce65fb7f226a23417df4fb1f496"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"463491b2e75bd5a22de811b5e913bc7ba5a37d51","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        return utils.ssh_connect(_parse_driver_info(node))"},{"line_number":211,"context_line":"    except exception.SSHConnectFailed as e:"},{"line_number":212,"context_line":"        raise exception.InvalidParameterValue(_(\"SSH connection cannot\""},{"line_number":213,"context_line":"                                                \" be established: %s\") % e)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"def _get_hosts_name_for_node(ssh_obj, driver_info):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FPLE%3D","line":213,"updated":"2014-01-16 02:56:39.000000000","message":"I am confusing here, why we catch ironic\u0027s exception.SSHConnectFailed [1] and raise another exception.InvalidParameterValue exception, in case of ssh connecting timeout or other issue that is not with invalid parameter value, they should not be invalid parameter case I think.\n\n\n[1] https://github.com/openstack/ironic/blob/master/ironic/common/exception.py#L278","commit_id":"991b1bec536bfce65fb7f226a23417df4fb1f496"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"1b8558ea190573780463b1fbbc1bbfcc00e5d2b7","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        return utils.ssh_connect(_parse_driver_info(node))"},{"line_number":211,"context_line":"    except exception.SSHConnectFailed as e:"},{"line_number":212,"context_line":"        raise exception.InvalidParameterValue(_(\"SSH connection cannot\""},{"line_number":213,"context_line":"                                                \" be established: %s\") % e)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"def _get_hosts_name_for_node(ssh_obj, driver_info):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B5tI%3D","line":213,"in_reply_to":"AAAAUH%2F%2B50E%3D","updated":"2014-01-20 22:34:43.000000000","message":"I was concerned that someone might get confused if they eg call validate() and get an InvalidParameterValue (instead of the SSHConnectFailed), and then turn around and call set_power_state() and get SSHConnectFailed instead of InvalidParameterValue.","commit_id":"991b1bec536bfce65fb7f226a23417df4fb1f496"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"902a2eb14f28fd0bdec6501059f491c1d7715135","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        return utils.ssh_connect(_parse_driver_info(node))"},{"line_number":211,"context_line":"    except exception.SSHConnectFailed as e:"},{"line_number":212,"context_line":"        raise exception.InvalidParameterValue(_(\"SSH connection cannot\""},{"line_number":213,"context_line":"                                                \" be established: %s\") % e)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"def _get_hosts_name_for_node(ssh_obj, driver_info):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B50E%3D","line":213,"in_reply_to":"AAAAUH%2F%2FMvQ%3D","updated":"2014-01-20 22:03:56.000000000","message":"Ruby, I don\u0027t think this method should convert SSHConnectFailed to InvalidParameterValue. It\u0027s reasonable in, eg, get_power_state, for there to be an SSHConnectFailed error raised and passed back to the client, eg. if the paramters were previously validated and then later SSH starts to fail.","commit_id":"991b1bec536bfce65fb7f226a23417df4fb1f496"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"f224b6396587387e3dd0b06fcf712bc7cabc2c06","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        return utils.ssh_connect(_parse_driver_info(node))"},{"line_number":211,"context_line":"    except exception.SSHConnectFailed as e:"},{"line_number":212,"context_line":"        raise exception.InvalidParameterValue(_(\"SSH connection cannot\""},{"line_number":213,"context_line":"                                                \" be established: %s\") % e)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"def _get_hosts_name_for_node(ssh_obj, driver_info):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FMvQ%3D","line":213,"in_reply_to":"AAAAUH%2F%2FPLE%3D","updated":"2014-01-16 14:11:45.000000000","message":"The original code had that (see SSHPower.validate()), and since other methods also call _get_connection, it seemed more confusing for other methods to be raising a SSHConnectFailed when validate() didn\u0027t, so I moved the logic here. I am open to removing this catch (if eg the original author is OK with it), and/or  remove it in a different bug if it is considered a bug. Although the docstring for .validate() indicates that someone knowingly wanted to do this.","commit_id":"991b1bec536bfce65fb7f226a23417df4fb1f496"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"463491b2e75bd5a22de811b5e913bc7ba5a37d51","unresolved":false,"context_lines":[{"line_number":219,"context_line":"    :param ssh_obj: paramiko.SSHClient, an active ssh connection."},{"line_number":220,"context_line":"    :param driver_info: information for accessing the node."},{"line_number":221,"context_line":"    :returns: the name or None if not found."},{"line_number":222,"context_line":"    :raises: SSHCommandFailed on an error from ssh."},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"    \"\"\""},{"line_number":225,"context_line":"    matched_name \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FPKo%3D","line":222,"updated":"2014-01-16 02:56:39.000000000","message":"ditto L171","commit_id":"991b1bec536bfce65fb7f226a23417df4fb1f496"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"463491b2e75bd5a22de811b5e913bc7ba5a37d51","unresolved":false,"context_lines":[{"line_number":263,"context_line":"    :param driver_info: information for accessing the node."},{"line_number":264,"context_line":"    :returns: one of ironic.common.states POWER_ON or ERROR."},{"line_number":265,"context_line":"    :raises: NodeNotFound"},{"line_number":266,"context_line":"    :raises: SSHCommandFailed on an error from ssh."},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    \"\"\""},{"line_number":269,"context_line":"    current_pstate \u003d _get_power_status(ssh_obj, driver_info)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FPKc%3D","line":266,"updated":"2014-01-16 02:56:39.000000000","message":"ditto L171","commit_id":"991b1bec536bfce65fb7f226a23417df4fb1f496"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"463491b2e75bd5a22de811b5e913bc7ba5a37d51","unresolved":false,"context_lines":[{"line_number":292,"context_line":"    :returns: one of ironic.common.states POWER_OFF or ERROR."},{"line_number":293,"context_line":"    :raises: NodeNotFound"},{"line_number":294,"context_line":"    :raises: SSHCommandFailed on an error from ssh."},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"    \"\"\""},{"line_number":297,"context_line":"    current_pstate \u003d _get_power_status(ssh_obj, driver_info)"},{"line_number":298,"context_line":"    if current_pstate \u003d\u003d states.POWER_OFF:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FPKY%3D","line":295,"updated":"2014-01-16 02:56:39.000000000","message":"ditto L171","commit_id":"991b1bec536bfce65fb7f226a23417df4fb1f496"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"902a2eb14f28fd0bdec6501059f491c1d7715135","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        :raises: InvalidParameterValue if any connection parameters are"},{"line_number":340,"context_line":"            incorrect or if ssh failed to connect to the node."},{"line_number":341,"context_line":"        \"\"\""},{"line_number":342,"context_line":"        _get_connection(node)"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    def get_power_state(self, task, node):"},{"line_number":345,"context_line":"        \"\"\"Get the current power state."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B5z0%3D","line":342,"updated":"2014-01-20 22:03:56.000000000","message":"conversion to InvalidParameterValue should still happen here.","commit_id":"991b1bec536bfce65fb7f226a23417df4fb1f496"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"463491b2e75bd5a22de811b5e913bc7ba5a37d51","unresolved":false,"context_lines":[{"line_number":353,"context_line":"        :raises: InvalidParameterValue if any connection parameters are"},{"line_number":354,"context_line":"            incorrect or if ssh failed to connect to the node."},{"line_number":355,"context_line":"        :raises: NodeNotFound."},{"line_number":356,"context_line":"        :raises: SSHCommandFailed on an error from ssh."},{"line_number":357,"context_line":"        \"\"\""},{"line_number":358,"context_line":"        driver_info \u003d _parse_driver_info(node)"},{"line_number":359,"context_line":"        driver_info[\u0027macs\u0027] \u003d _get_nodes_mac_addresses(task, node)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FPKM%3D","line":356,"updated":"2014-01-16 02:56:39.000000000","message":"ditto L171","commit_id":"991b1bec536bfce65fb7f226a23417df4fb1f496"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"902a2eb14f28fd0bdec6501059f491c1d7715135","unresolved":false,"context_lines":[{"line_number":372,"context_line":"            `ironic.common.states`."},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        :returns NOTHING:"},{"line_number":375,"context_line":"        :raises: InvalidParameterValue if any connection parameters are"},{"line_number":376,"context_line":"            incorrect, if ssh failed to connect to the node, or if the"},{"line_number":377,"context_line":"            desired power state is invalid."},{"line_number":378,"context_line":"        :raises: NodeNotFound."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B5zo%3D","line":375,"updated":"2014-01-20 22:03:56.000000000","message":"this should be SSHConnectFailed, not InvalidParam. ditto for other doc strings.","commit_id":"991b1bec536bfce65fb7f226a23417df4fb1f496"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"1b8558ea190573780463b1fbbc1bbfcc00e5d2b7","unresolved":false,"context_lines":[{"line_number":372,"context_line":"            `ironic.common.states`."},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        :returns NOTHING:"},{"line_number":375,"context_line":"        :raises: InvalidParameterValue if any connection parameters are"},{"line_number":376,"context_line":"            incorrect, if ssh failed to connect to the node, or if the"},{"line_number":377,"context_line":"            desired power state is invalid."},{"line_number":378,"context_line":"        :raises: NodeNotFound."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2B5sM%3D","line":375,"in_reply_to":"AAAAUH%2F%2B5zo%3D","updated":"2014-01-20 22:34:43.000000000","message":"Shouldn\u0027t it be both? The call to _parse_driver_info() can raise  InvalidParameterValue and the call to _get_connection can raise SSHConnectFailed.","commit_id":"991b1bec536bfce65fb7f226a23417df4fb1f496"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"463491b2e75bd5a22de811b5e913bc7ba5a37d51","unresolved":false,"context_lines":[{"line_number":377,"context_line":"            desired power state is invalid."},{"line_number":378,"context_line":"        :raises: NodeNotFound."},{"line_number":379,"context_line":"        :raises: PowerStateFailure if it failed to set power state to pstate."},{"line_number":380,"context_line":"        :raises: SSHCommandFailed on an error from ssh."},{"line_number":381,"context_line":"        \"\"\""},{"line_number":382,"context_line":"        driver_info \u003d _parse_driver_info(node)"},{"line_number":383,"context_line":"        driver_info[\u0027macs\u0027] \u003d _get_nodes_mac_addresses(task, node)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FPKI%3D","line":380,"updated":"2014-01-16 02:56:39.000000000","message":"ditto L171","commit_id":"991b1bec536bfce65fb7f226a23417df4fb1f496"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"463491b2e75bd5a22de811b5e913bc7ba5a37d51","unresolved":false,"context_lines":[{"line_number":408,"context_line":"            incorrect or if ssh failed to connect to the node."},{"line_number":409,"context_line":"        :raises: NodeNotFound."},{"line_number":410,"context_line":"        :raises: PowerStateFailure if it failed to set power state to POWER_ON."},{"line_number":411,"context_line":"        :raises: SSHCommandFailed on an error from ssh."},{"line_number":412,"context_line":"        \"\"\""},{"line_number":413,"context_line":"        driver_info \u003d _parse_driver_info(node)"},{"line_number":414,"context_line":"        driver_info[\u0027macs\u0027] \u003d _get_nodes_mac_addresses(task, node)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FPKE%3D","line":411,"updated":"2014-01-16 02:56:39.000000000","message":"ditto L171","commit_id":"991b1bec536bfce65fb7f226a23417df4fb1f496"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"c6a39e4f9230189a8f8d8bd85f70292e5a093f1c","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    :param node: the Node of interest."},{"line_number":110,"context_line":"    :returns: dictionary of information."},{"line_number":111,"context_line":"    :raises InvalidParameterValue if any required parameters are missing"},{"line_number":112,"context_line":"        or incorrect."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2Bmtg%3D","line":111,"updated":"2014-01-23 23:27:01.000000000","message":"doc issue - missing \":\" here","commit_id":"784e63c19f1e8b5c0fb0850e278858f32bb987c2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"f7bfa6e5db7677cd8860d44e04eb7b4f64bf4bbb","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    :param node: the Node of interest."},{"line_number":110,"context_line":"    :returns: dictionary of information."},{"line_number":111,"context_line":"    :raises InvalidParameterValue if any required parameters are missing"},{"line_number":112,"context_line":"        or incorrect."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2Bl0g%3D","line":111,"in_reply_to":"AAAAUH%2F%2Bmtg%3D","updated":"2014-01-24 02:50:55.000000000","message":"Oops. (That should be automated!)","commit_id":"784e63c19f1e8b5c0fb0850e278858f32bb987c2"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f1503ae0c5f6641fec3501d4ccd4941df0d6cd6f","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    try:"},{"line_number":96,"context_line":"        output_list \u003d processutils.ssh_execute(ssh_obj,"},{"line_number":97,"context_line":"                                               cmd_to_exec)[0].split(\u0027\\n\u0027)"},{"line_number":98,"context_line":"    except Exception as e:"},{"line_number":99,"context_line":"        LOG.debug(_(\"Cannot execute SSH cmd %(cmd)s. Reason: %(err)s.\")"},{"line_number":100,"context_line":"                % {\u0027cmd\u0027: cmd_to_exec, \u0027err\u0027: str(e)})"},{"line_number":101,"context_line":"        raise exception.SSHCommandFailed(cmd\u003dcmd_to_exec)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Bj1M%3D","line":98,"updated":"2014-01-24 12:03:34.000000000","message":"I think this exception is too broad for this operation. Seems that the ssh_execute() method from processutils.py could raise only two types of exceptions: InvalidArgumentError and ProcessExecutionError, so I would handle only these two specific exceptions instead.","commit_id":"34db07e2746d855cdfe2a6da5cf875604f472bc0"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"423cb3798ef1d28bf2aaf306dc11ee5b44b76988","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    try:"},{"line_number":96,"context_line":"        output_list \u003d processutils.ssh_execute(ssh_obj,"},{"line_number":97,"context_line":"                                               cmd_to_exec)[0].split(\u0027\\n\u0027)"},{"line_number":98,"context_line":"    except Exception as e:"},{"line_number":99,"context_line":"        LOG.debug(_(\"Cannot execute SSH cmd %(cmd)s. Reason: %(err)s.\")"},{"line_number":100,"context_line":"                % {\u0027cmd\u0027: cmd_to_exec, \u0027err\u0027: str(e)})"},{"line_number":101,"context_line":"        raise exception.SSHCommandFailed(cmd\u003dcmd_to_exec)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2BXHA%3D","line":98,"in_reply_to":"AAAAUH%2F%2Bj1M%3D","updated":"2014-01-27 18:24:05.000000000","message":"The ssh_execute() method calls paramiko.SSHClient.execute_command(), which raises SSHException (according to its docstring). I wasn\u0027t sure how much to \"trust\" this code going forward, and I wanted to be sure we caught all exceptions here, so I opted for Exception. Do you think we should only catch InvalidArgumentError, ProcessExecutionError and paramiko.SSHException here?","commit_id":"34db07e2746d855cdfe2a6da5cf875604f472bc0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f1503ae0c5f6641fec3501d4ccd4941df0d6cd6f","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                                               cmd_to_exec)[0].split(\u0027\\n\u0027)"},{"line_number":98,"context_line":"    except Exception as e:"},{"line_number":99,"context_line":"        LOG.debug(_(\"Cannot execute SSH cmd %(cmd)s. Reason: %(err)s.\")"},{"line_number":100,"context_line":"                % {\u0027cmd\u0027: cmd_to_exec, \u0027err\u0027: str(e)})"},{"line_number":101,"context_line":"        raise exception.SSHCommandFailed(cmd\u003dcmd_to_exec)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    return output_list"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Bj1E%3D","line":100,"updated":"2014-01-24 12:03:34.000000000","message":"It\u0027s not needed to convert to str() here","commit_id":"34db07e2746d855cdfe2a6da5cf875604f472bc0"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"423cb3798ef1d28bf2aaf306dc11ee5b44b76988","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                                               cmd_to_exec)[0].split(\u0027\\n\u0027)"},{"line_number":98,"context_line":"    except Exception as e:"},{"line_number":99,"context_line":"        LOG.debug(_(\"Cannot execute SSH cmd %(cmd)s. Reason: %(err)s.\")"},{"line_number":100,"context_line":"                % {\u0027cmd\u0027: cmd_to_exec, \u0027err\u0027: str(e)})"},{"line_number":101,"context_line":"        raise exception.SSHCommandFailed(cmd\u003dcmd_to_exec)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    return output_list"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2BXG0%3D","line":100,"in_reply_to":"AAAAUH%2F%2Bj1E%3D","updated":"2014-01-27 18:24:05.000000000","message":"Yes, thx for pointing it out.","commit_id":"34db07e2746d855cdfe2a6da5cf875604f472bc0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f1503ae0c5f6641fec3501d4ccd4941df0d6cd6f","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        :param pstate: Either POWER_ON or POWER_OFF from :class:"},{"line_number":365,"context_line":"            `ironic.common.states`."},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        :returns NOTHING:"},{"line_number":368,"context_line":"        :raises: InvalidParameterValue if any connection parameters are"},{"line_number":369,"context_line":"            incorrect, or if the desired power state is invalid."},{"line_number":370,"context_line":"        :raises: NodeNotFound."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Bjzw%3D","line":367,"updated":"2014-01-24 12:03:34.000000000","message":"I know it was there already, but as you\u0027re fixing the docstrings: \"returns NOTHING\" seems inconsistent with the rest of the Ironic code, when a method doesn\u0027t return anything we simple omit the \"returns\" tag. As the docstrings are now part of our auto-documentation I think we should be a bit more consistent.","commit_id":"34db07e2746d855cdfe2a6da5cf875604f472bc0"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"423cb3798ef1d28bf2aaf306dc11ee5b44b76988","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        :param pstate: Either POWER_ON or POWER_OFF from :class:"},{"line_number":365,"context_line":"            `ironic.common.states`."},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        :returns NOTHING:"},{"line_number":368,"context_line":"        :raises: InvalidParameterValue if any connection parameters are"},{"line_number":369,"context_line":"            incorrect, or if the desired power state is invalid."},{"line_number":370,"context_line":"        :raises: NodeNotFound."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2BXGU%3D","line":367,"in_reply_to":"AAAAUH%2F%2Bjzw%3D","updated":"2014-01-27 18:24:05.000000000","message":"Great, I\u0027ll remove it.","commit_id":"34db07e2746d855cdfe2a6da5cf875604f472bc0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f1503ae0c5f6641fec3501d4ccd4941df0d6cd6f","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        :param task: An instance of `ironic.manager.task_manager.TaskManager`."},{"line_number":397,"context_line":"        :param node: A single node."},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        :returns NOTHING:"},{"line_number":400,"context_line":"        :raises: InvalidParameterValue if any connection parameters are"},{"line_number":401,"context_line":"            incorrect."},{"line_number":402,"context_line":"        :raises: NodeNotFound."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2Bjzo%3D","line":399,"updated":"2014-01-24 12:03:34.000000000","message":"ditto about omitting this tag","commit_id":"34db07e2746d855cdfe2a6da5cf875604f472bc0"}],"ironic/tests/drivers/test_ssh.py":[{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"2a8ae5be6130af9a9a69e55ddf7f76a66e21f88d","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        self.addCleanup(stop_patcher)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def test__get_connection_client(self):"},{"line_number":136,"context_line":"        with mock.patch.object(utils, \u0027ssh_connect\u0027) \\"},{"line_number":137,"context_line":"                as ssh_connect_mock:"},{"line_number":138,"context_line":"            ssh_connect_mock.return_value \u003d self.sshclient"},{"line_number":139,"context_line":"            client \u003d ssh._get_connection(self.node)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B1iU%3D","line":136,"updated":"2014-01-21 15:50:10.000000000","message":"we are moving away from \u0027\\\u0027 in favor of \u0027(.....)\u0027","commit_id":"fbbb2a4fa020f2a7a14b858c1a711cc9d794813b"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"2801229fd4383c5a4f3e844f64b03040afda1bdc","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        self.addCleanup(stop_patcher)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def test__get_connection_client(self):"},{"line_number":136,"context_line":"        with mock.patch.object(utils, \u0027ssh_connect\u0027) \\"},{"line_number":137,"context_line":"                as ssh_connect_mock:"},{"line_number":138,"context_line":"            ssh_connect_mock.return_value \u003d self.sshclient"},{"line_number":139,"context_line":"            client \u003d ssh._get_connection(self.node)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B1Mk%3D","line":136,"in_reply_to":"AAAAUH%2F%2B1XY%3D","updated":"2014-01-21 16:42:07.000000000","message":"Sorry \u003d) it\u0027s just copy-paste comment from my patch https://review.openstack.org/#/c/64108/9/ironic/conductor/manager.py \u003d)","commit_id":"fbbb2a4fa020f2a7a14b858c1a711cc9d794813b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6a871c7e38265dc48b9f67decd0b9afcdcb22952","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        self.addCleanup(stop_patcher)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def test__get_connection_client(self):"},{"line_number":136,"context_line":"        with mock.patch.object(utils, \u0027ssh_connect\u0027) \\"},{"line_number":137,"context_line":"                as ssh_connect_mock:"},{"line_number":138,"context_line":"            ssh_connect_mock.return_value \u003d self.sshclient"},{"line_number":139,"context_line":"            client \u003d ssh._get_connection(self.node)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B1XY%3D","line":136,"in_reply_to":"AAAAUH%2F%2B1iU%3D","updated":"2014-01-21 16:09:06.000000000","message":"grumble, grumble. Ok. Please add a link to something next time. Guess we should try to get your review merged SOON :-)","commit_id":"fbbb2a4fa020f2a7a14b858c1a711cc9d794813b"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"2a8ae5be6130af9a9a69e55ddf7f76a66e21f88d","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            ssh_connect_mock.assert_called_once(self.node)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def test__get_connection_exception(self):"},{"line_number":144,"context_line":"        with mock.patch.object(utils, \u0027ssh_connect\u0027) \\"},{"line_number":145,"context_line":"                as ssh_connect_mock:"},{"line_number":146,"context_line":"            ssh_connect_mock.side_effect \u003d exception.SSHConnectFailed("},{"line_number":147,"context_line":"                                                                  host\u003d\u0027fake\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B1hM%3D","line":144,"updated":"2014-01-21 15:50:10.000000000","message":"ditto","commit_id":"fbbb2a4fa020f2a7a14b858c1a711cc9d794813b"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"2a8ae5be6130af9a9a69e55ddf7f76a66e21f88d","unresolved":false,"context_lines":[{"line_number":357,"context_line":"        info[\u0027macs\u0027] \u003d [\"11:11:11:11:11:11\", \"52:54:00:cf:2d:31\"]"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        self.exec_ssh_mock.side_effect \u003d processutils.ProcessExecutionError"},{"line_number":360,"context_line":"        with mock.patch.object(ssh, \u0027_get_power_status\u0027) \\"},{"line_number":361,"context_line":"                as get_power_status_mock:"},{"line_number":362,"context_line":"            with mock.patch.object(ssh, \u0027_get_hosts_name_for_node\u0027) \\"},{"line_number":363,"context_line":"                    as get_hosts_name_mock:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B1e4%3D","line":360,"updated":"2014-01-21 15:50:10.000000000","message":"ditto","commit_id":"fbbb2a4fa020f2a7a14b858c1a711cc9d794813b"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"2a8ae5be6130af9a9a69e55ddf7f76a66e21f88d","unresolved":false,"context_lines":[{"line_number":359,"context_line":"        self.exec_ssh_mock.side_effect \u003d processutils.ProcessExecutionError"},{"line_number":360,"context_line":"        with mock.patch.object(ssh, \u0027_get_power_status\u0027) \\"},{"line_number":361,"context_line":"                as get_power_status_mock:"},{"line_number":362,"context_line":"            with mock.patch.object(ssh, \u0027_get_hosts_name_for_node\u0027) \\"},{"line_number":363,"context_line":"                    as get_hosts_name_mock:"},{"line_number":364,"context_line":"                get_power_status_mock.side_effect \u003d [states.POWER_OFF,"},{"line_number":365,"context_line":"                                                     states.POWER_ON]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B1e0%3D","line":362,"updated":"2014-01-21 15:50:10.000000000","message":"ditto","commit_id":"fbbb2a4fa020f2a7a14b858c1a711cc9d794813b"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"2a8ae5be6130af9a9a69e55ddf7f76a66e21f88d","unresolved":false,"context_lines":[{"line_number":436,"context_line":"        info \u003d ssh._parse_driver_info(self.node)"},{"line_number":437,"context_line":"        info[\u0027macs\u0027] \u003d [\"11:11:11:11:11:11\", \"52:54:00:cf:2d:31\"]"},{"line_number":438,"context_line":"        self.exec_ssh_mock.side_effect \u003d processutils.ProcessExecutionError"},{"line_number":439,"context_line":"        with mock.patch.object(ssh, \u0027_get_power_status\u0027) \\"},{"line_number":440,"context_line":"                as get_power_status_mock:"},{"line_number":441,"context_line":"            with mock.patch.object(ssh, \u0027_get_hosts_name_for_node\u0027) \\"},{"line_number":442,"context_line":"                    as get_hosts_name_mock:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B1eo%3D","line":439,"updated":"2014-01-21 15:50:10.000000000","message":"ditto","commit_id":"fbbb2a4fa020f2a7a14b858c1a711cc9d794813b"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"2a8ae5be6130af9a9a69e55ddf7f76a66e21f88d","unresolved":false,"context_lines":[{"line_number":438,"context_line":"        self.exec_ssh_mock.side_effect \u003d processutils.ProcessExecutionError"},{"line_number":439,"context_line":"        with mock.patch.object(ssh, \u0027_get_power_status\u0027) \\"},{"line_number":440,"context_line":"                as get_power_status_mock:"},{"line_number":441,"context_line":"            with mock.patch.object(ssh, \u0027_get_hosts_name_for_node\u0027) \\"},{"line_number":442,"context_line":"                    as get_hosts_name_mock:"},{"line_number":443,"context_line":"                self.exec_ssh_mock.side_effect \u003d ("},{"line_number":444,"context_line":"                        processutils.ProcessExecutionError)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B1ec%3D","line":441,"updated":"2014-01-21 15:50:10.000000000","message":"ditto","commit_id":"fbbb2a4fa020f2a7a14b858c1a711cc9d794813b"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"c6a39e4f9230189a8f8d8bd85f70292e5a093f1c","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        self.exec_ssh_mock.return_value \u003d (\u0027\\n\u0027.join(expected), \u0027\u0027)"},{"line_number":157,"context_line":"        lst \u003d ssh._ssh_execute(self.sshclient, ssh_cmd)"},{"line_number":158,"context_line":"        self.exec_ssh_mock.assert_called_once_with(self.sshclient, ssh_cmd)"},{"line_number":159,"context_line":"        self.assertEqual(lst, expected)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def test__ssh_execute_exception(self):"},{"line_number":162,"context_line":"        ssh_cmd \u003d \"somecmd\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2Bmqk%3D","line":159,"updated":"2014-01-23 23:27:01.000000000","message":"assertEqual should put the expected parameter first. This will make it easier to read the error when it fails. ditto for all other assertEqual, too.\n\n(fwiw, I was corrected on this a while ago, but some of the code may still be doing it backwards...)","commit_id":"784e63c19f1e8b5c0fb0850e278858f32bb987c2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"f7bfa6e5db7677cd8860d44e04eb7b4f64bf4bbb","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        self.exec_ssh_mock.return_value \u003d (\u0027\\n\u0027.join(expected), \u0027\u0027)"},{"line_number":157,"context_line":"        lst \u003d ssh._ssh_execute(self.sshclient, ssh_cmd)"},{"line_number":158,"context_line":"        self.exec_ssh_mock.assert_called_once_with(self.sshclient, ssh_cmd)"},{"line_number":159,"context_line":"        self.assertEqual(lst, expected)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def test__ssh_execute_exception(self):"},{"line_number":162,"context_line":"        ssh_cmd \u003d \"somecmd\""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2Bl0w%3D","line":159,"in_reply_to":"AAAAUH%2F%2Bmqk%3D","updated":"2014-01-24 02:50:55.000000000","message":"That\u0027s interesting. Will need to internalize it somehow ;)","commit_id":"784e63c19f1e8b5c0fb0850e278858f32bb987c2"}]}
