2019-05-07 03:29:29 -05:00
|
|
|
syntax = "proto3";
|
2019-05-10 13:57:24 -05:00
|
|
|
package witProtobuf;
|
2019-05-07 03:22:53 -05:00
|
|
|
|
2019-05-25 04:46:11 -05:00
|
|
|
import "config.proto";
|
|
|
|
|
2019-05-10 13:57:24 -05:00
|
|
|
message Event {
|
|
|
|
EventType type = 1;
|
|
|
|
int32 id = 2;
|
2019-05-23 22:10:06 -05:00
|
|
|
string comment = 3;
|
|
|
|
string username = 4;
|
2019-05-12 13:31:57 -05:00
|
|
|
string email = 5;
|
2019-05-23 22:10:06 -05:00
|
|
|
string password = 6;
|
|
|
|
string token = 7;
|
2019-05-10 13:57:24 -05:00
|
|
|
|
2019-05-23 21:14:09 -05:00
|
|
|
repeated Response results = 8;
|
|
|
|
repeated Network networks = 9;
|
|
|
|
repeated VM vms = 10;
|
2019-05-11 05:35:55 -05:00
|
|
|
|
2019-05-25 04:46:11 -05:00
|
|
|
Config test = 11;
|
|
|
|
|
2019-05-11 05:35:55 -05:00
|
|
|
enum EventType {
|
|
|
|
ADD = 0;
|
|
|
|
DELETE = 1;
|
|
|
|
POWERON = 2;
|
|
|
|
POWEROFF = 3;
|
2019-05-12 01:02:53 -05:00
|
|
|
HIBERNATE = 4;
|
2019-05-11 05:35:55 -05:00
|
|
|
MIGRATE = 5;
|
2019-05-12 20:18:23 -05:00
|
|
|
DEMO = 6;
|
2019-05-24 01:35:40 -05:00
|
|
|
GET = 7; // request something
|
|
|
|
LOGIN = 8; // attempt to login
|
|
|
|
OK = 9; // everything is ok
|
2019-05-24 01:43:58 -05:00
|
|
|
FAIL = 10; // everything failed
|
2019-05-11 05:35:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
message Response {
|
|
|
|
EventType type = 1;
|
|
|
|
int32 id = 2;
|
|
|
|
string name = 3;
|
|
|
|
string error = 4;
|
|
|
|
repeated string snippets = 5;
|
|
|
|
}
|
2019-05-12 13:31:57 -05:00
|
|
|
|
|
|
|
message Network {
|
|
|
|
int32 id = 1;
|
|
|
|
string name = 2;
|
|
|
|
int64 total_cpu = 3;
|
|
|
|
int64 total_mem = 4;
|
|
|
|
string login_url = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message VM {
|
2019-05-12 14:15:03 -05:00
|
|
|
int64 id = 1;
|
2019-05-12 13:31:57 -05:00
|
|
|
string name = 2;
|
2019-05-12 14:15:03 -05:00
|
|
|
string hostname = 3;
|
|
|
|
int64 cpus = 4;
|
|
|
|
int64 memory = 5;
|
|
|
|
int64 disk = 6;
|
|
|
|
string IPv6 = 7;
|
|
|
|
string role = 8;
|
|
|
|
string baseImage = 9;
|
2019-05-12 13:31:57 -05:00
|
|
|
}
|
2019-05-10 13:57:24 -05:00
|
|
|
}
|