diff options
author | Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com> | 2018-09-13 14:25:49 +0000 |
---|---|---|
committer | Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com> | 2018-09-13 14:25:49 +0000 |
commit | 031164be51b84748fa07e6a51c961be055dd169e (patch) | |
tree | e3395cb752110fa09872cf1ca6ef534cd62776b9 /ms/controllerblueprints/modules/service/src/main | |
parent | 99f4a1e766cf27d35fb7b68b4904d1e49e7fa787 (diff) |
Controller Blueprints Microservice
Optimise dictionary dummy data creation reusability and property usage optimisation.
Change-Id: Ibbd56d514f437f29943cebc0e607becb6798e4b6
Issue-ID: CCSDK-491
Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Diffstat (limited to 'ms/controllerblueprints/modules/service/src/main')
-rw-r--r-- | ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerService.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerService.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerService.kt index cf9e96e77..46709c5f7 100644 --- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerService.kt +++ b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerService.kt @@ -171,7 +171,7 @@ open class BluePrintEnhancerDefaultService(val bluePrintRepoService: BluePrintRe }
open fun enrichNodeTypeCapabilityProperties(nodeTypeName: String, nodeType: NodeType) {
- nodeType.capabilities?.forEach { capabilityDefinitionName, capabilityDefinition ->
+ nodeType.capabilities?.forEach { _, capabilityDefinition ->
capabilityDefinition.properties?.let { properties ->
enrichPropertyDefinitions(properties)
}
@@ -246,7 +246,7 @@ open class BluePrintEnhancerDefaultService(val bluePrintRepoService: BluePrintRe open fun populateNodeType(nodeTypeName: String): NodeType {
val nodeType = serviceTemplate.nodeTypes?.get(nodeTypeName)
- ?: bluePrintRepoService.getNodeType(nodeTypeName)?.block()
+ ?: bluePrintRepoService.getNodeType(nodeTypeName).block()
?: throw BluePrintException(format("Couldn't get NodeType({}) from repo.", nodeTypeName))
serviceTemplate.nodeTypes?.put(nodeTypeName, nodeType)
return nodeType
@@ -254,7 +254,7 @@ open class BluePrintEnhancerDefaultService(val bluePrintRepoService: BluePrintRe open fun populateArtifactType(artifactTypeName: String): ArtifactType {
val artifactType = serviceTemplate.artifactTypes?.get(artifactTypeName)
- ?: bluePrintRepoService.getArtifactType(artifactTypeName)?.block()
+ ?: bluePrintRepoService.getArtifactType(artifactTypeName).block()
?: throw BluePrintException(format("Couldn't get ArtifactType({}) from repo.", artifactTypeName))
serviceTemplate.artifactTypes?.put(artifactTypeName, artifactType)
return artifactType
@@ -262,7 +262,7 @@ open class BluePrintEnhancerDefaultService(val bluePrintRepoService: BluePrintRe open fun populateDataTypes(dataTypeName: String): DataType {
val dataType = serviceTemplate.dataTypes?.get(dataTypeName)
- ?: bluePrintRepoService.getDataType(dataTypeName)?.block()
+ ?: bluePrintRepoService.getDataType(dataTypeName).block()
?: throw BluePrintException(format("Couldn't get DataType({}) from repo.", dataTypeName))
serviceTemplate.dataTypes?.put(dataTypeName, dataType)
return dataType
|