blob: 1169b9d932fc018df516a08a58d85828f0df37a6 [file] [log] [blame]
syntax = "proto3";
package xos;
import "google/protobuf/empty.proto";
import "google/api/annotations.proto";
import "common.proto";
message LoginRequest {
string username = 1;
string password = 2;
};
message LoginResponse {
string sessionid = 1;
};
message ToscaRequest {
string recipe = 1;
};
message ToscaResponse {
enum ToscaStatus {
SUCCESS = 0;
ERROR = 1;
}
ToscaStatus status = 1;
string messages = 2;
};
message ModelFilter {
string class_name = 1;
};
message ModelListEntry {
string class_name = 1;
int32 id = 2;
string info = 3;
};
message ModelList {
repeated ModelListEntry items = 1;
};
message XProtos {
string xproto = 1;
};
service utility {
rpc Login(LoginRequest) returns (LoginResponse) {
option (google.api.http) = {
post: "/xosapi/v1/utility/login"
body: "*"
};
}
rpc Logout(google.protobuf.Empty) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/xosapi/v1/utility/logout"
body: "*"
};
}
rpc RunTosca(ToscaRequest) returns (ToscaResponse) {
option (google.api.http) = {
post: "/xosapi/v1/utility/tosca"
body: "*"
};
}
rpc DestroyTosca(ToscaRequest) returns (ToscaResponse) {
option (google.api.http) = {
post: "/xosapi/v1/utility/destroy_tosca"
body: "*"
};
}
rpc NoOp(google.protobuf.Empty) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/xosapi/v1/utility/noop"
body: "*"
};
}
rpc AuthenticatedNoOp(google.protobuf.Empty) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/xosapi/v1/utility/auth_noop"
body: "*"
};
}
rpc SetDirtyModels(ModelFilter) returns (ModelList) {
option (google.api.http) = {
post: "/xosapi/v1/utility/dirty_models"
body: "*"
};
}
rpc ListDirtyModels(ModelFilter) returns (ModelList) {
option (google.api.http) = {
get: "/xosapi/v1/utility/dirty_models"
};
}
rpc GetXproto(google.protobuf.Empty) returns (XProtos) {
option (google.api.http) = {
get: "/xosapi/v1/xproto"
};
}
};