@task_manager.require_exclusive_lock
    def set_power_state(self, task, pstate):
        client, blade_id = msftocs_common.get_client_info(
            task.node.driver_info)

        try:
            if pstate == states.POWER_ON:
                client.set_blade_on(blade_id)
            elif pstate == states.POWER_OFF:
                client.set_blade_off(blade_id)
            else:
                raise exception.InvalidParameterValue(
                    _('Unsupported target_state: %s') % pstate)
        except exception.MSFTOCSClientApiException as ex:
            LOG.exception(_LE("Changing the power state to %(pstate)s failed. "
                              "Error: %(err_msg)s"),
                          {"pstate": pstate, "err_msg": ex})
            raise exception.PowerStateFailure(pstate=pstate)
Decorator raising SkipTest if the OS is Mac OS X and the OS X
dataset/ETHPy150Open openstack/ironic/ironic/drivers/modules/msftocs/power.py/MSFTOCSPower.set_power_state--crossover with--dataset/ETHPy150Open OpenCobolIDE/OpenCobolIDE/open_cobol_ide/extlibs/future/backports/test/support.py/requires_mac_ver