Add the compose type to the output from compose status
This commit is contained in:
parent
423e8cba88
commit
c15f3c89fa
@ -73,12 +73,13 @@ def compose_status(socket_path, api_version, args, show_json=False, testmode=0):
|
|||||||
return {"id": compose["id"],
|
return {"id": compose["id"],
|
||||||
"recipe": compose["recipe"],
|
"recipe": compose["recipe"],
|
||||||
"version": compose["version"],
|
"version": compose["version"],
|
||||||
|
"compose_type": compose["compose_type"],
|
||||||
"status": compose["queue_status"]}
|
"status": compose["queue_status"]}
|
||||||
|
|
||||||
# Sort the status in a specific order
|
# Sort the status in a specific order
|
||||||
def sort_status(a):
|
def sort_status(a):
|
||||||
order = ["RUNNING", "WAITING", "FINISHED", "FAILED"]
|
order = ["RUNNING", "WAITING", "FINISHED", "FAILED"]
|
||||||
return (order.index(a["status"]), a["recipe"], a["version"])
|
return (order.index(a["status"]), a["recipe"], a["version"], a["compose_type"])
|
||||||
|
|
||||||
status = []
|
status = []
|
||||||
|
|
||||||
@ -106,7 +107,7 @@ def compose_status(socket_path, api_version, args, show_json=False, testmode=0):
|
|||||||
|
|
||||||
# Print them as UUID RECIPE STATUS
|
# Print them as UUID RECIPE STATUS
|
||||||
for c in status:
|
for c in status:
|
||||||
print("%s %-8s %-15s %s" % (c["id"], c["status"], c["recipe"], c["version"]))
|
print("%s %-8s %-15s %s %s" % (c["id"], c["status"], c["recipe"], c["version"], c["compose_type"]))
|
||||||
|
|
||||||
|
|
||||||
def compose_types(socket_path, api_version, args, show_json=False, testmode=0):
|
def compose_types(socket_path, api_version, args, show_json=False, testmode=0):
|
||||||
|
Loading…
Reference in New Issue
Block a user