{%
    local function print_psu_work_mode(max_ps_num, deep_sleep_supported)
        local min_power_idx = 1
        local max_power_idx = max_ps_num
        -- 若产品ID为0x0d(PANGEA 产品ID)可选psu_id需减1

        if deep_sleep_supported == true then
            if max_ps_num == 2 then
                echo('Usage: ipmcset -d psuworkmode -v <option> [active psuid|enabled/disabled]\n')
            else
                echo('Usage: ipmcset -d psuworkmode -v <option> [active psuid|enabled/disabled] [active psuid]\n')
            end
            echo('Options are:\n')
            echo('0:           Load Balancing, without parameter [active psuid|enabled/disabled]\n')
            echo(string.format('1:           Active/Standby, with parameter [active psuid] range <%d-%d>\n', min_power_idx, max_power_idx))
            echo('2:           Hibernate, with parameter [enabled/disabled]')
        else
            if max_ps_num == 2 then
                echo('Usage: ipmcset -d psuworkmode -v <option> [active psuid]\n')
            else
                echo('Usage: ipmcset -d psuworkmode -v <option> [active psuid] [active psuid]\n')
            end
            echo('Options are:\n')
            echo('0:           Load Balancing, without parameter [active psuid]\n')
            echo(string.format('1:           Active/Standby, [active psuid] range <%d-%d>', min_power_idx, max_power_idx))
        end
    end
    -- 输入参数的合法性判断
    if GetAllValueParamsValid ~= true then
        print_psu_work_mode(#OnePowerList, DeepSleepSupported)
    elseif value1 == '2' then -- 设置深度休眠
        if value2 == 'enabled' then
            echo('Enable Power Work Mode Hibernate successfully.')
        else
            echo('Disable Power Work Mode Hibernate successfully.')
        end
    else -- 设置主备或负载均衡
        if NormalAndRedundancy == 'Enabled' then -- n+r状态
            echo('The normal and redundancy is enabled through the Redfish interface, this mode cannot be set.')
        elseif value1 == '0' then
            echo('Set Power Work Mode Load Balancing successfully.')
        elseif value1 == '1' then
            echo('Set Power Work Mode Active Standby successfully.')
        end
    end
%}