def status_command(api, command, **selections):
    """ Launch testbed status commands

    :param api: API Rest api object
    :param command: command that should be run
    :param **selections: other selections (site, archi, state)
    """
    assert command in ('sites', 'nodes', 'nodes-ids', 'experiments')
    if command == 'experiments':
        result = api.get_running_experiments()
    elif command == 'sites':
        result = api.get_sites_details()
    elif command == 'nodes':
        result = api.get_nodes(**selections)
    else:
        result = api.get_nodes(list_id=True, **selections)
    return result
