def power_configuration(name, policy=None, delayType=None, delayValue=None):
    '''
    Ensures that the power configuration is configured on the system. This is
    only available on some C-Series servers.

    .. versionadded:: 2019.2.0

    name: The name of the module function to execute.

    policy(str): The action to be taken when chassis power is restored after
    an unexpected power loss. This can be one of the following:

        reset: The server is allowed to boot up normally when power is
        restored. The server can restart immediately or, optionally, after a
        fixed or random delay.

        stay-off: The server remains off until it is manually restarted.

        last-state: The server restarts and the system attempts to restore
        any processes that were running before power was lost.

    delayType(str): If the selected policy is reset, the restart can be
    delayed with this option. This can be one of the following:

        fixed: The server restarts after a fixed delay.

        random: The server restarts after a random delay.

    delayValue(int): If a fixed delay is selected, once chassis power is
    restored and the Cisco IMC has finished rebooting, the system waits for
    the specified number of seconds before restarting the server. Enter an
    integer between 0 and 240.


    SLS Example:

    .. code-block:: yaml

        reset_power:
          cimc.power_configuration:
            - policy: reset
            - delayType: fixed
            - delayValue: 0

        power_off:
          cimc.power_configuration:
            - policy: stay-off


    '''

    ret = _default_ret(name)

    power_conf = __salt__['cimc.get_power_configuration']()

    req_change = False

    try:
        power_dict = power_conf['outConfigs']['biosVfResumeOnACPowerLoss'][0]

        if policy and power_dict['vpResumeOnACPowerLoss'] != policy:
            req_change = True
        elif policy == "reset":
            if power_dict['delayType'] != delayType:
                req_change = True
            elif power_dict['delayType'] == "fixed":
                if str(power_dict['delay']) != str(delayValue):
                    req_change = True
        else:
            ret['result'] = False
            ret['comment'] = "The power policy must be specified."
            return ret

        if req_change:

            update = __salt__['cimc.set_power_configuration'](policy,
                                                              delayType,
                                                              delayValue)

            if update['outConfig']['biosVfResumeOnACPowerLoss'][0]['status'] != 'modified':
                ret['result'] = False
                ret['comment'] = "Error setting power configuration."
                return ret

            ret['changes']['before'] = power_conf
            ret['changes']['after'] = __salt__['cimc.get_power_configuration']()
            ret['comment'] = "Power settings modified."
        else:
            ret['comment'] = "Power settings already configured. No changes required."

    except Exception as err:
        ret['result'] = False
        ret['comment'] = "Error occurred setting power settings."
        log.error(err)
        return ret

    ret['result'] = True

    return ret
Ensures that the power configuration is configured on the system. This is
    only available on some C-Series servers.

    .. versionadded:: 2019.2.0

    name: The name of the module function to execute.

    policy(str): The action to be taken when chassis power is restored after
    an unexpected power loss. This can be one of the following:

        reset: The server is allowed to boot up normally when power is
        restored. The server can restart immediately or, optionally, after a
        fixed or random delay.

        stay-off: The server remains off until it is manually restarted.

        last-state: The server restarts and the system attempts to restore
        any processes that were running before power was lost.

    delayType(str): If the selected policy is reset, the restart can be
    delayed with this option. This can be one of the following:

        fixed: The server restarts after a fixed delay.

        random: The server restarts after a random delay.

    delayValue(int): If a fixed delay is selected, once chassis power is
    restored and the Cisco IMC has finished rebooting, the system waits for
    the specified number of seconds before restarting the server. Enter an
    integer between 0 and 240.


    SLS Example:

    .. code-block:: yaml

        reset_power:
          cimc.power_configuration:
            - policy: reset
            - delayType: fixed
            - delayValue: 0

        power_off:
          cimc.power_configuration:
            - policy: stay-off