diff options
author | Singal, Kapil (ks220y) <ks220y@att.com> | 2020-09-22 12:16:46 -0400 |
---|---|---|
committer | Singal, Kapil (ks220y) <ks220y@att.com> | 2020-09-22 13:49:05 -0400 |
commit | 1072867dfac0df993cbd3e44bcc11a5cac7465fd (patch) | |
tree | 4a821659cf3b50cf946cbb535d528be8508e9fff /components/model-catalog/blueprint-model/test-blueprint | |
parent | d97021cd756d63402545fdc2e14ac7611c3da118 (diff) |
Enabling Code Formatter
Code Formatter was turned off due to java 11 migation
Issue-ID: CCSDK-2852
Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com>
Change-Id: I3d02ed3cc7a93d7551fe25356512cfe8db1517d8
Diffstat (limited to 'components/model-catalog/blueprint-model/test-blueprint')
6 files changed, 57 insertions, 44 deletions
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCliDefinitions.kt b/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCliDefinitions.kt index 698bf330f..d09244868 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCliDefinitions.kt +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCliDefinitions.kt @@ -73,7 +73,8 @@ fun CapabilityCliDefinitions.defaultServiceTemplate() = } } artifact( - id = "command-template", type = "artifact-template-velocity", + id = "command-template", + type = "artifact-template-velocity", file = "Templates/check-command-template.vtl" ) } diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCli.kt b/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/Check.kt index e29055634..e29055634 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCli.kt +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/Check.kt diff --git a/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/DeviceResourceDefinitions.kt b/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/DeviceResourceDefinitions.kt index a0ca1676e..ee99b04f9 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/DeviceResourceDefinitions.kt +++ b/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/DeviceResourceDefinitions.kt @@ -59,4 +59,4 @@ val deviceResourceDefinitions = BluePrintTypes.resourceDefinitions { } } } -}
\ No newline at end of file +} 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()) + } diff --git a/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/functions/ResourceAuditFunctions.kt b/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/functions/ConfigCollector.kt index 49d0c7348..7ae27dacc 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/functions/ResourceAuditFunctions.kt +++ b/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/functions/ConfigCollector.kt @@ -44,13 +44,15 @@ class ConfigCollector : AbstractScriptComponentFunction() { // Set the Attributes setAttribute(ComponentScriptExecutor.ATTRIBUTE_STATUS, BluePrintConstants.STATUS_SUCCESS.asJsonPrimitive()) - setAttribute(ComponentScriptExecutor.ATTRIBUTE_RESPONSE_DATA, """{ + setAttribute( + ComponentScriptExecutor.ATTRIBUTE_RESPONSE_DATA, + """{ "port-speed" : "10MBS" - }""".trimIndent().jsonAsJsonType()) - + } + """.trimIndent().jsonAsJsonType() + ) } override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) { - } -}
\ No newline at end of file +} diff --git a/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/processor/RAProcessor.kt b/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/processor/PortSpeedRAProcessor.kt index 660f5918b..453c42933 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/processor/RAProcessor.kt +++ b/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/processor/PortSpeedRAProcessor.kt @@ -21,6 +21,7 @@ import org.onap.ccsdk.cds.controllerblueprints.core.logger import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment class PortSpeedRAProcessor : ResourceAssignmentProcessor() { + val log = logger(PortSpeedRAProcessor::class) override fun getName(): String { return "PortSpeedRAProcessor" @@ -31,6 +32,6 @@ class PortSpeedRAProcessor : ResourceAssignmentProcessor() { } override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ResourceAssignment) { - TODO("not implemented") //To change body of created functions use File | Settings | File Templates. + TODO("not implemented") // To change body of created functions use File | Settings | File Templates. } -}
\ No newline at end of file +} |