summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-11-07 14:59:34 +0000
committerGerrit Code Review <gerrit@onap.org>2019-11-07 14:59:34 +0000
commitdd785b270c9215297ca9c498a966c5f84e883bbe (patch)
tree82f038bcb23adce14e4eaaee2864b1e0550edd99
parentfea07ea9ca84ea193380034b2b58d588071e7720 (diff)
parent8c3fedf3b903aa8b7b907d8f3fb66c43e4405dbe (diff)
Merge "Add missing property metadata DSL fun."
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintTypeDSLBuilder.kt7
1 files changed, 7 insertions, 0 deletions
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintTypeDSLBuilder.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintTypeDSLBuilder.kt
index 6dc5647da..8d96e7110 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintTypeDSLBuilder.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintTypeDSLBuilder.kt
@@ -384,6 +384,13 @@ class PropertyDefinitionBuilder(private val id: String,
propertyDefinition.defaultValue = defaultValue
}
+ fun metadata(name: String, value: String) {
+ if (propertyDefinition.metadata == null) {
+ propertyDefinition.metadata = hashMapOf()
+ }
+ propertyDefinition.metadata!![name] = value
+ }
+
fun value(value: Any) {
value(value.asJsonType())
}