@task_manager.require_exclusive_lock
    def reboot(self, task):
        current_power_state = self.get_power_state(task)

        if current_power_state == states.POWER_ON:
            self.set_power_state(task, states.REBOOT)
        elif current_power_state == states.POWER_OFF:
            self.set_power_state(task, states.POWER_ON)
Perform a hard reboot of the task's node.
dataset/ETHPy150Open openstack/ironic/ironic/drivers/modules/cimc/power.py/Power.reboot