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

Side by Side Diff: appengine/swarming/swarming_rpcs.py

Issue 2198063002: Add bots.count endpoint (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@master
Patch Set: Address nits 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 unified diff | Download patch
« no previous file with comments | « appengine/swarming/handlers_endpoints_test.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The LUCI Authors. All rights reserved. 1 # Copyright 2015 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # that can be found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 """This module defines ProtoRPC types for the Swarming Server handlers.""" 5 """This module defines ProtoRPC types for the Swarming Server handlers."""
6 6
7 from protorpc import message_types 7 from protorpc import message_types
8 from protorpc import messages 8 from protorpc import messages
9 9
10 10
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 367
368 368
369 class BotList(messages.Message): 369 class BotList(messages.Message):
370 """Wraps a list of BotInfo.""" 370 """Wraps a list of BotInfo."""
371 cursor = messages.StringField(1) 371 cursor = messages.StringField(1)
372 items = messages.MessageField(BotInfo, 2, repeated=True) 372 items = messages.MessageField(BotInfo, 2, repeated=True)
373 now = message_types.DateTimeField(3) 373 now = message_types.DateTimeField(3)
374 death_timeout = messages.IntegerField(4) 374 death_timeout = messages.IntegerField(4)
375 375
376 376
377 class BotsCount(messages.Message):
378 """Returns the count, as requested."""
379 now = message_types.DateTimeField(1)
380 count = messages.IntegerField(2)
381 quarantined = messages.IntegerField(3)
382 dead = messages.IntegerField(4)
383 busy = messages.IntegerField(5)
384
385
377 class BotEvent(messages.Message): 386 class BotEvent(messages.Message):
378 # Timestamp of this event. 387 # Timestamp of this event.
379 ts = message_types.DateTimeField(1) 388 ts = message_types.DateTimeField(1)
380 # Type of event. 389 # Type of event.
381 event_type = messages.StringField(2) 390 event_type = messages.StringField(2)
382 # Message included in the event. 391 # Message included in the event.
383 message = messages.StringField(3) 392 message = messages.StringField(3)
384 # Bot dimensions at that moment. 393 # Bot dimensions at that moment.
385 dimensions = messages.MessageField(StringListPair, 4, repeated=True) 394 dimensions = messages.MessageField(StringListPair, 4, repeated=True)
386 # Bot state at that moment, encoded as json. 395 # Bot state at that moment, encoded as json.
(...skipping 23 matching lines...) Expand all
410 419
411 420
412 class DeletedResponse(messages.Message): 421 class DeletedResponse(messages.Message):
413 """Indicates whether a bot was deleted.""" 422 """Indicates whether a bot was deleted."""
414 deleted = messages.BooleanField(1) 423 deleted = messages.BooleanField(1)
415 424
416 425
417 class TerminateResponse(messages.Message): 426 class TerminateResponse(messages.Message):
418 """Returns the pseudo taskid to wait for the bot to shut down.""" 427 """Returns the pseudo taskid to wait for the bot to shut down."""
419 task_id = messages.StringField(1) 428 task_id = messages.StringField(1)
OLDNEW
« no previous file with comments | « appengine/swarming/handlers_endpoints_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698