witProtobuf/events.proto

63 lines
1.0 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package witProtobuf;
import "config.proto";
message Event {
EventType type = 1;
int32 id = 2;
string comment = 3;
string username = 4;
string email = 5;
string password = 6;
string token = 7;
repeated Response results = 8;
repeated Network networks = 9;
repeated VM vms = 10;
Config test = 11;
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 {
int32 id = 1;
string name = 2;
int64 total_cpu = 3;
int64 total_mem = 4;
string login_url = 5;
}
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;
}
}