def set_power(state='power_on', wait=True, **kwargs):
    '''
    Request power state change

    :param name:
        * power_on -- system turn on
        * power_off -- system turn off (without waiting for OS)
        * shutdown -- request OS proper shutdown
        * reset -- reset (without waiting for OS)
        * boot -- If system is off, then 'on', else 'reset'

    :param ensure: If (bool True), do not return until system actually completes
                requested state change for 300 seconds.
                If a non-zero (int), adjust the wait time to the
                requested number of seconds
    :param kwargs:
        - api_host=127.0.0.1
        - api_user=admin
        - api_pass=example
        - api_port=623
        - api_kg=None

    :returns: dict -- A dict describing the response retrieved

    CLI Examples:

    .. code-block:: bash

        salt-call ipmi.set_power state=shutdown wait=True
    '''
    if state is True or state == 'power_on':
        state = 'on'
    if state is False or state == 'power_off':
        state = 'off'
    with _IpmiCommand(**kwargs) as s:
        return s.set_power(state, wait=wait)
Request power state change

    :param name:
        * power_on -- system turn on
        * power_off -- system turn off (without waiting for OS)
        * shutdown -- request OS proper shutdown
        * reset -- reset (without waiting for OS)
        * boot -- If system is off, then 'on', else 'reset'

    :param ensure: If (bool True), do not return until system actually completes
                requested state change for 300 seconds.
                If a non-zero (int), adjust the wait time to the
                requested number of seconds
    :param kwargs:
        - api_host=127.0.0.1
        - api_user=admin
        - api_pass=example
        - api_port=623
        - api_kg=None

    :returns: dict -- A dict describing the response retrieved

    CLI Examples:

    .. code-block:: bash

        salt-call ipmi.set_power state=shutdown wait=True