def _format_servers_list_power_state(state):
    power_states = [
        'NOSTATE',      # 0x00
        'Running',      # 0x01
        '',             # 0x02
        'Paused',       # 0x03
        'Shutdown',     # 0x04
        '',             # 0x05
        'Crashed',      # 0x06
        'Suspended'     # 0x07
    ]

    try:
        return power_states[state]
    except Exception:
        return 'N/A'
Return a formatted string of a server's power state
dataset/ETHPy150Open dtroyer/python-openstackclient/openstackclient/compute/v2/server.py/_format_servers_list_power_state