114 lines
2.0 KiB
Protocol Buffer
114 lines
2.0 KiB
Protocol Buffer
syntax="proto3";
|
|
|
|
option go_package = "./proto";
|
|
package deevirt;
|
|
|
|
// The greeting service definition.
|
|
service Domain {
|
|
rpc List (DomainListAllRequest) returns (DomainListAllResponse) {}
|
|
rpc Get (DomainListRequest) returns (DomainListResponse) {}
|
|
rpc Create (DomainCreateRequest) returns (DomainCreateResponse) {}
|
|
rpc Update (DomainUpdateRequest) returns (DomainUpdateResponse) {}
|
|
rpc Delete (DomainDeleteRequest) returns (DomainDeleteResponse) {}
|
|
|
|
rpc Migrate (DomainMigrateRequest) returns (stream DomainMigrateResponse) {}
|
|
|
|
rpc Power (DomainPowerRequest) returns (DomainPowerResponse) {}
|
|
|
|
rpc Event (DomainEventRequest) returns (DomainEventResponse) {}
|
|
}
|
|
|
|
message DomainEventRequest {
|
|
string node_id = 1;
|
|
string domain_id = 2;
|
|
string type = 3;
|
|
int64 state = 4;
|
|
bytes event = 5;
|
|
}
|
|
|
|
message DomainEventResponse {}
|
|
|
|
message DomainListAllRequest {}
|
|
|
|
message DomainListAllResponse {
|
|
repeated DomainListResponse domains = 1;
|
|
}
|
|
|
|
message DomainListRequest {
|
|
string domain_id = 1;
|
|
}
|
|
|
|
message DomainListResponse {
|
|
string node_id = 1;
|
|
string domain_id = 2;
|
|
string config = 3;
|
|
int64 state = 4;
|
|
}
|
|
|
|
message DomainCreateRequest {
|
|
string node_id = 1;
|
|
string config = 2;
|
|
}
|
|
|
|
message DomainCreateResponse {
|
|
int64 progress = 1;
|
|
}
|
|
|
|
service DomainDevicesGraphics {
|
|
rpc Console (DomainDevicesGraphicsConsoleRequest) returns (DomainDevicesGraphicsConsoleResponse) {}
|
|
}
|
|
|
|
|
|
|
|
message DomainUpdateRequest {
|
|
string vm_id = 1;
|
|
}
|
|
|
|
message DomainUpdateResponse {
|
|
}
|
|
|
|
message DomainDeleteRequest {
|
|
string vm_id = 1;
|
|
}
|
|
|
|
message DomainDeleteResponse {
|
|
}
|
|
|
|
// Migrate
|
|
message DomainMigrateRequest {
|
|
string domain_id = 1;
|
|
}
|
|
|
|
message DomainMigrateResponse {
|
|
float percentage = 1;
|
|
}
|
|
|
|
enum DomainPower {
|
|
UNDEFINED = 0;
|
|
START = 1;
|
|
REBOOT = 2;
|
|
SHUTDOWN = 3;
|
|
PAUSE = 4;
|
|
RESUME = 5;
|
|
RESET = 6;
|
|
DESTROY = 7;
|
|
}
|
|
|
|
message DomainPowerRequest {
|
|
bytes vm_id = 1;
|
|
DomainPower action = 2;
|
|
}
|
|
|
|
message DomainPowerResponse {
|
|
}
|
|
|
|
message DomainDevicesGraphicsConsoleRequest {
|
|
bytes vm_id = 1;
|
|
}
|
|
|
|
message DomainDevicesGraphicsConsoleResponse {
|
|
string uri = 1;
|
|
}
|
|
|
|
|