witProtobuf/events.proto

60 lines
1013 B
Protocol Buffer

syntax = "proto3";
package guipb;
import "config.proto";
import "account.proto";
message Event {
EventType type = 1;
int32 id = 2;
string comment = 3;
Config config = 4;
Account account = 5; // this is the user
repeated Response results = 6;
repeated Network networks = 7;
repeated VM vms = 8;
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;
}
}