[autotest] Break an import cycle in lab_inventory.
An upcoming change adds a dependency in server.hosts on the
MANAGED_POOLS list. That dependency introduces a cycle:
hosts package -> lab_inventory -> servo_host -> hosts package
To break the cycle, this moves the MANAGED_POOLS list into
suite_scheduler.constants.
BUG=None
TEST=unit tests; dry run of lab_inventory script
Change-Id: I502d57631705f5f7dd69c805c2a67ff88b5bc73f
Reviewed-on: https://chromium-review.googlesource.com/419115
Commit-Ready: Richard Barnette <jrbarnette@google.com>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
diff --git a/site_utils/suite_scheduler/constants.py b/site_utils/suite_scheduler/constants.py
index 3a80bf0..51a31c5 100644
--- a/site_utils/suite_scheduler/constants.py
+++ b/site_utils/suite_scheduler/constants.py
@@ -7,16 +7,46 @@
class Labels:
- """Constants related to label names.
+ """
+ Constants related to label names.
@var BOARD_PREFIX The string with which board labels are prefixed.
- @var POOL_PREFIX The stright with which pool labels are prefixed."""
+ @var POOL_PREFIX The stright with which pool labels are prefixed.
+ """
BOARD_PREFIX = 'board:'
POOL_PREFIX = 'pool:'
+class Pools:
+ """
+ Well-known pool names used in automated inventory management.
+
+ These are general purpose pools of DUTs that are considered
+ identical for purposes of testing. That is, a device in one of
+ these pools can be shifted to another pool at will for purposes
+ of supplying test demand.
+
+ Devices in these pools are not allowed to have special-purpose
+ attachments, or to be part of in any kind of custom fixture.
+ Devices in these pools are also required to reside in areas
+ managed by the Platforms team (i.e. at the time of this writing,
+ only in "Atlantis" or "Destiny").
+
+ CRITICAL_POOLS - Pools that must be kept fully supplied in order
+ to guarantee timely completion of tests from builders.
+ SPARE_POOL - A low priority pool that is allowed to provide
+ spares to replace broken devices in the critical pools.
+ MANAGED_POOLS - The set of all the general purpose pools
+ monitored for health.
+ """
+ CRITICAL_POOLS = ['bvt', 'cq', 'continuous', 'cts']
+ SPARE_POOL = 'suites'
+ MANAGED_POOLS = CRITICAL_POOLS + [SPARE_POOL]
+
+
class Builds:
- """Constants related to build type.
+ """
+ Constants related to build type.
@var FIRMWARE_RW: The string indicating the given build is used to update
RW firmware.