)]}'
{"ironic_python_agent/errors.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"abe879ea262581cfad28905f61c543c986363638","unresolved":false,"context_lines":[{"line_number":228,"context_line":""},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"class DecommissionError(RESTError):"},{"line_number":231,"context_line":"    message \u003d \u0027Agent failed to decommission.\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_09a6600f","line":231,"updated":"2014-07-31 17:58:47.000000000","message":"Would like to be able to include details in this exception. I think you need to define an __init__ method with details as an argument, like the other exceptions above.","commit_id":"f3a9c24038b51fc3a3d1c52fcd975b5ca319f499"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"615552ea753a1e363cd257a62a9e1b1cbe3d6d15","unresolved":false,"context_lines":[{"line_number":228,"context_line":""},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"class DecommissionError(RESTError):"},{"line_number":231,"context_line":"    message \u003d \u0027Agent failed to decommission.\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_7d001603","line":231,"in_reply_to":"baada198_09a6600f","updated":"2014-08-12 00:49:44.000000000","message":"Done","commit_id":"f3a9c24038b51fc3a3d1c52fcd975b5ca319f499"}],"ironic_python_agent/extensions/decom.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"579faabcb86f3d65ebeea933b0aad5da2a4004db","unresolved":false,"context_lines":[{"line_number":21,"context_line":"        super(DecomExtension, self).__init__()"},{"line_number":22,"context_line":"        self.command_map[\u0027erase_hardware\u0027] \u003d self.erase_hardware"},{"line_number":23,"context_line":"        self.command_map[\u0027update_firmware\u0027] \u003d self.update_firmware"},{"line_number":24,"context_line":"        self.command_map[\u0027update_bios\u0027] \u003d self.update_bios"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def get_decom_steps(self):"},{"line_number":27,"context_line":"        \"\"\"Get a list of functions to call to decommission this hardware."}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_94d98a24","line":24,"updated":"2014-07-03 19:02:52.000000000","message":"Need to add decomission here, no?","commit_id":"8ee102bc69f8b06a26df899dff92a745a53a0555"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"abe879ea262581cfad28905f61c543c986363638","unresolved":false,"context_lines":[{"line_number":22,"context_line":"        self.command_map[\u0027erase_hardware\u0027] \u003d self.erase_hardware"},{"line_number":23,"context_line":"        self.command_map[\u0027decommission\u0027] \u003d self.decommission"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def get_decom_steps(self):"},{"line_number":26,"context_line":"        \"\"\"Get a list of functions to call to decommission this hardware."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"        These will be defined by the hardware manager."}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_895a701c","line":25,"updated":"2014-07-31 17:58:47.000000000","message":"Nit: I\u0027d prefer this was called `get_decommission_steps` (why does this word have to be so long?).","commit_id":"f3a9c24038b51fc3a3d1c52fcd975b5ca319f499"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"615552ea753a1e363cd257a62a9e1b1cbe3d6d15","unresolved":false,"context_lines":[{"line_number":22,"context_line":"        self.command_map[\u0027erase_hardware\u0027] \u003d self.erase_hardware"},{"line_number":23,"context_line":"        self.command_map[\u0027decommission\u0027] \u003d self.decommission"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def get_decom_steps(self):"},{"line_number":26,"context_line":"        \"\"\"Get a list of functions to call to decommission this hardware."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"        These will be defined by the hardware manager."}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_09b1a490","line":25,"in_reply_to":"baada198_895a701c","updated":"2014-08-12 00:49:44.000000000","message":"I\u0027m just going to drop this. The conductor doesn\u0027t actually use it at all.","commit_id":"f3a9c24038b51fc3a3d1c52fcd975b5ca319f499"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"abe879ea262581cfad28905f61c543c986363638","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    def get_decom_steps(self):"},{"line_number":26,"context_line":"        \"\"\"Get a list of functions to call to decommission this hardware."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"        These will be defined by the hardware manager."},{"line_number":29,"context_line":"        \"\"\""},{"line_number":30,"context_line":"        pass"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_a99814cd","line":28,"updated":"2014-07-31 17:58:47.000000000","message":"This might make more sense as \"hardware managers that provide decommissioning functions should define these steps\" or something.","commit_id":"f3a9c24038b51fc3a3d1c52fcd975b5ca319f499"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"abe879ea262581cfad28905f61c543c986363638","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"        These will be defined by the hardware manager."},{"line_number":29,"context_line":"        \"\"\""},{"line_number":30,"context_line":"        pass"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @base.async_command()"},{"line_number":33,"context_line":"    def erase_hardware(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_c99b88c6","line":30,"updated":"2014-07-31 17:58:47.000000000","message":"Shouldn\u0027t this return an empty list? If a hardware manager doesn\u0027t provide any sort of decom functionality, they shouldn\u0027t need to override this method.\n\nThe current code might handle `None` rather than `[]` just fine, but I think an empty list would be clearer.","commit_id":"f3a9c24038b51fc3a3d1c52fcd975b5ca319f499"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"abe879ea262581cfad28905f61c543c986363638","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @base.async_command()"},{"line_number":33,"context_line":"    def erase_hardware(self):"},{"line_number":34,"context_line":"        return hardware.get_manager().erase_devices()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @base.async_command()"},{"line_number":37,"context_line":"    def decommission(self, driver_info):"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_e9a20cfb","line":34,"updated":"2014-07-31 17:58:47.000000000","message":"I wonder if we should move `hardware.get_manager()` to be run in __init__ (and set to self.hardware_manager or something), so it only needs to be loaded once. I might be missing cases where this would break, but I think this extension is loaded after hardware managers are initialized, and it should be fine to do this in __init__.\n\nPlease sanity check me on this before changing it. :)","commit_id":"f3a9c24038b51fc3a3d1c52fcd975b5ca319f499"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"615552ea753a1e363cd257a62a9e1b1cbe3d6d15","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @base.async_command()"},{"line_number":33,"context_line":"    def erase_hardware(self):"},{"line_number":34,"context_line":"        return hardware.get_manager().erase_devices()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @base.async_command()"},{"line_number":37,"context_line":"    def decommission(self, driver_info):"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_a94d1895","line":34,"in_reply_to":"baada198_e9a20cfb","updated":"2014-08-12 00:49:44.000000000","message":"No that definitely makes sense. I\u0027ll test it.","commit_id":"f3a9c24038b51fc3a3d1c52fcd975b5ca319f499"}],"ironic_python_agent/hardware.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"c4215d3aa772f0317b9f323bebcc96d4e311c923","unresolved":false,"context_lines":[{"line_number":250,"context_line":"                    \u0027decommission_next_state\u0027: next_state,"},{"line_number":251,"context_line":"                    # If true, the node will be rebooted by Ironic"},{"line_number":252,"context_line":"                    # (possibly out of band)"},{"line_number":253,"context_line":"                    \u0027reboot_requested\u0027: step.get(\u0027reboot_requested\u0027)"},{"line_number":254,"context_line":"                }"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def list_hardware_info(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_a08d1e33","line":253,"updated":"2014-07-15 03:04:06.000000000","message":"If \u0027reboot requested\u0027 is not in step, maybe this should default to \u0027False\u0027 vs \u0027None\u0027.... even though \u0027None\u0027 will evaluate to False :)","commit_id":"5b58eac6a88693645a265ace825e3eb82c79b64c"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"abe879ea262581cfad28905f61c543c986363638","unresolved":false,"context_lines":[{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        # Execute function"},{"line_number":232,"context_line":"        try:"},{"line_number":233,"context_line":"            #TODO(JoshNang) return the result to commandresult"},{"line_number":234,"context_line":"            func(driver_info)"},{"line_number":235,"context_line":"        except Exception:"},{"line_number":236,"context_line":"            raise errors.DecommissionError(\u0027Error performing decommission \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_096f40c5","line":233,"updated":"2014-07-31 17:58:47.000000000","message":"I\u0027d like to see this todo happen before landing this... how else will we confirm the status in Ironic?","commit_id":"f3a9c24038b51fc3a3d1c52fcd975b5ca319f499"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"615552ea753a1e363cd257a62a9e1b1cbe3d6d15","unresolved":false,"context_lines":[{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        # Execute function"},{"line_number":232,"context_line":"        try:"},{"line_number":233,"context_line":"            #TODO(JoshNang) return the result to commandresult"},{"line_number":234,"context_line":"            func(driver_info)"},{"line_number":235,"context_line":"        except Exception:"},{"line_number":236,"context_line":"            raise errors.DecommissionError(\u0027Error performing decommission \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_42ae1130","line":233,"in_reply_to":"baada198_096f40c5","updated":"2014-08-12 00:49:44.000000000","message":"If it doesn\u0027t raise, it worked. But it may be handy to have an output field to let Ironic make conditional choices or something. Added.","commit_id":"f3a9c24038b51fc3a3d1c52fcd975b5ca319f499"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"abe879ea262581cfad28905f61c543c986363638","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        for index, next_step in enumerate(next_steps):"},{"line_number":244,"context_line":"            if next_step[\u0027state\u0027] \u003d\u003d step[\u0027state\u0027]:"},{"line_number":245,"context_line":"                if index \u003d\u003d len(next_steps) - 1:"},{"line_number":246,"context_line":"                    next_state \u003d \u0027DONE\u0027"},{"line_number":247,"context_line":"                else:"},{"line_number":248,"context_line":"                    next_state \u003d next_steps[index + 1][\u0027state\u0027]"},{"line_number":249,"context_line":"                return {"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_2965e4e1","line":246,"updated":"2014-07-31 17:58:47.000000000","message":"This is a little hacky... I\u0027m fine with landing this but would love to see something better in the future.","commit_id":"f3a9c24038b51fc3a3d1c52fcd975b5ca319f499"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"615552ea753a1e363cd257a62a9e1b1cbe3d6d15","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        for index, next_step in enumerate(next_steps):"},{"line_number":244,"context_line":"            if next_step[\u0027state\u0027] \u003d\u003d step[\u0027state\u0027]:"},{"line_number":245,"context_line":"                if index \u003d\u003d len(next_steps) - 1:"},{"line_number":246,"context_line":"                    next_state \u003d \u0027DONE\u0027"},{"line_number":247,"context_line":"                else:"},{"line_number":248,"context_line":"                    next_state \u003d next_steps[index + 1][\u0027state\u0027]"},{"line_number":249,"context_line":"                return {"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_a24d2d95","line":246,"in_reply_to":"baada198_2965e4e1","updated":"2014-08-12 00:49:44.000000000","message":"Yeah, I wanted it to be None, but that\u0027s already taken for the initial state. I added decommission_completed_step, so we might be able to do something with that, like, initial run if both keys are None, done if completed is not none and next is none. I\u0027ll come back to it with the matching Ironic changes.","commit_id":"f3a9c24038b51fc3a3d1c52fcd975b5ca319f499"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"abe879ea262581cfad28905f61c543c986363638","unresolved":false,"context_lines":[{"line_number":247,"context_line":"                else:"},{"line_number":248,"context_line":"                    next_state \u003d next_steps[index + 1][\u0027state\u0027]"},{"line_number":249,"context_line":"                return {"},{"line_number":250,"context_line":"                    # This will get saved in Node.driver_info["},{"line_number":251,"context_line":"                    # \u0027target_decommission_state\u0027] and sent back to the node"},{"line_number":252,"context_line":"                    # on lookup"},{"line_number":253,"context_line":"                    \u0027decommission_next_state\u0027: next_state,"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_496058d0","line":250,"updated":"2014-07-31 17:58:47.000000000","message":"Can you put the code in this comment all on one line? Hard to read at a glance with it split.","commit_id":"f3a9c24038b51fc3a3d1c52fcd975b5ca319f499"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"615552ea753a1e363cd257a62a9e1b1cbe3d6d15","unresolved":false,"context_lines":[{"line_number":247,"context_line":"                else:"},{"line_number":248,"context_line":"                    next_state \u003d next_steps[index + 1][\u0027state\u0027]"},{"line_number":249,"context_line":"                return {"},{"line_number":250,"context_line":"                    # This will get saved in Node.driver_info["},{"line_number":251,"context_line":"                    # \u0027target_decommission_state\u0027] and sent back to the node"},{"line_number":252,"context_line":"                    # on lookup"},{"line_number":253,"context_line":"                    \u0027decommission_next_state\u0027: next_state,"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_422371bd","line":250,"in_reply_to":"baada198_496058d0","updated":"2014-08-12 00:49:44.000000000","message":"Done","commit_id":"f3a9c24038b51fc3a3d1c52fcd975b5ca319f499"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"abe879ea262581cfad28905f61c543c986363638","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                    # on lookup"},{"line_number":253,"context_line":"                    \u0027decommission_next_state\u0027: next_state,"},{"line_number":254,"context_line":"                    # If true, the node will be rebooted by Ironic"},{"line_number":255,"context_line":"                    # (possibly out of band)"},{"line_number":256,"context_line":"                    \u0027reboot_requested\u0027: step.get(\u0027reboot_requested\u0027)"},{"line_number":257,"context_line":"                }"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_695fdc0f","line":255,"updated":"2014-07-31 17:58:47.000000000","message":"These comments should probably be documented in the docstring for the step definition function.","commit_id":"f3a9c24038b51fc3a3d1c52fcd975b5ca319f499"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"615552ea753a1e363cd257a62a9e1b1cbe3d6d15","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                    # on lookup"},{"line_number":253,"context_line":"                    \u0027decommission_next_state\u0027: next_state,"},{"line_number":254,"context_line":"                    # If true, the node will be rebooted by Ironic"},{"line_number":255,"context_line":"                    # (possibly out of band)"},{"line_number":256,"context_line":"                    \u0027reboot_requested\u0027: step.get(\u0027reboot_requested\u0027)"},{"line_number":257,"context_line":"                }"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_fd76e690","line":255,"in_reply_to":"baada198_695fdc0f","updated":"2014-08-12 00:49:44.000000000","message":"Done","commit_id":"f3a9c24038b51fc3a3d1c52fcd975b5ca319f499"}]}
