)]}'
{"ironic/drivers/modules/ipminative.py":[{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"0498432673e2e554a1631fef65dcd6ccab7da4fb","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    bmc_info[\u0027uuid\u0027] \u003d node.uuid"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    # terminal port must be an integer"},{"line_number":106,"context_line":"    port \u003d info.get(\u0027ipmi_terminal_port\u0027)"},{"line_number":107,"context_line":"    if port is not None:"},{"line_number":108,"context_line":"        try:"},{"line_number":109,"context_line":"            port \u003d int(port)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_7fe9e6b5","line":106,"updated":"2014-09-06 02:06:00.000000000","message":"It is better that we have the document to be synced for user for such \u0027ipmi_terminal_port\u0027 configurations.","commit_id":"d228c8664f9752ea2c0bec93a620031edf8a4c66"},{"author":{"_account_id":7589,"name":"linggao","email":"linggao@us.ibm.com","username":"linggao"},"change_message_id":"753c7df2a059881edb5e09accb830ef4341c1452","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    bmc_info[\u0027uuid\u0027] \u003d node.uuid"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    # terminal port must be an integer"},{"line_number":106,"context_line":"    port \u003d info.get(\u0027ipmi_terminal_port\u0027)"},{"line_number":107,"context_line":"    if port is not None:"},{"line_number":108,"context_line":"        try:"},{"line_number":109,"context_line":"            port \u003d int(port)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_54d94082","line":106,"in_reply_to":"fa98f980_7fe9e6b5","updated":"2014-09-08 14:53:39.000000000","message":"This setting is documented in the configuration file. Yes, we do need documentation on how to use console support.\nPlease let me know the doc url so that I can add the console support.\nThanks.","commit_id":"d228c8664f9752ea2c0bec93a620031edf8a4c66"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"81cf9d6e612d40c2e2b0796b99771f7221750c14","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        except ValueError:"},{"line_number":111,"context_line":"            raise exception.InvalidParameterValue(_("},{"line_number":112,"context_line":"                \"IPMI terminal port is not an integer.\"))"},{"line_number":113,"context_line":"    bmc_info[\u0027port\u0027] \u003d port"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    return bmc_info"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_e7d52fba","line":113,"updated":"2014-09-08 09:42:54.000000000","message":"Does port can be None? With this logic if port is not specified it will be set to None.","commit_id":"d228c8664f9752ea2c0bec93a620031edf8a4c66"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ff62186057f8aeae964bc7a786e28d71a3ac55b5","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        except ValueError:"},{"line_number":111,"context_line":"            raise exception.InvalidParameterValue(_("},{"line_number":112,"context_line":"                \"IPMI terminal port is not an integer.\"))"},{"line_number":113,"context_line":"    bmc_info[\u0027port\u0027] \u003d port"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    return bmc_info"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_17b97ae9","line":113,"in_reply_to":"fa98f980_e7d52fba","updated":"2014-09-08 14:50:00.000000000","message":"Yes, it can be None. It is only needed for the console stuff. See NativeIPMIShellinaboxConsole.validate() (line 494).","commit_id":"d228c8664f9752ea2c0bec93a620031edf8a4c66"},{"author":{"_account_id":7589,"name":"linggao","email":"linggao@us.ibm.com","username":"linggao"},"change_message_id":"753c7df2a059881edb5e09accb830ef4341c1452","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        except ValueError:"},{"line_number":111,"context_line":"            raise exception.InvalidParameterValue(_("},{"line_number":112,"context_line":"                \"IPMI terminal port is not an integer.\"))"},{"line_number":113,"context_line":"    bmc_info[\u0027port\u0027] \u003d port"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    return bmc_info"},{"line_number":116,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_745484ca","line":113,"in_reply_to":"fa98f980_e7d52fba","updated":"2014-09-08 14:53:39.000000000","message":"Yes, the port can be None. It is okay that it is set to None than not set. Otherwise, other part of code will complain. I have tested this part with and without the ipmi_terminal_port specified. \nThe very original code was:\n     bmc_info[\u0027port\u0027] \u003d info.get(\u0027ipmi_terminal_port\u0027)","commit_id":"d228c8664f9752ea2c0bec93a620031edf8a4c66"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"81cf9d6e612d40c2e2b0796b99771f7221750c14","unresolved":false,"context_lines":[{"line_number":521,"context_line":"                         \u0027passwd_file\u0027: pw_file}"},{"line_number":522,"context_line":"        try:"},{"line_number":523,"context_line":"            console_utils.start_shellinabox_console(driver_info[\u0027uuid\u0027],"},{"line_number":524,"context_line":"                                                    driver_info[\u0027port\u0027],"},{"line_number":525,"context_line":"                                                    console_cmd)"},{"line_number":526,"context_line":"        except exception.ConsoleError:"},{"line_number":527,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_a7cb271d","line":524,"updated":"2014-09-08 09:42:54.000000000","message":"if it\u0027s None I think it\u0027s going to cause some trouble[1]\n\n [1] https://github.com/openstack/ironic/blob/master/ironic/drivers/modules/console_utils.py#L197","commit_id":"d228c8664f9752ea2c0bec93a620031edf8a4c66"},{"author":{"_account_id":7589,"name":"linggao","email":"linggao@us.ibm.com","username":"linggao"},"change_message_id":"753c7df2a059881edb5e09accb830ef4341c1452","unresolved":false,"context_lines":[{"line_number":521,"context_line":"                         \u0027passwd_file\u0027: pw_file}"},{"line_number":522,"context_line":"        try:"},{"line_number":523,"context_line":"            console_utils.start_shellinabox_console(driver_info[\u0027uuid\u0027],"},{"line_number":524,"context_line":"                                                    driver_info[\u0027port\u0027],"},{"line_number":525,"context_line":"                                                    console_cmd)"},{"line_number":526,"context_line":"        except exception.ConsoleError:"},{"line_number":527,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_d7e1b2d1","line":524,"in_reply_to":"fa98f980_a7cb271d","updated":"2014-09-08 14:53:39.000000000","message":"If None, this part of the code will not be called because validate() will fail.","commit_id":"d228c8664f9752ea2c0bec93a620031edf8a4c66"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ff62186057f8aeae964bc7a786e28d71a3ac55b5","unresolved":false,"context_lines":[{"line_number":521,"context_line":"                         \u0027passwd_file\u0027: pw_file}"},{"line_number":522,"context_line":"        try:"},{"line_number":523,"context_line":"            console_utils.start_shellinabox_console(driver_info[\u0027uuid\u0027],"},{"line_number":524,"context_line":"                                                    driver_info[\u0027port\u0027],"},{"line_number":525,"context_line":"                                                    console_cmd)"},{"line_number":526,"context_line":"        except exception.ConsoleError:"},{"line_number":527,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_576ea297","line":524,"in_reply_to":"fa98f980_a7cb271d","updated":"2014-09-08 14:50:00.000000000","message":"Yes, that\u0027s true. But this won\u0027t get called unless .validate() succeeds, which is where the port is checked. And conductor/manager.py calls .validate() first.\n\nIt does make it harder to understand though. I suspect this is a similar pattern (of coding) that we do elsewhere too.","commit_id":"d228c8664f9752ea2c0bec93a620031edf8a4c66"}]}
