51 lines
823 B
Protocol Buffer
51 lines
823 B
Protocol Buffer
|
syntax = "proto3";
|
||
|
package virtbuf;
|
||
|
|
||
|
message Droplet {
|
||
|
string uuid = 1;
|
||
|
string name = 2;
|
||
|
|
||
|
repeated Response results = 3;
|
||
|
repeated Network networks = 4;
|
||
|
repeated VM vms = 5;
|
||
|
|
||
|
enum EventType {
|
||
|
ADD = 0;
|
||
|
DELETE = 1;
|
||
|
POWERON = 2;
|
||
|
POWEROFF = 3;
|
||
|
HIBERNATE = 4;
|
||
|
MIGRATE = 5;
|
||
|
DEMO = 6;
|
||
|
GET = 7; // request something
|
||
|
LOGIN = 8; // attempt to login
|
||
|
OK = 9; // everything is ok
|
||
|
FAIL = 10; // everything failed
|
||
|
}
|
||
|
|
||
|
message Response {
|
||
|
EventType type = 1;
|
||
|
int32 id = 2;
|
||
|
string name = 3;
|
||
|
string error = 4;
|
||
|
repeated string snippets = 5;
|
||
|
}
|
||
|
|
||
|
message Network {
|
||
|
string mac = 1;
|
||
|
string name = 2;
|
||
|
}
|
||
|
|
||
|
message VM {
|
||
|
int64 id = 1;
|
||
|
string name = 2;
|
||
|
string hostname = 3;
|
||
|
int64 cpus = 4;
|
||
|
int64 memory = 5;
|
||
|
int64 disk = 6;
|
||
|
string IPv6 = 7;
|
||
|
string role = 8;
|
||
|
string baseImage = 9;
|
||
|
}
|
||
|
}
|