@ucs_helper.requires_ucs_client
    def get_power_state(self, task, helper=None):

        try:
            power_handle = ucs_power.UcsPower(helper)
            power_status = power_handle.get_power_state()
        except ucs_error.UcsOperationError as ucs_exception:
            LOG.error(_LE("%(driver)s: get_power_state operation failed for "
                          "node %(uuid)s with error: %(msg)s."),
                      {'driver': task.node.driver, 'uuid': task.node.uuid,
                       'msg': ucs_exception})
            operation = _('getting power status')
            raise exception.UcsOperationError(operation=operation,
                                              error=ucs_exception,
                                              node=task.node.uuid)
        return UCS_TO_IRONIC_POWER_STATE.get(power_status, states.ERROR)
Get the current power state.
dataset/ETHPy150Open openstack/ironic/ironic/drivers/modules/ucs/power.py/Power.get_power_state