Add relationships type enhancement logic. 07/75507/5
authorMuthuramalingam, Brinda Santh <bs2796@att.com>
Wed, 9 Jan 2019 01:59:31 +0000 (20:59 -0500)
committerBrinda Santh Muthuramalingam <bs2796@att.com>
Thu, 10 Jan 2019 19:59:45 +0000 (19:59 +0000)
Change-Id: If8f072f49ccc74502052055bce0c90dd43ebd495
Issue-ID: CCSDK-920
Signed-off-by: Muthuramalingam, Brinda Santh <bs2796@att.com>
13 files changed:
components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/BluePrintConstants.kt
components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt
components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintImportService.kt
components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintFileUtils.kt
components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/activation-blueprint.json
components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/relationship_types.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.AttachesTo.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.HostedOn.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.RoutesTo.json [new file with mode: 0644]
ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImpl.kt
ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintNodeTypeEnhancerImpl.kt
ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintServiceTemplateEnhancerImpl.kt
ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/utils/BluePrintEnhancerUtils.kt

index fd6a8db..102e2eb 100644 (file)
@@ -45,17 +45,13 @@ object BluePrintConstants {
 \r
     const val USER_SYSTEM: String = "System"\r
 \r
-    const val MODEL_CONTENT_TYPE_JSON: String = "JSON"\r
-    const val MODEL_CONTENT_TYPE_YAML: String = "YAML"\r
-    const val MODEL_CONTENT_TYPE_YANG: String = "YANG"\r
-    const val MODEL_CONTENT_TYPE_SCHEMA: String = "SCHEMA"\r
-\r
     const val PATH_DIVIDER: String = "/"\r
     const val PATH_SERVICE_TEMPLATE: String = "service_template"\r
     const val PATH_TOPOLOGY_TEMPLATE: String = "topology_template"\r
     const val PATH_METADATA: String = "metadata"\r
     const val PATH_NODE_TYPES: String = "node_types"\r
     const val PATH_POLICY_TYPES: String = "policy_types"\r
+    const val PATH_RELATIONSHIP_TYPES: String = "relationship_types"\r
     const val PATH_ARTIFACT_TYPES: String = "artifact_types"\r
     const val PATH_DATA_TYPES: String = "data_types"\r
     const val PATH_INPUTS: String = "inputs"\r
index 19f0943..9767b2e 100644 (file)
@@ -598,6 +598,8 @@ class ServiceTemplate : Cloneable {
     var artifactTypes: MutableMap<String, ArtifactType>? = null\r
     @get:JsonProperty("data_types")\r
     var dataTypes: MutableMap<String, DataType>? = null\r
+    @get:JsonProperty("relationship_types")\r
+    var relationshipTypes: MutableMap<String, RelationshipType>? = null\r
     @get:JsonProperty("node_types")\r
     var nodeTypes: MutableMap<String, NodeType>? = null\r
     @get:JsonProperty("policy_types")\r
index fce06f3..26eb19d 100644 (file)
@@ -28,11 +28,13 @@ import java.net.URLDecoder
 import java.nio.charset.Charset
 
 class BluePrintImportService(private val parentServiceTemplate: ServiceTemplate, private val blueprintBasePath: String) {
+    companion object {
+        private const val PARENT_SERVICE_TEMPLATE: String = "parent"
+    }
 
     private val log: Logger = LoggerFactory.getLogger(this::class.toString())
-    val PARENT_SERVICE_TEMPLATE: String = "parent"
 
-    var importServiceTemplateMap: MutableMap<String, ServiceTemplate> = hashMapOf()
+    private var importServiceTemplateMap: MutableMap<String, ServiceTemplate> = hashMapOf()
 
 
     fun getImportResolvedServiceTemplate(): ServiceTemplate {
index 18896f5..5a10e43 100755 (executable)
@@ -33,12 +33,6 @@ import java.nio.file.Files
 import java.nio.file.Path
 import java.nio.file.Paths
 import java.nio.file.StandardOpenOption
-import java.text.MessageFormat
-import java.time.Instant
-import java.time.temporal.ChronoUnit
-import java.time.ZoneId
-import java.time.format.DateTimeFormatter
-
 
 
 class BluePrintFileUtils {
@@ -56,8 +50,9 @@ class BluePrintFileUtils {
             val metaDataDir = File(blueprintDir.absolutePath.plus(File.separator).plus(BluePrintConstants.TOSCA_METADATA_DIR))
             Files.createDirectories(metaDataDir.toPath())
 
-            val metafile = File(blueprintDir.absolutePath.plus(File.separator).plus(BluePrintConstants.TOSCA_METADATA_ENTRY_DEFINITION_FILE))
-            Files.write(metafile.toPath(), getMetaDataContent().toByteArray(), StandardOpenOption.CREATE_NEW)
+            val metaFile = File(blueprintDir.absolutePath.plus(File.separator).plus(BluePrintConstants
+                    .TOSCA_METADATA_ENTRY_DEFINITION_FILE))
+            Files.write(metaFile.toPath(), getMetaDataContent().toByteArray(), StandardOpenOption.CREATE_NEW)
 
             val definitionsDir = File(blueprintDir.absolutePath.plus(File.separator).plus(BluePrintConstants.TOSCA_DEFINITIONS_DIR))
             Files.createDirectories(definitionsDir.toPath())
@@ -92,35 +87,6 @@ class BluePrintFileUtils {
             }
         }
 
-        fun populateDefaultImports(blueprintContext: BluePrintContext) {
-            // Get the Default Types
-            val types = arrayListOf(BluePrintConstants.PATH_DATA_TYPES, BluePrintConstants.PATH_ARTIFACT_TYPES,
-                    BluePrintConstants.PATH_NODE_TYPES, BluePrintConstants.PATH_POLICY_TYPES)
-
-            // Clean Type Imports
-            cleanImportTypes(blueprintContext.serviceTemplate)
-
-            val imports = mutableListOf<ImportDefinition>()
-            types.forEach { typeName ->
-                val import = ImportDefinition()
-                import.file = BluePrintConstants.TOSCA_DEFINITIONS_DIR.plus("/$typeName.json")
-                imports.add(import)
-            }
-
-            blueprintContext.serviceTemplate.imports = imports
-        }
-
-        fun cleanImportTypes(serviceTemplate: ServiceTemplate) {
-            // Clean the Type imports
-            val toDeleteTypes = serviceTemplate.imports?.filter {
-                it.file.endsWith("_types.json")
-            }
-
-            if (toDeleteTypes != null && toDeleteTypes.isNotEmpty()) {
-                serviceTemplate.imports?.removeAll(toDeleteTypes)
-            }
-        }
-
         fun writeEnhancedBluePrint(blueprintContext: BluePrintContext) {
 
             // Write Blueprint Types
@@ -147,6 +113,11 @@ class BluePrintFileUtils {
                 writeTypeFile(definitionDir.absolutePath, BluePrintConstants.PATH_DATA_TYPES, dataTypesContent)
             }
 
+            blueprintContext.serviceTemplate.relationshipTypes?.let {
+                val nodeTypesContent = JacksonUtils.getWrappedJson(BluePrintConstants.PATH_RELATIONSHIP_TYPES, it.toSortedMap(), true)
+                writeTypeFile(definitionDir.absolutePath, BluePrintConstants.PATH_RELATIONSHIP_TYPES, nodeTypesContent)
+            }
+
             blueprintContext.serviceTemplate.artifactTypes?.let {
                 val artifactTypesContent = JacksonUtils.getWrappedJson(BluePrintConstants.PATH_ARTIFACT_TYPES, it.toSortedMap(), true)
                 writeTypeFile(definitionDir.absolutePath, BluePrintConstants.PATH_ARTIFACT_TYPES, artifactTypesContent)
@@ -163,7 +134,40 @@ class BluePrintFileUtils {
             }
         }
 
-        fun writeEntryDefinitionFile(blueprintContext: BluePrintContext) {
+        private fun populateDefaultImports(blueprintContext: BluePrintContext) {
+            // Get the Default Types
+            val types = arrayListOf(BluePrintConstants.PATH_DATA_TYPES, BluePrintConstants.PATH_RELATIONSHIP_TYPES,
+                    BluePrintConstants.PATH_ARTIFACT_TYPES, BluePrintConstants.PATH_NODE_TYPES,
+                    BluePrintConstants.PATH_POLICY_TYPES)
+
+            // Clean Type Imports
+            cleanImportTypes(blueprintContext.serviceTemplate)
+
+            val imports = mutableListOf<ImportDefinition>()
+            types.forEach { typeName ->
+                val import = ImportDefinition()
+                import.file = BluePrintConstants.TOSCA_DEFINITIONS_DIR.plus("/$typeName.json")
+                imports.add(import)
+            }
+
+            blueprintContext.serviceTemplate.imports = imports
+        }
+
+        fun cleanImportTypes(serviceTemplate: ServiceTemplate) {
+            // Clean the Type imports
+            val toDeleteTypes = serviceTemplate.imports?.filter {
+                it.file.endsWith("_types.json")
+            }
+
+            if (toDeleteTypes != null && toDeleteTypes.isNotEmpty()) {
+                serviceTemplate.imports?.removeAll(toDeleteTypes)
+            }
+        }
+
+        /**
+         * Re Generate the Blueprint Service Template Definition file based on BluePrint Context.
+         */
+        private fun writeEntryDefinitionFile(blueprintContext: BluePrintContext) {
 
             val absoluteEntryDefinitionFile = blueprintContext.rootPath.plus(File.separator).plus(blueprintContext.entryDefinition)
 
@@ -174,14 +178,15 @@ class BluePrintFileUtils {
             writeServiceTemplate.dataTypes = null
             writeServiceTemplate.artifactTypes = null
             writeServiceTemplate.policyTypes = null
+            writeServiceTemplate.relationshipTypes = null
             writeServiceTemplate.nodeTypes = null
 
-            // Write the Serivice Template
+            // Write the Service Template
             writeDefinitionFile(absoluteEntryDefinitionFile, JacksonUtils.getJson(writeServiceTemplate, true))
         }
 
-        fun writeDefinitionFile(definitionFile: String, content: String) = runBlocking {
-            val definitionFile = File(definitionFile)
+        fun writeDefinitionFile(definitionFileName: String, content: String) = runBlocking {
+            val definitionFile = File(definitionFileName)
             // Delete the File If exists
             Files.deleteIfExists(definitionFile.toPath())
 
@@ -207,22 +212,6 @@ class BluePrintFileUtils {
                     "\nEntry-Definitions: Definitions/<BLUEPRINT_NAME>.json" +
                     "\nTemplate-Tags: <TAGS>"
         }
-       
-        fun getBluePrintFile(fileName: String, targetPath: Path) : File {
-            val filePath = targetPath.resolve(fileName).toString()
-            val file = File(filePath)
-            check(file.exists()) {
-                throw BluePrintException("couldn't get definition file under path(${file.absolutePath})")
-            }
-            return file
-        }
-
-        fun getCBAGeneratedFileName(fileName: String, prefix: String): String {
-            val DATE_FORMAT = "yyyyMMddHHmmss"
-            val formatter = DateTimeFormatter.ofPattern(DATE_FORMAT)
-            val datePrefix = Instant.now().atZone(ZoneId.systemDefault()).toLocalDateTime().format(formatter)
-            return MessageFormat.format(prefix, datePrefix, fileName)
-        }
 
         fun getCbaStorageDirectory(path: String): Path {
             check(StringUtils.isNotBlank(path)) {
diff --git a/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/relationship_types.json b/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/relationship_types.json
new file mode 100644 (file)
index 0000000..87d2dc5
--- /dev/null
@@ -0,0 +1,9 @@
+{
+  "relationship_types": {
+    "tosca.relationships.ConnectsTo": {
+      "description": "Relationship tosca.relationships.ConnectsTo",
+      "version": "1.0.0",
+      "derived_from": "tosca.relationships.Root"
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.AttachesTo.json b/components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.AttachesTo.json
new file mode 100644 (file)
index 0000000..bcfb65e
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  "description": "Relationship tosca.relationships.AttachesTo",
+  "version": "1.0.0",
+  "derived_from": "tosca.relationships.Root"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.HostedOn.json b/components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.HostedOn.json
new file mode 100644 (file)
index 0000000..a8337cd
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  "description": "Relationship tosca.relationships.HostedOn",
+  "version": "1.0.0",
+  "derived_from": "tosca.relationships.Root"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.RoutesTo.json b/components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.RoutesTo.json
new file mode 100644 (file)
index 0000000..1da73cd
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  "description": "Relationship tosca.relationships.RoutesTo",
+  "version": "1.0.0",
+  "derived_from": "tosca.relationships.Root"
+}
\ No newline at end of file
index d789595..d4e4a24 100644 (file)
@@ -21,7 +21,6 @@ import com.att.eelf.configuration.EELFLogger
 import com.att.eelf.configuration.EELFManager\r
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException\r
 import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintEnhancerService\r
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintRepoService\r
 import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService\r
 import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext\r
 import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService\r
@@ -31,8 +30,7 @@ import org.springframework.stereotype.Service
 import java.util.*\r
 \r
 @Service\r
-open class BluePrintEnhancerServiceImpl(private val bluePrintRepoService: BluePrintRepoService,\r
-                                        private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,\r
+open class BluePrintEnhancerServiceImpl(private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,\r
                                         private val resourceDefinitionEnhancerService: ResourceDefinitionEnhancerService) : BluePrintEnhancerService {\r
 \r
     private val log: EELFLogger = EELFManager.getInstance().getLogger(BluePrintEnhancerServiceImpl::class.toString())\r
index 4e226b2..6ff0b39 100644 (file)
@@ -18,6 +18,7 @@ package org.onap.ccsdk.apps.controllerblueprints.service.enhancer
 
 import com.att.eelf.configuration.EELFLogger
 import com.att.eelf.configuration.EELFManager
+import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes
 import org.onap.ccsdk.apps.controllerblueprints.core.data.InterfaceDefinition
 import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeType
@@ -57,7 +58,7 @@ open class BluePrintNodeTypeEnhancerImpl(private val bluePrintRepoService: BlueP
         }
 
         // NodeType Attribute Definitions
-        enrichNodeTypeAtributes(name, nodeType)
+        enrichNodeTypeAttributes(name, nodeType)
 
         // NodeType Property Definitions
         enrichNodeTypeProperties(name, nodeType)
@@ -73,7 +74,7 @@ open class BluePrintNodeTypeEnhancerImpl(private val bluePrintRepoService: BlueP
 
     }
 
-    open fun enrichNodeTypeAtributes(nodeTypeName: String, nodeType: NodeType) {
+    open fun enrichNodeTypeAttributes(nodeTypeName: String, nodeType: NodeType) {
         nodeType.attributes?.let {
             bluePrintTypeEnhancerService.enhanceAttributeDefinitions(bluePrintRuntimeService, nodeType.attributes!!)
         }
@@ -87,14 +88,20 @@ open class BluePrintNodeTypeEnhancerImpl(private val bluePrintRepoService: BlueP
 
     open fun enrichNodeTypeRequirements(nodeTypeName: String, nodeType: NodeType) {
 
-        nodeType.requirements?.forEach { _, requirementDefinition ->
+        nodeType.requirements?.forEach { requirementName, requirementDefinition ->
             // Populate Requirement Node
             requirementDefinition.node?.let { requirementNodeTypeName ->
                 // Get Requirement NodeType from Repo and Update Service Template
                 val requirementNodeType = BluePrintEnhancerUtils.populateNodeType(bluePrintContext,
                         bluePrintRepoService, requirementNodeTypeName)
-                // Enhanypece Node T
+                // Enhance Node Type
                 enhance(bluePrintRuntimeService, requirementNodeTypeName, requirementNodeType)
+
+                // Enhance Relationship Type
+                val relationShipTypeName = requirementDefinition.relationship
+                        ?: throw BluePrintException("couldn't get relationship name for the NodeType($nodeTypeName) " +
+                                "Requirement($requirementName)")
+                enrichRelationShipType(relationShipTypeName)
             }
         }
     }
@@ -120,7 +127,7 @@ open class BluePrintNodeTypeEnhancerImpl(private val bluePrintRepoService: BlueP
 
         interfaceObj.operations?.forEach { operationName, operation ->
             enrichNodeTypeInterfaceOperationInputs(nodeTypeName, operationName, operation)
-            enrichNodeTypeInterfaceOperationOputputs(nodeTypeName, operationName, operation)
+            enrichNodeTypeInterfaceOperationOutputs(nodeTypeName, operationName, operation)
         }
     }
 
@@ -130,10 +137,18 @@ open class BluePrintNodeTypeEnhancerImpl(private val bluePrintRepoService: BlueP
         }
     }
 
-    open fun enrichNodeTypeInterfaceOperationOputputs(nodeTypeName: String, operationName: String, operation: OperationDefinition) {
+    open fun enrichNodeTypeInterfaceOperationOutputs(nodeTypeName: String, operationName: String,
+                                                     operation: OperationDefinition) {
         operation.outputs?.let { inputs ->
             bluePrintTypeEnhancerService.enhancePropertyDefinitions(bluePrintRuntimeService, inputs)
         }
     }
 
+    /**
+     * Get the Relationship Type from database and add to Blueprint Context
+     */
+    open fun enrichRelationShipType(relationshipName: String) {
+        BluePrintEnhancerUtils.populateRelationshipType(bluePrintContext, bluePrintRepoService, relationshipName)
+    }
+
 }
\ No newline at end of file
index 51064bb..8c269e5 100644 (file)
@@ -19,7 +19,6 @@ package org.onap.ccsdk.apps.controllerblueprints.service.enhancer
 import com.att.eelf.configuration.EELFLogger
 import com.att.eelf.configuration.EELFManager
 import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintRepoService
 import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintServiceTemplateEnhancer
 import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
 import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
@@ -30,8 +29,7 @@ import org.springframework.stereotype.Service
 
 @Service
 @Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BluePrintServiceTemplateEnhancerImpl(private val bluePrintRepoService: BluePrintRepoService,
-                                                private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService)
+open class BluePrintServiceTemplateEnhancerImpl(private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService)
     : BluePrintServiceTemplateEnhancer {
     private val log: EELFLogger = EELFManager.getInstance().getLogger(BluePrintServiceTemplateEnhancerImpl::class.toString())
 
@@ -52,11 +50,14 @@ open class BluePrintServiceTemplateEnhancerImpl(private val bluePrintRepoService
         bluePrintContext.serviceTemplate.nodeTypes?.clear()
         bluePrintContext.serviceTemplate.dataTypes?.clear()
         bluePrintContext.serviceTemplate.policyTypes?.clear()
+        bluePrintContext.serviceTemplate.relationshipTypes?.clear()
 
         bluePrintContext.serviceTemplate.artifactTypes = mutableMapOf()
         bluePrintContext.serviceTemplate.nodeTypes = mutableMapOf()
         bluePrintContext.serviceTemplate.dataTypes = mutableMapOf()
         bluePrintContext.serviceTemplate.policyTypes = mutableMapOf()
+        bluePrintContext.serviceTemplate.relationshipTypes = mutableMapOf()
+        log.info("reinitialized all type definitions")
 
     }
 
index 2f18abf..c2d6f6a 100644 (file)
@@ -21,7 +21,7 @@ import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
 import org.onap.ccsdk.apps.controllerblueprints.core.data.ArtifactType
 import org.onap.ccsdk.apps.controllerblueprints.core.data.DataType
 import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeType
-import org.onap.ccsdk.apps.controllerblueprints.core.format
+import org.onap.ccsdk.apps.controllerblueprints.core.data.RelationshipType
 import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintRepoService
 import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
 import org.springframework.http.codec.multipart.FilePart
@@ -45,13 +45,23 @@ class BluePrintEnhancerUtils {
             return dataType
         }
 
+        fun populateRelationshipType(bluePrintContext: BluePrintContext, bluePrintRepoService: BluePrintRepoService,
+                             relationshipName: String): RelationshipType {
+
+            val relationshipType = bluePrintContext.serviceTemplate.relationshipTypes?.get(relationshipName)
+                    ?: bluePrintRepoService.getRelationshipType(relationshipName)
+                    ?: throw BluePrintException("couldn't get RelationshipType($relationshipName) from repo.")
+            bluePrintContext.serviceTemplate.relationshipTypes?.put(relationshipName, relationshipType)
+            return relationshipType
+        }
+
 
         fun populateNodeType(bluePrintContext: BluePrintContext, bluePrintRepoService: BluePrintRepoService,
                              nodeTypeName: String): NodeType {
 
             val nodeType = bluePrintContext.serviceTemplate.nodeTypes?.get(nodeTypeName)
                     ?: bluePrintRepoService.getNodeType(nodeTypeName)
-                    ?: throw BluePrintException(format("Couldn't get NodeType({}) from repo.", nodeTypeName))
+                    ?: throw BluePrintException("couldn't get NodeType($nodeTypeName) from repo.")
             bluePrintContext.serviceTemplate.nodeTypes?.put(nodeTypeName, nodeType)
             return nodeType
         }