SEBA-349 GRPC
added xos proto files
Change-Id: I59feae392782331d11e1ac506c18f772ccfb8898
diff --git a/contrib/xos/dynamicload.proto b/contrib/xos/dynamicload.proto
new file mode 100644
index 0000000..0279f71
--- /dev/null
+++ b/contrib/xos/dynamicload.proto
@@ -0,0 +1,90 @@
+syntax = "proto3";
+
+package xos;
+
+import "google/protobuf/empty.proto";
+import "annotations.proto";
+
+message Xproto {
+ string filename = 1;
+ string contents = 2;
+}
+
+message DeclFile {
+ string filename = 1;
+ string contents = 2;
+};
+
+message AtticFile {
+ string filename = 1;
+ string contents = 2;
+};
+
+message APIConvenienceFile {
+ string filename = 1;
+ string contents = 2;
+};
+
+message LoadModelsRequest {
+ string name = 1;
+ string version = 2;
+ repeated Xproto xprotos = 3;
+ repeated DeclFile decls = 4;
+ repeated AtticFile attics = 5;
+ repeated APIConvenienceFile convenience_methods = 6;
+};
+
+message ListConvenienceMethodsReply {
+ repeated APIConvenienceFile convenience_methods = 1;
+}
+
+message LoadModelsReply {
+ enum LoadModelsStatus {
+ SUCCESS = 0;
+ ERROR = 1;
+ }
+ LoadModelsStatus status = 1;
+};
+
+message UnloadModelsRequest {
+ string name = 1;
+ string version = 2;
+};
+
+message ServiceModelStatus {
+ string name = 1;
+ string version = 2;
+ string state = 3;
+};
+
+message LoadStatusReply {
+ int32 model_status = 1;
+ string model_output = 2;
+ repeated ServiceModelStatus services = 3;
+}
+
+service dynamicload {
+ rpc LoadModels(LoadModelsRequest) returns (LoadModelsReply) {
+ option (googleapi.http) = {
+ post: "/xosapi/v1/dynamicload/load_models"
+ body: "*"
+ };
+ }
+ rpc UnloadModels(UnloadModelsRequest) returns (LoadModelsReply) {
+ option (googleapi.http) = {
+ post: "/xosapi/v1/dynamicload/unload_models"
+ body: "*"
+ };
+ }
+ rpc GetLoadStatus(google.protobuf.Empty) returns (LoadStatusReply) {
+ option (googleapi.http) = {
+ get: "/xosapi/v1/dynamicload/load_status"
+ };
+ }
+ rpc GetConvenienceMethods(google.protobuf.Empty) returns (ListConvenienceMethodsReply) {
+ option (googleapi.http) = {
+ // NOTE do we need to expose this via rest? maybe for debug...
+ get: "/xosapi/v1/dynamicload/convenience_methods"
+ };
+ }
+};