[CORD-2683] Adding convenience method to populate ServiceInstance with provider/subscriber ids
Change-Id: I973e1a910584015405080621bd0c17b83d27f711
diff --git a/xos/coreapi/protos/utility.proto b/xos/coreapi/protos/utility.proto
index 1169b9d..073eb81 100644
--- a/xos/coreapi/protos/utility.proto
+++ b/xos/coreapi/protos/utility.proto
@@ -5,6 +5,7 @@
import "google/protobuf/empty.proto";
import "google/api/annotations.proto";
import "common.proto";
+import "xosoptions.proto";
message LoginRequest {
string username = 1;
@@ -15,19 +16,6 @@
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;
};
@@ -46,6 +34,26 @@
string xproto = 1;
};
+message PopulatedServiceInstance {
+ option (contentTypeId) = "core.serviceinstance";
+ oneof id_present {
+ int32 id = 1;
+ }
+ oneof leaf_model_name_present {
+ string leaf_model_name = 2[(val).maxLength = 1024, (val).nonNull = true];
+ }
+ oneof name_present {
+ string name = 3[(val).maxLength = 200];
+ }
+ oneof owner_present {
+ int32 owner_id = 4[(val).nonNull = true, (foreignKey).modelName = "Service", (foreignKey).reverseFieldName = "service_instances"];
+ }
+ repeated int32 provided_service_instances = 5;
+ repeated int32 subscribed_service_instances = 6;
+ repeated int32 subscribed_service = 7;
+ repeated int32 subscribed_network = 8;
+};
+
service utility {
rpc Login(LoginRequest) returns (LoginResponse) {
@@ -62,20 +70,6 @@
};
}
- 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"
@@ -108,4 +102,10 @@
get: "/xosapi/v1/xproto"
};
}
+
+ rpc GetPopulatedServiceInstances(ID) returns (PopulatedServiceInstance) {
+ option (google.api.http) = {
+ get: "/xosapi/v1/core/populatedserviceinstance/{id}"
+ };
+ }
};
\ No newline at end of file