summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt271
-rw-r--r--components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt37
-rw-r--r--components/core/src/test/resources/dictionary/dictionary_schema.json4
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/vFW_spinup.json46
-rw-r--r--components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/baseconfig-mapping.json2
-rw-r--r--components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/resources_definition_types.json2
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/image_name.json2
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/key_name.json2
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/mdsal-source.json2
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_id.json2
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/onap_private_subnet_id.json2
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/pub_key.json2
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/sample-licenses.json2
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/sample-mdsal-source.json2
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_0.json2
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_1.json2
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vnf-name.json2
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vnf_name.json2
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vpg_private_ip_0.json2
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vsn_private_ip_0.json2
-rw-r--r--components/resource-dict/load/resource_dictionary/mdsal-source.json2
-rw-r--r--components/resource-dict/load/resource_dictionary/vfw_private_ip_0.json2
-rw-r--r--components/resource-dict/load/resource_dictionary/vfw_private_ip_1.json2
-rw-r--r--components/resource-dict/load/resource_dictionary/vnf-name.json2
-rw-r--r--components/resource-dict/load/resource_dictionary/vnf_name.json2
-rw-r--r--components/resource-dict/load/resource_dictionary/vpg_private_ip_0.json2
-rw-r--r--components/resource-dict/load/resource_dictionary/vsn_private_ip_0.json2
-rw-r--r--components/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt2
-rw-r--r--components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/factory/ResourceSourceMappingFactoryTest.java2
-rw-r--r--components/resource-dict/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryTestUtils.kt2
-rw-r--r--components/resource-dict/src/test/resources/validation/cyclic.json10
-rw-r--r--components/resource-dict/src/test/resources/validation/duplicate.json10
-rw-r--r--components/resource-dict/src/test/resources/validation/success.json10
33 files changed, 218 insertions, 222 deletions
diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt
index bd19ae47..60318659 100644
--- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt
+++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt
@@ -62,20 +62,20 @@ interface BluePrintRuntimeService<T> {
fun setBluePrintError(bluePrintError: BluePrintError)
- /*
- Get the Node Type Definition for the Node Template, Then iterate Node Type Properties and resolve the expressing
- */
- fun resolveNodeTemplateProperties(nodeTemplateName: String): MutableMap<String, JsonNode>
+ fun resolveNodeTemplatePropertyAssignments(nodeTemplateName: String,
+ propertyDefinitions: MutableMap<String, PropertyDefinition>,
+ propertyAssignments: MutableMap<String, JsonNode>): MutableMap<String, JsonNode>
- fun resolveNodeTemplateCapabilityProperties(nodeTemplateName: String, capability: String): MutableMap<String,
- JsonNode>
+ fun resolveNodeTemplateProperties(nodeTemplateName: String): MutableMap<String, JsonNode>
- fun resolveNodeTemplateRequirementProperties(nodeTemplateName: String, requirementName: String): MutableMap<String,
+ fun resolveNodeTemplateCapabilityProperties(nodeTemplateName: String, capabilityName: String): MutableMap<String,
JsonNode>
- fun resolveNodeTemplateInterfaceOperationInputs(nodeTemplateName: String, interfaceName: String, operationName: String): MutableMap<String, JsonNode>
+ fun resolveNodeTemplateInterfaceOperationInputs(nodeTemplateName: String, interfaceName: String,
+ operationName: String): MutableMap<String, JsonNode>
- fun resolveNodeTemplateInterfaceOperationOutputs(nodeTemplateName: String, interfaceName: String, operationName: String): MutableMap<String, JsonNode>
+ fun resolveNodeTemplateInterfaceOperationOutputs(nodeTemplateName: String, interfaceName: String,
+ operationName: String): MutableMap<String, JsonNode>
fun resolveNodeTemplateArtifact(nodeTemplateName: String, artifactName: String): String
@@ -89,24 +89,24 @@ interface BluePrintRuntimeService<T> {
fun setNodeTemplateAttributeValue(nodeTemplateName: String, attributeName: String, value: JsonNode)
- fun setNodeTemplateOperationPropertyValue(nodeTemplateName: String, interfaceName: String, operationName: String, propertyName: String, value: JsonNode)
+ fun setNodeTemplateOperationPropertyValue(nodeTemplateName: String, interfaceName: String,
+ operationName: String, propertyName: String, value: JsonNode)
- fun setNodeTemplateOperationInputValue(nodeTemplateName: String, interfaceName: String, operationName: String, propertyName: String, value: JsonNode)
+ fun setNodeTemplateOperationInputValue(nodeTemplateName: String, interfaceName: String,
+ operationName: String, propertyName: String, value: JsonNode)
- fun setNodeTemplateOperationOutputValue(nodeTemplateName: String, interfaceName: String, operationName: String, propertyName: String, value: JsonNode)
+ fun setNodeTemplateOperationOutputValue(nodeTemplateName: String, interfaceName: String,
+ operationName: String, propertyName: String, value: JsonNode)
fun getInputValue(propertyName: String): JsonNode
- fun getNodeTemplateOperationOutputValue(nodeTemplateName: String, interfaceName: String, operationName: String, propertyName: String): JsonNode
+ fun getNodeTemplateOperationOutputValue(nodeTemplateName: String, interfaceName: String,
+ operationName: String, propertyName: String): JsonNode
fun getNodeTemplatePropertyValue(nodeTemplateName: String, propertyName: String): JsonNode?
fun getNodeTemplateAttributeValue(nodeTemplateName: String, attributeName: String): JsonNode?
- fun getNodeTemplateRequirementPropertyValue(nodeTemplateName: String, requirementName: String, propertyName: String): JsonNode?
-
- fun getNodeTemplateCapabilityPropertyValue(nodeTemplateName: String, capabilityName: String, propertyName: String): JsonNode?
-
fun assignInputs(jsonNode: JsonNode)
fun assignWorkflowInputs(workflowName: String, jsonNode: JsonNode)
@@ -190,22 +190,17 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl
this.bluePrintError = bluePrintError
}
- /*
- Get the Node Type Definition for the Node Template, Then iterate Node Type Properties and resolve the expressing
- */
- override fun resolveNodeTemplateProperties(nodeTemplateName: String): MutableMap<String, JsonNode> {
- log.info("resolveNodeTemplatePropertyValues for node template ({})", nodeTemplateName)
- val propertyAssignmentValue: MutableMap<String, JsonNode> = hashMapOf()
+ /**
+ * Resolve any property assignments for the node
+ */
+ override fun resolveNodeTemplatePropertyAssignments(nodeTemplateName: String,
+ propertyDefinitions: MutableMap<String, PropertyDefinition>,
+ propertyAssignments: MutableMap<String, JsonNode>)
+ : MutableMap<String, JsonNode> {
- val nodeTemplate: NodeTemplate = bluePrintContext.nodeTemplateByName(nodeTemplateName)
-
- val propertyAssignments: MutableMap<String, JsonNode> = nodeTemplate.properties!!
-
- // Get the Node Type Definitions
- val nodeTypeProperties: MutableMap<String, PropertyDefinition> = bluePrintContext.nodeTypeChainedProperties(nodeTemplate.type)!!
+ val propertyAssignmentValue: MutableMap<String, JsonNode> = hashMapOf()
- // Iterate Node Type Properties
- nodeTypeProperties.forEach { nodeTypePropertyName, nodeTypeProperty ->
+ propertyDefinitions.forEach { nodeTypePropertyName, nodeTypeProperty ->
// Get the Express or Value for the Node Template
val propertyAssignment: JsonNode? = propertyAssignments[nodeTypePropertyName]
@@ -213,38 +208,61 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl
if (propertyAssignment != null) {
// Resolve the Expressing
val propertyAssignmentExpression = PropertyAssignmentService(this)
- resolvedValue = propertyAssignmentExpression.resolveAssignmentExpression(nodeTemplateName, nodeTypePropertyName, propertyAssignment)
+ resolvedValue = propertyAssignmentExpression.resolveAssignmentExpression(nodeTemplateName,
+ nodeTypePropertyName, propertyAssignment)
} else {
// Assign default value to the Operation
- nodeTypeProperty.defaultValue?.let { defaultValue ->
- resolvedValue = defaultValue
+ nodeTypeProperty.defaultValue?.let {
+ resolvedValue = JacksonUtils.jsonNodeFromObject(nodeTypeProperty.defaultValue!!)
}
}
// Set for Return of method
propertyAssignmentValue[nodeTypePropertyName] = resolvedValue
}
- log.info("resolved property definition for node template ({}), values ({})", nodeTemplateName, propertyAssignmentValue)
return propertyAssignmentValue
}
+ override fun resolveNodeTemplateProperties(nodeTemplateName: String): MutableMap<String, JsonNode> {
+ log.info("resolveNodeTemplatePropertyValues for node template ({})", nodeTemplateName)
+
+ val nodeTemplate: NodeTemplate = bluePrintContext.nodeTemplateByName(nodeTemplateName)
+
+ val propertyAssignments: MutableMap<String, JsonNode> = nodeTemplate.properties!!
+
+ // Get the Node Type Definitions
+ val nodeTypePropertieDefinitions: MutableMap<String, PropertyDefinition> = bluePrintContext
+ .nodeTypeChainedProperties(nodeTemplate.type)!!
+
+ /**
+ * Resolve the NodeTemplate Property Assignment Values.
+ */
+ return resolveNodeTemplatePropertyAssignments(nodeTemplateName, nodeTypePropertieDefinitions,
+ propertyAssignments)
+ }
+
override fun resolveNodeTemplateCapabilityProperties(nodeTemplateName: String, capabilityName: String):
MutableMap<String, JsonNode> {
log.info("resolveNodeTemplateCapabilityProperties for node template($nodeTemplateName) capability " +
"($capabilityName)")
- TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
- }
+ val nodeTemplate: NodeTemplate = bluePrintContext.nodeTemplateByName(nodeTemplateName)
+
+ val propertyAssignments = nodeTemplate.capabilities?.get(capabilityName)?.properties ?: hashMapOf()
- override fun resolveNodeTemplateRequirementProperties(nodeTemplateName: String, requirementName: String): MutableMap<String, JsonNode> {
- log.info("resolveNodeTemplateRequirementProperties for node template($nodeTemplateName) requirement ($requirementName)")
- TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
+ val propertyDefinitions = bluePrintContext.nodeTemplateNodeType(nodeTemplateName)
+ .capabilities?.get(capabilityName)?.properties ?: hashMapOf()
+
+ /**
+ * Resolve the Capability Property Assignment Values.
+ */
+ return resolveNodeTemplatePropertyAssignments(nodeTemplateName, propertyDefinitions,
+ propertyAssignments)
}
override fun resolveNodeTemplateInterfaceOperationInputs(nodeTemplateName: String,
- interfaceName: String, operationName: String): MutableMap<String, JsonNode> {
- log.info("resolveNodeTemplateInterfaceOperationInputs for node template ({}),interface name ({}), " +
- "operationName({})", nodeTemplateName, interfaceName, operationName)
-
- val propertyAssignmentValue: MutableMap<String, JsonNode> = hashMapOf()
+ interfaceName: String,
+ operationName: String): MutableMap<String, JsonNode> {
+ log.info("resolveNodeTemplateInterfaceOperationInputs for node template ($nodeTemplateName),interface name " +
+ "($interfaceName), operationName($operationName)")
val propertyAssignments: MutableMap<String, JsonNode> =
bluePrintContext.nodeTemplateInterfaceOperationInputs(nodeTemplateName, interfaceName, operationName)
@@ -256,40 +274,22 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl
bluePrintContext.nodeTypeInterfaceOperationInputs(nodeTypeName, interfaceName, operationName)
?: hashMapOf()
- log.info("input definition for node template ({}), values ({})", nodeTemplateName, propertyAssignments)
+ log.info("input definition for node template ($nodeTemplateName), values ($propertyAssignments)")
- // Iterate Node Type Properties
- nodeTypeInterfaceOperationInputs.forEach { nodeTypePropertyName, nodeTypeProperty ->
- // Get the Express or Value for the Node Template
- val propertyAssignment: JsonNode? = propertyAssignments[nodeTypePropertyName]
+ /**
+ * Resolve the Property Input Assignment Values.
+ */
+ return resolveNodeTemplatePropertyAssignments(nodeTemplateName, nodeTypeInterfaceOperationInputs,
+ propertyAssignments)
- var resolvedValue: JsonNode = NullNode.getInstance()
- if (propertyAssignment != null) {
- // Resolve the Expressing
- val propertyAssignmentExpression = PropertyAssignmentService(this)
- resolvedValue = propertyAssignmentExpression.resolveAssignmentExpression(nodeTemplateName, nodeTypePropertyName, propertyAssignment)
- } else {
- // Assign default value to the Operation
- nodeTypeProperty.defaultValue?.let {
- resolvedValue = JacksonUtils.jsonNodeFromObject(nodeTypeProperty.defaultValue!!)
- }
- }
- // Set for Return of method
- propertyAssignmentValue[nodeTypePropertyName] = resolvedValue
- }
- log.trace("resolved input assignments for node template ({}), values ({})", nodeTemplateName,
- propertyAssignmentValue)
-
- return propertyAssignmentValue
}
override fun resolveNodeTemplateInterfaceOperationOutputs(nodeTemplateName: String,
- interfaceName: String, operationName: String): MutableMap<String, JsonNode> {
- log.info("resolveNodeTemplateInterfaceOperationOutputs for node template ({}),interface name ({}), " +
- "operationName({})", nodeTemplateName, interfaceName, operationName)
-
- val propertyAssignmentValue: MutableMap<String, JsonNode> = hashMapOf()
+ interfaceName: String,
+ operationName: String): MutableMap<String, JsonNode> {
+ log.info("resolveNodeTemplateInterfaceOperationOutputs for node template ($nodeTemplateName),interface name " +
+ "($interfaceName), operationName($operationName)")
val propertyAssignments: MutableMap<String, JsonNode> =
bluePrintContext.nodeTemplateInterfaceOperationOutputs(nodeTemplateName, interfaceName, operationName)
@@ -300,30 +300,15 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl
val nodeTypeInterfaceOperationOutputs: MutableMap<String, PropertyDefinition> =
bluePrintContext.nodeTypeInterfaceOperationOutputs(nodeTypeName, interfaceName, operationName)
?: hashMapOf()
-
- // Iterate Node Type Properties
- nodeTypeInterfaceOperationOutputs.forEach { nodeTypePropertyName, nodeTypeProperty ->
-
- // Get the Express or Value for the Node Template
- val propertyAssignment: JsonNode? = propertyAssignments[nodeTypePropertyName]
-
- var resolvedValue: JsonNode = NullNode.getInstance()
- if (propertyAssignment != null) {
- // Resolve the Expressing
- val propertyAssignmentExpression = PropertyAssignmentService(this)
- resolvedValue = propertyAssignmentExpression.resolveAssignmentExpression(nodeTemplateName, nodeTypePropertyName, propertyAssignment)
- } else {
- // Assign default value to the Operation
- nodeTypeProperty.defaultValue?.let {
- resolvedValue = JacksonUtils.jsonNodeFromObject(nodeTypeProperty.defaultValue!!)
- }
- }
- // Set for Return of method
- propertyAssignmentValue[nodeTypePropertyName] = resolvedValue
-
- // Store operation output values into context
- setNodeTemplateOperationOutputValue(nodeTemplateName, interfaceName, operationName, nodeTypePropertyName, resolvedValue)
- log.trace("resolved output assignments for node template ({}), property name ({}), value ({})", nodeTemplateName, nodeTypePropertyName, resolvedValue)
+ /**
+ * Resolve the Property Output Assignment Values.
+ */
+ val propertyAssignmentValue = resolveNodeTemplatePropertyAssignments(nodeTemplateName,
+ nodeTypeInterfaceOperationOutputs, propertyAssignments)
+
+ // Store operation output values into context
+ propertyAssignmentValue.forEach { key, value ->
+ setNodeTemplateOperationOutputValue(nodeTemplateName, interfaceName, operationName, key, value)
}
return propertyAssignmentValue
}
@@ -338,12 +323,11 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl
val nodeTemplate = bluePrintContext.nodeTemplateByName(nodeTemplateName)
return nodeTemplate.artifacts?.get(artifactName)
- ?: throw BluePrintProcessorException(String.format("failed to get artifat definition {} from the node template"
- , artifactName))
+ ?: throw BluePrintProcessorException("failed to get artifat definition($artifactName) from the node " +
+ "template")
}
-
override fun setInputValue(propertyName: String, propertyDefinition: PropertyDefinition, value: JsonNode) {
val path = StringBuilder(BluePrintConstants.PATH_INPUTS)
.append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
@@ -351,8 +335,10 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl
put(path, value)
}
- override fun setWorkflowInputValue(workflowName: String, propertyName: String, propertyDefinition: PropertyDefinition, value: JsonNode) {
- val path: String = StringBuilder(BluePrintConstants.PATH_NODE_WORKFLOWS).append(BluePrintConstants.PATH_DIVIDER).append(workflowName)
+ override fun setWorkflowInputValue(workflowName: String, propertyName: String,
+ propertyDefinition: PropertyDefinition, value: JsonNode) {
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_WORKFLOWS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(workflowName)
.append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_INPUTS)
.append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)
.append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
@@ -361,7 +347,8 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl
override fun setNodeTemplatePropertyValue(nodeTemplateName: String, propertyName: String, value: JsonNode) {
- val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES).append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
.append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)
.append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
put(path, value)
@@ -369,7 +356,8 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl
override fun setNodeTemplateAttributeValue(nodeTemplateName: String, attributeName: String, value: JsonNode) {
- val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES).append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
.append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_ATTRIBUTES)
.append(BluePrintConstants.PATH_DIVIDER).append(attributeName).toString()
put(path, value)
@@ -377,31 +365,42 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl
override fun setNodeTemplateOperationPropertyValue(nodeTemplateName: String, interfaceName: String, operationName: String, propertyName: String,
value: JsonNode) {
- val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES).append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
- .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_INTERFACES).append(BluePrintConstants.PATH_DIVIDER).append(interfaceName)
- .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_OPERATIONS).append(BluePrintConstants.PATH_DIVIDER).append(operationName)
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_INTERFACES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(interfaceName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_OPERATIONS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(operationName)
.append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)
.append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
log.trace("setting operation property path ({}), values ({})", path, value)
put(path, value)
}
- override fun setNodeTemplateOperationInputValue(nodeTemplateName: String, interfaceName: String, operationName: String, propertyName: String,
+ override fun setNodeTemplateOperationInputValue(nodeTemplateName: String, interfaceName: String,
+ operationName: String, propertyName: String,
value: JsonNode) {
- val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES).append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
- .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_INTERFACES).append(BluePrintConstants.PATH_DIVIDER).append(interfaceName)
- .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_OPERATIONS).append(BluePrintConstants.PATH_DIVIDER).append(operationName)
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_INTERFACES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(interfaceName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_OPERATIONS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(operationName)
.append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_INPUTS)
.append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)
.append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
put(path, value)
}
- override fun setNodeTemplateOperationOutputValue(nodeTemplateName: String, interfaceName: String, operationName: String, propertyName: String,
+ override fun setNodeTemplateOperationOutputValue(nodeTemplateName: String, interfaceName: String,
+ operationName: String, propertyName: String,
value: JsonNode) {
- val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES).append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
- .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_INTERFACES).append(BluePrintConstants.PATH_DIVIDER).append(interfaceName)
- .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_OPERATIONS).append(BluePrintConstants.PATH_DIVIDER).append(operationName)
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_INTERFACES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(interfaceName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_OPERATIONS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(operationName)
.append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_OUTPUTS)
.append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)
.append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
@@ -415,47 +414,36 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl
return getJsonNode(path)
}
- override fun getNodeTemplateOperationOutputValue(nodeTemplateName: String, interfaceName: String, operationName: String, propertyName: String): JsonNode {
- val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES).append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
- .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_INTERFACES).append(BluePrintConstants.PATH_DIVIDER).append(interfaceName)
- .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_OPERATIONS).append(BluePrintConstants.PATH_DIVIDER).append(operationName)
- .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_OUTPUTS).append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)
+ override fun getNodeTemplateOperationOutputValue(nodeTemplateName: String, interfaceName: String,
+ operationName: String, propertyName: String): JsonNode {
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_INTERFACES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(interfaceName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_OPERATIONS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(operationName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_OUTPUTS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)
.append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
return getJsonNode(path)
}
override fun getNodeTemplatePropertyValue(nodeTemplateName: String, propertyName: String): JsonNode {
- val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES).append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
.append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)
.append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
return getJsonNode(path)
}
override fun getNodeTemplateAttributeValue(nodeTemplateName: String, attributeName: String): JsonNode {
- val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES).append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
.append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_ATTRIBUTES)
.append(BluePrintConstants.PATH_DIVIDER).append(attributeName).toString()
return getJsonNode(path)
}
- override fun getNodeTemplateRequirementPropertyValue(nodeTemplateName: String, requirementName: String, propertyName:
- String): JsonNode {
- val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES).append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
- .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_REQUIREMENTS).append(requirementName)
- .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)
- .append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
- return getJsonNode(path)
- }
-
- override fun getNodeTemplateCapabilityPropertyValue(nodeTemplateName: String, capabilityName: String, propertyName:
- String): JsonNode {
- val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES).append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
- .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_CAPABILITIES).append(capabilityName)
- .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)
- .append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
- return getJsonNode(path)
- }
-
override fun assignInputs(jsonNode: JsonNode) {
log.info("assignInputs from input JSON ({})", jsonNode.toString())
bluePrintContext.inputs?.forEach { propertyName, property ->
@@ -493,7 +481,8 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl
override fun getJsonForNodeTemplateAttributeProperties(nodeTemplateName: String, keys: List<String>): JsonNode {
val jsonNode: ObjectNode = jacksonObjectMapper().createObjectNode()
- val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES).append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
.append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_ATTRIBUTES)
.append(BluePrintConstants.PATH_DIVIDER).toString()
store.keys.filter {
diff --git a/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt b/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
index c01b14b3..02148f08 100644
--- a/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
+++ b/components/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
@@ -39,7 +39,7 @@ class BluePrintRuntimeServiceTest {
private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
@Test
- fun testResolveNodeTemplateProperties() {
+ fun `test Resolve NodeTemplate Properties`() {
log.info("************************ testResolveNodeTemplateProperties **********************")
val bluePrintRuntimeService = getBluePrintRuntimeService()
@@ -49,25 +49,31 @@ class BluePrintRuntimeServiceTest {
val inputNode: JsonNode = JacksonUtils.jsonNodeFromFile(inputDataPath)
bluePrintRuntimeService.assignInputs(inputNode)
- val propContext: MutableMap<String, JsonNode> = bluePrintRuntimeService.resolveNodeTemplateProperties("activate-process")
+ val propContext: MutableMap<String, JsonNode> = bluePrintRuntimeService
+ .resolveNodeTemplateProperties("activate-process")
assertNotNull(propContext, "Failed to populate interface property values")
}
@Test
- fun testResolveNodeTemplateCapabilityProperties() {
+ fun `test resolve NodeTemplate Capability Properties`() {
log.info("************************ testResolveNodeTemplateRequirementProperties **********************")
- //TODO
- }
+ val bluePrintRuntimeService = getBluePrintRuntimeService()
- @Test
- fun testResolveNodeTemplateRequirementProperties() {
- log.info("************************ testResolveNodeTemplateRequirementProperties **********************")
- //TODO
+ val executionContext = bluePrintRuntimeService.getExecutionContext()
+
+ BluePrintRuntimeUtils.assignInputsFromClassPathFile(bluePrintRuntimeService.bluePrintContext(),
+ "data/default-context.json", executionContext)
+
+ val capProperties = bluePrintRuntimeService.resolveNodeTemplateCapabilityProperties("sample-netconf-device",
+ "netconf")
+ assertNotNull(capProperties, "Failed to populate capability property values")
+ assertEquals(capProperties["target-ip-address"], JacksonUtils.jsonNodeFromObject("localhost"), "Failed to populate parameter target-ip-address")
+ assertEquals(capProperties["port-number"], JacksonUtils.jsonNodeFromObject(830), "Failed to populate parameter port-number")
}
@Test
- fun testResolveNodeTemplateInterfaceOperationInputs() {
+ fun `test Resolve NodeTemplate Interface Operation Inputs`() {
log.info("************************ testResolveNodeTemplateInterfaceOperationInputs **********************")
val bluePrintRuntimeService = getBluePrintRuntimeService()
@@ -77,16 +83,17 @@ class BluePrintRuntimeServiceTest {
BluePrintRuntimeUtils.assignInputsFromClassPathFile(bluePrintRuntimeService.bluePrintContext(),
"data/default-context.json", executionContext)
- val inContext: MutableMap<String, JsonNode> = bluePrintRuntimeService.resolveNodeTemplateInterfaceOperationInputs("resource-assignment",
- "ResourceAssignmentComponent", "process")
+ val inContext: MutableMap<String, JsonNode> = bluePrintRuntimeService
+ .resolveNodeTemplateInterfaceOperationInputs("resource-assignment",
+ "ResourceAssignmentComponent", "process")
assertNotNull(inContext, "Failed to populate interface input property values")
assertEquals(inContext["action-name"], JacksonUtils.jsonNodeFromObject("sample-action"), "Failed to populate parameter action-name")
assertEquals(inContext["request-id"], JacksonUtils.jsonNodeFromObject("12345"), "Failed to populate parameter action-name")
- }
+ }
@Test
- fun testResolveNodeTemplateInterfaceOperationOutputs() {
+ fun `test Resolve NodeTemplate Interface Operation Outputs`() {
log.info("************************ testResolveNodeTemplateInterfaceOperationOutputs **********************")
val bluePrintRuntimeService = getBluePrintRuntimeService()
@@ -107,7 +114,7 @@ class BluePrintRuntimeServiceTest {
}
@Test
- fun testNodeTemplateContextProperty() {
+ fun `test NodeTemplate Context Property`() {
log.info("************************ testNodeTemplateContextProperty **********************")
val bluePrintRuntimeService = getBluePrintRuntimeService()
diff --git a/components/core/src/test/resources/dictionary/dictionary_schema.json b/components/core/src/test/resources/dictionary/dictionary_schema.json
index f9ef9eee..51db5f51 100644
--- a/components/core/src/test/resources/dictionary/dictionary_schema.json
+++ b/components/core/src/test/resources/dictionary/dictionary_schema.json
@@ -54,7 +54,7 @@
"aai": {
"type": "any"
},
- "mdsal": {
+ "primary-config-data": {
"type": "object",
"properties": {
"path": {
@@ -188,7 +188,7 @@
}
}
},
- "mdsal": {
+ "primary-config-data": {
"type": "object",
"properties": {
"names": {
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/vFW_spinup.json b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/vFW_spinup.json
index 13847bbb..4484d550 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/vFW_spinup.json
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/vFW_spinup.json
@@ -667,7 +667,7 @@
},
"input-param": false,
"dictionary-name": "vnf-name",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -982,7 +982,7 @@
},
"input-param": false,
"dictionary-name": "image_name",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -1007,7 +1007,7 @@
},
"input-param": false,
"dictionary-name": "key_name",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -1032,7 +1032,7 @@
},
"input-param": false,
"dictionary-name": "pub_key",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -1057,7 +1057,7 @@
},
"input-param": false,
"dictionary-name": "onap_private_net_id",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -1082,7 +1082,7 @@
},
"input-param": false,
"dictionary-name": "onap_private_subnet_id",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -1462,7 +1462,7 @@
},
"input-param": false,
"dictionary-name": "vnf-name",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -1777,7 +1777,7 @@
},
"input-param": false,
"dictionary-name": "image_name",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -1802,7 +1802,7 @@
},
"input-param": false,
"dictionary-name": "key_name",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -1827,7 +1827,7 @@
},
"input-param": false,
"dictionary-name": "pub_key",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -1852,7 +1852,7 @@
},
"input-param": false,
"dictionary-name": "onap_private_net_id",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -1877,7 +1877,7 @@
},
"input-param": false,
"dictionary-name": "onap_private_subnet_id",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -1950,7 +1950,7 @@
},
"input-param": false,
"dictionary-name": "vfw_private_ip_0",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -1975,7 +1975,7 @@
},
"input-param": false,
"dictionary-name": "vsn_private_ip_0",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -2050,7 +2050,7 @@
},
"input-param": false,
"dictionary-name": "vpg_private_ip_0",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -2284,7 +2284,7 @@
},
"input-param": false,
"dictionary-name": "vnf-name",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -2574,7 +2574,7 @@
},
"input-param": false,
"dictionary-name": "image_name",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -2625,7 +2625,7 @@
},
"input-param": false,
"dictionary-name": "key_name",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -2650,7 +2650,7 @@
},
"input-param": false,
"dictionary-name": "pub_key",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -2675,7 +2675,7 @@
},
"input-param": false,
"dictionary-name": "onap_private_net_id",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -2700,7 +2700,7 @@
},
"input-param": false,
"dictionary-name": "onap_private_subnet_id",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -2848,7 +2848,7 @@
},
"input-param": false,
"dictionary-name": "vfw_private_ip_1",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
@@ -3250,7 +3250,7 @@
},
"input-param": false,
"dictionary-name": "vnf-name",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
diff --git a/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/baseconfig-mapping.json b/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/baseconfig-mapping.json
index c457086c..67d2a914 100644
--- a/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/baseconfig-mapping.json
+++ b/components/model-catalog/blueprint-model/starter-blueprint/baseconfiguration/Definitions/baseconfig-mapping.json
@@ -27,7 +27,7 @@
"type": "string"
},
"dictionary-name": "vnf_name",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"service-instance-id",
"vnf-id"
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
index 557f6efc..c8871214 100644
--- 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
@@ -38,7 +38,7 @@
"type": "string"
},
"sources": {
- "mdsal": {
+ "primary-config-data": {
"type": "source-rest",
"properties": {
"type": "JSON",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/image_name.json b/components/model-catalog/resource-dictionary/starter-dictionary/image_name.json
index 37ef5ae1..57a0ef39 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/image_name.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/image_name.json
@@ -10,7 +10,7 @@
"input": {
"type": "source-input"
},
- "mdsal": {
+ "primary-config-data": {
"type": "source-rest",
"properties": {
"type": "JSON",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/key_name.json b/components/model-catalog/resource-dictionary/starter-dictionary/key_name.json
index 1f1b3e65..6eb8d929 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/key_name.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/key_name.json
@@ -10,7 +10,7 @@
"input": {
"type": "source-input"
},
- "mdsal": {
+ "primary-config-data": {
"type": "source-rest",
"properties": {
"type": "JSON",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/mdsal-source.json b/components/model-catalog/resource-dictionary/starter-dictionary/mdsal-source.json
index 300a71f1..67661ecd 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/mdsal-source.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/mdsal-source.json
@@ -7,7 +7,7 @@
},
"updated-by": "brindasanth@onap.com",
"sources": {
- "mdsal": {
+ "primary-config-data": {
"type": "source-rest",
"properties": {
"type": "JSON",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_id.json b/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_id.json
index bb70fe3c..3dd74f7d 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_id.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_id.json
@@ -10,7 +10,7 @@
"input": {
"type": "source-input"
},
- "mdsal": {
+ "primary-config-data": {
"type": "source-rest",
"properties": {
"type": "JSON",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_subnet_id.json b/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_subnet_id.json
index d38ceb49..6cb22c3d 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_subnet_id.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_subnet_id.json
@@ -10,7 +10,7 @@
"input": {
"type": "source-input"
},
- "mdsal": {
+ "primary-config-data": {
"type": "source-rest",
"properties": {
"type": "JSON",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/pub_key.json b/components/model-catalog/resource-dictionary/starter-dictionary/pub_key.json
index ce6c2f2a..fe172caf 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/pub_key.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/pub_key.json
@@ -10,7 +10,7 @@
"input": {
"type": "source-input"
},
- "mdsal": {
+ "primary-config-data": {
"type": "source-rest",
"properties": {
"type": "JSON",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/sample-licenses.json b/components/model-catalog/resource-dictionary/starter-dictionary/sample-licenses.json
index 5834dd49..c0f78ac5 100644
--- a/components/model-catalog/resource-dictionary/starter-dictionary/sample-licenses.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/sample-licenses.json
@@ -11,7 +11,7 @@
},
"updated-by": "brindasanth@onap.com",
"sources": {
- "mdsal": {
+ "primary-config-data": {
"type": "source-rest",
"properties": {
"type": "JSON",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/sample-mdsal-source.json b/components/model-catalog/resource-dictionary/starter-dictionary/sample-mdsal-source.json
index 25464d3f..75d7ca05 100644
--- a/components/model-catalog/resource-dictionary/starter-dictionary/sample-mdsal-source.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/sample-mdsal-source.json
@@ -7,7 +7,7 @@
},
"updated-by": "brindasanth@onap.com",
"sources": {
- "mdsal": {
+ "primary-config-data": {
"type": "source-rest",
"properties": {
"type": "JSON",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_0.json
index 71a4df2c..4c227f91 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_0.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_0.json
@@ -12,7 +12,7 @@
"properties" : {
}
},
- "mdsal" : {
+ "primary-config-data" : {
"type" : "source-rest",
"properties" : {
"type" : "JSON",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_1.json b/components/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_1.json
index 481edae8..0df08c00 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_1.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_1.json
@@ -12,7 +12,7 @@
"properties" : {
}
},
- "mdsal" : {
+ "primary-config-data" : {
"type" : "source-rest",
"properties" : {
"type" : "JSON",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vnf-name.json b/components/model-catalog/resource-dictionary/starter-dictionary/vnf-name.json
index 89b3dc1c..4c0320ac 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vnf-name.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vnf-name.json
@@ -7,7 +7,7 @@
"type" : "string"
},
"sources" : {
- "mdsal" : {
+ "primary-config-data" : {
"type" : "source-rest",
"properties" : {
"type" : "JSON",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vnf_name.json b/components/model-catalog/resource-dictionary/starter-dictionary/vnf_name.json
index c55f1c18..e9d8a3b4 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vnf_name.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vnf_name.json
@@ -7,7 +7,7 @@
"type" : "string"
},
"sources" : {
- "mdsal" : {
+ "primary-config-data" : {
"type" : "source-rest",
"properties" : {
"type" : "JSON",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vpg_private_ip_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/vpg_private_ip_0.json
index 13d89993..586aa0c9 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vpg_private_ip_0.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vpg_private_ip_0.json
@@ -12,7 +12,7 @@
"properties" : {
}
},
- "mdsal" : {
+ "primary-config-data" : {
"type" : "source-rest",
"properties" : {
"type" : "JSON",
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vsn_private_ip_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/vsn_private_ip_0.json
index fcd6d8d5..1fe47971 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vsn_private_ip_0.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vsn_private_ip_0.json
@@ -12,7 +12,7 @@
"properties" : {
}
},
- "mdsal" : {
+ "primary-config-data" : {
"type" : "source-rest",
"properties" : {
"type" : "JSON",
diff --git a/components/resource-dict/load/resource_dictionary/mdsal-source.json b/components/resource-dict/load/resource_dictionary/mdsal-source.json
index b38986a4..fa72e5dc 100644
--- a/components/resource-dict/load/resource_dictionary/mdsal-source.json
+++ b/components/resource-dict/load/resource_dictionary/mdsal-source.json
@@ -7,7 +7,7 @@
},
"updated-by": "brindasanth@onap.com",
"sources": {
- "mdsal": {
+ "primary-config-data": {
"type": "source-rest",
"properties": {
"type": "JSON",
diff --git a/components/resource-dict/load/resource_dictionary/vfw_private_ip_0.json b/components/resource-dict/load/resource_dictionary/vfw_private_ip_0.json
index 7c8d4f4e..59f51516 100644
--- a/components/resource-dict/load/resource_dictionary/vfw_private_ip_0.json
+++ b/components/resource-dict/load/resource_dictionary/vfw_private_ip_0.json
@@ -13,7 +13,7 @@
"key" : "vfw_private_ip_0"
}
},
- "mdsal" : {
+ "primary-config-data" : {
"type" : "source-rest",
"properties" : {
"type" : "JSON",
diff --git a/components/resource-dict/load/resource_dictionary/vfw_private_ip_1.json b/components/resource-dict/load/resource_dictionary/vfw_private_ip_1.json
index 0553b8c3..6dda72f7 100644
--- a/components/resource-dict/load/resource_dictionary/vfw_private_ip_1.json
+++ b/components/resource-dict/load/resource_dictionary/vfw_private_ip_1.json
@@ -13,7 +13,7 @@
"key" : "vfw_private_ip_1"
}
},
- "mdsal" : {
+ "primary-config-data" : {
"type" : "source-rest",
"properties" : {
"type" : "JSON",
diff --git a/components/resource-dict/load/resource_dictionary/vnf-name.json b/components/resource-dict/load/resource_dictionary/vnf-name.json
index 47371d18..708030ee 100644
--- a/components/resource-dict/load/resource_dictionary/vnf-name.json
+++ b/components/resource-dict/load/resource_dictionary/vnf-name.json
@@ -7,7 +7,7 @@
"type" : "string"
},
"sources" : {
- "mdsal" : {
+ "primary-config-data" : {
"type" : "source-rest",
"properties" : {
"type" : "JSON",
diff --git a/components/resource-dict/load/resource_dictionary/vnf_name.json b/components/resource-dict/load/resource_dictionary/vnf_name.json
index 4617a264..3164367c 100644
--- a/components/resource-dict/load/resource_dictionary/vnf_name.json
+++ b/components/resource-dict/load/resource_dictionary/vnf_name.json
@@ -7,7 +7,7 @@
"type" : "string"
},
"sources" : {
- "mdsal" : {
+ "primary-config-data" : {
"type" : "source-rest",
"properties" : {
"type" : "JSON",
diff --git a/components/resource-dict/load/resource_dictionary/vpg_private_ip_0.json b/components/resource-dict/load/resource_dictionary/vpg_private_ip_0.json
index 912cfb9a..9bef3c79 100644
--- a/components/resource-dict/load/resource_dictionary/vpg_private_ip_0.json
+++ b/components/resource-dict/load/resource_dictionary/vpg_private_ip_0.json
@@ -13,7 +13,7 @@
"key" : "vpg_private_ip_0"
}
},
- "mdsal" : {
+ "primary-config-data" : {
"type" : "source-rest",
"properties" : {
"type" : "JSON",
diff --git a/components/resource-dict/load/resource_dictionary/vsn_private_ip_0.json b/components/resource-dict/load/resource_dictionary/vsn_private_ip_0.json
index bf987382..52a4542c 100644
--- a/components/resource-dict/load/resource_dictionary/vsn_private_ip_0.json
+++ b/components/resource-dict/load/resource_dictionary/vsn_private_ip_0.json
@@ -13,7 +13,7 @@
"key" : "vsn_private_ip_0"
}
},
- "mdsal" : {
+ "primary-config-data" : {
"type" : "source-rest",
"properties" : {
"type" : "JSON",
diff --git a/components/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt b/components/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt
index 0004b02f..aa06c9da 100644
--- a/components/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt
+++ b/components/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt
@@ -24,7 +24,7 @@ package org.onap.ccsdk.apps.controllerblueprints.resource.dict
object ResourceDictionaryConstants {
const val SOURCE_INPUT = "input"
const val SOURCE_DEFAULT = "default"
- const val SOURCE_MDSAL = "mdsal"
+ const val SOURCE_PRIMARY_CONFIG_DATA = "primary-config-data"
const val SOURCE_PRIMARY_DB = "primary-db"
const val MODEL_DIR_RESOURCE_DEFINITION: String = "resource_dictionary"
diff --git a/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/factory/ResourceSourceMappingFactoryTest.java b/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/factory/ResourceSourceMappingFactoryTest.java
index 3f5aef43..f11638e3 100644
--- a/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/factory/ResourceSourceMappingFactoryTest.java
+++ b/components/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/factory/ResourceSourceMappingFactoryTest.java
@@ -28,7 +28,7 @@ public class ResourceSourceMappingFactoryTest {
ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("primary-db", "source-primary-db");
ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("input", "source-input");
ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("default", "source-default");
- ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("mdsal", "source-rest");
+ ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("primary-config-data", "source-rest");
String nodeTypeName = ResourceSourceMappingFactory.INSTANCE.getRegisterSourceMapping("primary-db");
Assert.notNull(nodeTypeName, "Failed to get primary-db mapping");
diff --git a/components/resource-dict/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryTestUtils.kt b/components/resource-dict/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryTestUtils.kt
index 50e5c329..74ef6d6d 100644
--- a/components/resource-dict/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryTestUtils.kt
+++ b/components/resource-dict/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryTestUtils.kt
@@ -25,6 +25,6 @@ object ResourceDictionaryTestUtils {
ResourceSourceMappingFactory.registerSourceMapping("primary-db", "source-primary-db")
ResourceSourceMappingFactory.registerSourceMapping("input", "source-input")
ResourceSourceMappingFactory.registerSourceMapping("default", "source-default")
- ResourceSourceMappingFactory.registerSourceMapping("mdsal", "source-rest")
+ ResourceSourceMappingFactory.registerSourceMapping("primary-config-data", "source-rest")
}
} \ No newline at end of file
diff --git a/components/resource-dict/src/test/resources/validation/cyclic.json b/components/resource-dict/src/test/resources/validation/cyclic.json
index 7e6472f5..98cd1444 100644
--- a/components/resource-dict/src/test/resources/validation/cyclic.json
+++ b/components/resource-dict/src/test/resources/validation/cyclic.json
@@ -29,7 +29,7 @@
"required": true
},
"dictionary-name": "bundle-id",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"vnf-id"
]
@@ -42,7 +42,7 @@
"required": true
},
"dictionary-name": "bundle-ip",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"vnf-id"
]
@@ -54,7 +54,7 @@
"type": "string"
},
"dictionary-name": "bundle-mac",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"vnf-id",
"bundle-id"
@@ -67,7 +67,7 @@
"type": "string"
},
"dictionary-name": "managed-ip",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"loopback-ip"
]
@@ -90,7 +90,7 @@
"type": "string"
},
"dictionary-name": "managed-ip1",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"loopback-ip"
]
diff --git a/components/resource-dict/src/test/resources/validation/duplicate.json b/components/resource-dict/src/test/resources/validation/duplicate.json
index 28ab71fc..7581ff64 100644
--- a/components/resource-dict/src/test/resources/validation/duplicate.json
+++ b/components/resource-dict/src/test/resources/validation/duplicate.json
@@ -29,7 +29,7 @@
"required": true
},
"dictionary-name": "bundle-id",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"vnf-id"
]
@@ -42,7 +42,7 @@
"required": true
},
"dictionary-name": "bundle-ip",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"vnf-id"
]
@@ -54,7 +54,7 @@
"type": "string"
},
"dictionary-name": "bundle-mac",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"vnf-id",
"bundle-id"
@@ -67,7 +67,7 @@
"type": "string"
},
"dictionary-name": "bundle-mac",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"loopback-ip"
]
@@ -90,7 +90,7 @@
"type": "string"
},
"dictionary-name": "managed-ip1",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"loopback-ip"
]
diff --git a/components/resource-dict/src/test/resources/validation/success.json b/components/resource-dict/src/test/resources/validation/success.json
index 5d0e8980..486251d6 100644
--- a/components/resource-dict/src/test/resources/validation/success.json
+++ b/components/resource-dict/src/test/resources/validation/success.json
@@ -29,7 +29,7 @@
"required": true
},
"dictionary-name": "bundle-id",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"vnf-id"
]
@@ -42,7 +42,7 @@
"required": true
},
"dictionary-name": "bundle-ip",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"vnf-id"
]
@@ -54,7 +54,7 @@
"type": "string"
},
"dictionary-name": "bundle-mac",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"vnf-id",
"bundle-id"
@@ -67,7 +67,7 @@
"type": "string"
},
"dictionary-name": "managed-ip",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"loopback-ip"
]
@@ -90,7 +90,7 @@
"type": "string"
},
"dictionary-name": "managed-ip1",
- "dictionary-source": "mdsal",
+ "dictionary-source": "primary-config-data",
"dependencies": [
"loopback-ip"
]