[autotest] Get atest to list the shard a host is on. TEST=Ran atest host list. BUG=chromium:438858 Change-Id: I0ec46f1d3f8068c0f2144a8a0e5a769cf81a0c96 Reviewed-on: https://chromium-review.googlesource.com/235545 Reviewed-by: Prashanth B <[email protected]> Tested-by: Prashanth B <[email protected]> Commit-Queue: Prashanth B <[email protected]> Trybot-Ready: Prashanth B <[email protected]>
diff --git a/cli/topic_common.py b/cli/topic_common.py index f4cb0ba..c9c0a7f 100644 --- a/cli/topic_common.py +++ b/cli/topic_common.py
@@ -108,6 +108,7 @@ 'max_number_of_machines': 'Max. hosts to use', 'parse_failed_repair': 'Include failed repair results', 'atomic_group.name': 'Atomic Group Name', + 'shard': 'Shard', } # In the failure, tag that will replace the item. @@ -138,7 +139,8 @@ 'invalid': lambda flag: str(bool(not flag)), 'only_if_needed': _int_2_bool_string, 'platform': __convert_platform, - 'labels': lambda labels: ', '.join(labels)} + 'labels': lambda labels: ', '.join(labels), + 'shards': lambda shard: shard.hostname if shard else ''} def _get_item_key(item, key):