)]}'
{"ironic/drivers/modules/seamicro.py":[{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"50886cfaa0a3cc81a1113c08caa1c63ccd0a5c1e","unresolved":false,"context_lines":[{"line_number":621,"context_line":"        \"\"\"Validate the Node console info."},{"line_number":622,"context_line":""},{"line_number":623,"context_line":"        :param task: a task from TaskManager."},{"line_number":624,"context_line":"        :raises: InvalidParameterValue"},{"line_number":625,"context_line":"        \"\"\""},{"line_number":626,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":627,"context_line":"        if not driver_info[\u0027port\u0027]:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8c0949_ed212fa0","line":624,"updated":"2014-11-07 04:27:21.000000000","message":"better to update when this exception is raised","commit_id":"6e717370493acaa4e6a3f5173c5a8d94c18f8d7c"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"50886cfaa0a3cc81a1113c08caa1c63ccd0a5c1e","unresolved":false,"context_lines":[{"line_number":632,"context_line":"        \"\"\"Start a remote console for the node."},{"line_number":633,"context_line":""},{"line_number":634,"context_line":"        :param task: a task from TaskManager"},{"line_number":635,"context_line":"        :raises: InvalidParameterValue if required ipmi parameters are missing"},{"line_number":636,"context_line":"        :raises: ConsoleError if the directory for the PID file cannot be"},{"line_number":637,"context_line":"                 created"},{"line_number":638,"context_line":"        :raises: ConsoleSubprocessFailed when invoking the subprocess failed"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8c0949_cd2ab37d","line":635,"updated":"2014-11-07 04:27:21.000000000","message":"seamicro parameters are missing?","commit_id":"6e717370493acaa4e6a3f5173c5a8d94c18f8d7c"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"50886cfaa0a3cc81a1113c08caa1c63ccd0a5c1e","unresolved":false,"context_lines":[{"line_number":656,"context_line":"        \"\"\"Stop the remote console session for the node."},{"line_number":657,"context_line":""},{"line_number":658,"context_line":"        :param task: a task from TaskManager"},{"line_number":659,"context_line":"        :raises: InvalidParameterValue if required ipmi parameters are missing"},{"line_number":660,"context_line":"        :raises: ConsoleError if unable to stop the console"},{"line_number":661,"context_line":"        \"\"\""},{"line_number":662,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8c0949_0d259baa","line":659,"updated":"2014-11-07 04:27:21.000000000","message":"ditto","commit_id":"6e717370493acaa4e6a3f5173c5a8d94c18f8d7c"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"50886cfaa0a3cc81a1113c08caa1c63ccd0a5c1e","unresolved":false,"context_lines":[{"line_number":664,"context_line":"        console_utils.stop_shellinabox_console(driver_info[\u0027uuid\u0027])"},{"line_number":665,"context_line":""},{"line_number":666,"context_line":"    def get_console(self, task):"},{"line_number":667,"context_line":"        \"\"\"Get the type and connection information about the console.\"\"\""},{"line_number":668,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":669,"context_line":"        url \u003d console_utils.get_shellinabox_console_url(driver_info[\u0027port\u0027])"},{"line_number":670,"context_line":"        return {\u0027type\u0027: \u0027shellinabox\u0027, \u0027url\u0027: url}"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8c0949_2d3b37d2","line":667,"updated":"2014-11-07 04:27:21.000000000","message":"raises InvalidParameterValue?","commit_id":"6e717370493acaa4e6a3f5173c5a8d94c18f8d7c"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"38b97180b6b2b5d23f0313586468fb34a2fcc09d","unresolved":false,"context_lines":[{"line_number":622,"context_line":""},{"line_number":623,"context_line":"        :param task: a task from TaskManager."},{"line_number":624,"context_line":"        :raises: InvalidParameterValue if required seamicro parameters are"},{"line_number":625,"context_line":"                 missing"},{"line_number":626,"context_line":"        \"\"\""},{"line_number":627,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":628,"context_line":"        if not driver_info[\u0027port\u0027]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_60092f95","line":625,"updated":"2014-11-10 09:42:05.000000000","message":"According to _parse_driver_info() MissingParameterValue will be raised for that reason instead of InvalidParameterValue","commit_id":"d9be4c925d05892760b70f4761632f203022a611"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"38b97180b6b2b5d23f0313586468fb34a2fcc09d","unresolved":false,"context_lines":[{"line_number":627,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":628,"context_line":"        if not driver_info[\u0027port\u0027]:"},{"line_number":629,"context_line":"            raise exception.InvalidParameterValue(_("},{"line_number":630,"context_line":"                \"SeaMicro terminal port not supplied to SeaMicro driver.\"))"},{"line_number":631,"context_line":""},{"line_number":632,"context_line":"    def start_console(self, task):"},{"line_number":633,"context_line":"        \"\"\"Start a remote console for the node."}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_40dd1314","line":630,"updated":"2014-11-10 09:42:05.000000000","message":"Looks like you should raise MissingParameterValue here (docstring needs update too)","commit_id":"d9be4c925d05892760b70f4761632f203022a611"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"38b97180b6b2b5d23f0313586468fb34a2fcc09d","unresolved":false,"context_lines":[{"line_number":634,"context_line":""},{"line_number":635,"context_line":"        :param task: a task from TaskManager"},{"line_number":636,"context_line":"        :raises: InvalidParameterValue if required seamicro parameters are"},{"line_number":637,"context_line":"                 missing"},{"line_number":638,"context_line":"        :raises: ConsoleError if the directory for the PID file cannot be"},{"line_number":639,"context_line":"                 created"},{"line_number":640,"context_line":"        :raises: ConsoleSubprocessFailed when invoking the subprocess failed"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_e0f43f89","line":637,"updated":"2014-11-10 09:42:05.000000000","message":"According to _parse_driver_info() MissingParameterValue will be raised for that reason instead of InvalidParameterValue","commit_id":"d9be4c925d05892760b70f4761632f203022a611"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"38b97180b6b2b5d23f0313586468fb34a2fcc09d","unresolved":false,"context_lines":[{"line_number":659,"context_line":""},{"line_number":660,"context_line":"        :param task: a task from TaskManager"},{"line_number":661,"context_line":"        :raises: InvalidParameterValue if required seamicro parameters are"},{"line_number":662,"context_line":"                 missing"},{"line_number":663,"context_line":"        :raises: ConsoleError if unable to stop the console"},{"line_number":664,"context_line":"        \"\"\""},{"line_number":665,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_a0031772","line":662,"updated":"2014-11-10 09:42:05.000000000","message":"According to _parse_driver_info() MissingParameterValue will be raised for that reason instead of InvalidParameterValue","commit_id":"d9be4c925d05892760b70f4761632f203022a611"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"38b97180b6b2b5d23f0313586468fb34a2fcc09d","unresolved":false,"context_lines":[{"line_number":668,"context_line":""},{"line_number":669,"context_line":"    def get_console(self, task):"},{"line_number":670,"context_line":"        \"\"\"Get the type and connection information about the console."},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"        :raises: NodeConsoleNotEnabled if Node console is not enabled."},{"line_number":673,"context_line":"        \"\"\""},{"line_number":674,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_60304f57","line":671,"updated":"2014-11-10 09:42:05.000000000","message":":raises: MissingParameterValue if required seamicro parameters are missing","commit_id":"d9be4c925d05892760b70f4761632f203022a611"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":78,"context_line":"COMMON_PROPERTIES.update(OPTIONAL_PROPERTIES)"},{"line_number":79,"context_line":"CONSOLE_PROPERTIES \u003d {"},{"line_number":80,"context_line":"    \u0027seamicro_terminal_port\u0027: _(\"node\u0027s UDP port to connect to.\""},{"line_number":81,"context_line":"                                \"Only required for console access.\")"},{"line_number":82,"context_line":"}"},{"line_number":83,"context_line":"PORT_BASE \u003d 2000"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_c191b79b","line":81,"updated":"2014-11-12 23:07:40.000000000","message":"It looks to me like you\u0027re missing a space between \"to.Only...\"","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    :param node: An Ironic node object."},{"line_number":109,"context_line":"    :returns: SeaMicro driver info."},{"line_number":110,"context_line":"    :raises: MissingParameterValue if any required parameters are missing."},{"line_number":111,"context_line":"    \"\"\""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    info \u003d node.driver_info or {}"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_41d4e746","line":110,"updated":"2014-11-12 23:07:40.000000000","message":"also \"raises: InvalidParameterValue ...\"","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":10984,"name":"Harshada Mangesh Kakad","email":"harshadak@metsi.co.uk","username":"harshada.kakad"},"change_message_id":"3dfbc40bdd25b3eebd50bf9d752eeb2a1bf15da2","unresolved":false,"context_lines":[{"line_number":349,"context_line":""},{"line_number":350,"context_line":"def get_telnet_port(driver_info):"},{"line_number":351,"context_line":"    \"\"\"Get SeaMicro telnet port to listen.\"\"\""},{"line_number":352,"context_line":"    server_id \u003d int(driver_info[\u0027server_id\u0027].split(\"/\")[0])"},{"line_number":353,"context_line":"    return PORT_BASE + (10 * server_id)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_abbabc07","line":352,"updated":"2014-11-13 09:36:53.000000000","message":"@Ruby loo: server_id format is \"int/int\". Here if it is gibberish then I can only validate if server_id\u0027s format is \"int/int\" using regular expression. Which I think its very obvious that server_id\u0027s format would not be gibberish as its given during node creation. So I don\u0027t think its should be validated. \n\nSame in case of chassis_ip, its taken from driver_info.\nLet me know your suggestion on this.","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":349,"context_line":""},{"line_number":350,"context_line":"def get_telnet_port(driver_info):"},{"line_number":351,"context_line":"    \"\"\"Get SeaMicro telnet port to listen.\"\"\""},{"line_number":352,"context_line":"    server_id \u003d int(driver_info[\u0027server_id\u0027].split(\"/\")[0])"},{"line_number":353,"context_line":"    return PORT_BASE + (10 * server_id)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_e19f935d","line":352,"updated":"2014-11-12 23:07:40.000000000","message":"I\u0027m not familiar with the naming/format of the server_id. Regardless, what if this is gibberish and an exception is raised. Does it matter?\n\nShould it be validated in the validate()?","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a189cbf399046995bae57e99a981e26063f17a3c","unresolved":false,"context_lines":[{"line_number":349,"context_line":""},{"line_number":350,"context_line":"def get_telnet_port(driver_info):"},{"line_number":351,"context_line":"    \"\"\"Get SeaMicro telnet port to listen.\"\"\""},{"line_number":352,"context_line":"    server_id \u003d int(driver_info[\u0027server_id\u0027].split(\"/\")[0])"},{"line_number":353,"context_line":"    return PORT_BASE + (10 * server_id)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_e65b1285","line":352,"in_reply_to":"5a890539_abbabc07","updated":"2014-11-13 14:05:26.000000000","message":"I honestly don\u0027t see how it is obvious that the server_id\u0027s format would not be gibberish. Someone could enter it incorrectly.\n\nAre you saying that you\u0027re OK if for whatever reason, an exception is thrown here?\n\nMy suggestion/question is whether or not it should be checked in validate(). You check the value of \u0027port\u0027, why not check this value too?\n\nSimilar thoughts wrt chassis_ip.","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":10984,"name":"Harshada Mangesh Kakad","email":"harshadak@metsi.co.uk","username":"harshada.kakad"},"change_message_id":"ffaf21ab071955a722caa985f29e9e17d5e2b9ed","unresolved":false,"context_lines":[{"line_number":349,"context_line":""},{"line_number":350,"context_line":"def get_telnet_port(driver_info):"},{"line_number":351,"context_line":"    \"\"\"Get SeaMicro telnet port to listen.\"\"\""},{"line_number":352,"context_line":"    server_id \u003d int(driver_info[\u0027server_id\u0027].split(\"/\")[0])"},{"line_number":353,"context_line":"    return PORT_BASE + (10 * server_id)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_45b83ce5","line":352,"in_reply_to":"5a890539_e65b1285","updated":"2014-11-14 09:25:21.000000000","message":"@Ruby: Yes you are right this can happen. I can put a check in validate on server_id\u0027s format (\"int/int\")","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":622,"context_line":""},{"line_number":623,"context_line":"        :param task: a task from TaskManager."},{"line_number":624,"context_line":"        :raises: MissingParameterValue if required seamicro parameters are"},{"line_number":625,"context_line":"                 missing"},{"line_number":626,"context_line":"        \"\"\""},{"line_number":627,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":628,"context_line":"        if not driver_info[\u0027port\u0027]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_01681f86","line":625,"updated":"2014-11-12 23:07:40.000000000","message":"also :raises: InvalidParameterValue (from _parse_driver_info())","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":627,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":628,"context_line":"        if not driver_info[\u0027port\u0027]:"},{"line_number":629,"context_line":"            raise exception.MissingParameterValue(_("},{"line_number":630,"context_line":"                \"Missing SeaMicro console terminal port.\"))"},{"line_number":631,"context_line":""},{"line_number":632,"context_line":"    def start_console(self, task):"},{"line_number":633,"context_line":"        \"\"\"Start a remote console for the node."}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_41bea7d5","line":630,"updated":"2014-11-12 23:07:40.000000000","message":"Wondering if it might be clearer if it was \u0027Missing \u0027seamicro_terminal_port\u0027 parameter in node\u0027s driver_info\u0027.","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":637,"context_line":"                 missing"},{"line_number":638,"context_line":"        :raises: ConsoleError if the directory for the PID file cannot be"},{"line_number":639,"context_line":"                 created"},{"line_number":640,"context_line":"        :raises: ConsoleSubprocessFailed when invoking the subprocess failed"},{"line_number":641,"context_line":"        \"\"\""},{"line_number":642,"context_line":""},{"line_number":643,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_e1c87376","line":640,"updated":"2014-11-12 23:07:40.000000000","message":"also :raises: InvalidParameterValue","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":642,"context_line":""},{"line_number":643,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":644,"context_line":"        telnet_port \u003d get_telnet_port(driver_info)"},{"line_number":645,"context_line":"        chassis_ip \u003d driver_info[\u0027api_endpoint\u0027].split(\"/\")[2]"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"        seamicro_cmd \u003d (\"/:%(uid)s:%(gid)s:HOME:telnet %(chassis)s %(port)s\""},{"line_number":648,"context_line":"                       % {\u0027uid\u0027: os.getuid(),"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_619ac364","line":645,"updated":"2014-11-12 23:07:40.000000000","message":"what if there is a problem here, eg, no [2]?","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"956fdb3f913a7ccb8dd30f6d3ebfd924e6d7918b","unresolved":false,"context_lines":[{"line_number":642,"context_line":""},{"line_number":643,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":644,"context_line":"        telnet_port \u003d get_telnet_port(driver_info)"},{"line_number":645,"context_line":"        chassis_ip \u003d driver_info[\u0027api_endpoint\u0027].split(\"/\")[2]"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"        seamicro_cmd \u003d (\"/:%(uid)s:%(gid)s:HOME:telnet %(chassis)s %(port)s\""},{"line_number":648,"context_line":"                       % {\u0027uid\u0027: os.getuid(),"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_d1d7b221","line":645,"in_reply_to":"5a890539_619ac364","updated":"2014-11-13 14:20:02.000000000","message":"maybe using urlparse here? Or on the validate() to check if it\u0027s a valid url","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":10984,"name":"Harshada Mangesh Kakad","email":"harshadak@metsi.co.uk","username":"harshada.kakad"},"change_message_id":"ffaf21ab071955a722caa985f29e9e17d5e2b9ed","unresolved":false,"context_lines":[{"line_number":642,"context_line":""},{"line_number":643,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":644,"context_line":"        telnet_port \u003d get_telnet_port(driver_info)"},{"line_number":645,"context_line":"        chassis_ip \u003d driver_info[\u0027api_endpoint\u0027].split(\"/\")[2]"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"        seamicro_cmd \u003d (\"/:%(uid)s:%(gid)s:HOME:telnet %(chassis)s %(port)s\""},{"line_number":648,"context_line":"                       % {\u0027uid\u0027: os.getuid(),"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_05a9d490","line":645,"in_reply_to":"5a890539_d1d7b221","updated":"2014-11-14 09:25:21.000000000","message":"@Lucas and @Ruby: Yes I can use urlparse to parse the valid url and can put this check in validate.\nThanks for your suggestions.","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":648,"context_line":"                       % {\u0027uid\u0027: os.getuid(),"},{"line_number":649,"context_line":"                          \u0027gid\u0027: os.getgid(),"},{"line_number":650,"context_line":"                          \u0027chassis\u0027: chassis_ip,"},{"line_number":651,"context_line":"                          \u0027port\u0027: telnet_port})"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"        console_utils.start_shellinabox_console(driver_info[\u0027uuid\u0027],"},{"line_number":654,"context_line":"                                                driver_info[\u0027port\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_e1f23399","line":651,"updated":"2014-11-12 23:07:40.000000000","message":"I\u0027ll take your word for it that this is the correct seamicro cmd ;)","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":659,"context_line":""},{"line_number":660,"context_line":"        :param task: a task from TaskManager"},{"line_number":661,"context_line":"        :raises: MissingParameterValue if required seamicro parameters are"},{"line_number":662,"context_line":"                 missing"},{"line_number":663,"context_line":"        :raises: ConsoleError if unable to stop the console"},{"line_number":664,"context_line":"        \"\"\""},{"line_number":665,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_0173bf15","line":662,"updated":"2014-11-12 23:07:40.000000000","message":"also :raises: InvalidParameterValue","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":670,"context_line":"        \"\"\"Get the type and connection information about the console."},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"        :raises: MissingParameterValue if required seamicro parameters are"},{"line_number":673,"context_line":"                 missing"},{"line_number":674,"context_line":"        \"\"\""},{"line_number":675,"context_line":""},{"line_number":676,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_c14ff7bc","line":673,"updated":"2014-11-12 23:07:40.000000000","message":"and :raises: InvalidParameterValue","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"30073395ebb8d06509383ee87fc93e3f5bb84cc2","unresolved":false,"context_lines":[{"line_number":625,"context_line":"        if not r.match(driver_info[\u0027server_id\u0027]):"},{"line_number":626,"context_line":"            raise exception.InvalidParameterValue(_("},{"line_number":627,"context_line":"                \"Invalid \u0027seamicro_server_id\u0027 parameter in node\u0027s \""},{"line_number":628,"context_line":"                \"driver_info.\"))"},{"line_number":629,"context_line":""},{"line_number":630,"context_line":"        url \u003d urlparse.urlparse(driver_info[\u0027api_endpoint\u0027])"},{"line_number":631,"context_line":"        if (not (url.scheme \u003d\u003d \"http\") or not url.netloc"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_51c27985","line":628,"updated":"2014-11-17 21:59:59.000000000","message":"would it be useful to mention the format of the id, eg \u0027\u003cint\u003e/\u003cint\u003e\u0027. Or maybe seamicro users should know the format.","commit_id":"1b5e1bf9a293eed24e505813decc20a9a0e01528"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"30073395ebb8d06509383ee87fc93e3f5bb84cc2","unresolved":false,"context_lines":[{"line_number":629,"context_line":""},{"line_number":630,"context_line":"        url \u003d urlparse.urlparse(driver_info[\u0027api_endpoint\u0027])"},{"line_number":631,"context_line":"        if (not (url.scheme \u003d\u003d \"http\") or not url.netloc"},{"line_number":632,"context_line":"            or not (url.path \u003d\u003d \"/v2.0\")):"},{"line_number":633,"context_line":"            raise exception.InvalidParameterValue(_("},{"line_number":634,"context_line":"                \"Invalid \u0027seamicro_api_endpoint\u0027 parameter in node\u0027s \""},{"line_number":635,"context_line":"                \"driver_info.\"))"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_d1666950","line":632,"updated":"2014-11-17 21:59:59.000000000","message":"This check for /v2.0 doesn\u0027t have anything to do with getting the chassis_ip. I don\u0027t really like hard-coding of things like versions, because it means that this will have to change if this path changes. But I don\u0027t know much about seamicro. Just wanted to mention it ;)","commit_id":"1b5e1bf9a293eed24e505813decc20a9a0e01528"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"30073395ebb8d06509383ee87fc93e3f5bb84cc2","unresolved":false,"context_lines":[{"line_number":648,"context_line":""},{"line_number":649,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":650,"context_line":"        telnet_port \u003d get_telnet_port(driver_info)"},{"line_number":651,"context_line":"        chassis_ip \u003d driver_info[\u0027api_endpoint\u0027].split(\"/\")[2]"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"        seamicro_cmd \u003d (\"/:%(uid)s:%(gid)s:HOME:telnet %(chassis)s %(port)s\""},{"line_number":654,"context_line":"                       % {\u0027uid\u0027: os.getuid(),"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_f159a58e","line":651,"updated":"2014-11-17 21:59:59.000000000","message":"If you used urlparse.urlparse() on this, then chassis_ip would be the .netloc, right? Would it be easier to understand if you did this via urlparse? (although this is probably faster).","commit_id":"1b5e1bf9a293eed24e505813decc20a9a0e01528"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"9fb6958dce7ae1ff7efaac50a16eac5e4e19cf35","unresolved":false,"context_lines":[{"line_number":620,"context_line":"            raise exception.MissingParameterValue(_("},{"line_number":621,"context_line":"                \"Missing \u0027seamicro_terminal_port\u0027 parameter in node\u0027s \""},{"line_number":622,"context_line":"                \"driver_info\"))"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"        r \u003d re.compile(r\"(^[0-9]+)/([0-9]+$)\")"},{"line_number":625,"context_line":"        if not r.match(driver_info[\u0027server_id\u0027]):"},{"line_number":626,"context_line":"            raise exception.InvalidParameterValue(_("}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_6e1ca26b","line":623,"updated":"2014-11-19 17:05:28.000000000","message":"I think validation code for \u0027server_id\u0027 and \u0027api_endpoint\u0027 (l624-635) should be moved to _parse_driver_info() because these parameters are required not only for console interface.","commit_id":"68b4508b510c1b6a76c8bb3e24d6189a9f743693"},{"author":{"_account_id":10984,"name":"Harshada Mangesh Kakad","email":"harshadak@metsi.co.uk","username":"harshada.kakad"},"change_message_id":"3c99a9b6210593392db210c980557a7eda2170d6","unresolved":false,"context_lines":[{"line_number":620,"context_line":"            raise exception.MissingParameterValue(_("},{"line_number":621,"context_line":"                \"Missing \u0027seamicro_terminal_port\u0027 parameter in node\u0027s \""},{"line_number":622,"context_line":"                \"driver_info\"))"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"        r \u003d re.compile(r\"(^[0-9]+)/([0-9]+$)\")"},{"line_number":625,"context_line":"        if not r.match(driver_info[\u0027server_id\u0027]):"},{"line_number":626,"context_line":"            raise exception.InvalidParameterValue(_("}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_052f6aa2","line":623,"in_reply_to":"5a890539_6e1ca26b","updated":"2014-11-20 06:28:36.000000000","message":"@Yuriy Zveryanskyy: Thanks for your comment. Even I think you have a valid point. Moved those validations to _parse_driver_info() .","commit_id":"68b4508b510c1b6a76c8bb3e24d6189a9f743693"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"0197b88d789d9bc5d82f61aa34080c2a68ee0e41","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        raise exception.InvalidParameterValue(_("},{"line_number":138,"context_line":"            \"Invalid \u0027seamicro_server_id\u0027 parameter in node\u0027s \""},{"line_number":139,"context_line":"            \"driver_info. Expected format of \u0027seamicro_server_id\u0027 \""},{"line_number":140,"context_line":"            \"is \u003cint\u003e/\u003cint.\u003e\"))"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    url \u003d urlparse.urlparse(api_endpoint)"},{"line_number":143,"context_line":"    if (not (url.scheme \u003d\u003d \"http\") or not url.netloc):"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_93dab6e7","line":140,"updated":"2014-11-20 15:01:14.000000000","message":"nit: \u0027\u003cint\u003e/\u003cint.\u003e\u0027 -\u003e \u0027\u003cint\u003e/\u003cint\u003e\" (no period)","commit_id":"b2d3117c140e9fcbae0e152a1d6168f616393e6c"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"e9f19d9319375cf87885d053b18a19d132b0177e","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        raise exception.InvalidParameterValue(_("},{"line_number":138,"context_line":"            \"Invalid \u0027seamicro_server_id\u0027 parameter in node\u0027s \""},{"line_number":139,"context_line":"            \"driver_info. Expected format of \u0027seamicro_server_id\u0027 \""},{"line_number":140,"context_line":"            \"is \u003cint\u003e/\u003cint.\u003e\"))"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    url \u003d urlparse.urlparse(api_endpoint)"},{"line_number":143,"context_line":"    if (not (url.scheme \u003d\u003d \"http\") or not url.netloc):"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_fca4a74c","line":140,"in_reply_to":"5a890539_93dab6e7","updated":"2014-11-20 15:35:25.000000000","message":"+1","commit_id":"b2d3117c140e9fcbae0e152a1d6168f616393e6c"}],"ironic/tests/drivers/test_seamicro.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ffec5588141523fb1f5c5900ffbb882850b86e61","unresolved":false,"context_lines":[{"line_number":610,"context_line":"                              task.driver.management.validate, task)"},{"line_number":611,"context_line":""},{"line_number":612,"context_line":"    @mock.patch.object(console_utils, \u0027start_shellinabox_console\u0027,"},{"line_number":613,"context_line":"                       autospec\u003dTrue)"},{"line_number":614,"context_line":"    def test_start_console(self, mock_exec):"},{"line_number":615,"context_line":"        mock_exec.return_value \u003d None"},{"line_number":616,"context_line":"        info \u003d seamicro ._parse_driver_info(self.node)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8c0949_8190a144","line":613,"updated":"2014-11-04 14:00:44.000000000","message":"I think you don\u0027t need autospec\u003dTrue in these tests.","commit_id":"e0bc660c2f42f69c78cbcda8d0ae5787d1f74506"},{"author":{"_account_id":10984,"name":"Harshada Mangesh Kakad","email":"harshadak@metsi.co.uk","username":"harshada.kakad"},"change_message_id":"27d703ad19a832342536f268313aa0b0c400b437","unresolved":false,"context_lines":[{"line_number":610,"context_line":"                              task.driver.management.validate, task)"},{"line_number":611,"context_line":""},{"line_number":612,"context_line":"    @mock.patch.object(console_utils, \u0027start_shellinabox_console\u0027,"},{"line_number":613,"context_line":"                       autospec\u003dTrue)"},{"line_number":614,"context_line":"    def test_start_console(self, mock_exec):"},{"line_number":615,"context_line":"        mock_exec.return_value \u003d None"},{"line_number":616,"context_line":"        info \u003d seamicro ._parse_driver_info(self.node)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8c0949_7a5b5b2e","line":613,"in_reply_to":"7a8c0949_8190a144","updated":"2014-11-05 05:28:24.000000000","message":"Thanks Vladyslav for yours suggestion, will do the necessory changes.","commit_id":"e0bc660c2f42f69c78cbcda8d0ae5787d1f74506"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ffec5588141523fb1f5c5900ffbb882850b86e61","unresolved":false,"context_lines":[{"line_number":621,"context_line":"        mock_exec.assert_called_once_with(info[\u0027uuid\u0027],"},{"line_number":622,"context_line":"                                          info[\u0027port\u0027],"},{"line_number":623,"context_line":"                                          mock.ANY)"},{"line_number":624,"context_line":"        self.assertTrue(mock_exec.called)"},{"line_number":625,"context_line":""},{"line_number":626,"context_line":"    @mock.patch.object(console_utils, \u0027start_shellinabox_console\u0027,"},{"line_number":627,"context_line":"                       autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8c0949_4177993a","line":624,"updated":"2014-11-04 14:00:44.000000000","message":"No need to add this if you already checked it was called on line 621.","commit_id":"e0bc660c2f42f69c78cbcda8d0ae5787d1f74506"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ffec5588141523fb1f5c5900ffbb882850b86e61","unresolved":false,"context_lines":[{"line_number":624,"context_line":"        self.assertTrue(mock_exec.called)"},{"line_number":625,"context_line":""},{"line_number":626,"context_line":"    @mock.patch.object(console_utils, \u0027start_shellinabox_console\u0027,"},{"line_number":627,"context_line":"                       autospec\u003dTrue)"},{"line_number":628,"context_line":"    def test_start_console_fail(self, mock_exec):"},{"line_number":629,"context_line":"        mock_exec.side_effect \u003d exception.ConsoleSubprocessFailed("},{"line_number":630,"context_line":"                error\u003d\u0027error\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8c0949_a193dd4d","line":627,"updated":"2014-11-04 14:00:44.000000000","message":"ditto","commit_id":"e0bc660c2f42f69c78cbcda8d0ae5787d1f74506"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ffec5588141523fb1f5c5900ffbb882850b86e61","unresolved":false,"context_lines":[{"line_number":636,"context_line":"                              task)"},{"line_number":637,"context_line":""},{"line_number":638,"context_line":"    @mock.patch.object(console_utils, \u0027stop_shellinabox_console\u0027,"},{"line_number":639,"context_line":"                       autospec\u003dTrue)"},{"line_number":640,"context_line":"    def test_stop_console(self, mock_exec):"},{"line_number":641,"context_line":"        mock_exec.return_value \u003d None"},{"line_number":642,"context_line":"        info \u003d seamicro ._parse_driver_info(self.node)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8c0949_01a4b1a4","line":639,"updated":"2014-11-04 14:00:44.000000000","message":"ditto","commit_id":"e0bc660c2f42f69c78cbcda8d0ae5787d1f74506"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ffec5588141523fb1f5c5900ffbb882850b86e61","unresolved":false,"context_lines":[{"line_number":639,"context_line":"                       autospec\u003dTrue)"},{"line_number":640,"context_line":"    def test_stop_console(self, mock_exec):"},{"line_number":641,"context_line":"        mock_exec.return_value \u003d None"},{"line_number":642,"context_line":"        info \u003d seamicro ._parse_driver_info(self.node)"},{"line_number":643,"context_line":"        with task_manager.acquire(self.context,"},{"line_number":644,"context_line":"                                  self.node[\u0027uuid\u0027]) as task:"},{"line_number":645,"context_line":"            self.driver.console.stop_console(task)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8c0949_21cd2d5e","line":642,"updated":"2014-11-04 14:00:44.000000000","message":"nit: space in seamicro ._parse_driver_info","commit_id":"e0bc660c2f42f69c78cbcda8d0ae5787d1f74506"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ffec5588141523fb1f5c5900ffbb882850b86e61","unresolved":false,"context_lines":[{"line_number":645,"context_line":"            self.driver.console.stop_console(task)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"        mock_exec.assert_called_once_with(info[\u0027uuid\u0027])"},{"line_number":648,"context_line":"        self.assertTrue(mock_exec.called)"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"    @mock.patch.object(console_utils, \u0027stop_shellinabox_console\u0027,"},{"line_number":651,"context_line":"                       autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8c0949_41aeb986","line":648,"updated":"2014-11-04 14:00:44.000000000","message":"ditto","commit_id":"e0bc660c2f42f69c78cbcda8d0ae5787d1f74506"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ffec5588141523fb1f5c5900ffbb882850b86e61","unresolved":false,"context_lines":[{"line_number":648,"context_line":"        self.assertTrue(mock_exec.called)"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"    @mock.patch.object(console_utils, \u0027stop_shellinabox_console\u0027,"},{"line_number":651,"context_line":"                       autospec\u003dTrue)"},{"line_number":652,"context_line":"    def test_stop_console_fail(self, mock_stop):"},{"line_number":653,"context_line":"        mock_stop.side_effect \u003d exception.ConsoleError()"},{"line_number":654,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8c0949_81b7c1d7","line":651,"updated":"2014-11-04 14:00:44.000000000","message":"ditto","commit_id":"e0bc660c2f42f69c78cbcda8d0ae5787d1f74506"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ffec5588141523fb1f5c5900ffbb882850b86e61","unresolved":false,"context_lines":[{"line_number":653,"context_line":"        mock_stop.side_effect \u003d exception.ConsoleError()"},{"line_number":654,"context_line":""},{"line_number":655,"context_line":"        with task_manager.acquire(self.context,"},{"line_number":656,"context_line":"                                  self.node.uuid) as task:"},{"line_number":657,"context_line":"            self.assertRaises(exception.ConsoleError,"},{"line_number":658,"context_line":"                              self.driver.console.stop_console,"},{"line_number":659,"context_line":"                              task)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8c0949_21c60d4a","line":656,"updated":"2014-11-04 14:00:44.000000000","message":"you use both node.uuid and node[\u0027uuid\u0027], it\u0027s better to choose one for consistency.","commit_id":"e0bc660c2f42f69c78cbcda8d0ae5787d1f74506"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ffec5588141523fb1f5c5900ffbb882850b86e61","unresolved":false,"context_lines":[{"line_number":661,"context_line":"        mock_stop.assert_called_once_with(self.node.uuid)"},{"line_number":662,"context_line":""},{"line_number":663,"context_line":"    @mock.patch.object(console_utils, \u0027start_shellinabox_console\u0027,"},{"line_number":664,"context_line":"                       autospec\u003dTrue)"},{"line_number":665,"context_line":"    def test_start_console_fail_nodir(self, mock_exec):"},{"line_number":666,"context_line":"        mock_exec.side_effect \u003d exception.ConsoleError()"},{"line_number":667,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8c0949_41c5d93a","line":664,"updated":"2014-11-04 14:00:44.000000000","message":"ditto","commit_id":"e0bc660c2f42f69c78cbcda8d0ae5787d1f74506"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ffec5588141523fb1f5c5900ffbb882850b86e61","unresolved":false,"context_lines":[{"line_number":673,"context_line":"        mock_exec.assert_called_once_with(self.node.uuid, mock.ANY, mock.ANY)"},{"line_number":674,"context_line":""},{"line_number":675,"context_line":"    @mock.patch.object(console_utils, \u0027get_shellinabox_console_url\u0027,"},{"line_number":676,"context_line":"                       utospec\u003dTrue)"},{"line_number":677,"context_line":"    def test_get_console(self, mock_exec):"},{"line_number":678,"context_line":"        url \u003d \u0027http://localhost:4201\u0027"},{"line_number":679,"context_line":"        mock_exec.return_value \u003d url"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8c0949_8105017c","line":676,"updated":"2014-11-04 14:00:44.000000000","message":"ditto","commit_id":"e0bc660c2f42f69c78cbcda8d0ae5787d1f74506"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ffec5588141523fb1f5c5900ffbb882850b86e61","unresolved":false,"context_lines":[{"line_number":678,"context_line":"        url \u003d \u0027http://localhost:4201\u0027"},{"line_number":679,"context_line":"        mock_exec.return_value \u003d url"},{"line_number":680,"context_line":"        expected \u003d {\u0027type\u0027: \u0027shellinabox\u0027, \u0027url\u0027: url}"},{"line_number":681,"context_line":"        info \u003d seamicro ._parse_driver_info(self.node)"},{"line_number":682,"context_line":""},{"line_number":683,"context_line":"        with task_manager.acquire(self.context,"},{"line_number":684,"context_line":"                                  self.node[\u0027uuid\u0027]) as task:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8c0949_c1ff0966","line":681,"updated":"2014-11-04 14:00:44.000000000","message":"space again","commit_id":"e0bc660c2f42f69c78cbcda8d0ae5787d1f74506"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ffec5588141523fb1f5c5900ffbb882850b86e61","unresolved":false,"context_lines":[{"line_number":686,"context_line":""},{"line_number":687,"context_line":"        self.assertEqual(expected, console_info)"},{"line_number":688,"context_line":"        mock_exec.assert_called_once_with(info[\u0027port\u0027])"},{"line_number":689,"context_line":"        self.assertTrue(mock_exec.called)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8c0949_e102456e","line":689,"updated":"2014-11-04 14:00:44.000000000","message":"ditto","commit_id":"e0bc660c2f42f69c78cbcda8d0ae5787d1f74506"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"1d2a0a7c0ab7358ec7d7f527ae8ca40263493dee","unresolved":false,"context_lines":[{"line_number":297,"context_line":"            expected \u003d (list(seamicro.COMMON_PROPERTIES) +"},{"line_number":298,"context_line":"                        list(seamicro.CONSOLE_PROPERTIES))"},{"line_number":299,"context_line":"            console_properties \u003d task.driver.console.get_properties().keys()"},{"line_number":300,"context_line":"            self.assertEqual(sorted(expected),"},{"line_number":301,"context_line":"                             sorted(console_properties))"},{"line_number":302,"context_line":"            self.assertEqual(sorted(expected),"},{"line_number":303,"context_line":"                             sorted(task.driver.get_properties().keys()))"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_1a41a039","line":300,"updated":"2014-11-11 08:59:12.000000000","message":"If we don\u0027t care of the order of the content, we can use this   assertItemsEqual(actual_iterable, expected_iterable) method without sorteded method call.","commit_id":"7c7cc029ea7af048745f78cc949ea15221375e80"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"87073458d6be29ac5259a80b27016881d9748624","unresolved":false,"context_lines":[{"line_number":297,"context_line":"            expected \u003d (list(seamicro.COMMON_PROPERTIES) +"},{"line_number":298,"context_line":"                        list(seamicro.CONSOLE_PROPERTIES))"},{"line_number":299,"context_line":"            console_properties \u003d task.driver.console.get_properties().keys()"},{"line_number":300,"context_line":"            self.assertEqual(sorted(expected),"},{"line_number":301,"context_line":"                             sorted(console_properties))"},{"line_number":302,"context_line":"            self.assertEqual(sorted(expected),"},{"line_number":303,"context_line":"                             sorted(task.driver.get_properties().keys()))"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_7d8d3e7b","line":300,"in_reply_to":"5a890539_1a41a039","updated":"2014-11-11 09:44:45.000000000","message":"Oh nice I didn\u0027t know that one :)","commit_id":"7c7cc029ea7af048745f78cc949ea15221375e80"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"1d2a0a7c0ab7358ec7d7f527ae8ca40263493dee","unresolved":false,"context_lines":[{"line_number":300,"context_line":"            self.assertEqual(sorted(expected),"},{"line_number":301,"context_line":"                             sorted(console_properties))"},{"line_number":302,"context_line":"            self.assertEqual(sorted(expected),"},{"line_number":303,"context_line":"                             sorted(task.driver.get_properties().keys()))"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    @mock.patch.object(seamicro, \u0027_parse_driver_info\u0027)"},{"line_number":306,"context_line":"    def test_power_interface_validate_good(self, parse_drv_info_mock):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a890539_3a3e5cb9","line":303,"updated":"2014-11-11 08:59:12.000000000","message":"ditto","commit_id":"7c7cc029ea7af048745f78cc949ea15221375e80"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"0b41004b94eb769f6edd7173f9b93fca50ac24f3","unresolved":false,"context_lines":[{"line_number":296,"context_line":""},{"line_number":297,"context_line":"            expected \u003d (list(seamicro.COMMON_PROPERTIES) +"},{"line_number":298,"context_line":"                        list(seamicro.CONSOLE_PROPERTIES))"},{"line_number":299,"context_line":"            console_properties \u003d task.driver.console.get_properties().keys()"},{"line_number":300,"context_line":"            self.assertItemsEqual(expected, console_properties)"},{"line_number":301,"context_line":"            self.assertItemsEqual(expected,"},{"line_number":302,"context_line":"                                  task.driver.get_properties().keys())"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_b030ad57","line":299,"updated":"2014-11-11 10:40:13.000000000","message":"As I understood it should be converted to list fot py3 compatibility like list(task.driver.console.get_properties()), is it the case for tests?","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"364b9235787ae052ebce4060d46541a9ac6c9387","unresolved":false,"context_lines":[{"line_number":296,"context_line":""},{"line_number":297,"context_line":"            expected \u003d (list(seamicro.COMMON_PROPERTIES) +"},{"line_number":298,"context_line":"                        list(seamicro.CONSOLE_PROPERTIES))"},{"line_number":299,"context_line":"            console_properties \u003d task.driver.console.get_properties().keys()"},{"line_number":300,"context_line":"            self.assertItemsEqual(expected, console_properties)"},{"line_number":301,"context_line":"            self.assertItemsEqual(expected,"},{"line_number":302,"context_line":"                                  task.driver.get_properties().keys())"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_510a7926","line":299,"in_reply_to":"5a890539_6942a93f","updated":"2014-11-17 21:56:04.000000000","message":"Hi, did you look at this? I don\u0027t think we should be using .assertItemsEqual because it isn\u0027t available in python 3.3 (.assertCountEqual instead).","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":296,"context_line":""},{"line_number":297,"context_line":"            expected \u003d (list(seamicro.COMMON_PROPERTIES) +"},{"line_number":298,"context_line":"                        list(seamicro.CONSOLE_PROPERTIES))"},{"line_number":299,"context_line":"            console_properties \u003d task.driver.console.get_properties().keys()"},{"line_number":300,"context_line":"            self.assertItemsEqual(expected, console_properties)"},{"line_number":301,"context_line":"            self.assertItemsEqual(expected,"},{"line_number":302,"context_line":"                                  task.driver.get_properties().keys())"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_6942a93f","line":299,"in_reply_to":"5a890539_b030ad57","updated":"2014-11-12 23:07:40.000000000","message":"So for py3, this is a \u0027view object\u0027 [1]. I think (but didn\u0027t verify) that the .assertItemsEqual() will work because it does a sort() on it.\n\nHowever, in Python 3, this .assertItemsEqual() method is named assertCountEqual [2]. So maybe we shouldn\u0027t be using it?\n\n[1] https://docs.python.org/3/library/stdtypes.html#mapping-types-dict\n[2] https://docs.python.org/2/library/unittest.html","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"0b41004b94eb769f6edd7173f9b93fca50ac24f3","unresolved":false,"context_lines":[{"line_number":299,"context_line":"            console_properties \u003d task.driver.console.get_properties().keys()"},{"line_number":300,"context_line":"            self.assertItemsEqual(expected, console_properties)"},{"line_number":301,"context_line":"            self.assertItemsEqual(expected,"},{"line_number":302,"context_line":"                                  task.driver.get_properties().keys())"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    @mock.patch.object(seamicro, \u0027_parse_driver_info\u0027)"},{"line_number":305,"context_line":"    def test_power_interface_validate_good(self, parse_drv_info_mock):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_d0353947","line":302,"updated":"2014-11-11 10:40:13.000000000","message":"ditto","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":613,"context_line":"        mock_exec.return_value \u003d None"},{"line_number":614,"context_line":"        info \u003d seamicro._parse_driver_info(self.node)"},{"line_number":615,"context_line":"        with task_manager.acquire(self.context,"},{"line_number":616,"context_line":"                                  self.node.uuid) as task:"},{"line_number":617,"context_line":"            self.driver.console.start_console(task)"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"        mock_exec.assert_called_once_with(info[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_49732db1","line":616,"updated":"2014-11-12 23:07:40.000000000","message":"We are trying to move away from this syntax. Please use self.node[\u0027uuid\u0027] instead.","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"024877b031546501b0ef1e7e73f4cc9d3684e803","unresolved":false,"context_lines":[{"line_number":613,"context_line":"        mock_exec.return_value \u003d None"},{"line_number":614,"context_line":"        info \u003d seamicro._parse_driver_info(self.node)"},{"line_number":615,"context_line":"        with task_manager.acquire(self.context,"},{"line_number":616,"context_line":"                                  self.node.uuid) as task:"},{"line_number":617,"context_line":"            self.driver.console.start_console(task)"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"        mock_exec.assert_called_once_with(info[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_2c733981","line":616,"in_reply_to":"5a890539_31a476a5","updated":"2014-11-13 14:36:05.000000000","message":"OMG. Lucas, you\u0027re right. Still jetlagged, sorry about that Harshada.","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"956fdb3f913a7ccb8dd30f6d3ebfd924e6d7918b","unresolved":false,"context_lines":[{"line_number":613,"context_line":"        mock_exec.return_value \u003d None"},{"line_number":614,"context_line":"        info \u003d seamicro._parse_driver_info(self.node)"},{"line_number":615,"context_line":"        with task_manager.acquire(self.context,"},{"line_number":616,"context_line":"                                  self.node.uuid) as task:"},{"line_number":617,"context_line":"            self.driver.console.start_console(task)"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":"        mock_exec.assert_called_once_with(info[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_31a476a5","line":616,"in_reply_to":"5a890539_49732db1","updated":"2014-11-13 14:20:02.000000000","message":"I think it\u0027s the other way around Ruby, we are trying to get rid of the dict-like behavior of the objects[1]. So self.node.uuid is correct IIRC.\n\n[1] https://github.com/openstack/ironic/blob/master/ironic/objects/base.py#L412-L416","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":626,"context_line":"                error\u003d\u0027error\u0027)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"        with task_manager.acquire(self.context,"},{"line_number":629,"context_line":"                                  self.node.uuid) as task:"},{"line_number":630,"context_line":"            self.assertRaises(exception.ConsoleSubprocessFailed,"},{"line_number":631,"context_line":"                              self.driver.console.start_console,"},{"line_number":632,"context_line":"                              task)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_89ab55d5","line":629,"updated":"2014-11-12 23:07:40.000000000","message":"ditto","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":636,"context_line":"        mock_exec.return_value \u003d None"},{"line_number":637,"context_line":"        info \u003d seamicro._parse_driver_info(self.node)"},{"line_number":638,"context_line":"        with task_manager.acquire(self.context,"},{"line_number":639,"context_line":"                                  self.node.uuid) as task:"},{"line_number":640,"context_line":"            self.driver.console.stop_console(task)"},{"line_number":641,"context_line":""},{"line_number":642,"context_line":"        mock_exec.assert_called_once_with(info[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_e983f953","line":639,"updated":"2014-11-12 23:07:40.000000000","message":"ditto","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":646,"context_line":"        mock_stop.side_effect \u003d exception.ConsoleError()"},{"line_number":647,"context_line":""},{"line_number":648,"context_line":"        with task_manager.acquire(self.context,"},{"line_number":649,"context_line":"                                  self.node.uuid) as task:"},{"line_number":650,"context_line":"            self.assertRaises(exception.ConsoleError,"},{"line_number":651,"context_line":"                              self.driver.console.stop_console,"},{"line_number":652,"context_line":"                              task)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_69de296f","line":649,"updated":"2014-11-12 23:07:40.000000000","message":"ditto","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":651,"context_line":"                              self.driver.console.stop_console,"},{"line_number":652,"context_line":"                              task)"},{"line_number":653,"context_line":""},{"line_number":654,"context_line":"        mock_stop.assert_called_once_with(self.node.uuid)"},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"    @mock.patch.object(console_utils, \u0027start_shellinabox_console\u0027)"},{"line_number":657,"context_line":"    def test_start_console_fail_nodir(self, mock_exec):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_a9e81111","line":654,"updated":"2014-11-12 23:07:40.000000000","message":"ditto","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":658,"context_line":"        mock_exec.side_effect \u003d exception.ConsoleError()"},{"line_number":659,"context_line":""},{"line_number":660,"context_line":"        with task_manager.acquire(self.context,"},{"line_number":661,"context_line":"                                  self.node.uuid) as task:"},{"line_number":662,"context_line":"            self.assertRaises(exception.ConsoleError,"},{"line_number":663,"context_line":"                              self.driver.console.start_console,"},{"line_number":664,"context_line":"                              task)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_69c5498d","line":661,"updated":"2014-11-12 23:07:40.000000000","message":"ditto","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":662,"context_line":"            self.assertRaises(exception.ConsoleError,"},{"line_number":663,"context_line":"                              self.driver.console.start_console,"},{"line_number":664,"context_line":"                              task)"},{"line_number":665,"context_line":"        mock_exec.assert_called_once_with(self.node.uuid, mock.ANY, mock.ANY)"},{"line_number":666,"context_line":""},{"line_number":667,"context_line":"    @mock.patch.object(console_utils, \u0027get_shellinabox_console_url\u0027)"},{"line_number":668,"context_line":"    def test_get_console(self, mock_exec):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_a9bf31fa","line":665,"updated":"2014-11-12 23:07:40.000000000","message":"ditto","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":672,"context_line":"        info \u003d seamicro._parse_driver_info(self.node)"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"        with task_manager.acquire(self.context,"},{"line_number":675,"context_line":"                                  self.node.uuid) as task:"},{"line_number":676,"context_line":"            console_info \u003d self.driver.console.get_console(task)"},{"line_number":677,"context_line":""},{"line_number":678,"context_line":"        self.assertEqual(expected, console_info)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_694c6943","line":675,"updated":"2014-11-12 23:07:40.000000000","message":"ditto","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"edadef75108a2636c4df945ff11731bc483bc5b3","unresolved":false,"context_lines":[{"line_number":676,"context_line":"            console_info \u003d self.driver.console.get_console(task)"},{"line_number":677,"context_line":""},{"line_number":678,"context_line":"        self.assertEqual(expected, console_info)"},{"line_number":679,"context_line":"        mock_exec.assert_called_once_with(info[\u0027port\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_e95f79e3","line":679,"updated":"2014-11-12 23:07:40.000000000","message":"Maybe a dumb question, but why are these tests part of SeaMicroPowerDriverTestCase? Maybe it should be called SeaMicroDriverTestCase? (or maybe it is outside the scope of this patch).\n\nI was looking because I was wondering whether it might make sense in the setUp(), to set self.info \u003d seamicro._parse_driver_info(self.node) there, and not have to set info in some of these tests. [I don\u0027t have a strong opinion either way.]","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"364b9235787ae052ebce4060d46541a9ac6c9387","unresolved":false,"context_lines":[{"line_number":676,"context_line":"            console_info \u003d self.driver.console.get_console(task)"},{"line_number":677,"context_line":""},{"line_number":678,"context_line":"        self.assertEqual(expected, console_info)"},{"line_number":679,"context_line":"        mock_exec.assert_called_once_with(info[\u0027port\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_91a4e14b","line":679,"in_reply_to":"5a890539_65229853","updated":"2014-11-17 21:56:04.000000000","message":"I was wondering more about this being part of SeaMicroPowerDriverTestCase, when this is the console stuff, not the power stuff. If you could take a look at this in another patch, that\u0027d be great. Thx.","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"},{"author":{"_account_id":10984,"name":"Harshada Mangesh Kakad","email":"harshadak@metsi.co.uk","username":"harshada.kakad"},"change_message_id":"ffaf21ab071955a722caa985f29e9e17d5e2b9ed","unresolved":false,"context_lines":[{"line_number":676,"context_line":"            console_info \u003d self.driver.console.get_console(task)"},{"line_number":677,"context_line":""},{"line_number":678,"context_line":"        self.assertEqual(expected, console_info)"},{"line_number":679,"context_line":"        mock_exec.assert_called_once_with(info[\u0027port\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_65229853","line":679,"in_reply_to":"5a890539_e95f79e3","updated":"2014-11-14 09:25:21.000000000","message":"Maybe  I can open a seperate bug to put self.info \u003d seamicro._parse_driver_info(self.node) in setUp(). As most of the testcases in this file set info into tests. So I dnt think making that change should be part of this patch. Let me know what u think on this.","commit_id":"dc0aa96aba1a4f46d5ae634dd909b04e156fb947"}]}
