Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 count = messages.IntegerField(1) | |
| 380 now = message_types.DateTimeField(2) | |
|
M-A Ruel
2016/08/01 18:27:19
make it the first, otherwise it's kind of odd orde
kjlubick
2016/08/01 19:15:20
Done.
| |
| 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 Loading... | |
| 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) |
| OLD | NEW |