aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSL.kt
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSL.kt')
-rw-r--r--ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSL.kt30
1 files changed, 15 insertions, 15 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSL.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSL.kt
index fd51da152..34dd0a417 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSL.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.db
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
@@ -30,25 +30,25 @@ import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipType
/** Relationships Types DSL for Database Producer */
fun ServiceTemplateBuilder.relationshipTypeConnectsToDb() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsToDb()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToDb()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsToDb(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsToDb(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship connects to through Database."
) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintConstants.DATA_TYPE_MAP,
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintConstants.DATA_TYPE_MAP,
true,
"Connection Config details."
)
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
@@ -66,25 +66,25 @@ fun TopologyTemplateBuilder.relationshipTemplateDb(
class DbRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB, description
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB, description
) {
fun mariaDb(block: DbMariaDataSourcePropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.mariaDbProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.mariaDbProperties(block))
}
fun mySqlDb(block: DbMySqlDataSourcePropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.mySqlDbProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.mySqlDbProperties(block))
}
}
-fun BlueprintTypes.mariaDbProperties(block: DbMariaDataSourcePropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.mariaDbProperties(block: DbMariaDataSourcePropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = DbMariaDataSourcePropertiesAssignmentBuilder().apply(block).build()
assignments[DBDataSourceProperties::type.name] = DBLibConstants.MARIA_DB.asJsonPrimitive()
return assignments.asJsonNode()
}
-fun BlueprintTypes.mySqlDbProperties(block: DbMySqlDataSourcePropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.mySqlDbProperties(block: DbMySqlDataSourcePropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = DbMySqlDataSourcePropertiesAssignmentBuilder().apply(block).build()
assignments[DBDataSourceProperties::type.name] = DBLibConstants.MYSQL_DB.asJsonPrimitive()
return assignments.asJsonNode()