task: add mesos agent ID to dcos task table (#915)

This makes it easy to see a task and then SSH into the agent using either the private ip or the mesos id.
This commit is contained in:
tamarrow
2017-02-24 16:56:01 -08:00
committed by GitHub
parent f33a45ee94
commit 55fdf24192
2 changed files with 4 additions and 2 deletions

View File

@@ -40,12 +40,14 @@ def task_table(tasks):
("USER", lambda t: t.user()),
("STATE", lambda t: t["state"].split("_")[-1][0]),
("ID", lambda t: t["id"]),
("MESOS ID", lambda t: t["slave_id"]),
])
tb = table(fields, tasks, sortby="NAME")
tb.align["NAME"] = "l"
tb.align["HOST"] = "l"
tb.align["ID"] = "l"
tb.align["MESOS ID"] = "l"
return tb

View File

@@ -1,2 +1,2 @@
NAME HOST USER STATE ID
test-app mock-hostname root R test-app.d44dd7f2-f9b7-11e4-bb43-56847afe9799
NAME HOST USER STATE ID MESOS ID
test-app mock-hostname root R test-app.d44dd7f2-f9b7-11e4-bb43-56847afe9799 20150513-185808-177048842-5050-1220-S0