Merge "Controller Blueprints Microservice"
authorDan Timoney <dt5972@att.com>
Tue, 4 Sep 2018 15:08:04 +0000 (15:08 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 4 Sep 2018 15:08:04 +0000 (15:08 +0000)
23 files changed:
ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/data/BluePrintModel.kt
ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintEnhancerFactory.kt
ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintParserFactory.kt
ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContext.kt
ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintEnhancerService.kt
ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintExpressionService.kt
ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintParserService.kt
ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRepoService.kt
ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeService.kt
ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintValidatorService.kt
ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/PropertyAssignmentService.kt
ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintMetadataUtils.kt
ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintRuntimeUtils.kt
ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtils.kt
ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/ResourceResolverUtils.kt
ms/controllerblueprints/modules/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/ServiceTemplateUtils.kt
ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintContextTest.kt
ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintParserFactoryTest.kt
ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/BluePrintValidatorDefaultServiceTest.kt
ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/JacksonUtilsTest.kt
ms/controllerblueprints/modules/core/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/TopologicalSortingUtilsTest.kt
ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDefinition.kt

index b78a594..1664f79 100644 (file)
@@ -185,10 +185,10 @@ class AttributeDefinition {
     var description: String? = null\r
     lateinit var type: String\r
     @JsonProperty("default")\r
-    var _default: JsonNode? = null\r
+    var defaultValue: JsonNode? = null\r
     var status: String? = null\r
     @JsonProperty("entry_schema")\r
-    var entry_schema: String? = null\r
+    var entrySchema: String? = null\r
 }\r
 \r
 /*\r
index 2a29635..d796597 100644 (file)
@@ -17,8 +17,8 @@
 package org.onap.ccsdk.apps.controllerblueprints.core.factory\r
 \r
 import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintEnhancerService\r
-import org.slf4j.Logger\r
-import org.slf4j.LoggerFactory\r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 \r
 \r
 /**\r
@@ -28,7 +28,7 @@ import org.slf4j.LoggerFactory
  */\r
 \r
 object BluePrintEnhancerFactory {\r
-    private val logger: Logger = LoggerFactory.getLogger(this::class.toString())\r
+    private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())\r
 \r
     var bluePrintEnhancerServices: MutableMap<String, BluePrintEnhancerService> = HashMap()\r
 \r
index 10eb0e6..83233ab 100644 (file)
@@ -18,8 +18,8 @@ package org.onap.ccsdk.apps.controllerblueprints.core.factory
 \r
 import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintParserDefaultService\r
 import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintParserService\r
-import org.slf4j.Logger\r
-import org.slf4j.LoggerFactory\r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 \r
 /**\r
  *\r
@@ -28,12 +28,12 @@ import org.slf4j.LoggerFactory
  */\r
 \r
 object BluePrintParserFactory {\r
-    private val logger: Logger = LoggerFactory.getLogger(this::class.toString())\r
+    private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())\r
 \r
     var bluePrintParserServices: MutableMap<String, BluePrintParserService> = HashMap()\r
 \r
     init {\r
-        logger.info("Initialised default BluePrintParser Service ")\r
+        log.info("Initialised default BluePrintParser Service ")\r
         bluePrintParserServices.put(org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants.TYPE_DEFAULT, BluePrintParserDefaultService())\r
     }\r
 \r
index dde1d58..875cbea 100644 (file)
 \r
 package org.onap.ccsdk.apps.controllerblueprints.core.service\r
 \r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 import com.fasterxml.jackson.databind.JsonNode\r
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException\r
 import org.onap.ccsdk.apps.controllerblueprints.core.data.*\r
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils\r
-import org.slf4j.Logger\r
-import org.slf4j.LoggerFactory\r
 /**\r
  *\r
  *\r
@@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory
  */\r
 class BluePrintContext(serviceTemplate: ServiceTemplate) {\r
 \r
-    private val logger: Logger = LoggerFactory.getLogger(this::class.toString())\r
+    private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())\r
 \r
     val serviceTemplate: ServiceTemplate = serviceTemplate\r
 \r
index 8bc0e6e..c90d659 100644 (file)
@@ -21,8 +21,8 @@ import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes\r
 import org.onap.ccsdk.apps.controllerblueprints.core.data.*\r
 import org.onap.ccsdk.apps.controllerblueprints.core.format\r
-import org.slf4j.Logger\r
-import org.slf4j.LoggerFactory\r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 import java.io.Serializable\r
 \r
 /**\r
@@ -47,7 +47,7 @@ interface BluePrintEnhancerService : Serializable {
 \r
 open class BluePrintEnhancerDefaultService(val bluePrintRepoService: BluePrintRepoService) : BluePrintEnhancerService {\r
 \r
-    private val log: Logger = LoggerFactory.getLogger(BluePrintEnhancerDefaultService::class.java)\r
+    private val log: EELFLogger = EELFManager.getInstance().getLogger(BluePrintEnhancerDefaultService::class.toString())\r
 \r
     lateinit var serviceTemplate: ServiceTemplate\r
 \r
@@ -189,7 +189,6 @@ open class BluePrintEnhancerDefaultService(val bluePrintRepoService: BluePrintRe
 \r
     open fun enrichPropertyDefinition(propertyName: String, propertyDefinition: PropertyDefinition) {\r
         val propertyType = propertyDefinition.type\r
-                ?: throw BluePrintException(format("Property type is missing for property : {}", propertyName))\r
         if (BluePrintTypes.validPrimitiveTypes().contains(propertyType)) {\r
 \r
         } else if (BluePrintTypes.validCollectionTypes().contains(propertyType)) {\r
index 36959c4..19d515e 100644 (file)
@@ -23,15 +23,15 @@ import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes\r
 import org.onap.ccsdk.apps.controllerblueprints.core.data.*\r
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils\r
-import org.slf4j.Logger\r
-import org.slf4j.LoggerFactory\r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 /**\r
  *\r
  *\r
  * @author Brinda Santh\r
  */\r
 object BluePrintExpressionService {\r
-    val logger: Logger = LoggerFactory.getLogger(this::class.toString())\r
+    val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())\r
 \r
     @JvmStatic\r
     fun getExpressionData(propertyAssignment: Any): ExpressionData {\r
@@ -41,7 +41,7 @@ object BluePrintExpressionService {
 \r
     @JvmStatic\r
     fun getExpressionData(propertyAssignmentNode: JsonNode): ExpressionData {\r
-        logger.trace("Assignment Data/Expression : {}", propertyAssignmentNode)\r
+        log.trace("Assignment Data/Expression : {}", propertyAssignmentNode)\r
         val expressionData = ExpressionData(valueNode = propertyAssignmentNode)\r
         if (propertyAssignmentNode is ObjectNode) {\r
 \r
@@ -89,18 +89,20 @@ object BluePrintExpressionService {
         var reqOrCapEntityName: String? = null\r
         var propertyName = ""\r
         var subProperty: String? = null\r
-        if (arrayNode.size() == 2) {\r
-            propertyName = arrayNode[1].textValue()\r
-        } else if (arrayNode.size() == 3) {\r
-            reqOrCapEntityName = arrayNode[1].textValue()\r
-            propertyName = arrayNode[2].textValue()\r
-        } else if (arrayNode.size() > 3) {\r
-            reqOrCapEntityName = arrayNode[1].textValue()\r
-            propertyName = arrayNode[2].textValue()\r
-            val propertyPaths: List<String> = arrayNode.filterIndexed { index, obj ->\r
-                index >= 3\r
-            }.map { it.textValue() }\r
-            subProperty = propertyPaths.joinToString("/")\r
+        when {\r
+            arrayNode.size() == 2 -> propertyName = arrayNode[1].textValue()\r
+            arrayNode.size() == 3 -> {\r
+                reqOrCapEntityName = arrayNode[1].textValue()\r
+                propertyName = arrayNode[2].textValue()\r
+            }\r
+            arrayNode.size() > 3 -> {\r
+                reqOrCapEntityName = arrayNode[1].textValue()\r
+                propertyName = arrayNode[2].textValue()\r
+                val propertyPaths: List<String> = arrayNode.filterIndexed { index, obj ->\r
+                    index >= 3\r
+                }.map { it.textValue() }\r
+                subProperty = propertyPaths.joinToString("/")\r
+            }\r
         }\r
 \r
         return PropertyExpression(modelableEntityName = arrayNode[0].asText(),\r
@@ -120,7 +122,7 @@ object BluePrintExpressionService {
         }\r
 \r
         var reqOrCapEntityName: String? = null\r
-        var propertyName: String = ""\r
+        var propertyName = ""\r
         var subProperty: String? = null\r
         if (arrayNode.size() == 2) {\r
             propertyName = arrayNode[1].textValue()\r
index 3b91720..43267ff 100644 (file)
@@ -18,8 +18,8 @@ package org.onap.ccsdk.apps.controllerblueprints.core.service
 \r
 import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate\r
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.ServiceTemplateUtils\r
-import org.slf4j.Logger\r
-import org.slf4j.LoggerFactory\r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 import java.io.File\r
 import java.io.Serializable\r
 \r
@@ -39,7 +39,7 @@ interface BluePrintParserService : Serializable {
 \r
 class BluePrintParserDefaultService : BluePrintParserService {\r
 \r
-    private val logger: Logger = LoggerFactory.getLogger(this::class.toString())\r
+    private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())\r
 \r
     var basePath : String = javaClass.classLoader.getResource(".").path\r
 \r
index 8c25473..8d2557c 100644 (file)
@@ -24,8 +24,8 @@ import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException\r
 import org.onap.ccsdk.apps.controllerblueprints.core.data.*\r
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils\r
-import org.slf4j.Logger\r
-import org.slf4j.LoggerFactory\r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 import reactor.core.publisher.Mono\r
 import java.io.File\r
 import java.io.Serializable\r
@@ -59,7 +59,7 @@ interface BluePrintRepoService : Serializable {
 \r
 class BluePrintRepoFileService(val basePath: String) : BluePrintRepoService {\r
 \r
-    private val log: Logger = LoggerFactory.getLogger(BluePrintRepoFileService::class.java)\r
+    private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())\r
 \r
     private val dataTypePath = basePath.plus(BluePrintConstants.PATH_DIVIDER).plus(BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE)\r
     private val nodeTypePath = basePath.plus(BluePrintConstants.PATH_DIVIDER).plus(BluePrintConstants.MODEL_DEFINITION_TYPE_NODE_TYPE)\r
index 9ba6313..ce0bcee 100644 (file)
@@ -27,8 +27,8 @@ import org.onap.ccsdk.apps.controllerblueprints.core.data.ArtifactDefinition
 import org.onap.ccsdk.apps.controllerblueprints.core.data.NodeTemplate\r
 import org.onap.ccsdk.apps.controllerblueprints.core.data.PropertyDefinition\r
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils\r
-import org.slf4j.Logger\r
-import org.slf4j.LoggerFactory\r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 /**\r
  *\r
  *\r
@@ -36,13 +36,13 @@ import org.slf4j.LoggerFactory
  */\r
 open class BluePrintRuntimeService(var bluePrintContext: BluePrintContext, var context: MutableMap<String, Any> = hashMapOf()) {\r
 \r
-    private val logger: Logger = LoggerFactory.getLogger(this::class.toString())\r
+    private val log: EELFLogger = EELFManager.getInstance().getLogger(BluePrintRuntimeService::class.toString())\r
 \r
     /*\r
         Get the Node Type Definition for the Node Template, Then iterate Node Type Properties and resolve the expressing\r
      */\r
     open fun resolveNodeTemplateProperties(nodeTemplateName: String): MutableMap<String, Any?> {\r
-        logger.info("resolveNodeTemplatePropertyValues for node template ({})", nodeTemplateName)\r
+        log.info("resolveNodeTemplatePropertyValues for node template ({})", nodeTemplateName)\r
         val propertyAssignmentValue: MutableMap<String, Any?> = hashMapOf()\r
 \r
         val nodeTemplate: NodeTemplate = bluePrintContext.nodeTemplateByName(nodeTemplateName)\r
@@ -73,13 +73,13 @@ open class BluePrintRuntimeService(var bluePrintContext: BluePrintContext, var c
             // Set for Return of method\r
             propertyAssignmentValue[nodeTypePropertyName] = resolvedValue\r
         }\r
-        logger.info("resolved property definition for node template ({}), values ({})", nodeTemplateName, propertyAssignmentValue)\r
+        log.info("resolved property definition for node template ({}), values ({})", nodeTemplateName, propertyAssignmentValue)\r
         return propertyAssignmentValue\r
     }\r
 \r
     open fun resolveNodeTemplateInterfaceOperationInputs(nodeTemplateName: String,\r
                                                     interfaceName: String, operationName: String): MutableMap<String, Any?> {\r
-        logger.info("nodeTemplateInterfaceOperationInputsResolvedExpression for node template ({}),interface name ({}), " +\r
+        log.info("nodeTemplateInterfaceOperationInputsResolvedExpression for node template ({}),interface name ({}), " +\r
                 "operationName({})", nodeTemplateName, interfaceName, operationName)\r
 \r
         val propertyAssignmentValue: MutableMap<String, Any?> = hashMapOf()\r
@@ -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), " +\r
                                 "interface name (%s), operationName(%s)", nodeTypeName, interfaceName, operationName))\r
 \r
-        logger.info("input definition for node template ({}), values ({})", nodeTemplateName, propertyAssignments)\r
+        log.info("input definition for node template ({}), values ({})", nodeTemplateName, propertyAssignments)\r
 \r
         // Iterate Node Type Properties\r
         nodeTypeInterfaceOperationInputs.forEach { nodeTypePropertyName, nodeTypeProperty ->\r
@@ -117,7 +117,7 @@ open class BluePrintRuntimeService(var bluePrintContext: BluePrintContext, var c
             // Set for Return of method\r
             propertyAssignmentValue[nodeTypePropertyName] = resolvedValue\r
         }\r
-        logger.info("resolved input assignments for node template ({}), values ({})", nodeTemplateName, propertyAssignmentValue)\r
+        log.info("resolved input assignments for node template ({}), values ({})", nodeTemplateName, propertyAssignmentValue)\r
 \r
         return propertyAssignmentValue\r
     }\r
@@ -125,7 +125,7 @@ open class BluePrintRuntimeService(var bluePrintContext: BluePrintContext, var c
 \r
     open fun resolveNodeTemplateInterfaceOperationOutputs(nodeTemplateName: String,\r
                                                      interfaceName: String, operationName: String, componentContext: MutableMap<String, Any?>) {\r
-        logger.info("nodeTemplateInterfaceOperationInputsResolvedExpression for node template ({}),interface name ({}), " +\r
+        log.info("nodeTemplateInterfaceOperationInputsResolvedExpression for node template ({}),interface name ({}), " +\r
                 "operationName({})", nodeTemplateName, interfaceName, operationName)\r
 \r
         val nodeTypeName = bluePrintContext.nodeTemplateByName(nodeTemplateName).type\r
@@ -147,7 +147,7 @@ open class BluePrintRuntimeService(var bluePrintContext: BluePrintContext, var c
                     ?: NullNode.getInstance()\r
             // Store  operation output values into context\r
             setNodeTemplateOperationPropertyValue(nodeTemplateName, interfaceName, operationName, nodeTypePropertyName, resolvedValue)\r
-            logger.debug("resolved output assignments for node template ({}), property name ({}), value ({})", nodeTemplateName, nodeTypePropertyName, resolvedValue)\r
+            log.debug("resolved output assignments for node template ({}), property name ({}), value ({})", nodeTemplateName, nodeTypePropertyName, resolvedValue)\r
         }\r
     }\r
 \r
@@ -166,7 +166,7 @@ open class BluePrintRuntimeService(var bluePrintContext: BluePrintContext, var c
     open fun setInputValue(propertyName: String, propertyDefinition: PropertyDefinition, value: JsonNode) {\r
         val path = StringBuilder(BluePrintConstants.PATH_INPUTS)\r
                 .append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()\r
-        logger.trace("setting input path ({}), values ({})", path, value)\r
+        log.trace("setting input path ({}), values ({})", path, value)\r
         context[path] = value\r
     }\r
 \r
@@ -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)\r
                 .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)\r
                 .append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()\r
-        logger.trace("setting operation property path ({}), values ({})", path, value)\r
+        log.trace("setting operation property path ({}), values ({})", path, value)\r
         context[path] = value\r
     }\r
 \r
@@ -259,7 +259,7 @@ open class BluePrintRuntimeService(var bluePrintContext: BluePrintContext, var c
     }\r
 \r
     open fun assignInputs(jsonNode: JsonNode) {\r
-        logger.info("assignInputs from input JSON ({})", jsonNode.toString())\r
+        log.info("assignInputs from input JSON ({})", jsonNode.toString())\r
         bluePrintContext.inputs?.forEach { propertyName, property ->\r
             val valueNode: JsonNode = jsonNode.at(BluePrintConstants.PATH_DIVIDER + propertyName)\r
                     ?: NullNode.getInstance()\r
@@ -268,7 +268,7 @@ open class BluePrintRuntimeService(var bluePrintContext: BluePrintContext, var c
     }\r
 \r
     open fun assignWorkflowInputs(workflowName: String, jsonNode: JsonNode) {\r
-        logger.info("assign workflow {} input value ({})", workflowName, jsonNode.toString())\r
+        log.info("assign workflow {} input value ({})", workflowName, jsonNode.toString())\r
         bluePrintContext.workflowByName(workflowName)?.inputs?.forEach { propertyName, property ->\r
             val valueNode: JsonNode = jsonNode.at(BluePrintConstants.PATH_DIVIDER + propertyName)\r
                     ?: NullNode.getInstance()\r
index 973e3de..34399fd 100644 (file)
@@ -21,8 +21,8 @@ import com.google.common.base.Preconditions
 import org.apache.commons.lang3.StringUtils\r
 import org.onap.ccsdk.apps.controllerblueprints.core.*\r
 import org.onap.ccsdk.apps.controllerblueprints.core.data.*\r
-import org.slf4j.Logger\r
-import org.slf4j.LoggerFactory\r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 import java.io.Serializable\r
 \r
 /**\r
@@ -41,7 +41,7 @@ interface BluePrintValidatorService : Serializable {
 \r
 open class BluePrintValidatorDefaultService : BluePrintValidatorService {\r
 \r
-    val logger: Logger = LoggerFactory.getLogger(BluePrintValidatorDefaultService::class.toString())\r
+    val log: EELFLogger = EELFManager.getInstance().getLogger(BluePrintValidatorDefaultService::class.toString())\r
 \r
     lateinit var bluePrintContext: BluePrintContext\r
     lateinit var serviceTemplate: ServiceTemplate\r
@@ -68,8 +68,8 @@ open class BluePrintValidatorDefaultService : BluePrintValidatorService {
             serviceTemplate.nodeTypes?.let { validateNodeTypes(serviceTemplate.nodeTypes!!) }\r
             serviceTemplate.topologyTemplate?.let { validateTopologyTemplate(serviceTemplate.topologyTemplate!!) }\r
         } catch (e: Exception) {\r
-            logger.error("validation failed in the path : {}", paths.joinToString(separator), e)\r
-            logger.error("validation trace message :{} ", message)\r
+            log.error("validation failed in the path : {}", paths.joinToString(separator), e)\r
+            log.error("validation trace message :{} ", message)\r
             throw BluePrintException(e,\r
                     format("failed to validate blueprint on path ({}) with message {}"\r
                             , paths.joinToString(separator), e.message))\r
@@ -215,15 +215,17 @@ open class BluePrintValidatorDefaultService : BluePrintValidatorService {
         paths.add("properties")\r
         properties.forEach { propertyName, propertyDefinition ->\r
             paths.add(propertyName)\r
-            val dataType: String = propertyDefinition.type!!\r
-            if (BluePrintTypes.validPrimitiveTypes().contains(dataType)) {\r
-                // Do Nothing\r
-            } else if (BluePrintTypes.validCollectionTypes().contains(dataType)) {\r
-                val entrySchemaType: String = propertyDefinition.entrySchema?.type\r
-                        ?: throw BluePrintException(format("Entry schema for data type ({}) for the property ({}) not found", dataType, propertyName))\r
-                checkPrimitiveOrComplex(entrySchemaType, propertyName)\r
-            } else {\r
-                checkPropertyDataType(dataType, propertyName)\r
+            val dataType: String = propertyDefinition.type\r
+            when {\r
+                BluePrintTypes.validPrimitiveTypes().contains(dataType) -> {\r
+                    // Do Nothing\r
+                }\r
+                BluePrintTypes.validCollectionTypes().contains(dataType) -> {\r
+                    val entrySchemaType: String = propertyDefinition.entrySchema?.type\r
+                            ?: throw BluePrintException(format("Entry schema for data type ({}) for the property ({}) not found", dataType, propertyName))\r
+                    checkPrimitiveOrComplex(entrySchemaType, propertyName)\r
+                }\r
+                else -> checkPropertyDataType(dataType, propertyName)\r
             }\r
             message.appendln("property " + paths.joinToString(separator) + " of type " + dataType)\r
             paths.removeAt(paths.lastIndex)\r
@@ -328,7 +330,7 @@ open class BluePrintValidatorDefaultService : BluePrintValidatorService {
     }\r
 \r
     private fun checkPropertyValue(propertyDefinition: PropertyDefinition, jsonNode: JsonNode) {\r
-        //logger.info("validating path ({}), Property {}, value ({})", paths, propertyDefinition, jsonNode)\r
+        //log.info("validating path ({}), Property {}, value ({})", paths, propertyDefinition, jsonNode)\r
     }\r
 \r
     private fun checkPropertyDataType(dataType: String, propertyName: String): Boolean {\r
index ea8d491..ece09d6 100644 (file)
@@ -25,8 +25,8 @@ import org.onap.ccsdk.apps.controllerblueprints.core.data.*
 import org.onap.ccsdk.apps.controllerblueprints.core.format\r
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils\r
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.ResourceResolverUtils\r
-import org.slf4j.Logger\r
-import org.slf4j.LoggerFactory\r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 /**\r
  *\r
  *\r
@@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory
  */\r
 class PropertyAssignmentService(var context: MutableMap<String, Any>,\r
                                 var bluePrintRuntimeService: BluePrintRuntimeService) {\r
-    private val logger: Logger = LoggerFactory.getLogger(this::class.toString())\r
+    private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())\r
 \r
     private var bluePrintContext: BluePrintContext = bluePrintRuntimeService.bluePrintContext\r
 \r
@@ -48,7 +48,7 @@ If Property Assignment is Expression.
     fun resolveAssignmentExpression(nodeTemplateName: String, assignmentName: String,\r
                                             assignment: Any): JsonNode {\r
         val valueNode: JsonNode\r
-        logger.trace("Assignment ({})", assignment)\r
+        log.trace("Assignment ({})", assignment)\r
         val expressionData = BluePrintExpressionService.getExpressionData(assignment)\r
 \r
         if (expressionData.isExpression) {\r
@@ -113,7 +113,7 @@ If Property Assignment is Expression.
 \r
         var propertyDefinition: AttributeDefinition = bluePrintContext.nodeTemplateNodeType(attributeNodeTemplateName).attributes?.get(attributeName)!!\r
 \r
-        logger.info("node template name ({}), property Name ({}) resolved value ({})", attributeNodeTemplateName, attributeName, nodeTemplateAttributeExpression)\r
+        log.info("node template name ({}), property Name ({}) resolved value ({})", attributeNodeTemplateName, attributeName, nodeTemplateAttributeExpression)\r
 \r
         // Check it it is a nested expression\r
         valueNode = resolveAssignmentExpression(attributeNodeTemplateName, attributeName, nodeTemplateAttributeExpression)\r
@@ -144,7 +144,7 @@ If Property Assignment is Expression.
 \r
         var propertyDefinition: PropertyDefinition = bluePrintContext.nodeTemplateNodeType(propertyNodeTemplateName).properties?.get(propertyName)!!\r
 \r
-        logger.info("node template name ({}), property Name ({}) resolved value ({})", propertyNodeTemplateName, propertyName, nodeTemplatePropertyExpression)\r
+        log.info("node template name ({}), property Name ({}) resolved value ({})", propertyNodeTemplateName, propertyName, nodeTemplatePropertyExpression)\r
 \r
         // Check it it is a nested expression\r
         valueNode = resolveAssignmentExpression(propertyNodeTemplateName, propertyName, nodeTemplatePropertyExpression)\r
index a9236f6..b7f9fc7 100644 (file)
@@ -20,13 +20,13 @@ package org.onap.ccsdk.apps.controllerblueprints.core.utils
 import org.apache.commons.io.FileUtils\r
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants\r
 import org.onap.ccsdk.apps.controllerblueprints.core.data.ToscaMetaData\r
-import org.slf4j.Logger\r
-import org.slf4j.LoggerFactory\r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 import java.io.File\r
 import java.nio.charset.Charset\r
 \r
 object BluePrintMetadataUtils {\r
-    private val logger: Logger = LoggerFactory.getLogger(this::class.toString())\r
+    private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())\r
 \r
     @JvmStatic\r
     fun toscaMetaData(basePath: String): ToscaMetaData {\r
@@ -65,7 +65,7 @@ object BluePrintMetadataUtils {
 \r
         val toscaMetaData: ToscaMetaData = BluePrintMetadataUtils.toscaMetaData(metaDataFile)\r
 \r
-        logger.info("Processing blueprint base path ({}) and entry definition file ({})", blueprintBasePath, toscaMetaData.entityDefinitions)\r
+        log.info("Processing blueprint base path ({}) and entry definition file ({})", blueprintBasePath, toscaMetaData.entityDefinitions)\r
 \r
         return BluePrintParserFactory.instance(BluePrintConstants.TYPE_DEFAULT)!!\r
                 .readBlueprintFile(toscaMetaData.entityDefinitions!!, blueprintBasePath)\r
@@ -78,7 +78,7 @@ object BluePrintMetadataUtils {
 \r
         val toscaMetaData: ToscaMetaData = BluePrintMetadataUtils.toscaMetaData(metaDataFile)\r
 \r
-        logger.info("Processing blueprint base path ({}) and entry definition file ({})", blueprintBasePath, toscaMetaData.entityDefinitions)\r
+        log.info("Processing blueprint base path ({}) and entry definition file ({})", blueprintBasePath, toscaMetaData.entityDefinitions)\r
 \r
         val bluePrintContext: BluePrintContext = BluePrintParserFactory.instance(BluePrintConstants.TYPE_DEFAULT)!!\r
                 .readBlueprintFile(toscaMetaData.entityDefinitions!!, blueprintBasePath)\r
index bad9201..07b819f 100644 (file)
@@ -20,8 +20,8 @@ import com.fasterxml.jackson.databind.JsonNode
 import com.fasterxml.jackson.databind.node.NullNode\r
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants\r
 import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext\r
-import org.slf4j.Logger\r
-import org.slf4j.LoggerFactory\r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 \r
 /**\r
  *\r
@@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory
  * @author Brinda Santh\r
  */\r
 object BluePrintRuntimeUtils {\r
-    private val logger: Logger = LoggerFactory.getLogger(this::class.toString())\r
+    private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())\r
 \r
     fun assignInputsFromFile(bluePrintContext: BluePrintContext, fileName: String, context: MutableMap<String, Any>) {\r
         val jsonNode: JsonNode = JacksonUtils.jsonNodeFromFile(fileName)\r
@@ -42,12 +42,12 @@ object BluePrintRuntimeUtils {
     }\r
 \r
     fun assignInputs(bluePrintContext: BluePrintContext, jsonNode: JsonNode, context: MutableMap<String, Any>) {\r
-        logger.info("assignInputs from input JSON ({})", jsonNode.toString())\r
+        log.info("assignInputs from input JSON ({})", jsonNode.toString())\r
         bluePrintContext.inputs?.forEach { propertyName, property ->\r
             val valueNode: JsonNode = jsonNode.at("/".plus(propertyName)) ?: NullNode.getInstance()\r
 \r
             val path = BluePrintConstants.PATH_INPUTS.plus(BluePrintConstants.PATH_DIVIDER).plus(propertyName)\r
-            logger.trace("setting input path ({}), values ({})", path, valueNode)\r
+            log.trace("setting input path ({}), values ({})", path, valueNode)\r
             context[path] = valueNode\r
         }\r
     }\r
index 9eef1ca..7e72744 100644 (file)
@@ -17,6 +17,8 @@
 \r
 package org.onap.ccsdk.apps.controllerblueprints.core.utils\r
 \r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 import com.fasterxml.jackson.annotation.JsonInclude\r
 import com.fasterxml.jackson.core.type.TypeReference\r
 import com.fasterxml.jackson.databind.JsonNode\r
@@ -31,7 +33,6 @@ import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException\r
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintTypes\r
 import org.onap.ccsdk.apps.controllerblueprints.core.format\r
-import org.slf4j.LoggerFactory\r
 import java.io.File\r
 import java.nio.charset.Charset\r
 \r
@@ -41,7 +42,7 @@ import java.nio.charset.Charset
  * @author Brinda Santh\r
  */\r
 object JacksonUtils {\r
-    private val log = LoggerFactory.getLogger(JacksonUtils::class.java)\r
+    private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())\r
 \r
     inline fun <reified T : Any> readValue(content: String): T =\r
             jacksonObjectMapper().readValue(content, T::class.java)\r
index a267455..bc0d9b4 100644 (file)
@@ -19,8 +19,8 @@ package org.onap.ccsdk.apps.controllerblueprints.core.utils
 import org.apache.commons.io.FileUtils\r
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException\r
 import org.onap.ccsdk.apps.controllerblueprints.core.checkNotEmpty\r
-import org.slf4j.Logger\r
-import org.slf4j.LoggerFactory\r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 import java.io.File\r
 import java.net.URL\r
 import java.nio.charset.Charset\r
@@ -30,18 +30,18 @@ import java.nio.charset.Charset
  * @author Brinda Santh\r
  */\r
 object ResourceResolverUtils {\r
-    private val logger: Logger = LoggerFactory.getLogger(this::class.toString())\r
+    private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())\r
 \r
     @JvmStatic\r
     fun getFileContent(filename : String, basePath : String?): String {\r
-        logger.trace("file ({}), basePath ({}) ", filename, basePath)\r
+        log.trace("file ({}), basePath ({}) ", filename, basePath)\r
         try{\r
             var resolvedFileName : String = filename\r
             if(filename.startsWith("http", true)\r
                     || filename.startsWith("https", true)){\r
                 val givenUrl : String = URL(filename).toString()\r
                 val systemUrl : String = File(".").toURI().toURL().toString()\r
-                logger.trace("givenUrl ({}), systemUrl ({}) ", givenUrl, systemUrl)\r
+                log.trace("givenUrl ({}), systemUrl ({}) ", givenUrl, systemUrl)\r
                 if(givenUrl.startsWith(systemUrl)){\r
 \r
                 }\r
index 2fcb9b2..0d73935 100644 (file)
@@ -37,7 +37,7 @@ object ServiceTemplateUtils {
 \r
     @JvmStatic\r
     fun getServiceTemplateFromContent(content: String): ServiceTemplate {\r
-        return JacksonUtils.readValue<ServiceTemplate>(content)\r
+        return JacksonUtils.readValue(content)\r
     }\r
 \r
 \r
index 0b2b39c..7a74ca4 100644 (file)
@@ -23,8 +23,8 @@ import org.junit.Test
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants\r
 import org.onap.ccsdk.apps.controllerblueprints.core.factory.BluePrintParserFactory\r
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils\r
-import org.slf4j.Logger\r
-import org.slf4j.LoggerFactory\r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 import java.io.File\r
 import java.nio.charset.Charset\r
 import kotlin.test.assertNotNull\r
@@ -35,7 +35,7 @@ import kotlin.test.assertNotNull
  */\r
 class BluePrintContextTest {\r
 \r
-    private val logger: Logger = LoggerFactory.getLogger(this::class.toString())\r
+    private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())\r
 \r
     lateinit var bluePrintContext: BluePrintContext\r
 \r
@@ -63,7 +63,7 @@ class BluePrintContextTest {
     fun testChainedProperty() {\r
         val nodeType = bluePrintContext.nodeTypeChained("component-resource-assignment")\r
         assertNotNull(nodeType, "Failed to get chained node type")\r
-        logger.trace("Properties {}", JacksonUtils.getJson(nodeType, true))\r
+        log.trace("Properties {}", JacksonUtils.getJson(nodeType, true))\r
     }\r
 \r
 \r
index 0f211ab..5a5557d 100644 (file)
@@ -18,8 +18,8 @@ package org.onap.ccsdk.apps.controllerblueprints.core.service
 \r
 import org.junit.Test\r
 import org.onap.ccsdk.apps.controllerblueprints.core.factory.BluePrintParserFactory\r
-import org.slf4j.Logger\r
-import org.slf4j.LoggerFactory\r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 import kotlin.test.assertNotNull\r
 \r
 /**\r
@@ -28,7 +28,7 @@ import kotlin.test.assertNotNull
  * @author Brinda Santh\r
  */\r
 class BluePrintParserFactoryTest {\r
-    private val logger: Logger = LoggerFactory.getLogger(this::class.toString())\r
+    private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())\r
 \r
     @Test\r
     fun testBluePrintJson() {\r
@@ -37,6 +37,6 @@ class BluePrintParserFactoryTest {
         val bluePrintContext: BluePrintContext = BluePrintParserFactory.instance(org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants.TYPE_DEFAULT)!!\r
                 .readBlueprintFile("baseconfiguration/Definitions/activation-blueprint.json", basepath)\r
         assertNotNull(bluePrintContext, "Failed to populate Blueprint context")\r
-        logger.trace("Blue Print {}",bluePrintContext.blueprintJson(true))\r
+        log.trace("Blue Print {}",bluePrintContext.blueprintJson(true))\r
     }\r
 }
\ No newline at end of file
index 8ed161a..5d24b07 100644 (file)
@@ -25,8 +25,8 @@ import org.onap.ccsdk.apps.controllerblueprints.core.factory.BluePrintParserFact
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.BluePrintRuntimeUtils\r
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils.jsonNodeFromFile\r
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils.jsonNodeFromObject\r
-import org.slf4j.Logger\r
-import org.slf4j.LoggerFactory\r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 import kotlin.test.assertEquals\r
 import kotlin.test.assertNotNull\r
 \r
@@ -36,7 +36,7 @@ import kotlin.test.assertNotNull
  * @author Brinda Santh\r
  */\r
 class BluePrintRuntimeServiceTest {\r
-    private val logger: Logger = LoggerFactory.getLogger(this::class.toString())\r
+    private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())\r
     val basepath = "load/blueprints"\r
 \r
 \r
@@ -47,7 +47,7 @@ class BluePrintRuntimeServiceTest {
 \r
     @Test\r
     fun testResolveNodeTemplateProperties() {\r
-        logger.info("************************ testResolveNodeTemplateProperties **********************")\r
+        log.info("************************ testResolveNodeTemplateProperties **********************")\r
         val bluePrintContext: BluePrintContext = BluePrintParserFactory.instance(BluePrintConstants.TYPE_DEFAULT)!!\r
                 .readBlueprintFile("baseconfiguration/Definitions/activation-blueprint.json", basepath)\r
 \r
@@ -61,7 +61,7 @@ class BluePrintRuntimeServiceTest {
         bluePrintRuntimeService.assignInputs(inputNode)\r
 \r
         val propContext: MutableMap<String, Any?> = bluePrintRuntimeService.resolveNodeTemplateProperties("activate-process")\r
-        logger.info("Context {}" ,bluePrintRuntimeService.context)\r
+        log.info("Context {}" ,bluePrintRuntimeService.context)\r
 \r
         assertNotNull(propContext, "Failed to populate interface property values")\r
         assertEquals(propContext.get("process-name"), jsonNodeFromObject("sample-action"), "Failed to populate parameter process-name")\r
@@ -70,7 +70,7 @@ class BluePrintRuntimeServiceTest {
 \r
     @Test\r
     fun testResolveNodeTemplateInterfaceOperationInputs() {\r
-        logger.info("************************ testResolveNodeTemplateInterfaceOperationInputs **********************")\r
+        log.info("************************ testResolveNodeTemplateInterfaceOperationInputs **********************")\r
         val bluePrintContext: BluePrintContext = BluePrintParserFactory.instance(BluePrintConstants.TYPE_DEFAULT)!!\r
                 .readBlueprintFile("baseconfiguration/Definitions/activation-blueprint.json", basepath)\r
         assertNotNull(bluePrintContext, "Failed to populate Blueprint context")\r
@@ -84,12 +84,12 @@ class BluePrintRuntimeServiceTest {
 \r
         val bluePrintRuntimeService = BluePrintRuntimeService(bluePrintContext, context)\r
 \r
-        logger.info("Prepared Context {}" ,context)\r
+        log.info("Prepared Context {}" ,context)\r
 \r
         val inContext: MutableMap<String, Any?> = bluePrintRuntimeService.resolveNodeTemplateInterfaceOperationInputs("resource-assignment",\r
                 "DefaultComponentNode", "process")\r
 \r
-        logger.trace("In Context {}" ,inContext)\r
+        log.trace("In Context {}" ,inContext)\r
 \r
         assertNotNull(inContext, "Failed to populate interface input property values")\r
         assertEquals(inContext.get("action-name"), jsonNodeFromObject("sample-action"), "Failed to populate parameter action-name")\r
@@ -100,7 +100,7 @@ class BluePrintRuntimeServiceTest {
 \r
     @Test\r
     fun testResolveNodeTemplateInterfaceOperationOutputs() {\r
-        logger.info("************************ testResolveNodeTemplateInterfaceOperationOutputs **********************")\r
+        log.info("************************ testResolveNodeTemplateInterfaceOperationOutputs **********************")\r
         val bluePrintContext: BluePrintContext = BluePrintParserFactory.instance(BluePrintConstants.TYPE_DEFAULT)!!\r
                 .readBlueprintFile("baseconfiguration/Definitions/activation-blueprint.json", basepath)\r
         assertNotNull(bluePrintContext, "Failed to populate Blueprint context")\r
index 50d2ce4..b05fcb6 100644 (file)
@@ -20,8 +20,8 @@ import org.junit.Before
 import org.junit.Test\r
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants\r
 import org.onap.ccsdk.apps.controllerblueprints.core.factory.BluePrintParserFactory\r
-import org.slf4j.Logger\r
-import org.slf4j.LoggerFactory\r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 \r
 /**\r
  *\r
@@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory
  * @author Brinda Santh\r
  */\r
 class BluePrintValidatorDefaultServiceTest {\r
-    private val logger: Logger = LoggerFactory.getLogger(this::class.toString())\r
+    private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())\r
     val basepath = "load/blueprints"\r
 \r
     @Before\r
@@ -44,6 +44,6 @@ class BluePrintValidatorDefaultServiceTest {
         val properties : MutableMap<String, Any> = hashMapOf()\r
         val validatorService = BluePrintValidatorDefaultService()\r
         validatorService.validateBlueprint(bluePrintContext.serviceTemplate,properties)\r
-        logger.info("Validation Message {}", properties)\r
+        log.info("Validation Message {}", properties)\r
     }\r
 }
\ No newline at end of file
index 8d0f968..a5a630e 100644 (file)
@@ -20,8 +20,8 @@ package org.onap.ccsdk.apps.controllerblueprints.core.utils
 import org.junit.Test\r
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants\r
 import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate\r
-import org.slf4j.Logger\r
-import org.slf4j.LoggerFactory\r
+import com.att.eelf.configuration.EELFLogger\r
+import com.att.eelf.configuration.EELFManager\r
 import kotlin.test.assertEquals\r
 import kotlin.test.assertNotNull\r
 import kotlin.test.assertTrue\r
@@ -33,7 +33,7 @@ import kotlin.test.assertTrue
  */\r
 class JacksonUtilsTest {\r
 \r
-    private val log: Logger = LoggerFactory.getLogger(this::class.toString())\r
+    private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())\r
 \r
     val basePath = "load/blueprints"\r
 \r
@@ -71,7 +71,7 @@ class JacksonUtilsTest {
     @Test\r
     fun testJsonValue() {\r
         val filePath = "data/alltype-data.json"\r
-        val rootJson = JacksonUtils.jsonNodeFromClassPathFile(filePath);\r
+        val rootJson = JacksonUtils.jsonNodeFromClassPathFile(filePath)\r
         assertNotNull(rootJson, "Failed to get all type data json node")\r
         val intValue = rootJson.get("intValue")\r
         assertTrue(JacksonUtils.checkJsonNodeValueOfType(BluePrintConstants.DATA_TYPE_INTEGER, intValue), "Failed to get as int value")\r
index 907eb2e..3fa4f75 100644 (file)
@@ -22,7 +22,7 @@ class TopologicalSortingUtilsTest {
     \r
     @Test\r
     fun testSorting(): Unit {\r
-        val graph: TopologicalSortingUtils<String> = TopologicalSortingUtils<String>()\r
+        val graph: TopologicalSortingUtils<String> = TopologicalSortingUtils()\r
         graph.add("bundle-id", "bundle-mac")\r
         graph.add("bundle-id", "bundle-ip")\r
         graph.add("bundle-mac", "bundle-ip")\r
index b4d68cb..0808073 100644 (file)
@@ -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