aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrinda Santh <bs2796@att.com>2019-11-01 09:40:51 -0400
committerBrinda Santh <bs2796@att.com>2019-11-01 09:40:51 -0400
commit8c3fedf3b903aa8b7b907d8f3fb66c43e4405dbe (patch)
tree6fbacc96332911174d88fed8077250ce20e21325
parentfecb2a6da364eb94926aaacf136991e4e17b9bb6 (diff)
Add missing property metadata DSL fun.
Issue-ID: CCSDK-1576 Signed-off-by: Brinda Santh <bs2796@att.com> Change-Id: I814731382976111b8102070de536ecbe4338699a
-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())
}