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 { |
| 8 | // provider is the provider name the machine was created at. |
| 9 | string provider = 1; |
| 10 | // provider_id is the machine's provider-assigned ID. |
| 11 | string provider_id = 2; |
| 12 | // bmaas_endpoint is an address of the BMaaS service the agent should call |
| 13 | // back to. |
| 14 | string bmaas_endpoint = 3; |
| 15 | } |
| 16 | |
Lorenz Brun | 595dfe9 | 2023-02-21 19:13:02 +0100 | [diff] [blame^] | 17 | message TakeoverSuccess { |
Lorenz Brun | 9469596 | 2023-01-12 17:33:17 +0000 | [diff] [blame] | 18 | // init_message is the exact init message the agent received. |
| 19 | TakeoverInit init_message = 1; |
| 20 | // key is the agent's public key. |
| 21 | bytes key = 2; |
Lorenz Brun | 595dfe9 | 2023-02-21 19:13:02 +0100 | [diff] [blame^] | 22 | // warnings contains a list of non-critical errors which occurred during the |
| 23 | // takeover preparation. |
| 24 | repeated string warning = 3; |
| 25 | } |
| 26 | |
| 27 | message TakeoverError { |
| 28 | // Error message |
| 29 | string message = 1; |
| 30 | } |
| 31 | |
| 32 | // TakeoverResponse is the message the takeover process sends back after |
| 33 | // receiving an TakeoverInit message. |
| 34 | message TakeoverResponse { |
| 35 | oneof result { |
| 36 | TakeoverSuccess success = 1; |
| 37 | TakeoverError error = 2; |
| 38 | } |
Lorenz Brun | 9469596 | 2023-01-12 17:33:17 +0000 | [diff] [blame] | 39 | } |