)]}'
{"ironic/drivers/drac.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"3b5f15c33453190e9af131703f8a90760f3c9e6e","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self.power \u003d power.DRACPower()"},{"line_number":41,"context_line":"        self.boot \u003d pxe.PXEBoot()"},{"line_number":42,"context_line":"        self.deploy \u003d iscsi_deploy.ISCSIDeploy()"},{"line_number":43,"context_line":"        self.management \u003d management.DRACManagement()"},{"line_number":44,"context_line":"        self.iscsi_vendor \u003d iscsi_deploy.VendorPassthru()"},{"line_number":45,"context_line":"        self.drac_vendor \u003d vendor_passthru.DracVendorPassthru()"},{"line_number":46,"context_line":"        self.mapping \u003d {\u0027pass_deploy_info\u0027: self.iscsi_vendor,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_010e6c34","line":43,"updated":"2015-11-24 15:46:12.000000000","message":"Same comment as the previous patch. I would skip this change (renaming the interface) if possible since it may break someone composing their own driver downstream using the drac interfaces","commit_id":"205601471bd986a521ba514f183cb6acdb506554"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"2b0d2794bb2980679c568915c3620ab35f50eeb1","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self.power \u003d power.DRACPower()"},{"line_number":41,"context_line":"        self.boot \u003d pxe.PXEBoot()"},{"line_number":42,"context_line":"        self.deploy \u003d iscsi_deploy.ISCSIDeploy()"},{"line_number":43,"context_line":"        self.management \u003d management.DRACManagement()"},{"line_number":44,"context_line":"        self.iscsi_vendor \u003d iscsi_deploy.VendorPassthru()"},{"line_number":45,"context_line":"        self.drac_vendor \u003d vendor_passthru.DracVendorPassthru()"},{"line_number":46,"context_line":"        self.mapping \u003d {\u0027pass_deploy_info\u0027: self.iscsi_vendor,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_43e32634","line":43,"in_reply_to":"9a8ffd7b_010e6c34","updated":"2015-11-30 15:58:28.000000000","message":"Done","commit_id":"205601471bd986a521ba514f183cb6acdb506554"}],"ironic/drivers/fake.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"3b5f15c33453190e9af131703f8a90760f3c9e6e","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        self.power \u003d drac_power.DRACPower()"},{"line_number":191,"context_line":"        self.deploy \u003d fake.FakeDeploy()"},{"line_number":192,"context_line":"        self.management \u003d drac_mgmt.DRACManagement()"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"class FakeSNMPDriver(base.BaseDriver):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_611df865","line":192,"updated":"2015-11-24 15:46:12.000000000","message":"ditto","commit_id":"205601471bd986a521ba514f183cb6acdb506554"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"2b0d2794bb2980679c568915c3620ab35f50eeb1","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        self.power \u003d drac_power.DRACPower()"},{"line_number":191,"context_line":"        self.deploy \u003d fake.FakeDeploy()"},{"line_number":192,"context_line":"        self.management \u003d drac_mgmt.DRACManagement()"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"class FakeSNMPDriver(base.BaseDriver):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_a3c8d2a9","line":192,"in_reply_to":"9a8ffd7b_611df865","updated":"2015-11-30 15:58:28.000000000","message":"Done","commit_id":"205601471bd986a521ba514f183cb6acdb506554"}],"ironic/drivers/modules/drac/job.py":[{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"d409408d21d35d7948d6359047003d7b31f98fcf","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    :param node: an ironic node object."},{"line_number":37,"context_line":"    :raises: DracOperationError on an error from python-dracclient."},{"line_number":38,"context_line":"    :raises: InvalidDriverState if job queue validation fails."},{"line_number":39,"context_line":"    \"\"\""},{"line_number":40,"context_line":"    client \u003d drac_common.get_drac_client(node)"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a740942_87352af8","line":38,"updated":"2015-12-07 09:00:53.000000000","message":"InvalidDriverState does not look like Ironic exception. It is not being \n handled in code as well?","commit_id":"6feebcb5fc38072453c99b9dc4ad405a8854ad7b"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"c2b58c0e169938f1d17fc17265945cb235b916a6","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    :param node: an ironic node object."},{"line_number":37,"context_line":"    :raises: DracOperationError on an error from python-dracclient."},{"line_number":38,"context_line":"    :raises: InvalidDriverState if job queue validation fails."},{"line_number":39,"context_line":"    \"\"\""},{"line_number":40,"context_line":"    client \u003d drac_common.get_drac_client(node)"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a740942_5440c435","line":38,"in_reply_to":"7a740942_87352af8","updated":"2015-12-09 14:06:57.000000000","message":"yeah, I forgot to remove it. Deleting now...","commit_id":"6feebcb5fc38072453c99b9dc4ad405a8854ad7b"}],"ironic/drivers/modules/drac/management.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"3b5f15c33453190e9af131703f8a90760f3c9e6e","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        if NON_PERSISTENT_BOOT_MODE in next_boot_modes:"},{"line_number":65,"context_line":"            next_boot_mode \u003d NON_PERSISTENT_BOOT_MODE"},{"line_number":66,"context_line":"        else:"},{"line_number":67,"context_line":"            next_boot_mode \u003d next_boot_modes[0]"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if drac_boot_devices is None:"},{"line_number":70,"context_line":"            drac_boot_devices \u003d client.list_boot_devices()"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_c1c14482","line":67,"updated":"2015-11-24 15:46:12.000000000","message":"Can we be sure that we are going to have at least 1 boot device with \"is_next\" set to True?\n\nIf not we may want to have a try...except block here to handle the case of no device being marked as next","commit_id":"205601471bd986a521ba514f183cb6acdb506554"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"2b0d2794bb2980679c568915c3620ab35f50eeb1","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        if NON_PERSISTENT_BOOT_MODE in next_boot_modes:"},{"line_number":65,"context_line":"            next_boot_mode \u003d NON_PERSISTENT_BOOT_MODE"},{"line_number":66,"context_line":"        else:"},{"line_number":67,"context_line":"            next_boot_mode \u003d next_boot_modes[0]"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if drac_boot_devices is None:"},{"line_number":70,"context_line":"            drac_boot_devices \u003d client.list_boot_devices()"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_d1aef797","line":67,"in_reply_to":"9a8ffd7b_c1c14482","updated":"2015-11-30 15:58:28.000000000","message":"Yeah, the DRAC has to report at least one with is_next set to True. But I agree, it\u0027s  better to guard against it, so I will add IndexError to the except block.","commit_id":"205601471bd986a521ba514f183cb6acdb506554"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"3b5f15c33453190e9af131703f8a90760f3c9e6e","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if drac_boot_devices is None:"},{"line_number":70,"context_line":"            drac_boot_devices \u003d client.list_boot_devices()"},{"line_number":71,"context_line":"        drac_boot_device \u003d drac_boot_devices[next_boot_mode][0]"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        boot_device \u003d next((key for (key, value) in _BOOT_DEVICES_MAP.items()"},{"line_number":74,"context_line":"                            if value in drac_boot_device.id), None)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_611ad819","line":71,"updated":"2015-11-24 15:46:12.000000000","message":"same here, should we check if next_boot_mode is part of drac_boot_devices ? \n\nBecause I see we test if drac_boot_devices is None, but could it potentially be an empty list?","commit_id":"205601471bd986a521ba514f183cb6acdb506554"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"2b0d2794bb2980679c568915c3620ab35f50eeb1","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if drac_boot_devices is None:"},{"line_number":70,"context_line":"            drac_boot_devices \u003d client.list_boot_devices()"},{"line_number":71,"context_line":"        drac_boot_device \u003d drac_boot_devices[next_boot_mode][0]"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        boot_device \u003d next((key for (key, value) in _BOOT_DEVICES_MAP.items()"},{"line_number":74,"context_line":"                            if value in drac_boot_device.id), None)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_71c94b5a","line":71,"in_reply_to":"9a8ffd7b_611ad819","updated":"2015-11-30 15:58:28.000000000","message":"DRAC should\u0027t report that either. But the solution for the previous comment will guard against this case as well.","commit_id":"205601471bd986a521ba514f183cb6acdb506554"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"d409408d21d35d7948d6359047003d7b31f98fcf","unresolved":false,"context_lines":[{"line_number":55,"context_line":"NON_PERSISTENT_BOOT_MODE \u003d \u0027OneTime\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"def _get_boot_device(node, drac_boot_devices\u003dNone):"},{"line_number":59,"context_line":"    client \u003d drac_common.get_drac_client(node)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a740942_f214ee44","line":58,"updated":"2015-12-07 09:00:53.000000000","message":"Add doc string","commit_id":"6feebcb5fc38072453c99b9dc4ad405a8854ad7b"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"c2b58c0e169938f1d17fc17265945cb235b916a6","unresolved":false,"context_lines":[{"line_number":55,"context_line":"NON_PERSISTENT_BOOT_MODE \u003d \u0027OneTime\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"def _get_boot_device(node, drac_boot_devices\u003dNone):"},{"line_number":59,"context_line":"    client \u003d drac_common.get_drac_client(node)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a740942_34b5f830","line":58,"in_reply_to":"7a740942_f214ee44","updated":"2015-12-09 14:06:57.000000000","message":"Docstrings are not required for private methods.","commit_id":"6feebcb5fc38072453c99b9dc4ad405a8854ad7b"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"d409408d21d35d7948d6359047003d7b31f98fcf","unresolved":false,"context_lines":[{"line_number":84,"context_line":"def set_boot_device(node, device, persistent):"},{"line_number":85,"context_line":"    \"\"\"Set the boot device for a node."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    Set the boot device to use on next reboot of the node."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    :param node: an ironic node object."},{"line_number":90,"context_line":"    :param device: the boot device, one of"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a740942_724ebe70","line":87,"updated":"2015-12-07 09:00:53.000000000","message":"s/ reboot/ boot","commit_id":"6feebcb5fc38072453c99b9dc4ad405a8854ad7b"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"c2b58c0e169938f1d17fc17265945cb235b916a6","unresolved":false,"context_lines":[{"line_number":84,"context_line":"def set_boot_device(node, device, persistent):"},{"line_number":85,"context_line":"    \"\"\"Set the boot device for a node."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    Set the boot device to use on next reboot of the node."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    :param node: an ironic node object."},{"line_number":90,"context_line":"    :param device: the boot device, one of"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a740942_345178d9","line":87,"in_reply_to":"7a740942_724ebe70","updated":"2015-12-09 14:06:57.000000000","message":"Done","commit_id":"6feebcb5fc38072453c99b9dc4ad405a8854ad7b"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"d409408d21d35d7948d6359047003d7b31f98fcf","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                   :mod:`ironic.common.boot_devices`."},{"line_number":92,"context_line":"    :param persistent: Boolean value. True if the boot device will"},{"line_number":93,"context_line":"                       persist to all future boots, False if not."},{"line_number":94,"context_line":"                       Default: False."},{"line_number":95,"context_line":"    :raises: DracOperationError on an error from python-dracclient."},{"line_number":96,"context_line":"    \"\"\""},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a740942_92300aa0","line":94,"updated":"2015-12-07 09:00:53.000000000","message":"Would it be better to make \"persistent\u003dFalse\" in the args of this method?","commit_id":"6feebcb5fc38072453c99b9dc4ad405a8854ad7b"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"c2b58c0e169938f1d17fc17265945cb235b916a6","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                   :mod:`ironic.common.boot_devices`."},{"line_number":92,"context_line":"    :param persistent: Boolean value. True if the boot device will"},{"line_number":93,"context_line":"                       persist to all future boots, False if not."},{"line_number":94,"context_line":"                       Default: False."},{"line_number":95,"context_line":"    :raises: DracOperationError on an error from python-dracclient."},{"line_number":96,"context_line":"    \"\"\""},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a740942_940dccea","line":94,"in_reply_to":"7a740942_92300aa0","updated":"2015-12-09 14:06:57.000000000","message":"nice catch!","commit_id":"6feebcb5fc38072453c99b9dc4ad405a8854ad7b"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"d409408d21d35d7948d6359047003d7b31f98fcf","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    \"\"\"Create a configuration job."},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    This method is used to apply the pending values created by"},{"line_number":128,"context_line":"    set_boot_device()."},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    :param node: an ironic node object."},{"line_number":131,"context_line":"    :param reboot: indicates whether a reboot job should be automatically"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a740942_928c8a36","line":128,"updated":"2015-12-07 09:00:53.000000000","message":"This statement may be removed. It is no more called by set_boot_device()","commit_id":"6feebcb5fc38072453c99b9dc4ad405a8854ad7b"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"c2b58c0e169938f1d17fc17265945cb235b916a6","unresolved":false,"context_lines":[{"line_number":125,"context_line":"    \"\"\"Create a configuration job."},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    This method is used to apply the pending values created by"},{"line_number":128,"context_line":"    set_boot_device()."},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    :param node: an ironic node object."},{"line_number":131,"context_line":"    :param reboot: indicates whether a reboot job should be automatically"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a740942_b4e008fc","line":128,"in_reply_to":"7a740942_928c8a36","updated":"2015-12-09 14:06:57.000000000","message":"Please check the TODO on the previous line. It is still used by the BIOS vendor-passthru.","commit_id":"6feebcb5fc38072453c99b9dc4ad405a8854ad7b"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"d409408d21d35d7948d6359047003d7b31f98fcf","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        :param persistent: Boolean value. True if the boot device will"},{"line_number":264,"context_line":"                           persist to all future boots, False if not."},{"line_number":265,"context_line":"                           Default: False."},{"line_number":266,"context_line":"        :raises: DracOperationError on an error from python-dracclient."},{"line_number":267,"context_line":"        \"\"\""},{"line_number":268,"context_line":"        node \u003d task.node"},{"line_number":269,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a740942_32ffd668","line":266,"updated":"2015-12-07 09:00:53.000000000","message":"Add  raises: InvalidParameterValue\n\nI suppose, it will not throw DracOperationError","commit_id":"6feebcb5fc38072453c99b9dc4ad405a8854ad7b"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"c2b58c0e169938f1d17fc17265945cb235b916a6","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        :param persistent: Boolean value. True if the boot device will"},{"line_number":264,"context_line":"                           persist to all future boots, False if not."},{"line_number":265,"context_line":"                           Default: False."},{"line_number":266,"context_line":"        :raises: DracOperationError on an error from python-dracclient."},{"line_number":267,"context_line":"        \"\"\""},{"line_number":268,"context_line":"        node \u003d task.node"},{"line_number":269,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a740942_f4bd30d8","line":266,"in_reply_to":"7a740942_32ffd668","updated":"2015-12-09 14:06:57.000000000","message":"Done","commit_id":"6feebcb5fc38072453c99b9dc4ad405a8854ad7b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"f33f6daa901e7ae023163cf8d9d4d1f44c117058","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    client \u003d drac_common.get_drac_client(node)"},{"line_number":101,"context_line":"    drac_boot_devices \u003d client.list_boot_devices()"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    current_boot_device \u003d _get_boot_device(node, drac_boot_devices)"},{"line_number":104,"context_line":"    # If we are already booting from the right device, do nothing."},{"line_number":105,"context_line":"    if current_boot_device \u003d\u003d {\u0027boot_device\u0027: device,"},{"line_number":106,"context_line":"                               \u0027persistent\u0027: persistent}:"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_71deb812","line":103,"updated":"2016-01-04 19:02:42.000000000","message":"maybe a dumb question, but _get_boot_device() will call client.list_boot_devices() if drac_boot_devices is None, so why bother doing this here, instead of letting it be done in _get_boot_device()?","commit_id":"759db321c9d278fe9cd22866fdced9da30bf11cf"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"ae3b81a6f60e4b0f028eb25fd56a06954d23b6dd","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    client \u003d drac_common.get_drac_client(node)"},{"line_number":101,"context_line":"    drac_boot_devices \u003d client.list_boot_devices()"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    current_boot_device \u003d _get_boot_device(node, drac_boot_devices)"},{"line_number":104,"context_line":"    # If we are already booting from the right device, do nothing."},{"line_number":105,"context_line":"    if current_boot_device \u003d\u003d {\u0027boot_device\u0027: device,"},{"line_number":106,"context_line":"                               \u0027persistent\u0027: persistent}:"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_0e5e1d12","line":103,"in_reply_to":"fa69d971_71deb812","updated":"2016-01-05 08:52:30.000000000","message":"Because then client.list_boot_devices() (which communicates with the BMC) would be called twice. So this is just a little optimization.","commit_id":"759db321c9d278fe9cd22866fdced9da30bf11cf"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"f33f6daa901e7ae023163cf8d9d4d1f44c117058","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        boot_list \u003d NON_PERSISTENT_BOOT_MODE"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    client.change_boot_device_order(boot_list, drac_boot_device)"},{"line_number":120,"context_line":"    client.commit_pending_bios_changes()"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"# TODO(ifarkas): delete this during BIOS vendor_passthru refactor"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_717a38f3","line":120,"updated":"2016-01-04 19:02:42.000000000","message":"Could any of these client calls result in a drac_exception? Cuz only DracOperationError\u0027s should be raised from this.","commit_id":"759db321c9d278fe9cd22866fdced9da30bf11cf"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"ae3b81a6f60e4b0f028eb25fd56a06954d23b6dd","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        boot_list \u003d NON_PERSISTENT_BOOT_MODE"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    client.change_boot_device_order(boot_list, drac_boot_device)"},{"line_number":120,"context_line":"    client.commit_pending_bios_changes()"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"# TODO(ifarkas): delete this during BIOS vendor_passthru refactor"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_6e0d59e7","line":120,"in_reply_to":"fa69d971_717a38f3","updated":"2016-01-05 08:52:30.000000000","message":"Yes, that is a good point!","commit_id":"759db321c9d278fe9cd22866fdced9da30bf11cf"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"66082abca8cbdf32f4fa061c3d562d7d362ff1ee","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        node \u003d task.node"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"        if (\u0027drac_boot_device\u0027 in node.driver_internal_info and"},{"line_number":250,"context_line":"                node.driver_internal_info[\u0027drac_boot_device\u0027] is not None):"},{"line_number":251,"context_line":"            return node.driver_internal_info[\u0027drac_boot_device\u0027]"},{"line_number":252,"context_line":"        else:"},{"line_number":253,"context_line":"            return _get_boot_device(node)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a7e1126_ac71a3aa","line":250,"updated":"2015-12-22 13:10:36.000000000","message":"nit: This conditional can be simplified, e.g:\n\nSuggestions:\n\n#1.\n\n boot_dev \u003d node.driver_internal_info.get(\u0027drac_boot_device\u0027, None)\n\n if boot_dev is not None:\n     return boot_dev\n\n return _get_boot_device(node) \n\n\n#2. shorter version\n\n boot_dev \u003d node.driver_internal_info.get(\u0027drac_boot_device\u0027, None)\n return (boot_dev if boot_dev is not None\n         else _get_boot_device(node))\n\n\n#3. less checks\n\n boot_dev \u003d node.driver_internal_info.get(\u0027drac_boot_device\u0027, None)\n return boot_dev or _get_boot_device(node)","commit_id":"759db321c9d278fe9cd22866fdced9da30bf11cf"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"ae3b81a6f60e4b0f028eb25fd56a06954d23b6dd","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        node \u003d task.node"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"        if (\u0027drac_boot_device\u0027 in node.driver_internal_info and"},{"line_number":250,"context_line":"                node.driver_internal_info[\u0027drac_boot_device\u0027] is not None):"},{"line_number":251,"context_line":"            return node.driver_internal_info[\u0027drac_boot_device\u0027]"},{"line_number":252,"context_line":"        else:"},{"line_number":253,"context_line":"            return _get_boot_device(node)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_4ece5583","line":250,"in_reply_to":"3a7e1126_ac71a3aa","updated":"2016-01-05 08:52:30.000000000","message":"I will submit a follow-up fixing this.","commit_id":"759db321c9d278fe9cd22866fdced9da30bf11cf"}],"ironic/drivers/modules/drac/power.py":[{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"d409408d21d35d7948d6359047003d7b31f98fcf","unresolved":false,"context_lines":[{"line_number":58,"context_line":"def _commit_boot_list_change(node):"},{"line_number":59,"context_line":"    if (\u0027drac_boot_device\u0027 in node.driver_internal_info and"},{"line_number":60,"context_line":"            node.driver_internal_info[\u0027drac_boot_device\u0027] is not None):"},{"line_number":61,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":62,"context_line":"        boot_device \u003d node.driver_internal_info[\u0027drac_boot_device\u0027]"},{"line_number":63,"context_line":"        drac_management.set_boot_device(node, boot_device[\u0027boot_device\u0027],"},{"line_number":64,"context_line":"                                        boot_device[\u0027persistent\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a740942_325b5689","line":61,"updated":"2015-12-07 09:00:53.000000000","message":"May be this statement can be moved up and use variable \u0027driver_internal_info\u0027 in \u0027if\u0027 check above.","commit_id":"6feebcb5fc38072453c99b9dc4ad405a8854ad7b"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"c2b58c0e169938f1d17fc17265945cb235b916a6","unresolved":false,"context_lines":[{"line_number":58,"context_line":"def _commit_boot_list_change(node):"},{"line_number":59,"context_line":"    if (\u0027drac_boot_device\u0027 in node.driver_internal_info and"},{"line_number":60,"context_line":"            node.driver_internal_info[\u0027drac_boot_device\u0027] is not None):"},{"line_number":61,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":62,"context_line":"        boot_device \u003d node.driver_internal_info[\u0027drac_boot_device\u0027]"},{"line_number":63,"context_line":"        drac_management.set_boot_device(node, boot_device[\u0027boot_device\u0027],"},{"line_number":64,"context_line":"                                        boot_device[\u0027persistent\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a740942_f498d01d","line":61,"in_reply_to":"7a740942_325b5689","updated":"2015-12-09 14:06:57.000000000","message":"Done","commit_id":"6feebcb5fc38072453c99b9dc4ad405a8854ad7b"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"d409408d21d35d7948d6359047003d7b31f98fcf","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    if (\u0027drac_boot_device\u0027 in node.driver_internal_info and"},{"line_number":60,"context_line":"            node.driver_internal_info[\u0027drac_boot_device\u0027] is not None):"},{"line_number":61,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":62,"context_line":"        boot_device \u003d node.driver_internal_info[\u0027drac_boot_device\u0027]"},{"line_number":63,"context_line":"        drac_management.set_boot_device(node, boot_device[\u0027boot_device\u0027],"},{"line_number":64,"context_line":"                                        boot_device[\u0027persistent\u0027])"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a740942_32d276d3","line":62,"updated":"2015-12-07 09:00:53.000000000","message":"s/ node.driver_internal_info/ driver_internal_info","commit_id":"6feebcb5fc38072453c99b9dc4ad405a8854ad7b"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"c2b58c0e169938f1d17fc17265945cb235b916a6","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    if (\u0027drac_boot_device\u0027 in node.driver_internal_info and"},{"line_number":60,"context_line":"            node.driver_internal_info[\u0027drac_boot_device\u0027] is not None):"},{"line_number":61,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":62,"context_line":"        boot_device \u003d node.driver_internal_info[\u0027drac_boot_device\u0027]"},{"line_number":63,"context_line":"        drac_management.set_boot_device(node, boot_device[\u0027boot_device\u0027],"},{"line_number":64,"context_line":"                                        boot_device[\u0027persistent\u0027])"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a740942_949dcc0c","line":62,"in_reply_to":"7a740942_32d276d3","updated":"2015-12-09 14:06:57.000000000","message":"Done","commit_id":"6feebcb5fc38072453c99b9dc4ad405a8854ad7b"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"66082abca8cbdf32f4fa061c3d562d7d362ff1ee","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    driver_internal_info \u003d node.driver_internal_info"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    if (\u0027drac_boot_device\u0027 in driver_internal_info and"},{"line_number":70,"context_line":"            driver_internal_info[\u0027drac_boot_device\u0027] is not None):"},{"line_number":71,"context_line":"        boot_device \u003d driver_internal_info[\u0027drac_boot_device\u0027]"},{"line_number":72,"context_line":"        drac_management.set_boot_device(node, boot_device[\u0027boot_device\u0027],"},{"line_number":73,"context_line":"                                        boot_device[\u0027persistent\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a7e1126_2cba930b","line":70,"updated":"2015-12-22 13:10:36.000000000","message":"boot_dev \u003d driver_internal_info.get(\u0027drac_boot_device\u0027, None)\nif boot_dev is not None:\n     drac_management.set_boot_device(boot_dev[\u0027boot_device\u0027], ...)\n     ...","commit_id":"759db321c9d278fe9cd22866fdced9da30bf11cf"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"ae3b81a6f60e4b0f028eb25fd56a06954d23b6dd","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    driver_internal_info \u003d node.driver_internal_info"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    if (\u0027drac_boot_device\u0027 in driver_internal_info and"},{"line_number":70,"context_line":"            driver_internal_info[\u0027drac_boot_device\u0027] is not None):"},{"line_number":71,"context_line":"        boot_device \u003d driver_internal_info[\u0027drac_boot_device\u0027]"},{"line_number":72,"context_line":"        drac_management.set_boot_device(node, boot_device[\u0027boot_device\u0027],"},{"line_number":73,"context_line":"                                        boot_device[\u0027persistent\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_0eedbdee","line":70,"in_reply_to":"3a7e1126_2cba930b","updated":"2016-01-05 08:52:30.000000000","message":"I will submit a follow-up fixing this.","commit_id":"759db321c9d278fe9cd22866fdced9da30bf11cf"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"f33f6daa901e7ae023163cf8d9d4d1f44c117058","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    :raises: DracOperationError on an error from python-dracclient"},{"line_number":87,"context_line":"    \"\"\""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    _commit_boot_list_change(node)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    client \u003d drac_common.get_drac_client(node)"},{"line_number":92,"context_line":"    target_power_state \u003d REVERSE_POWER_STATES[power_state]"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_0365afdf","line":89,"updated":"2016-01-04 19:02:42.000000000","message":"Maybe it is just me, but a comment would be nice somewhere in this file, about setting the boot device. Otherwise, it seems odd that you\u0027re doing more than setting the power state.","commit_id":"759db321c9d278fe9cd22866fdced9da30bf11cf"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"ae3b81a6f60e4b0f028eb25fd56a06954d23b6dd","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    :raises: DracOperationError on an error from python-dracclient"},{"line_number":87,"context_line":"    \"\"\""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    _commit_boot_list_change(node)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    client \u003d drac_common.get_drac_client(node)"},{"line_number":92,"context_line":"    target_power_state \u003d REVERSE_POWER_STATES[power_state]"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_aebcb1dc","line":89,"in_reply_to":"fa69d971_0365afdf","updated":"2016-01-05 08:52:30.000000000","message":"I will submit a follow-up fixing this.","commit_id":"759db321c9d278fe9cd22866fdced9da30bf11cf"}],"ironic/tests/unit/drivers/modules/drac/test_job.py":[{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"d409408d21d35d7948d6359047003d7b31f98fcf","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        mock_client.list_jobs.return_value \u003d [42]"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        self.assertRaises(exception.DracOperationError,"},{"line_number":57,"context_line":"                          drac_job.validate_job_queue, self.node)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a740942_f2786ec6","line":57,"updated":"2015-12-07 09:00:53.000000000","message":"Add testcase for https://review.openstack.org/#/c/249256/7/ironic/drivers/modules/drac/job.py#L44","commit_id":"6feebcb5fc38072453c99b9dc4ad405a8854ad7b"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"c2b58c0e169938f1d17fc17265945cb235b916a6","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        mock_client.list_jobs.return_value \u003d [42]"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        self.assertRaises(exception.DracOperationError,"},{"line_number":57,"context_line":"                          drac_job.validate_job_queue, self.node)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a740942_d75cb6f2","line":57,"in_reply_to":"7a740942_f2786ec6","updated":"2015-12-09 14:06:57.000000000","message":"Done","commit_id":"6feebcb5fc38072453c99b9dc4ad405a8854ad7b"}],"ironic/tests/unit/drivers/modules/drac/test_management.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"f33f6daa901e7ae023163cf8d9d4d1f44c117058","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                \u0027persistent\u0027: True}"},{"line_number":254,"context_line":"            self.assertEqual("},{"line_number":255,"context_line":"                task.node.driver_internal_info[\u0027drac_boot_device\u0027],"},{"line_number":256,"context_line":"                expected_boot_device)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def test_set_boot_device_fail(self, mock_get_drac_client):"},{"line_number":259,"context_line":"        with task_manager.acquire(self.context, self.node.uuid,"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_a61e3161","line":256,"updated":"2016-01-04 19:02:42.000000000","message":"This is OK, but it would have been better to do this outside the with task_manager.acquire(...), to make sure the info was saved in the db.","commit_id":"759db321c9d278fe9cd22866fdced9da30bf11cf"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"change_message_id":"ae3b81a6f60e4b0f028eb25fd56a06954d23b6dd","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                \u0027persistent\u0027: True}"},{"line_number":254,"context_line":"            self.assertEqual("},{"line_number":255,"context_line":"                task.node.driver_internal_info[\u0027drac_boot_device\u0027],"},{"line_number":256,"context_line":"                expected_boot_device)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def test_set_boot_device_fail(self, mock_get_drac_client):"},{"line_number":259,"context_line":"        with task_manager.acquire(self.context, self.node.uuid,"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_8e9c4d5e","line":256,"in_reply_to":"fa69d971_a61e3161","updated":"2016-01-05 08:52:30.000000000","message":"I will submit a follow-up fixing this.","commit_id":"759db321c9d278fe9cd22866fdced9da30bf11cf"}]}
