def slave_table(slaves):

    fields = OrderedDict([
        ('HOSTNAME', lambda s: s['hostname']),
        ('IP', lambda s: mesos.parse_pid(s['pid'])[1]),
        ('ID', lambda s: s['id'])
    ])

    tb = table(fields, slaves, sortby="HOSTNAME")
    return tb
Returns a PrettyTable representation of the provided DCOS slaves
dataset/ETHPy150Open dcos/dcos-cli/cli/dcoscli/tables.py/slave_table