From 61f774846a79bd63ad5e1f8999740b556ef49aa3 Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh(bs2796)" Date: Tue, 18 Dec 2018 08:16:28 -0500 Subject: Add attribute definition enhancer. Change-Id: Ie8ac60910f04dfca477d0276aa451821cfcd8510 Issue-ID: CCSDK-718 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) --- .../core/ConfigModelConstant.kt | 8 - .../core/data/BluePrintModel.kt | 12 +- .../core/service/BluePrintContext.kt | 4 + .../core/utils/BluePrintFileUtils.kt | 63 +++++++- .../core/utils/BluePrintMetadataUtils.kt | 165 +++++++++++---------- .../baseconfiguration/Definitions/node_types.json | 5 +- .../Definitions/resources_definition_types.json | 62 ++++++++ .../Definitions/resources_dictionary_types.json | 62 -------- .../node_type/component-resource-assignment.json | 6 + 9 files changed, 231 insertions(+), 156 deletions(-) create mode 100644 components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/resources_definition_types.json delete mode 100644 components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/resources_dictionary_types.json (limited to 'components') diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/ConfigModelConstant.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/ConfigModelConstant.kt index 8bfa2db7e..5461798de 100644 --- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/ConfigModelConstant.kt +++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/ConfigModelConstant.kt @@ -26,13 +26,5 @@ object ConfigModelConstant { const val MODEL_CONTENT_TYPE_TOSCA_JSON = "TOSCA_JSON" const val MODEL_CONTENT_TYPE_TEMPLATE = "TEMPLATE" - - const val MODEL_TYPE_DATA_TYPE_DYNAMIC = "tosca.datatypes.Dynamic" - - const val MODEL_TYPE_NODE_ARTIFACT = "tosca.nodes.Artifact" - const val CAPABILITY_PROPERTY_MAPPING = "mapping" - - const val PROPERTY_RECIPE_NAMES = "action-names" - } diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt index 9b6fbbf19..19f09432d 100644 --- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt +++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt @@ -19,6 +19,7 @@ package org.onap.ccsdk.apps.controllerblueprints.core.data import com.fasterxml.jackson.annotation.JsonIgnore import com.fasterxml.jackson.annotation.JsonProperty +import com.fasterxml.jackson.annotation.JsonPropertyOrder import com.fasterxml.jackson.databind.JsonNode import io.swagger.annotations.ApiModelProperty @@ -183,12 +184,14 @@ class AttributeDefinition { @get:JsonIgnore var id: String? = null var description: String? = null + var required: Boolean? = null lateinit var type: String @JsonProperty("default") var defaultValue: JsonNode? = null var status: String? = null + var constraints: MutableList? = null @JsonProperty("entry_schema") - var entrySchema: String? = null + var entrySchema: EntrySchema? = null } /* @@ -579,7 +582,8 @@ class ConditionClause { A TOSCA Service Template (YAML) document contains element definitions of building blocks for cloud application, or complete models of cloud applications. This section describes the top-level structural elements (TOSCA keynames) along with their grammars, which are allowed to appear in a TOSCA Service Template document. */ -class ServiceTemplate { +@JsonPropertyOrder(value = ["toscaDefinitionsVersion", "description", "metadata", "imports", "topologyTemplate"]) +class ServiceTemplate : Cloneable { @get:JsonIgnore var id: String? = null @get:JsonProperty("tosca_definitions_version") @@ -600,6 +604,10 @@ class ServiceTemplate { var policyTypes: MutableMap? = null @get:JsonProperty("topology_template") var topologyTemplate: TopologyTemplate? = null + + override public fun clone(): ServiceTemplate { + return super.clone() as ServiceTemplate + } } class ToscaMetaData { diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt index 84af3f988..bc1f4b437 100644 --- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt +++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt @@ -36,6 +36,10 @@ class BluePrintContext(val serviceTemplate: ServiceTemplate) { * Blueprint CBA extracted file location */ var rootPath = "." + /** + * Root Definition file path + */ + var entryDefinition = "" val imports: List? = serviceTemplate.imports diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintFileUtils.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintFileUtils.kt index f9ac87600..67ae39870 100644 --- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintFileUtils.kt +++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintFileUtils.kt @@ -22,6 +22,8 @@ import kotlinx.coroutines.runBlocking import org.apache.commons.io.FileUtils import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException +import org.onap.ccsdk.apps.controllerblueprints.core.data.ImportDefinition +import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext import java.io.File import java.io.FileFilter @@ -79,6 +81,46 @@ 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() + 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 + writeBluePrintTypes(blueprintContext) + // Re Populate the Imports + populateDefaultImports(blueprintContext) + // Rewrite the Entry Definition Files + writeEntryDefinitionFile(blueprintContext) + + } + fun writeBluePrintTypes(blueprintContext: BluePrintContext) { val basePath = blueprintContext.rootPath @@ -110,10 +152,29 @@ class BluePrintFileUtils { } } + fun writeEntryDefinitionFile(blueprintContext: BluePrintContext) { + + val absoluteEntryDefinitionFile = blueprintContext.rootPath.plus(File.separator).plus(blueprintContext.entryDefinition) + + val serviceTemplate = blueprintContext.serviceTemplate + + // Clone the Service Template + val writeServiceTemplate = serviceTemplate.clone() + writeServiceTemplate.dataTypes = null + writeServiceTemplate.artifactTypes = null + writeServiceTemplate.policyTypes = null + writeServiceTemplate.nodeTypes = null + + // Write the Serivice Template + writeDefinitionFile(absoluteEntryDefinitionFile, JacksonUtils.getJson(writeServiceTemplate, true)) + } + fun writeDefinitionFile(definitionFile: String, content: String) = runBlocking { val definitionFile = File(definitionFile) + // Delete the File If exists + Files.deleteIfExists(definitionFile.toPath()) - Files.write(definitionFile.toPath(), content.toByteArray(), StandardOpenOption.CREATE) + Files.write(definitionFile.toPath(), content.toByteArray(), StandardOpenOption.CREATE_NEW) check(definitionFile.exists()) { throw BluePrintException("couldn't write definition file under path(${definitionFile.absolutePath})") } diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintMetadataUtils.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintMetadataUtils.kt index 9dbe15ef1..5b5561f64 100644 --- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintMetadataUtils.kt +++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintMetadataUtils.kt @@ -31,109 +31,114 @@ import org.onap.ccsdk.apps.controllerblueprints.core.service.DefaultBluePrintRun import java.io.File import java.nio.charset.Charset -object BluePrintMetadataUtils { - private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString()) +class BluePrintMetadataUtils { + companion object { + private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString()) - @JvmStatic - fun toscaMetaData(basePath: String): ToscaMetaData { - val toscaMetaPath = basePath.plus(BluePrintConstants.PATH_DIVIDER).plus("TOSCA-Metadata/TOSCA.meta") - return toscaMetaDataFromMetaFile(toscaMetaPath) - } - @JvmStatic - fun toscaMetaDataFromMetaFile(metaFilePath: String): ToscaMetaData { - val toscaMetaData = ToscaMetaData() - val lines: MutableList = FileUtils.readLines(File(metaFilePath), Charset.defaultCharset()) - lines.forEach { line -> - if (line.contains(":")) { - val keyValue = line.split(":") - if (keyValue.size == 2) { - val value: String = keyValue[1].trim() - when (keyValue[0]) { - "TOSCA-Meta-File-Version" -> toscaMetaData.toscaMetaFileVersion = value - "CSAR-Version" -> toscaMetaData.csarVersion = value - "Created-By" -> toscaMetaData.createdBy = value - "Entry-Definitions" -> toscaMetaData.entityDefinitions = value - "Template-Tags" -> toscaMetaData.templateTags = value + fun toscaMetaData(basePath: String): ToscaMetaData { + val toscaMetaPath = basePath.plus(BluePrintConstants.PATH_DIVIDER) + .plus(BluePrintConstants.TOSCA_METADATA_ENTRY_DEFINITION_FILE) + return toscaMetaDataFromMetaFile(toscaMetaPath) + } + + fun entryDefinitionFile(basePath: String): String { + val toscaMetaPath = basePath.plus(BluePrintConstants.PATH_DIVIDER) + .plus(BluePrintConstants.TOSCA_METADATA_ENTRY_DEFINITION_FILE) + return toscaMetaDataFromMetaFile(toscaMetaPath).entityDefinitions + } + + fun toscaMetaDataFromMetaFile(metaFilePath: String): ToscaMetaData { + val toscaMetaData = ToscaMetaData() + val lines: MutableList = FileUtils.readLines(File(metaFilePath), Charset.defaultCharset()) + lines.forEach { line -> + if (line.contains(":")) { + val keyValue = line.split(":") + if (keyValue.size == 2) { + val value: String = keyValue[1].trim() + when (keyValue[0]) { + "TOSCA-Meta-File-Version" -> toscaMetaData.toscaMetaFileVersion = value + "CSAR-Version" -> toscaMetaData.csarVersion = value + "Created-By" -> toscaMetaData.createdBy = value + "Entry-Definitions" -> toscaMetaData.entityDefinitions = value + "Template-Tags" -> toscaMetaData.templateTags = value + } } } - } + } + return toscaMetaData } - return toscaMetaData - } - @JvmStatic - fun getBluePrintRuntime(id: String, blueprintBasePath: String): BluePrintRuntimeService> { + fun getBluePrintRuntime(id: String, blueprintBasePath: String): BluePrintRuntimeService> { - val bluePrintContext: BluePrintContext = getBluePrintContext(blueprintBasePath) + val bluePrintContext: BluePrintContext = getBluePrintContext(blueprintBasePath) - val context: MutableMap = hashMapOf() - context[BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH] = blueprintBasePath.asJsonPrimitive() - context[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = id.asJsonPrimitive() + val context: MutableMap = hashMapOf() + context[BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH] = blueprintBasePath.asJsonPrimitive() + context[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = id.asJsonPrimitive() - val bluePrintRuntimeService = DefaultBluePrintRuntimeService(id, bluePrintContext) - bluePrintRuntimeService.setExecutionContext(context) + val bluePrintRuntimeService = DefaultBluePrintRuntimeService(id, bluePrintContext) + bluePrintRuntimeService.setExecutionContext(context) - return bluePrintRuntimeService - } + return bluePrintRuntimeService + } - @JvmStatic - fun getBaseEnhancementBluePrintRuntime(id: String, blueprintBasePath: String): BluePrintRuntimeService> { + fun getBaseEnhancementBluePrintRuntime(id: String, blueprintBasePath: String): BluePrintRuntimeService> { - val bluePrintContext: BluePrintContext = getBaseEnhancementBluePrintContext(blueprintBasePath) - val context: MutableMap = hashMapOf() - context[BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH] = blueprintBasePath.asJsonPrimitive() - context[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = id.asJsonPrimitive() + val bluePrintContext: BluePrintContext = getBaseEnhancementBluePrintContext(blueprintBasePath) + val context: MutableMap = hashMapOf() + context[BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH] = blueprintBasePath.asJsonPrimitive() + context[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = id.asJsonPrimitive() - val bluePrintRuntimeService = DefaultBluePrintRuntimeService(id, bluePrintContext) - bluePrintRuntimeService.setExecutionContext(context) + val bluePrintRuntimeService = DefaultBluePrintRuntimeService(id, bluePrintContext) + bluePrintRuntimeService.setExecutionContext(context) - return bluePrintRuntimeService - } + return bluePrintRuntimeService + } - @JvmStatic - fun getBluePrintRuntime(id: String, blueprintBasePath: String, executionContext: MutableMap): BluePrintRuntimeService> { - val bluePrintContext: BluePrintContext = getBluePrintContext(blueprintBasePath) - val bluePrintRuntimeService = DefaultBluePrintRuntimeService(id, bluePrintContext) - bluePrintRuntimeService.setExecutionContext(executionContext) - return bluePrintRuntimeService - } + fun getBluePrintRuntime(id: String, blueprintBasePath: String, executionContext: MutableMap): BluePrintRuntimeService> { + val bluePrintContext: BluePrintContext = getBluePrintContext(blueprintBasePath) + val bluePrintRuntimeService = DefaultBluePrintRuntimeService(id, bluePrintContext) + bluePrintRuntimeService.setExecutionContext(executionContext) + return bluePrintRuntimeService + } - @JvmStatic - fun getBluePrintContext(blueprintBasePath: String): BluePrintContext { + fun getBluePrintContext(blueprintBasePath: String): BluePrintContext { - val toscaMetaData: ToscaMetaData = toscaMetaData(blueprintBasePath) + val toscaMetaData: ToscaMetaData = toscaMetaData(blueprintBasePath) - log.info("Processing blueprint base path ($blueprintBasePath) and entry definition file (${toscaMetaData.entityDefinitions})") + log.info("Reading blueprint path($blueprintBasePath) and entry definition file (${toscaMetaData.entityDefinitions})") - return readBlueprintFile(toscaMetaData.entityDefinitions, blueprintBasePath) - } + return readBlueprintFile(toscaMetaData.entityDefinitions, blueprintBasePath) + } - fun getBaseEnhancementBluePrintContext(blueprintBasePath: String): BluePrintContext { - val toscaMetaData: ToscaMetaData = toscaMetaData(blueprintBasePath) - // Clean Type files - BluePrintFileUtils.deleteBluePrintTypes(blueprintBasePath) - val rootFilePath: String = blueprintBasePath.plus(File.separator).plus(toscaMetaData.entityDefinitions) - val rootServiceTemplate = ServiceTemplateUtils.getServiceTemplate(rootFilePath) + private fun getBaseEnhancementBluePrintContext(blueprintBasePath: String): BluePrintContext { + val toscaMetaData: ToscaMetaData = toscaMetaData(blueprintBasePath) + // Clean Type files + BluePrintFileUtils.deleteBluePrintTypes(blueprintBasePath) + val rootFilePath: String = blueprintBasePath.plus(File.separator).plus(toscaMetaData.entityDefinitions) + val rootServiceTemplate = ServiceTemplateUtils.getServiceTemplate(rootFilePath) - // Clean the Import Definitions - rootServiceTemplate.imports?.clear() + // Clean the Import Definitions + BluePrintFileUtils.cleanImportTypes(rootServiceTemplate) - val blueprintContext = BluePrintContext(rootServiceTemplate) - blueprintContext.rootPath = blueprintBasePath - return blueprintContext - } + val blueprintContext = BluePrintContext(rootServiceTemplate) + blueprintContext.rootPath = blueprintBasePath + blueprintContext.entryDefinition = toscaMetaData.entityDefinitions + return blueprintContext + } - @JvmStatic - fun readBlueprintFile(entityDefinitions: String, basePath: String): BluePrintContext { - val rootFilePath: String = basePath.plus(File.separator).plus(entityDefinitions) - val rootServiceTemplate = ServiceTemplateUtils.getServiceTemplate(rootFilePath) - // Recursively Import Template files - val schemaImportResolverUtils = BluePrintImportService(rootServiceTemplate, basePath) - val completeServiceTemplate = schemaImportResolverUtils.getImportResolvedServiceTemplate() - val blueprintContext = BluePrintContext(completeServiceTemplate) - blueprintContext.rootPath = basePath - return blueprintContext + private fun readBlueprintFile(entityDefinitions: String, basePath: String): BluePrintContext { + val rootFilePath: String = basePath.plus(File.separator).plus(entityDefinitions) + val rootServiceTemplate = ServiceTemplateUtils.getServiceTemplate(rootFilePath) + // Recursively Import Template files + val schemaImportResolverUtils = BluePrintImportService(rootServiceTemplate, basePath) + val completeServiceTemplate = schemaImportResolverUtils.getImportResolvedServiceTemplate() + val blueprintContext = BluePrintContext(completeServiceTemplate) + blueprintContext.rootPath = basePath + blueprintContext.entryDefinition = entityDefinitions + return blueprintContext + } } } \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/node_types.json b/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/node_types.json index 7330663c4..6a156ff16 100644 --- a/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/node_types.json +++ b/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/node_types.json @@ -37,9 +37,8 @@ "component-resource-assignment": { "description": "This is Resource Assignment Component API", "version": "1.0.0", - "properties": { - "request-id": { - "description": "Request Id used to store the generated configuration, in the database along with the template-name", + "attributes": { + "assignment-params": { "required": true, "type": "string" } diff --git a/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/resources_definition_types.json new file mode 100644 index 000000000..557f6efce --- /dev/null +++ b/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/resources_definition_types.json @@ -0,0 +1,62 @@ +{ + "service-instance-id": { + "name": "service-instance-id", + "tags": "service-instance-id, tosca.datatypes.Root, data_type", + "updated-by": "Singal, Kapil ", + "property": { + "description": "To be provided", + "type": "string" + }, + "sources": { + "input": { + "type": "source-input", + "properties": {} + } + } + }, + "vnf-id": { + "name": "vnf-id", + "tags": "vnf-id", + "updated-by": "Singal, Kapil ", + "property": { + "description": "vnf-id", + "type": "string" + }, + "sources": { + "input": { + "type": "source-input", + "properties": {} + } + } + }, + "vnf_name": { + "name": "vnf_name", + "tags": "vnf_name", + "updated-by": "Singal, Kapil ", + "property": { + "description": "vnf_name", + "type": "string" + }, + "sources": { + "mdsal": { + "type": "source-rest", + "properties": { + "type": "JSON", + "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf_name", + "path": "/param/0/value", + "input-key-mapping": { + "service-instance-id": "service-instance-id", + "vnf-id": "vnf-id" + }, + "output-key-mapping": { + "vnf_name": "value" + }, + "key-dependencies": [ + "service-instance-id", + "vnf-id" + ] + } + } + } + } +} \ No newline at end of file diff --git a/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/resources_dictionary_types.json b/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/resources_dictionary_types.json deleted file mode 100644 index 557f6efce..000000000 --- a/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/resources_dictionary_types.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "service-instance-id": { - "name": "service-instance-id", - "tags": "service-instance-id, tosca.datatypes.Root, data_type", - "updated-by": "Singal, Kapil ", - "property": { - "description": "To be provided", - "type": "string" - }, - "sources": { - "input": { - "type": "source-input", - "properties": {} - } - } - }, - "vnf-id": { - "name": "vnf-id", - "tags": "vnf-id", - "updated-by": "Singal, Kapil ", - "property": { - "description": "vnf-id", - "type": "string" - }, - "sources": { - "input": { - "type": "source-input", - "properties": {} - } - } - }, - "vnf_name": { - "name": "vnf_name", - "tags": "vnf_name", - "updated-by": "Singal, Kapil ", - "property": { - "description": "vnf_name", - "type": "string" - }, - "sources": { - "mdsal": { - "type": "source-rest", - "properties": { - "type": "JSON", - "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf_name", - "path": "/param/0/value", - "input-key-mapping": { - "service-instance-id": "service-instance-id", - "vnf-id": "vnf-id" - }, - "output-key-mapping": { - "vnf_name": "value" - }, - "key-dependencies": [ - "service-instance-id", - "vnf-id" - ] - } - } - } - } -} \ No newline at end of file diff --git a/components/model-catalog/definition-type/starter-type/node_type/component-resource-assignment.json b/components/model-catalog/definition-type/starter-type/node_type/component-resource-assignment.json index 51d70ede9..38fc97d70 100644 --- a/components/model-catalog/definition-type/starter-type/node_type/component-resource-assignment.json +++ b/components/model-catalog/definition-type/starter-type/node_type/component-resource-assignment.json @@ -1,6 +1,12 @@ { "description": "This is Resource Assignment Component API", "version": "1.0.0", + "attributes": { + "assignment-params": { + "required": true, + "type": "string" + } + }, "capabilities": { "component-node": { "type": "tosca.capabilities.Node" -- cgit 1.2.3-korg