

def vm_state_from_status(status):
    'Map the server status string to a vm state.'
    for (state, task_map) in _STATE_MAP.iteritems():
        status_string = task_map.get('default')
        if (task_map.lower() == status_string.lower()):
            return state

dataset/ETHPy150Open nii-cloud/dodai-compute/nova/api/openstack/common.py vm_state_from_status/VarMisuse@38/70 `status`->`task_map`