aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons/grpc-lib/src/main')
-rw-r--r--ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSL.kt13
1 files changed, 13 insertions, 0 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSL.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSL.kt
index 354e38dc7..8063e8909 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSL.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSL.kt
@@ -24,10 +24,17 @@ import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.PropertiesAssignmentBuilder
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.RelationshipTemplateBuilder
+import org.onap.ccsdk.cds.controllerblueprints.core.dsl.ServiceTemplateBuilder
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.TopologyTemplateBuilder
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipType
/** Relationships Types DSL for GRPC Server Producer */
+fun ServiceTemplateBuilder.relationshipTypeConnectsToGrpcServer() {
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToGrpcServer()
+ if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
+ this.relationshipTypes!![relationshipType.id!!] = relationshipType
+}
+
fun BluePrintTypes.relationshipTypeConnectsToGrpcServer(): RelationshipType {
return relationshipType(
id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_SERVER,
@@ -45,6 +52,12 @@ fun BluePrintTypes.relationshipTypeConnectsToGrpcServer(): RelationshipType {
}
}
+fun ServiceTemplateBuilder.relationshipTypeConnectsToGrpcClient() {
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToGrpcClient()
+ if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
+ this.relationshipTypes!![relationshipType.id!!] = relationshipType
+}
+
fun BluePrintTypes.relationshipTypeConnectsToGrpcClient(): RelationshipType {
return relationshipType(
id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_CLIENT,