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:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user