Add missing property metadata DSL fun. 53/97853/1
authorBrinda Santh <bs2796@att.com>
Fri, 1 Nov 2019 13:40:51 +0000 (09:40 -0400)
committerBrinda Santh <bs2796@att.com>
Fri, 1 Nov 2019 13:40:51 +0000 (09:40 -0400)
Issue-ID: CCSDK-1576
Signed-off-by: Brinda Santh <bs2796@att.com>
Change-Id: I814731382976111b8102070de536ecbe4338699a

ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintTypeDSLBuilder.kt

index 6dc5647..8d96e71 100644 (file)
@@ -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())
     }