lab helper script: unhardcode gsc labstations
TEST=ran script and inspected output
Commit-Ready: Kevin Shelton <firstname.lastname@example.org>
Tested-by: Kevin Shelton <email@example.com>
Reviewed-by: Mary Ruthven <firstname.lastname@example.org>
diff --git a/provingground/firmware/fw_lab_triage_helper.sh b/provingground/firmware/fw_lab_triage_helper.sh
index a41fbcc..38046f9 100755
@@ -6,10 +6,18 @@
# TODO(someone): Obviate in favor of monitoring and alerting.
- chromeos1-row2-rack10-labstation chromeos1-row1-rack5-labstation"
SERVO_PORTS="9901 9902 9903 9904"
+ atest host list --label=pool:faft-cr50 --parse \
+ | cut -f 1 -d \| \
+ | sed 's/host.*/labstation/g' \
+ | sed 's/Host=//g' \
+ | sort \
+ | uniq \
+ | xargs
echo "This script asssumes many things, like that you have atest in the \
environment that you run it, that you have cros in your DNS search path, and \
that you have added the testing_rsa key to your ssh agent. This is just a \
@@ -17,11 +25,12 @@
encouraged to extend and enhance it, but longer term it should be mostly \
obviated by monitoring and alerting."
-# TODO(kmshelton): Add an option to gather data on faft-test pool devices or
-# faft-cr50 devices instead of hardcoding for faft-cr50 pool devices.
+# TODO(kmshelton): Add an option to gather data on chromeos1 faft-test pool
echo -e "\nChecking that the labstations respond to ping first, because if a \
labstation is down: you are hosed."
echo -e "\n\nLogging labstation's version, uptime, the last 10 eventlog lines, \