Пример #1
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 {}
Пример #2
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 {}
Пример #3
0
 def setup_pxe(self):
     # set the pxe config based on what's in the DB
     cfg = data.device_config(self.machine.device_name)
     try:
         pxe_config = data.get_pxe_config_for_device(self.machine.device_name)
     except data.NotFound:
         self.logger.warning('no appropriate PXE config found')
         self.machine.goto_state(failed_pxe_booting)
         return
     bmm_api.set_pxe(self.machine.device_name, pxe_config,
                     cfg['boot_config'])
Пример #4
0
 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)
Пример #5
0
 def setup_pxe(self):
     # set the pxe config based on what's in the DB
     cfg = data.device_config(self.machine.device_name)
     bmm_api.set_pxe(self.machine.device_name, cfg['pxe_config'],
                     cfg['boot_config'])
Пример #6
0
 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)
Пример #7
0
 def setup_pxe(self):
     # set the pxe config based on what's in the DB
     cfg = data.device_config(self.machine.device_name)
     bmm_api.set_pxe(self.machine.device_name,
             cfg['pxe_config'],
             cfg['boot_config'])