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

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: copypasta 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
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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 # Encoded as json since it's an arbitrary dict. 365 # Encoded as json since it's an arbitrary dict.
366 state = messages.StringField(12) 366 state = messages.StringField(12)
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
M-A Ruel 2016/08/01 15:33:14 2 lines
kjlubick 2016/08/01 17:26:32 Done.
376 class BotsCount(messages.Message):
377 """Returns the count, as requested."""
378 count = messages.IntegerField(1)
379 now = message_types.DateTimeField(2)
380
381
376 382
377 class BotEvent(messages.Message): 383 class BotEvent(messages.Message):
378 # Timestamp of this event. 384 # Timestamp of this event.
379 ts = message_types.DateTimeField(1) 385 ts = message_types.DateTimeField(1)
380 # Type of event. 386 # Type of event.
381 event_type = messages.StringField(2) 387 event_type = messages.StringField(2)
382 # Message included in the event. 388 # Message included in the event.
383 message = messages.StringField(3) 389 message = messages.StringField(3)
384 # Bot dimensions at that moment. 390 # Bot dimensions at that moment.
385 dimensions = messages.MessageField(StringListPair, 4, repeated=True) 391 dimensions = messages.MessageField(StringListPair, 4, repeated=True)
(...skipping 24 matching lines...) Expand all
410 416
411 417
412 class DeletedResponse(messages.Message): 418 class DeletedResponse(messages.Message):
413 """Indicates whether a bot was deleted.""" 419 """Indicates whether a bot was deleted."""
414 deleted = messages.BooleanField(1) 420 deleted = messages.BooleanField(1)
415 421
416 422
417 class TerminateResponse(messages.Message): 423 class TerminateResponse(messages.Message):
418 """Returns the pseudo taskid to wait for the bot to shut down.""" 424 """Returns the pseudo taskid to wait for the bot to shut down."""
419 task_id = messages.StringField(1) 425 task_id = messages.StringField(1)
OLDNEW
« appengine/swarming/handlers_endpoints.py ('K') | « appengine/swarming/handlers_endpoints.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698