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 {}
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 {}
def call_first(): if new_pxe_config is None: bmm_api.clear_pxe(device_name) else: bmm_api.set_pxe(device_name, new_pxe_config, new_boot_config)
def on_b2g_downloading(self, args): self.machine.clear_counter(self.state_name) bmm_api.clear_pxe(self.machine.device_name) self.machine.goto_state(b2g_downloading)
def setup_pxe(self): # hook for subclasses bmm_api.clear_pxe(self.machine.device_name)
def POST(self, device_name): api.clear_pxe(device_name) return {}
def on_self_test_running(self, args): self.machine.clear_counter(self.state_name) bmm_api.clear_pxe(self.machine.device_name) self.machine.goto_state(self_test_running)
def on_mobile_init_started(self, args): self.machine.clear_counter(self.state_name) bmm_api.clear_pxe(self.machine.device_name) self.machine.goto_state(mobile_init_started)