def cmd_list(ns):
    state_names = {
        POWER_STATE_POWEROFF: "poweroff",
        POWER_STATE_POWEROFF_FORCE: "force poweroff",
        POWER_STATE_REBOOT: "reboot",
        POWER_STATE_REBOOT_FORCE: "force reboot",
        POWER_STATE_SUSPEND: "suspend",
        POWER_STATE_HIBERNATE: "hibernate"
    }

    available_states = list_power_states(ns)
    for state, name in state_names.items():
        if state in available_states:
            yield (name, "yes")
        else:
            yield (name, "no")
Test get() with error mode parameter.
dataset/ETHPy150Open openlmi/openlmi-scripts/commands/powermanagement/lmi/scripts/powermanagement/cmd.py/cmd_list--crossover with--dataset/ETHPy150Open google/simian/src/tests/simian/mac/munki/handlers/uploadpkg_test.py/UploadPackageTest.testGetError