Lorenz Brun | 9469596 | 2023-01-12 17:33:17 +0000 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | package cloud.agent.api; |
| 3 | option go_package = "source.monogon.dev/cloud/agent/api"; |
| 4 | |
| 5 | // TakeoverInit is the message sent to the takeover process over an SSH session |
| 6 | // during initialization. |
| 7 | message TakeoverInit { |
Lorenz Brun | 5b8b860 | 2023-03-09 17:22:21 +0100 | [diff] [blame^] | 8 | // Machine ID of this machine to be taken over as assigned by the BMaaS |
| 9 | // service. |
| 10 | string machine_id = 1; |
Lorenz Brun | 9469596 | 2023-01-12 17:33:17 +0000 | [diff] [blame] | 11 | // bmaas_endpoint is an address of the BMaaS service the agent should call |
| 12 | // back to. |
Lorenz Brun | 5b8b860 | 2023-03-09 17:22:21 +0100 | [diff] [blame^] | 13 | string bmaas_endpoint = 2; |
Lorenz Brun | 9469596 | 2023-01-12 17:33:17 +0000 | [diff] [blame] | 14 | } |
| 15 | |
Lorenz Brun | 595dfe9 | 2023-02-21 19:13:02 +0100 | [diff] [blame] | 16 | message TakeoverSuccess { |
Lorenz Brun | 9469596 | 2023-01-12 17:33:17 +0000 | [diff] [blame] | 17 | // init_message is the exact init message the agent received. |
| 18 | TakeoverInit init_message = 1; |
| 19 | // key is the agent's public key. |
| 20 | bytes key = 2; |
Lorenz Brun | 595dfe9 | 2023-02-21 19:13:02 +0100 | [diff] [blame] | 21 | // warnings contains a list of non-critical errors which occurred during the |
| 22 | // takeover preparation. |
| 23 | repeated string warning = 3; |
| 24 | } |
| 25 | |
| 26 | message TakeoverError { |
| 27 | // Error message |
| 28 | string message = 1; |
| 29 | } |
| 30 | |
| 31 | // TakeoverResponse is the message the takeover process sends back after |
| 32 | // receiving an TakeoverInit message. |
| 33 | message TakeoverResponse { |
| 34 | oneof result { |
| 35 | TakeoverSuccess success = 1; |
| 36 | TakeoverError error = 2; |
| 37 | } |
Lorenz Brun | 9469596 | 2023-01-12 17:33:17 +0000 | [diff] [blame] | 38 | } |