81 lines
1.4 KiB
Protocol Buffer
81 lines
1.4 KiB
Protocol Buffer
syntax="proto3";
|
|
|
|
option go_package = "./proto";
|
|
package domain;
|
|
|
|
// The greeting service definition.
|
|
service Domain {
|
|
rpc ListAll (DomainListAllRequest) returns (DomainListAllResponse) {}
|
|
rpc Create (DomainCreateRequest) returns (stream DomainCreateResponse) {}
|
|
rpc Update (DomainUpdateRequest) returns (DomainUpdateResponse) {}
|
|
rpc Delete (DomainDeleteRequest) returns (DomainDeleteResponse) {}
|
|
|
|
rpc Power (DomainPowerRequest) returns (DomainPowerResponse) {}
|
|
|
|
}
|
|
|
|
message DomainListAllRequest {}
|
|
|
|
message DomainListAllResponse {
|
|
repeated DomainListResponse all = 1;
|
|
}
|
|
|
|
message DomainListResponse {
|
|
string domainID = 1 [json_name="domain_id"];
|
|
}
|
|
|
|
service DomainDevicesGraphics {
|
|
rpc Console (DomainDevicesGraphicsConsoleRequest) returns (DomainDevicesGraphicsConsoleResponse) {}
|
|
}
|
|
|
|
message DomainCreateRequest {
|
|
bytes config = 2;
|
|
}
|
|
|
|
message DomainCreateResponse {
|
|
int64 progress = 1;
|
|
}
|
|
|
|
message DomainUpdateRequest {
|
|
string vm_id = 1;
|
|
}
|
|
|
|
message DomainUpdateResponse {
|
|
}
|
|
|
|
message DomainDeleteRequest {
|
|
string vm_id = 1;
|
|
}
|
|
|
|
message DomainDeleteResponse {
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
|