2024-10-18 20:58:15 -05:00
|
|
|
syntax = "proto3";
|
|
|
|
package virtbuf;
|
|
|
|
|
2024-10-22 14:40:59 -05:00
|
|
|
import "google/protobuf/any.proto";
|
|
|
|
|
2024-10-23 00:24:09 -05:00
|
|
|
message Droplets {
|
2024-10-24 16:57:50 -05:00
|
|
|
string uuid = 1; // I guess why not just have this on each file
|
|
|
|
string version = 2; // maybe can be used for protobuf schema change violations
|
|
|
|
repeated Droplet droplets = 3;
|
2024-10-23 00:24:09 -05:00
|
|
|
}
|
|
|
|
|
2024-10-18 20:58:15 -05:00
|
|
|
message Droplet {
|
2024-10-23 17:39:50 -05:00
|
|
|
string uuid = 1; // should be unique across the cluster
|
|
|
|
string hostname = 2; // should be unique and work in DNS
|
|
|
|
int64 cpus = 3; // what's the point of int64 vs int32
|
|
|
|
int64 memory = 4; // in bytes
|
2024-10-23 19:16:22 -05:00
|
|
|
DropletState start_state = 5; // what the state of the droplet is SUPPOSED TO BE ('on' or 'off')
|
2024-10-24 16:09:39 -05:00
|
|
|
string notes = 6; // maybe useful for something
|
2024-10-23 17:39:50 -05:00
|
|
|
string preferred_hypervisor = 7; // the hypervisor to prefer to run the droplet on
|
2024-10-24 16:09:39 -05:00
|
|
|
string qemu_arch = 8; // what arch. example: "x86_64" or "riscv64"
|
|
|
|
string qemu_cpu = 9; // qemu-system -cpu help
|
|
|
|
string qemu_machine = 10; // qemu-system -machine help
|
|
|
|
int64 spice_port = 11; // preferred port to use for spice
|
2024-10-23 17:39:50 -05:00
|
|
|
|
|
|
|
repeated Network networks = 12; // really just mac addresses. should be unique across cluster
|
2024-10-24 17:12:05 -05:00
|
|
|
repeated Disk disks = 13; // disks to attach
|
2024-10-23 17:39:50 -05:00
|
|
|
|
2024-10-24 17:12:05 -05:00
|
|
|
DropletState state = 14; // if the droplet is on, off, etc
|
|
|
|
string image_url = 15; // url to the image
|
2024-10-24 17:21:40 -05:00
|
|
|
|
|
|
|
// is it possible to have custom formatting in JSON and TEXT marshal/unmarshal ?
|
2024-10-24 18:22:31 -05:00
|
|
|
// JunkInfo humantest = 16;
|
2024-10-22 17:53:43 -05:00
|
|
|
}
|
2024-10-18 20:58:15 -05:00
|
|
|
|
2024-10-23 19:16:22 -05:00
|
|
|
enum DropletState {
|
|
|
|
ON = 0;
|
|
|
|
OFF = 1;
|
|
|
|
UNKNOWN = 2;
|
|
|
|
MIGRATING = 3;
|
|
|
|
}
|
2024-10-23 17:39:50 -05:00
|
|
|
|
2024-10-22 17:53:43 -05:00
|
|
|
message Network {
|
|
|
|
string mac = 1;
|
|
|
|
string name = 2;
|
2024-10-22 17:39:12 -05:00
|
|
|
}
|
2024-10-22 16:33:36 -05:00
|
|
|
|
2024-10-22 17:39:12 -05:00
|
|
|
message Disk {
|
|
|
|
string filename = 1;
|
|
|
|
int64 size = 2;
|
2024-10-22 16:42:14 -05:00
|
|
|
}
|
2024-10-24 17:21:40 -05:00
|
|
|
|
|
|
|
message JunkInfo {
|
|
|
|
int64 capacity = 1; // Stores the storage capacity in bytes.
|
|
|
|
}
|