diff options
author | Brinda Santh <bs2796@att.com> | 2019-11-01 09:40:51 -0400 |
---|---|---|
committer | Brinda Santh <bs2796@att.com> | 2019-11-01 09:40:51 -0400 |
commit | 8c3fedf3b903aa8b7b907d8f3fb66c43e4405dbe (patch) | |
tree | 6fbacc96332911174d88fed8077250ce20e21325 | |
parent | fecb2a6da364eb94926aaacf136991e4e17b9bb6 (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.kt | 7 |
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()) } |