blob: 788c5a3fa1a34d4e62370ea42eecb92d9716892c [file] [log] [blame]
Lorenz Brun94695962023-01-12 17:33:17 +00001syntax = "proto3";
2package cloud.agent.api;
3option 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.
7message TakeoverInit {
Lorenz Brun5b8b8602023-03-09 17:22:21 +01008 // Machine ID of this machine to be taken over as assigned by the BMaaS
9 // service.
10 string machine_id = 1;
Lorenz Brun94695962023-01-12 17:33:17 +000011 // bmaas_endpoint is an address of the BMaaS service the agent should call
12 // back to.
Lorenz Brun5b8b8602023-03-09 17:22:21 +010013 string bmaas_endpoint = 2;
Lorenz Brun94695962023-01-12 17:33:17 +000014}
15
Lorenz Brun595dfe92023-02-21 19:13:02 +010016message TakeoverSuccess {
Lorenz Brun94695962023-01-12 17:33:17 +000017 // 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 Brun595dfe92023-02-21 19:13:02 +010021 // warnings contains a list of non-critical errors which occurred during the
22 // takeover preparation.
23 repeated string warning = 3;
24}
25
26message 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.
33message TakeoverResponse {
34 oneof result {
35 TakeoverSuccess success = 1;
36 TakeoverError error = 2;
37 }
Lorenz Brun94695962023-01-12 17:33:17 +000038}