def service_table(services):

    fields = OrderedDict([
        ("NAME", lambda s: s['name']),
        ("HOST", lambda s: s['hostname']),
        ("ACTIVE", lambda s: s['active']),
        ("TASKS", lambda s: len(s['tasks'])),
        ("CPU", lambda s: s['resources']['cpus']),
        ("MEM", lambda s: s['resources']['mem']),
        ("DISK", lambda s: s['resources']['disk']),
        ("ID", lambda s: s['id']),
    ])

    tb = table(fields, services, sortby="NAME")
    tb.align["ID"] = 'l'
    tb.align["NAME"] = 'l'

    return tb
Unit test of StartCluster() with no external IP addresses for workers.
dataset/ETHPy150Open dcos/dcos-cli/cli/dcoscli/tables.py/service_table--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/solutions-google-compute-engine-cluster-for-hadoop/gce_cluster_test.py/GceClusterTest.testStartCluster_NoExternalIp