diff --git a/cli/dcoscli/tables.py b/cli/dcoscli/tables.py index dc2da0e..648866c 100644 --- a/cli/dcoscli/tables.py +++ b/cli/dcoscli/tables.py @@ -300,6 +300,7 @@ def package_search_table(search_results): fields = OrderedDict([ ('NAME', lambda p: p['name']), ('VERSION', lambda p: p['currentVersion']), + ('PROMOTED', lambda p: p.get("promoted", False)), ('FRAMEWORK', lambda p: p['framework']), ('DESCRIPTION', lambda p: p['description']) ]) @@ -312,6 +313,7 @@ def package_search_table(search_results): tb = table(fields, packages, sortby="NAME") tb.align['NAME'] = 'l' tb.align['VERSION'] = 'l' + tb.align['PROMOTED'] = 'l' tb.align['FRAMEWORK'] = 'l' tb.align['DESCRIPTION'] = 'l' diff --git a/cli/tests/unit/data/package_search.txt b/cli/tests/unit/data/package_search.txt index 3b26c17..4a2f98a 100644 --- a/cli/tests/unit/data/package_search.txt +++ b/cli/tests/unit/data/package_search.txt @@ -1,8 +1,8 @@ -NAME VERSION FRAMEWORK DESCRIPTION -cassandra 0.1.0-SNAPSHOT-447-master-3ad1bbf8f7 True Apache Cassandra running on Apache Mesos -chronos 2.3.4 True A fault tolerant job scheduler for Mesos which handles dependencies and ISO8601 based schedules. -hdfs 0.1.1 True Hadoop Distributed File System (HDFS), Highly Available -helloworld 0.1.0 False Example DCOS application package -kafka 0.9.0-beta True Apache Kafka running on top of Apache Mesos -marathon 0.8.1 True A cluster-wide init and control system for services in cgroups or Docker containers. -spark 1.4.0-SNAPSHOT True Spark is a fast and general cluster computing system for Big Data \ No newline at end of file +NAME VERSION PROMOTED FRAMEWORK DESCRIPTION +cassandra 0.1.0-SNAPSHOT-447-master-3ad1bbf8f7 False True Apache Cassandra running on Apache Mesos +chronos 2.3.4 False True A fault tolerant job scheduler for Mesos which handles dependencies and ISO8601 based schedules. +hdfs 0.1.1 False True Hadoop Distributed File System (HDFS), Highly Available +helloworld 0.1.0 False False Example DCOS application package +kafka 0.9.0-beta False True Apache Kafka running on top of Apache Mesos +marathon 0.8.1 False True A cluster-wide init and control system for services in cgroups or Docker containers. +spark 1.4.0-SNAPSHOT False True Spark is a fast and general cluster computing system for Big Data \ No newline at end of file