Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1248)

Unified Diff: appengine/swarming/swarming_rpcs.py

Issue 2220373003: Allow botlist API call to respond to quarantined: and is_dead: (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@master
Patch Set: Address nit Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/swarming/server/bot_management_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/swarming_rpcs.py
diff --git a/appengine/swarming/swarming_rpcs.py b/appengine/swarming/swarming_rpcs.py
index e000c40a23e95d38870f85a7ca1422ca8a11a0a1..cb92dfd82cd3321fc95bb558a10123f5dba171fc 100644
--- a/appengine/swarming/swarming_rpcs.py
+++ b/appengine/swarming/swarming_rpcs.py
@@ -48,6 +48,21 @@ class StringListPair(messages.Message):
value = messages.StringField(2, repeated=True)
+class ThreeStateBool(messages.Enum):
+ FALSE = 1
+ TRUE = 2
+ NONE = 3
+
+
+def to_bool(three_state):
+ if three_state in (None, True, False):
+ return three_state
+ if three_state == ThreeStateBool.FALSE:
+ return False
+ if three_state == ThreeStateBool.TRUE:
+ return True
+
+
### Server related.
@@ -308,6 +323,15 @@ class BotsRequest(messages.Message):
# Must be a list of 'key:value' strings to filter the returned list of bots
# on.
dimensions = messages.StringField(3, repeated=True)
+ quarantined = messages.EnumField(ThreeStateBool, 4, default='NONE')
+ is_dead = messages.EnumField(ThreeStateBool, 5, default='NONE')
+
+
+class BotsCountRequest(messages.Message):
+ """Information needed to request bot counts."""
+ # Must be a list of 'key:value' strings to filter the returned list of bots
+ # on.
+ dimensions = messages.StringField(1, repeated=True)
class BotEventsRequest(messages.Message):
« no previous file with comments | « appengine/swarming/server/bot_management_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698