| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 if three_state == ThreeStateBool.FALSE: | 60 if three_state == ThreeStateBool.FALSE: |
| 61 return False | 61 return False |
| 62 if three_state == ThreeStateBool.TRUE: | 62 if three_state == ThreeStateBool.TRUE: |
| 63 return True | 63 return True |
| 64 | 64 |
| 65 | 65 |
| 66 ### Server related. | 66 ### Server related. |
| 67 | 67 |
| 68 | 68 |
| 69 class ServerDetails(messages.Message): | 69 class ServerDetails(messages.Message): |
| 70 """Reports the server version.""" | 70 """Reports details about the server.""" |
| 71 server_version = messages.StringField(1) | 71 server_version = messages.StringField(1) |
| 72 bot_version = messages.StringField(2) |
| 73 |
| 74 |
| 75 class BootstrapToken(messages.Message): |
| 76 """Returns a token to bootstrap a new bot.""" |
| 77 bootstrap_token = messages.StringField(1) |
| 72 | 78 |
| 73 | 79 |
| 74 class ClientPermissions(messages.Message): | 80 class ClientPermissions(messages.Message): |
| 75 """Reports the client's permissions.""" | 81 """Reports the client's permissions.""" |
| 76 delete_bot = messages.BooleanField(1) | 82 delete_bot = messages.BooleanField(1) |
| 77 terminate_bot = messages.BooleanField(2) | 83 terminate_bot = messages.BooleanField(2) |
| 78 get_configs = messages.BooleanField(3) | 84 get_configs = messages.BooleanField(3) |
| 79 put_configs = messages.BooleanField(4) | 85 put_configs = messages.BooleanField(4) |
| 80 cancel_task = messages.BooleanField(5) | 86 cancel_task = messages.BooleanField(5) |
| 81 get_bootstrap_token = messages.BooleanField(6) | 87 get_bootstrap_token = messages.BooleanField(6) |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 | 515 |
| 510 | 516 |
| 511 class DeletedResponse(messages.Message): | 517 class DeletedResponse(messages.Message): |
| 512 """Indicates whether a bot was deleted.""" | 518 """Indicates whether a bot was deleted.""" |
| 513 deleted = messages.BooleanField(1) | 519 deleted = messages.BooleanField(1) |
| 514 | 520 |
| 515 | 521 |
| 516 class TerminateResponse(messages.Message): | 522 class TerminateResponse(messages.Message): |
| 517 """Returns the pseudo taskid to wait for the bot to shut down.""" | 523 """Returns the pseudo taskid to wait for the bot to shut down.""" |
| 518 task_id = messages.StringField(1) | 524 task_id = messages.StringField(1) |
| OLD | NEW |