Beispiel #1
0
 def on_entry(self):
     # kick off a power cycle on entry
     def powercycle_done(success):
         # send the machine a power-cycle-ok event on success, and do nothing on failure (timeout)
         if success:
             mozpool.lifeguard.driver.handle_event(self.machine.device_name, 'power_cycle_ok', {})
     self.setup_pxe()
     bmm_api.start_powercycle(self.machine.device_name, powercycle_done)
Beispiel #2
0
    def on_entry(self):
        # kick off a power cycle on entry
        def powercycle_done(success):
            # send the machine a power-cycle-ok event on success, and do nothing on failure (timeout)
            if success:
                mozpool.lifeguard.driver.handle_event(self.machine.device_name,
                                                      'power_cycle_ok', {})

        self.setup_pxe()
        bmm_api.start_powercycle(self.machine.device_name, powercycle_done)
Beispiel #3
0
 def POST(self, device_name):
     args, body = templeton.handlers.get_request_parms()
     if 'pxe_config' in body:
         api.set_pxe(device_name, body['pxe_config'],
                     body.get('boot_config', ''))
     else:
         api.clear_pxe(device_name)
     # start the power cycle and ignore the result
     api.start_powercycle(device_name, lambda *args: None)
     return {}
Beispiel #4
0
 def POST(self, device_name):
     args, body = templeton.handlers.get_request_parms()
     if 'pxe_config' in body:
         api.set_pxe(device_name, body['pxe_config'],
                 body.get('boot_config', ''))
     else:
         api.clear_pxe(device_name)
     # start the power cycle and ignore the result
     api.start_powercycle(device_name, lambda *args : None)
     return {}