From 1072867dfac0df993cbd3e44bcc11a5cac7465fd Mon Sep 17 00:00:00 2001 From: "Singal, Kapil (ks220y)" Date: Tue, 22 Sep 2020 12:16:46 -0400 Subject: Enabling Code Formatter Code Formatter was turned off due to java 11 migation Issue-ID: CCSDK-2852 Signed-off-by: Singal, Kapil (ks220y) Change-Id: I3d02ed3cc7a93d7551fe25356512cfe8db1517d8 --- .../cba/resource/audit/ResourceAuditDefinitions.kt | 79 ++++++++++++---------- 1 file changed, 44 insertions(+), 35 deletions(-) (limited to 'components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/ResourceAuditDefinitions.kt') diff --git a/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/ResourceAuditDefinitions.kt b/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/ResourceAuditDefinitions.kt index 61783d62f..4e66a05c4 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/ResourceAuditDefinitions.kt +++ b/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/ResourceAuditDefinitions.kt @@ -29,55 +29,64 @@ import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.AbstractBluePrintDefinitions class ResourceAuditDefinitions : AbstractBluePrintDefinitions() { + override fun serviceTemplate(): ServiceTemplate { return defaultServiceTemplate() } } fun ResourceAuditDefinitions.defaultServiceTemplate() = - serviceTemplate(name = "resource-audit", - version = "1.0.0", - author = "Brinda Santh Muthuramalingam", - tags = "brinda, tosca") { + serviceTemplate( + name = "resource-audit", + version = "1.0.0", + author = "Brinda Santh Muthuramalingam", + tags = "brinda, tosca" + ) { - topologyTemplate { + topologyTemplate { - workflow(id = "config-collect", description = "Collect the configuration for Device") { - inputs { - property(id = "device-id", type = BluePrintConstants.DATA_TYPE_STRING, required = true, description = "") - property(id = "sources", type = BluePrintConstants.DATA_TYPE_LIST, required = true, description = "") { - entrySchema(BluePrintConstants.DATA_TYPE_STRING) - } + workflow(id = "config-collect", description = "Collect the configuration for Device") { + inputs { + property(id = "device-id", type = BluePrintConstants.DATA_TYPE_STRING, required = true, description = "") + property(id = "sources", type = BluePrintConstants.DATA_TYPE_LIST, required = true, description = "") { + entrySchema(BluePrintConstants.DATA_TYPE_STRING) } - outputs { - property(id = "response-data", required = true, type = BluePrintConstants.DATA_TYPE_STRING, description = "") { - value(getNodeTemplateAttribute(nodeTemplateId = "config-collector", - attributeId = ComponentScriptExecutor.ATTRIBUTE_RESPONSE_DATA)) - } - property(id = "status", required = true, type = BluePrintConstants.DATA_TYPE_STRING, description = "") { - value(BluePrintConstants.STATUS_SUCCESS) - } + } + outputs { + property(id = "response-data", required = true, type = BluePrintConstants.DATA_TYPE_STRING, description = "") { + value( + getNodeTemplateAttribute( + nodeTemplateId = "config-collector", + attributeId = ComponentScriptExecutor.ATTRIBUTE_RESPONSE_DATA + ) + ) + } + property(id = "status", required = true, type = BluePrintConstants.DATA_TYPE_STRING, description = "") { + value(BluePrintConstants.STATUS_SUCCESS) } - step(id = "config-collector", target = "config-collector", description = "Collect the Configuration") } + step(id = "config-collector", target = "config-collector", description = "Collect the Configuration") + } - val configCollectorComponent = BluePrintTypes.nodeTemplateComponentScriptExecutor( - id = "config-collector", description = "Config collector component") { + val configCollectorComponent = BluePrintTypes.nodeTemplateComponentScriptExecutor( + id = "config-collector", + description = "Config collector component" + ) { - definedOperation(description = "Config Collector Operation") { - inputs { - type(BluePrintConstants.SCRIPT_KOTLIN) - scriptClassReference("cba.resource.audit.functions.ConfigCollector") - } - outputs { - status(getAttribute(ComponentScriptExecutor.ATTRIBUTE_STATUS)) - responseData(getAttribute(ComponentScriptExecutor.ATTRIBUTE_RESPONSE_DATA)) - } + definedOperation(description = "Config Collector Operation") { + inputs { + type(BluePrintConstants.SCRIPT_KOTLIN) + scriptClassReference("cba.resource.audit.functions.ConfigCollector") + } + outputs { + status(getAttribute(ComponentScriptExecutor.ATTRIBUTE_STATUS)) + responseData(getAttribute(ComponentScriptExecutor.ATTRIBUTE_RESPONSE_DATA)) } } - nodeTemplate(configCollectorComponent) } + nodeTemplate(configCollectorComponent) + } - nodeType(BluePrintTypes.nodeTypeComponent()) - nodeType(BluePrintTypes.nodeTypeComponentScriptExecutor()) - } \ No newline at end of file + nodeType(BluePrintTypes.nodeTypeComponent()) + nodeType(BluePrintTypes.nodeTypeComponentScriptExecutor()) + } -- cgit 1.2.3-korg