aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints
diff options
context:
space:
mode:
authorDan Timoney <dt5972@att.com>2018-09-04 15:08:04 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-04 15:08:04 +0000
commit5aac0d09bd6e03657538cb87252c079baa67b810 (patch)
treeadd8846af93fa15231b4d205773fc879a1d0e953 /ms/controllerblueprints
parentadb3769d518bcd77b3f947e027cbffa8b7e89181 (diff)
parent8fa6853463959ccc7a2215b0f43d4822a2f630b6 (diff)
Merge "Controller Blueprints Microservice"
Diffstat (limited to 'ms/controllerblueprints')
-rw-r--r--ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt4
-rw-r--r--ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintEnhancerFactory.kt6
-rw-r--r--ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintParserFactory.kt8
-rw-r--r--ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt6
-rw-r--r--ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintEnhancerService.kt7
-rw-r--r--ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintExpressionService.kt36
-rw-r--r--ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintParserService.kt6
-rw-r--r--ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRepoService.kt6
-rw-r--r--ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt28
-rw-r--r--ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintValidatorService.kt32
-rw-r--r--ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/PropertyAssignmentService.kt12
-rw-r--r--ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintMetadataUtils.kt10
-rw-r--r--ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintRuntimeUtils.kt10
-rw-r--r--ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt5
-rw-r--r--ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/ResourceResolverUtils.kt10
-rw-r--r--ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/ServiceTemplateUtils.kt2
-rw-r--r--ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContextTest.kt8
-rw-r--r--ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintParserFactoryTest.kt8
-rw-r--r--ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt18
-rw-r--r--ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintValidatorDefaultServiceTest.kt8
-rw-r--r--ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtilsTest.kt8
-rw-r--r--ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt2
-rw-r--r--ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDefinition.kt1
23 files changed, 122 insertions, 119 deletions
diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt
index b78a594f..1664f792 100644
--- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt
+++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt
@@ -185,10 +185,10 @@ class AttributeDefinition {
var description: String? = null
lateinit var type: String
@JsonProperty("default")
- var _default: JsonNode? = null
+ var defaultValue: JsonNode? = null
var status: String? = null
@JsonProperty("entry_schema")
- var entry_schema: String? = null
+ var entrySchema: String? = null
}
/*
diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintEnhancerFactory.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintEnhancerFactory.kt
index 2a296359..d796597b 100644
--- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintEnhancerFactory.kt
+++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintEnhancerFactory.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.apps.controllerblueprints.core.factory
import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintEnhancerService
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
/**
@@ -28,7 +28,7 @@ import org.slf4j.LoggerFactory
*/
object BluePrintEnhancerFactory {
- private val logger: Logger = LoggerFactory.getLogger(this::class.toString())
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
var bluePrintEnhancerServices: MutableMap<String, BluePrintEnhancerService> = HashMap()
diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintParserFactory.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintParserFactory.kt
index 10eb0e67..83233abc 100644
--- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintParserFactory.kt
+++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintParserFactory.kt
@@ -18,8 +18,8 @@ package org.onap.ccsdk.apps.controllerblueprints.core.factory
import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintParserDefaultService
import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintParserService
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
/**
*
@@ -28,12 +28,12 @@ import org.slf4j.LoggerFactory
*/
object BluePrintParserFactory {
- private val logger: Logger = LoggerFactory.getLogger(this::class.toString())
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
var bluePrintParserServices: MutableMap<String, BluePrintParserService> = HashMap()
init {
- logger.info("Initialised default BluePrintParser Service ")
+ log.info("Initialised default BluePrintParser Service ")
bluePrintParserServices.put(org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants.TYPE_DEFAULT, BluePrintParserDefaultService())
}
diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt
index dde1d58c..875cbea6 100644
--- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt
+++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt
@@ -16,12 +16,12 @@
package org.onap.ccsdk.apps.controllerblueprints.core.service
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
import com.fasterxml.jackson.databind.JsonNode
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.apps.controllerblueprints.core.data.*
import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
/**
*
*
@@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory
*/
class BluePrintContext(serviceTemplate: ServiceTemplate) {
- private val logger: Logger = LoggerFactory.getLogger(this::class.toString())
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
val serviceTemplate: ServiceTemplate = serviceTemplate
diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintEnhancerService.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintEnhancerService.kt
index 8bc0e6e0..c90d6597 100644
--- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintEnhancerService.kt
+++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintEnhancerService.kt
@@ -21,8 +21,8 @@ import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.apps.controllerblueprints.core.data.*
import org.onap.ccsdk.apps.controllerblueprints.core.format
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
import java.io.Serializable
/**
@@ -47,7 +47,7 @@ interface BluePrintEnhancerService : Serializable {
open class BluePrintEnhancerDefaultService(val bluePrintRepoService: BluePrintRepoService) : BluePrintEnhancerService {
- private val log: Logger = LoggerFactory.getLogger(BluePrintEnhancerDefaultService::class.java)
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(BluePrintEnhancerDefaultService::class.toString())
lateinit var serviceTemplate: ServiceTemplate
@@ -189,7 +189,6 @@ open class BluePrintEnhancerDefaultService(val bluePrintRepoService: BluePrintRe
open fun enrichPropertyDefinition(propertyName: String, propertyDefinition: PropertyDefinition) {
val propertyType = propertyDefinition.type
- ?: throw BluePrintException(format("Property type is missing for property : {}", propertyName))
if (BluePrintTypes.validPrimitiveTypes().contains(propertyType)) {
} else if (BluePrintTypes.validCollectionTypes().contains(propertyType)) {
diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintExpressionService.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintExpressionService.kt
index 36959c46..19d515e0 100644
--- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintExpressionService.kt
+++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintExpressionService.kt
@@ -23,15 +23,15 @@ import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.apps.controllerblueprints.core.data.*
import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
/**
*
*
* @author Brinda Santh
*/
object BluePrintExpressionService {
- val logger: Logger = LoggerFactory.getLogger(this::class.toString())
+ val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
@JvmStatic
fun getExpressionData(propertyAssignment: Any): ExpressionData {
@@ -41,7 +41,7 @@ object BluePrintExpressionService {
@JvmStatic
fun getExpressionData(propertyAssignmentNode: JsonNode): ExpressionData {
- logger.trace("Assignment Data/Expression : {}", propertyAssignmentNode)
+ log.trace("Assignment Data/Expression : {}", propertyAssignmentNode)
val expressionData = ExpressionData(valueNode = propertyAssignmentNode)
if (propertyAssignmentNode is ObjectNode) {
@@ -89,18 +89,20 @@ object BluePrintExpressionService {
var reqOrCapEntityName: String? = null
var propertyName = ""
var subProperty: String? = null
- if (arrayNode.size() == 2) {
- propertyName = arrayNode[1].textValue()
- } else if (arrayNode.size() == 3) {
- reqOrCapEntityName = arrayNode[1].textValue()
- propertyName = arrayNode[2].textValue()
- } else if (arrayNode.size() > 3) {
- reqOrCapEntityName = arrayNode[1].textValue()
- propertyName = arrayNode[2].textValue()
- val propertyPaths: List<String> = arrayNode.filterIndexed { index, obj ->
- index >= 3
- }.map { it.textValue() }
- subProperty = propertyPaths.joinToString("/")
+ when {
+ arrayNode.size() == 2 -> propertyName = arrayNode[1].textValue()
+ arrayNode.size() == 3 -> {
+ reqOrCapEntityName = arrayNode[1].textValue()
+ propertyName = arrayNode[2].textValue()
+ }
+ arrayNode.size() > 3 -> {
+ reqOrCapEntityName = arrayNode[1].textValue()
+ propertyName = arrayNode[2].textValue()
+ val propertyPaths: List<String> = arrayNode.filterIndexed { index, obj ->
+ index >= 3
+ }.map { it.textValue() }
+ subProperty = propertyPaths.joinToString("/")
+ }
}
return PropertyExpression(modelableEntityName = arrayNode[0].asText(),
@@ -120,7 +122,7 @@ object BluePrintExpressionService {
}
var reqOrCapEntityName: String? = null
- var propertyName: String = ""
+ var propertyName = ""
var subProperty: String? = null
if (arrayNode.size() == 2) {
propertyName = arrayNode[1].textValue()
diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintParserService.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintParserService.kt
index 3b917202..43267ff1 100644
--- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintParserService.kt
+++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintParserService.kt
@@ -18,8 +18,8 @@ package org.onap.ccsdk.apps.controllerblueprints.core.service
import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate
import org.onap.ccsdk.apps.controllerblueprints.core.utils.ServiceTemplateUtils
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
import java.io.File
import java.io.Serializable
@@ -39,7 +39,7 @@ interface BluePrintParserService : Serializable {
class BluePrintParserDefaultService : BluePrintParserService {
- private val logger: Logger = LoggerFactory.getLogger(this::class.toString())
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
var basePath : String = javaClass.classLoader.getResource(".").path
diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRepoService.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRepoService.kt
index 8c254732..8d2557cd 100644
--- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRepoService.kt
+++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRepoService.kt
@@ -24,8 +24,8 @@ import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.apps.controllerblueprints.core.data.*
import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
import reactor.core.publisher.Mono
import java.io.File
import java.io.Serializable
@@ -59,7 +59,7 @@ interface BluePrintRepoService : Serializable {
class BluePrintRepoFileService(val basePath: String) : BluePrintRepoService {
- private val log: Logger = LoggerFactory.getLogger(BluePrintRepoFileService::class.java)
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
private val dataTypePath = basePath.plus(BluePrintConstants.PATH_DIVIDER).plus(BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE)
private val nodeTypePath = basePath.plus(BluePrintConstants.PATH_DIVIDER).plus(BluePrintConstants.MODEL_DEFINITION_TYPE_NODE_TYPE)
diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt
index 9ba6313c..ce0bceee 100644
--- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt
+++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt
@@ -27,8 +27,8 @@ import org.onap.ccsdk.apps.controllerblueprints.core.data.ArtifactDefinition
import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeTemplate
import org.onap.ccsdk.apps.controllerblueprints.core.data.PropertyDefinition
import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
/**
*
*
@@ -36,13 +36,13 @@ import org.slf4j.LoggerFactory
*/
open class BluePrintRuntimeService(var bluePrintContext: BluePrintContext, var context: MutableMap<String, Any> = hashMapOf()) {
- private val logger: Logger = LoggerFactory.getLogger(this::class.toString())
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(BluePrintRuntimeService::class.toString())
/*
Get the Node Type Definition for the Node Template, Then iterate Node Type Properties and resolve the expressing
*/
open fun resolveNodeTemplateProperties(nodeTemplateName: String): MutableMap<String, Any?> {
- logger.info("resolveNodeTemplatePropertyValues for node template ({})", nodeTemplateName)
+ log.info("resolveNodeTemplatePropertyValues for node template ({})", nodeTemplateName)
val propertyAssignmentValue: MutableMap<String, Any?> = hashMapOf()
val nodeTemplate: NodeTemplate = bluePrintContext.nodeTemplateByName(nodeTemplateName)
@@ -73,13 +73,13 @@ open class BluePrintRuntimeService(var bluePrintContext: BluePrintContext, var c
// Set for Return of method
propertyAssignmentValue[nodeTypePropertyName] = resolvedValue
}
- logger.info("resolved property definition for node template ({}), values ({})", nodeTemplateName, propertyAssignmentValue)
+ log.info("resolved property definition for node template ({}), values ({})", nodeTemplateName, propertyAssignmentValue)
return propertyAssignmentValue
}
open fun resolveNodeTemplateInterfaceOperationInputs(nodeTemplateName: String,
interfaceName: String, operationName: String): MutableMap<String, Any?> {
- logger.info("nodeTemplateInterfaceOperationInputsResolvedExpression for node template ({}),interface name ({}), " +
+ log.info("nodeTemplateInterfaceOperationInputsResolvedExpression for node template ({}),interface name ({}), " +
"operationName({})", nodeTemplateName, interfaceName, operationName)
val propertyAssignmentValue: MutableMap<String, Any?> = hashMapOf()
@@ -96,7 +96,7 @@ open class BluePrintRuntimeService(var bluePrintContext: BluePrintContext, var c
?: throw BluePrintException(String.format("failed to get input definitions for node type (%s), " +
"interface name (%s), operationName(%s)", nodeTypeName, interfaceName, operationName))
- logger.info("input definition for node template ({}), values ({})", nodeTemplateName, propertyAssignments)
+ log.info("input definition for node template ({}), values ({})", nodeTemplateName, propertyAssignments)
// Iterate Node Type Properties
nodeTypeInterfaceOperationInputs.forEach { nodeTypePropertyName, nodeTypeProperty ->
@@ -117,7 +117,7 @@ open class BluePrintRuntimeService(var bluePrintContext: BluePrintContext, var c
// Set for Return of method
propertyAssignmentValue[nodeTypePropertyName] = resolvedValue
}
- logger.info("resolved input assignments for node template ({}), values ({})", nodeTemplateName, propertyAssignmentValue)
+ log.info("resolved input assignments for node template ({}), values ({})", nodeTemplateName, propertyAssignmentValue)
return propertyAssignmentValue
}
@@ -125,7 +125,7 @@ open class BluePrintRuntimeService(var bluePrintContext: BluePrintContext, var c
open fun resolveNodeTemplateInterfaceOperationOutputs(nodeTemplateName: String,
interfaceName: String, operationName: String, componentContext: MutableMap<String, Any?>) {
- logger.info("nodeTemplateInterfaceOperationInputsResolvedExpression for node template ({}),interface name ({}), " +
+ log.info("nodeTemplateInterfaceOperationInputsResolvedExpression for node template ({}),interface name ({}), " +
"operationName({})", nodeTemplateName, interfaceName, operationName)
val nodeTypeName = bluePrintContext.nodeTemplateByName(nodeTemplateName).type
@@ -147,7 +147,7 @@ open class BluePrintRuntimeService(var bluePrintContext: BluePrintContext, var c
?: NullNode.getInstance()
// Store operation output values into context
setNodeTemplateOperationPropertyValue(nodeTemplateName, interfaceName, operationName, nodeTypePropertyName, resolvedValue)
- logger.debug("resolved output assignments for node template ({}), property name ({}), value ({})", nodeTemplateName, nodeTypePropertyName, resolvedValue)
+ log.debug("resolved output assignments for node template ({}), property name ({}), value ({})", nodeTemplateName, nodeTypePropertyName, resolvedValue)
}
}
@@ -166,7 +166,7 @@ open class BluePrintRuntimeService(var bluePrintContext: BluePrintContext, var c
open fun setInputValue(propertyName: String, propertyDefinition: PropertyDefinition, value: JsonNode) {
val path = StringBuilder(BluePrintConstants.PATH_INPUTS)
.append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
- logger.trace("setting input path ({}), values ({})", path, value)
+ log.trace("setting input path ({}), values ({})", path, value)
context[path] = value
}
@@ -193,7 +193,7 @@ open class BluePrintRuntimeService(var bluePrintContext: BluePrintContext, var c
.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()
- logger.trace("setting operation property path ({}), values ({})", path, value)
+ log.trace("setting operation property path ({}), values ({})", path, value)
context[path] = value
}
@@ -259,7 +259,7 @@ open class BluePrintRuntimeService(var bluePrintContext: BluePrintContext, var c
}
open fun assignInputs(jsonNode: JsonNode) {
- logger.info("assignInputs from input JSON ({})", jsonNode.toString())
+ log.info("assignInputs from input JSON ({})", jsonNode.toString())
bluePrintContext.inputs?.forEach { propertyName, property ->
val valueNode: JsonNode = jsonNode.at(BluePrintConstants.PATH_DIVIDER + propertyName)
?: NullNode.getInstance()
@@ -268,7 +268,7 @@ open class BluePrintRuntimeService(var bluePrintContext: BluePrintContext, var c
}
open fun assignWorkflowInputs(workflowName: String, jsonNode: JsonNode) {
- logger.info("assign workflow {} input value ({})", workflowName, jsonNode.toString())
+ log.info("assign workflow {} input value ({})", workflowName, jsonNode.toString())
bluePrintContext.workflowByName(workflowName)?.inputs?.forEach { propertyName, property ->
val valueNode: JsonNode = jsonNode.at(BluePrintConstants.PATH_DIVIDER + propertyName)
?: NullNode.getInstance()
diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintValidatorService.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintValidatorService.kt
index 973e3de1..34399fdd 100644
--- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintValidatorService.kt
+++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintValidatorService.kt
@@ -21,8 +21,8 @@ import com.google.common.base.Preconditions
import org.apache.commons.lang3.StringUtils
import org.onap.ccsdk.apps.controllerblueprints.core.*
import org.onap.ccsdk.apps.controllerblueprints.core.data.*
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
import java.io.Serializable
/**
@@ -41,7 +41,7 @@ interface BluePrintValidatorService : Serializable {
open class BluePrintValidatorDefaultService : BluePrintValidatorService {
- val logger: Logger = LoggerFactory.getLogger(BluePrintValidatorDefaultService::class.toString())
+ val log: EELFLogger = EELFManager.getInstance().getLogger(BluePrintValidatorDefaultService::class.toString())
lateinit var bluePrintContext: BluePrintContext
lateinit var serviceTemplate: ServiceTemplate
@@ -68,8 +68,8 @@ open class BluePrintValidatorDefaultService : BluePrintValidatorService {
serviceTemplate.nodeTypes?.let { validateNodeTypes(serviceTemplate.nodeTypes!!) }
serviceTemplate.topologyTemplate?.let { validateTopologyTemplate(serviceTemplate.topologyTemplate!!) }
} catch (e: Exception) {
- logger.error("validation failed in the path : {}", paths.joinToString(separator), e)
- logger.error("validation trace message :{} ", message)
+ log.error("validation failed in the path : {}", paths.joinToString(separator), e)
+ log.error("validation trace message :{} ", message)
throw BluePrintException(e,
format("failed to validate blueprint on path ({}) with message {}"
, paths.joinToString(separator), e.message))
@@ -215,15 +215,17 @@ open class BluePrintValidatorDefaultService : BluePrintValidatorService {
paths.add("properties")
properties.forEach { propertyName, propertyDefinition ->
paths.add(propertyName)
- val dataType: String = propertyDefinition.type!!
- if (BluePrintTypes.validPrimitiveTypes().contains(dataType)) {
- // Do Nothing
- } else if (BluePrintTypes.validCollectionTypes().contains(dataType)) {
- val entrySchemaType: String = propertyDefinition.entrySchema?.type
- ?: throw BluePrintException(format("Entry schema for data type ({}) for the property ({}) not found", dataType, propertyName))
- checkPrimitiveOrComplex(entrySchemaType, propertyName)
- } else {
- checkPropertyDataType(dataType, propertyName)
+ val dataType: String = propertyDefinition.type
+ when {
+ BluePrintTypes.validPrimitiveTypes().contains(dataType) -> {
+ // Do Nothing
+ }
+ BluePrintTypes.validCollectionTypes().contains(dataType) -> {
+ val entrySchemaType: String = propertyDefinition.entrySchema?.type
+ ?: throw BluePrintException(format("Entry schema for data type ({}) for the property ({}) not found", dataType, propertyName))
+ checkPrimitiveOrComplex(entrySchemaType, propertyName)
+ }
+ else -> checkPropertyDataType(dataType, propertyName)
}
message.appendln("property " + paths.joinToString(separator) + " of type " + dataType)
paths.removeAt(paths.lastIndex)
@@ -328,7 +330,7 @@ open class BluePrintValidatorDefaultService : BluePrintValidatorService {
}
private fun checkPropertyValue(propertyDefinition: PropertyDefinition, jsonNode: JsonNode) {
- //logger.info("validating path ({}), Property {}, value ({})", paths, propertyDefinition, jsonNode)
+ //log.info("validating path ({}), Property {}, value ({})", paths, propertyDefinition, jsonNode)
}
private fun checkPropertyDataType(dataType: String, propertyName: String): Boolean {
diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/PropertyAssignmentService.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/PropertyAssignmentService.kt
index ea8d4911..ece09d6e 100644
--- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/PropertyAssignmentService.kt
+++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/PropertyAssignmentService.kt
@@ -25,8 +25,8 @@ import org.onap.ccsdk.apps.controllerblueprints.core.data.*
import org.onap.ccsdk.apps.controllerblueprints.core.format
import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.apps.controllerblueprints.core.utils.ResourceResolverUtils
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
/**
*
*
@@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory
*/
class PropertyAssignmentService(var context: MutableMap<String, Any>,
var bluePrintRuntimeService: BluePrintRuntimeService) {
- private val logger: Logger = LoggerFactory.getLogger(this::class.toString())
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
private var bluePrintContext: BluePrintContext = bluePrintRuntimeService.bluePrintContext
@@ -48,7 +48,7 @@ If Property Assignment is Expression.
fun resolveAssignmentExpression(nodeTemplateName: String, assignmentName: String,
assignment: Any): JsonNode {
val valueNode: JsonNode
- logger.trace("Assignment ({})", assignment)
+ log.trace("Assignment ({})", assignment)
val expressionData = BluePrintExpressionService.getExpressionData(assignment)
if (expressionData.isExpression) {
@@ -113,7 +113,7 @@ If Property Assignment is Expression.
var propertyDefinition: AttributeDefinition = bluePrintContext.nodeTemplateNodeType(attributeNodeTemplateName).attributes?.get(attributeName)!!
- logger.info("node template name ({}), property Name ({}) resolved value ({})", attributeNodeTemplateName, attributeName, nodeTemplateAttributeExpression)
+ log.info("node template name ({}), property Name ({}) resolved value ({})", attributeNodeTemplateName, attributeName, nodeTemplateAttributeExpression)
// Check it it is a nested expression
valueNode = resolveAssignmentExpression(attributeNodeTemplateName, attributeName, nodeTemplateAttributeExpression)
@@ -144,7 +144,7 @@ If Property Assignment is Expression.
var propertyDefinition: PropertyDefinition = bluePrintContext.nodeTemplateNodeType(propertyNodeTemplateName).properties?.get(propertyName)!!
- logger.info("node template name ({}), property Name ({}) resolved value ({})", propertyNodeTemplateName, propertyName, nodeTemplatePropertyExpression)
+ log.info("node template name ({}), property Name ({}) resolved value ({})", propertyNodeTemplateName, propertyName, nodeTemplatePropertyExpression)
// Check it it is a nested expression
valueNode = resolveAssignmentExpression(propertyNodeTemplateName, propertyName, nodeTemplatePropertyExpression)
diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintMetadataUtils.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintMetadataUtils.kt
index a9236f69..b7f9fc7e 100644
--- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintMetadataUtils.kt
+++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintMetadataUtils.kt
@@ -20,13 +20,13 @@ package org.onap.ccsdk.apps.controllerblueprints.core.utils
import org.apache.commons.io.FileUtils
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.apps.controllerblueprints.core.data.ToscaMetaData
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
import java.io.File
import java.nio.charset.Charset
object BluePrintMetadataUtils {
- private val logger: Logger = LoggerFactory.getLogger(this::class.toString())
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
@JvmStatic
fun toscaMetaData(basePath: String): ToscaMetaData {
@@ -65,7 +65,7 @@ object BluePrintMetadataUtils {
val toscaMetaData: ToscaMetaData = BluePrintMetadataUtils.toscaMetaData(metaDataFile)
- logger.info("Processing blueprint base path ({}) and entry definition file ({})", blueprintBasePath, toscaMetaData.entityDefinitions)
+ log.info("Processing blueprint base path ({}) and entry definition file ({})", blueprintBasePath, toscaMetaData.entityDefinitions)
return BluePrintParserFactory.instance(BluePrintConstants.TYPE_DEFAULT)!!
.readBlueprintFile(toscaMetaData.entityDefinitions!!, blueprintBasePath)
@@ -78,7 +78,7 @@ object BluePrintMetadataUtils {
val toscaMetaData: ToscaMetaData = BluePrintMetadataUtils.toscaMetaData(metaDataFile)
- logger.info("Processing blueprint base path ({}) and entry definition file ({})", blueprintBasePath, toscaMetaData.entityDefinitions)
+ log.info("Processing blueprint base path ({}) and entry definition file ({})", blueprintBasePath, toscaMetaData.entityDefinitions)
val bluePrintContext: BluePrintContext = BluePrintParserFactory.instance(BluePrintConstants.TYPE_DEFAULT)!!
.readBlueprintFile(toscaMetaData.entityDefinitions!!, blueprintBasePath)
diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintRuntimeUtils.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintRuntimeUtils.kt
index bad9201b..07b819ff 100644
--- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintRuntimeUtils.kt
+++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintRuntimeUtils.kt
@@ -20,8 +20,8 @@ import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.NullNode
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
/**
*
@@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory
* @author Brinda Santh
*/
object BluePrintRuntimeUtils {
- private val logger: Logger = LoggerFactory.getLogger(this::class.toString())
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
fun assignInputsFromFile(bluePrintContext: BluePrintContext, fileName: String, context: MutableMap<String, Any>) {
val jsonNode: JsonNode = JacksonUtils.jsonNodeFromFile(fileName)
@@ -42,12 +42,12 @@ object BluePrintRuntimeUtils {
}
fun assignInputs(bluePrintContext: BluePrintContext, jsonNode: JsonNode, context: MutableMap<String, Any>) {
- logger.info("assignInputs from input JSON ({})", jsonNode.toString())
+ log.info("assignInputs from input JSON ({})", jsonNode.toString())
bluePrintContext.inputs?.forEach { propertyName, property ->
val valueNode: JsonNode = jsonNode.at("/".plus(propertyName)) ?: NullNode.getInstance()
val path = BluePrintConstants.PATH_INPUTS.plus(BluePrintConstants.PATH_DIVIDER).plus(propertyName)
- logger.trace("setting input path ({}), values ({})", path, valueNode)
+ log.trace("setting input path ({}), values ({})", path, valueNode)
context[path] = valueNode
}
}
diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt
index 9eef1cad..7e72744c 100644
--- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt
+++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt
@@ -17,6 +17,8 @@
package org.onap.ccsdk.apps.controllerblueprints.core.utils
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
import com.fasterxml.jackson.annotation.JsonInclude
import com.fasterxml.jackson.core.type.TypeReference
import com.fasterxml.jackson.databind.JsonNode
@@ -31,7 +33,6 @@ import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.apps.controllerblueprints.core.format
-import org.slf4j.LoggerFactory
import java.io.File
import java.nio.charset.Charset
@@ -41,7 +42,7 @@ import java.nio.charset.Charset
* @author Brinda Santh
*/
object JacksonUtils {
- private val log = LoggerFactory.getLogger(JacksonUtils::class.java)
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
inline fun <reified T : Any> readValue(content: String): T =
jacksonObjectMapper().readValue(content, T::class.java)
diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/ResourceResolverUtils.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/ResourceResolverUtils.kt
index a2674556..bc0d9b4c 100644
--- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/ResourceResolverUtils.kt
+++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/ResourceResolverUtils.kt
@@ -19,8 +19,8 @@ package org.onap.ccsdk.apps.controllerblueprints.core.utils
import org.apache.commons.io.FileUtils
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.apps.controllerblueprints.core.checkNotEmpty
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
import java.io.File
import java.net.URL
import java.nio.charset.Charset
@@ -30,18 +30,18 @@ import java.nio.charset.Charset
* @author Brinda Santh
*/
object ResourceResolverUtils {
- private val logger: Logger = LoggerFactory.getLogger(this::class.toString())
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
@JvmStatic
fun getFileContent(filename : String, basePath : String?): String {
- logger.trace("file ({}), basePath ({}) ", filename, basePath)
+ log.trace("file ({}), basePath ({}) ", filename, basePath)
try{
var resolvedFileName : String = filename
if(filename.startsWith("http", true)
|| filename.startsWith("https", true)){
val givenUrl : String = URL(filename).toString()
val systemUrl : String = File(".").toURI().toURL().toString()
- logger.trace("givenUrl ({}), systemUrl ({}) ", givenUrl, systemUrl)
+ log.trace("givenUrl ({}), systemUrl ({}) ", givenUrl, systemUrl)
if(givenUrl.startsWith(systemUrl)){
}
diff --git a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/ServiceTemplateUtils.kt b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/ServiceTemplateUtils.kt
index 2fcb9b2a..0d739357 100644
--- a/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/ServiceTemplateUtils.kt
+++ b/ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/ServiceTemplateUtils.kt
@@ -37,7 +37,7 @@ object ServiceTemplateUtils {
@JvmStatic
fun getServiceTemplateFromContent(content: String): ServiceTemplate {
- return JacksonUtils.readValue<ServiceTemplate>(content)
+ return JacksonUtils.readValue(content)
}
diff --git a/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContextTest.kt b/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContextTest.kt
index 0b2b39c3..7a74ca47 100644
--- a/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContextTest.kt
+++ b/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContextTest.kt
@@ -23,8 +23,8 @@ import org.junit.Test
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.apps.controllerblueprints.core.factory.BluePrintParserFactory
import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
import java.io.File
import java.nio.charset.Charset
import kotlin.test.assertNotNull
@@ -35,7 +35,7 @@ import kotlin.test.assertNotNull
*/
class BluePrintContextTest {
- private val logger: Logger = LoggerFactory.getLogger(this::class.toString())
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
lateinit var bluePrintContext: BluePrintContext
@@ -63,7 +63,7 @@ class BluePrintContextTest {
fun testChainedProperty() {
val nodeType = bluePrintContext.nodeTypeChained("component-resource-assignment")
assertNotNull(nodeType, "Failed to get chained node type")
- logger.trace("Properties {}", JacksonUtils.getJson(nodeType, true))
+ log.trace("Properties {}", JacksonUtils.getJson(nodeType, true))
}
diff --git a/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintParserFactoryTest.kt b/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintParserFactoryTest.kt
index 0f211ab5..5a5557d7 100644
--- a/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintParserFactoryTest.kt
+++ b/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintParserFactoryTest.kt
@@ -18,8 +18,8 @@ package org.onap.ccsdk.apps.controllerblueprints.core.service
import org.junit.Test
import org.onap.ccsdk.apps.controllerblueprints.core.factory.BluePrintParserFactory
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
import kotlin.test.assertNotNull
/**
@@ -28,7 +28,7 @@ import kotlin.test.assertNotNull
* @author Brinda Santh
*/
class BluePrintParserFactoryTest {
- private val logger: Logger = LoggerFactory.getLogger(this::class.toString())
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
@Test
fun testBluePrintJson() {
@@ -37,6 +37,6 @@ class BluePrintParserFactoryTest {
val bluePrintContext: BluePrintContext = BluePrintParserFactory.instance(org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants.TYPE_DEFAULT)!!
.readBlueprintFile("baseconfiguration/Definitions/activation-blueprint.json", basepath)
assertNotNull(bluePrintContext, "Failed to populate Blueprint context")
- logger.trace("Blue Print {}",bluePrintContext.blueprintJson(true))
+ log.trace("Blue Print {}",bluePrintContext.blueprintJson(true))
}
} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt b/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
index 8ed161a1..5d24b072 100644
--- a/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
+++ b/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
@@ -25,8 +25,8 @@ import org.onap.ccsdk.apps.controllerblueprints.core.factory.BluePrintParserFact
import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintRuntimeUtils
import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils.jsonNodeFromFile
import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils.jsonNodeFromObject
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
@@ -36,7 +36,7 @@ import kotlin.test.assertNotNull
* @author Brinda Santh
*/
class BluePrintRuntimeServiceTest {
- private val logger: Logger = LoggerFactory.getLogger(this::class.toString())
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
val basepath = "load/blueprints"
@@ -47,7 +47,7 @@ class BluePrintRuntimeServiceTest {
@Test
fun testResolveNodeTemplateProperties() {
- logger.info("************************ testResolveNodeTemplateProperties **********************")
+ log.info("************************ testResolveNodeTemplateProperties **********************")
val bluePrintContext: BluePrintContext = BluePrintParserFactory.instance(BluePrintConstants.TYPE_DEFAULT)!!
.readBlueprintFile("baseconfiguration/Definitions/activation-blueprint.json", basepath)
@@ -61,7 +61,7 @@ class BluePrintRuntimeServiceTest {
bluePrintRuntimeService.assignInputs(inputNode)
val propContext: MutableMap<String, Any?> = bluePrintRuntimeService.resolveNodeTemplateProperties("activate-process")
- logger.info("Context {}" ,bluePrintRuntimeService.context)
+ log.info("Context {}" ,bluePrintRuntimeService.context)
assertNotNull(propContext, "Failed to populate interface property values")
assertEquals(propContext.get("process-name"), jsonNodeFromObject("sample-action"), "Failed to populate parameter process-name")
@@ -70,7 +70,7 @@ class BluePrintRuntimeServiceTest {
@Test
fun testResolveNodeTemplateInterfaceOperationInputs() {
- logger.info("************************ testResolveNodeTemplateInterfaceOperationInputs **********************")
+ log.info("************************ testResolveNodeTemplateInterfaceOperationInputs **********************")
val bluePrintContext: BluePrintContext = BluePrintParserFactory.instance(BluePrintConstants.TYPE_DEFAULT)!!
.readBlueprintFile("baseconfiguration/Definitions/activation-blueprint.json", basepath)
assertNotNull(bluePrintContext, "Failed to populate Blueprint context")
@@ -84,12 +84,12 @@ class BluePrintRuntimeServiceTest {
val bluePrintRuntimeService = BluePrintRuntimeService(bluePrintContext, context)
- logger.info("Prepared Context {}" ,context)
+ log.info("Prepared Context {}" ,context)
val inContext: MutableMap<String, Any?> = bluePrintRuntimeService.resolveNodeTemplateInterfaceOperationInputs("resource-assignment",
"DefaultComponentNode", "process")
- logger.trace("In Context {}" ,inContext)
+ log.trace("In Context {}" ,inContext)
assertNotNull(inContext, "Failed to populate interface input property values")
assertEquals(inContext.get("action-name"), jsonNodeFromObject("sample-action"), "Failed to populate parameter action-name")
@@ -100,7 +100,7 @@ class BluePrintRuntimeServiceTest {
@Test
fun testResolveNodeTemplateInterfaceOperationOutputs() {
- logger.info("************************ testResolveNodeTemplateInterfaceOperationOutputs **********************")
+ log.info("************************ testResolveNodeTemplateInterfaceOperationOutputs **********************")
val bluePrintContext: BluePrintContext = BluePrintParserFactory.instance(BluePrintConstants.TYPE_DEFAULT)!!
.readBlueprintFile("baseconfiguration/Definitions/activation-blueprint.json", basepath)
assertNotNull(bluePrintContext, "Failed to populate Blueprint context")
diff --git a/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintValidatorDefaultServiceTest.kt b/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintValidatorDefaultServiceTest.kt
index 50d2ce44..b05fcb61 100644
--- a/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintValidatorDefaultServiceTest.kt
+++ b/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintValidatorDefaultServiceTest.kt
@@ -20,8 +20,8 @@ import org.junit.Before
import org.junit.Test
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.apps.controllerblueprints.core.factory.BluePrintParserFactory
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
/**
*
@@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory
* @author Brinda Santh
*/
class BluePrintValidatorDefaultServiceTest {
- private val logger: Logger = LoggerFactory.getLogger(this::class.toString())
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
val basepath = "load/blueprints"
@Before
@@ -44,6 +44,6 @@ class BluePrintValidatorDefaultServiceTest {
val properties : MutableMap<String, Any> = hashMapOf()
val validatorService = BluePrintValidatorDefaultService()
validatorService.validateBlueprint(bluePrintContext.serviceTemplate,properties)
- logger.info("Validation Message {}", properties)
+ log.info("Validation Message {}", properties)
}
} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtilsTest.kt b/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtilsTest.kt
index 8d0f968f..a5a630e3 100644
--- a/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtilsTest.kt
+++ b/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtilsTest.kt
@@ -20,8 +20,8 @@ package org.onap.ccsdk.apps.controllerblueprints.core.utils
import org.junit.Test
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+import com.att.eelf.configuration.EELFLogger
+import com.att.eelf.configuration.EELFManager
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
import kotlin.test.assertTrue
@@ -33,7 +33,7 @@ import kotlin.test.assertTrue
*/
class JacksonUtilsTest {
- private val log: Logger = LoggerFactory.getLogger(this::class.toString())
+ private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
val basePath = "load/blueprints"
@@ -71,7 +71,7 @@ class JacksonUtilsTest {
@Test
fun testJsonValue() {
val filePath = "data/alltype-data.json"
- val rootJson = JacksonUtils.jsonNodeFromClassPathFile(filePath);
+ val rootJson = JacksonUtils.jsonNodeFromClassPathFile(filePath)
assertNotNull(rootJson, "Failed to get all type data json node")
val intValue = rootJson.get("intValue")
assertTrue(JacksonUtils.checkJsonNodeValueOfType(BluePrintConstants.DATA_TYPE_INTEGER, intValue), "Failed to get as int value")
diff --git a/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt b/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt
index 907eb2e0..3fa4f75d 100644
--- a/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt
+++ b/ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt
@@ -22,7 +22,7 @@ class TopologicalSortingUtilsTest {
@Test
fun testSorting(): Unit {
- val graph: TopologicalSortingUtils<String> = TopologicalSortingUtils<String>()
+ val graph: TopologicalSortingUtils<String> = TopologicalSortingUtils()
graph.add("bundle-id", "bundle-mac")
graph.add("bundle-id", "bundle-ip")
graph.add("bundle-mac", "bundle-ip")
diff --git a/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDefinition.kt b/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDefinition.kt
index b4d68cbc..0808073f 100644
--- a/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDefinition.kt
+++ b/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDefinition.kt
@@ -18,7 +18,6 @@ package org.onap.ccsdk.apps.controllerblueprints.resource.dict
import com.fasterxml.jackson.annotation.JsonFormat
import com.fasterxml.jackson.annotation.JsonProperty
-import org.apache.commons.lang3.builder.ToStringBuilder
import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeTemplate
import org.onap.ccsdk.apps.controllerblueprints.core.data.PropertyDefinition
import java.io.Serializable