From c15f3c89fab314f4df76bd27fb08462caaba00c9 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Thu, 22 Mar 2018 16:27:12 -0700 Subject: [PATCH] Add the compose type to the output from compose status --- src/composer/cli/compose.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/composer/cli/compose.py b/src/composer/cli/compose.py index d7e45897..ff743c18 100644 --- a/src/composer/cli/compose.py +++ b/src/composer/cli/compose.py @@ -73,12 +73,13 @@ def compose_status(socket_path, api_version, args, show_json=False, testmode=0): return {"id": compose["id"], "recipe": compose["recipe"], "version": compose["version"], + "compose_type": compose["compose_type"], "status": compose["queue_status"]} # Sort the status in a specific order def sort_status(a): 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 = [] @@ -106,7 +107,7 @@ def compose_status(socket_path, api_version, args, show_json=False, testmode=0): # Print them as UUID RECIPE 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):