From cbbe0eac48b8df6e616f56a8ef51fbc7c955d171 Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh(bs2796)" Date: Tue, 13 Nov 2018 16:47:33 -0500 Subject: Blueprints Processor Microservice Implement basic blueprint service logic workflow execution engine. Change-Id: Ifbbad70f2bdc4ba879b07d972083a411c7cc02f1 Issue-ID: CCSDK-672 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) --- .../modules/services/workflow-service/pom.xml | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 ms/blueprintsprocessor/modules/services/workflow-service/pom.xml (limited to 'ms/blueprintsprocessor/modules/services/workflow-service/pom.xml') diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml b/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml new file mode 100644 index 000000000..5809c06d5 --- /dev/null +++ b/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml @@ -0,0 +1,44 @@ + + + + + + org.onap.ccsdk.apps.blueprintsprocessor + services + 0.4.0-SNAPSHOT + + 4.0.0 + + workflow-service + Blueprints Processor Workflow Service + Blueprints Processor Workflow Service + + + + org.onap.ccsdk.apps.blueprintsprocessor + execution-service + + + org.onap.ccsdk.sli.core + sli-provider + + + + + \ No newline at end of file -- cgit 1.2.3-korg From 2e94232cddeb3de3aab4b9eda07ca830845ad259 Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh(bs2796)" Date: Thu, 15 Nov 2018 08:36:28 -0500 Subject: Blueprints Processor Microservice Refactor functon module as seperate module project. Change-Id: I392fc62e6dfb6c5f38f478c00e46460d5084f85c Issue-ID: CCSDK-688 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) --- ms/blueprintsprocessor/application/pom.xml | 1 + .../BlueprintProcessorApplication.java | 3 +- .../src/test/resources/logback-test.xml | 35 +++++++++ ms/blueprintsprocessor/functions/pom.xml | 63 ++++++++++++++++ .../functions/resource-resolution/pom.xml | 31 ++++++++ .../resolution/ResourceResolutionComponent.kt | 39 ++++++++++ .../resolution/ResourceResolutionService.kt | 79 +++++++++++++++++++ .../DefaultResourceAssignmentProcessor.kt | 49 ++++++++++++ .../processor/InputResourceAssignmentProcessor.kt | 49 ++++++++++++ .../processor/MDSALResourceAssignmentProcessor.kt | 48 ++++++++++++ .../processor/SdncResourceAssignmentProcessor.kt | 50 ++++++++++++ .../resolution/ResourceResolutionServiceTest.java | 88 ++++++++++++++++++++++ .../src/test/resources/mapping/db/db-array.json | 35 +++++++++ .../src/test/resources/mapping/db/db-complex.json | 27 +++++++ .../src/test/resources/mapping/db/db-simple.json | 26 +++++++ .../src/test/resources/mapping/db/dt-location.json | 15 ++++ .../mapping/db/resource-assignments-simple.json | 22 ++++++ .../src/test/resources/payload/inputs/input.json | 18 +++++ .../sample-resourceresolution-request.json | 22 ++++++ .../modules/commons/core/pom.xml | 42 +++++------ ms/blueprintsprocessor/modules/commons/pom.xml | 12 +-- ms/blueprintsprocessor/modules/inbounds/pom.xml | 9 +-- ms/blueprintsprocessor/modules/pom.xml | 62 +++++---------- .../modules/services/execution-service/pom.xml | 32 +++++++- ms/blueprintsprocessor/modules/services/pom.xml | 8 -- .../modules/services/resolution-service/pom.xml | 36 --------- .../resolution/ResourceResolutionComponent.kt | 39 ---------- .../resolution/ResourceResolutionService.kt | 79 ------------------- .../DefaultResourceAssignmentProcessor.kt | 49 ------------ .../processor/InputResourceAssignmentProcessor.kt | 49 ------------ .../processor/MDSALResourceAssignmentProcessor.kt | 48 ------------ .../processor/SdncResourceAssignmentProcessor.kt | 50 ------------ .../resolution/ResourceResolutionServiceTest.java | 88 ---------------------- .../src/test/resources/mapping/db/db-array.json | 35 --------- .../src/test/resources/mapping/db/db-complex.json | 27 ------- .../src/test/resources/mapping/db/db-simple.json | 26 ------- .../src/test/resources/mapping/db/dt-location.json | 15 ---- .../mapping/db/resource-assignments-simple.json | 22 ------ .../src/test/resources/payload/inputs/input.json | 18 ----- .../sample-resourceresolution-request.json | 22 ------ .../modules/services/workflow-service/pom.xml | 21 ++++++ .../src/test/resources/logback.xml | 35 +++++++++ ms/blueprintsprocessor/parent/pom.xml | 79 +++++++++++++++---- ms/blueprintsprocessor/pom.xml | 1 + 44 files changed, 896 insertions(+), 708 deletions(-) create mode 100644 ms/blueprintsprocessor/application/src/test/resources/logback-test.xml create mode 100644 ms/blueprintsprocessor/functions/pom.xml create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/pom.xml create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionComponent.kt create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionService.kt create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/DefaultResourceAssignmentProcessor.kt create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/InputResourceAssignmentProcessor.kt create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/MDSALResourceAssignmentProcessor.kt create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/SdncResourceAssignmentProcessor.kt create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/test/java/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionServiceTest.java create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-array.json create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-complex.json create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-simple.json create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/dt-location.json create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/resource-assignments-simple.json create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/payload/inputs/input.json create mode 100644 ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/payload/requests/sample-resourceresolution-request.json delete mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/pom.xml delete mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionComponent.kt delete mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionService.kt delete mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/DefaultResourceAssignmentProcessor.kt delete mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/InputResourceAssignmentProcessor.kt delete mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/MDSALResourceAssignmentProcessor.kt delete mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/SdncResourceAssignmentProcessor.kt delete mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/test/java/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionServiceTest.java delete mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-array.json delete mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-complex.json delete mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-simple.json delete mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/dt-location.json delete mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/resource-assignments-simple.json delete mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/inputs/input.json delete mode 100644 ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/requests/sample-resourceresolution-request.json create mode 100644 ms/blueprintsprocessor/modules/services/workflow-service/src/test/resources/logback.xml (limited to 'ms/blueprintsprocessor/modules/services/workflow-service/pom.xml') diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml index 0fe62e9ee..086a9883d 100644 --- a/ms/blueprintsprocessor/application/pom.xml +++ b/ms/blueprintsprocessor/application/pom.xml @@ -40,6 +40,7 @@ org.springframework.boot spring-boot-starter-web + org.onap.ccsdk.apps.blueprintsprocessor resource-api diff --git a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/BlueprintProcessorApplication.java b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/BlueprintProcessorApplication.java index 2a13f9293..241d920a5 100644 --- a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/BlueprintProcessorApplication.java +++ b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/BlueprintProcessorApplication.java @@ -19,6 +19,7 @@ package org.onap.ccsdk.apps.blueprintsprocessor; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.ComponentScan; import org.springframework.web.reactive.config.EnableWebFlux; @@ -28,7 +29,7 @@ import org.springframework.web.reactive.config.EnableWebFlux; * @author Brinda Santh 8/14/2018 */ @SpringBootApplication -@EnableAutoConfiguration +@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class}) @EnableWebFlux @ComponentScan(basePackages = {"org.onap.ccsdk.apps.controllerblueprints", "org.onap.ccsdk.apps.blueprintsprocessor"}) diff --git a/ms/blueprintsprocessor/application/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/application/src/test/resources/logback-test.xml new file mode 100644 index 000000000..a816a06c5 --- /dev/null +++ b/ms/blueprintsprocessor/application/src/test/resources/logback-test.xml @@ -0,0 +1,35 @@ + + + + + + + %d{HH:mm:ss.SSS} %-5level %logger{100} - %msg%n + + + + + + + + + + + + + diff --git a/ms/blueprintsprocessor/functions/pom.xml b/ms/blueprintsprocessor/functions/pom.xml new file mode 100644 index 000000000..50ea7b0e7 --- /dev/null +++ b/ms/blueprintsprocessor/functions/pom.xml @@ -0,0 +1,63 @@ + + + + + + org.onap.ccsdk.apps.blueprintsprocessor + parent + 0.4.0-SNAPSHOT + ../parent + + 4.0.0 + pom + functions + Blueprints Processor Functions POM + Blueprints Processor Functions POM + + resource-resolution + + + + + org.onap.ccsdk.apps.blueprintsprocessor + execution-service + + + + org.powermock + powermock-api-mockito2 + test + + + org.springframework.boot + spring-boot-starter-test + test + + + org.jetbrains.kotlin + kotlin-test-junit + test + + + io.projectreactor + reactor-test + test + + + \ No newline at end of file diff --git a/ms/blueprintsprocessor/functions/resource-resolution/pom.xml b/ms/blueprintsprocessor/functions/resource-resolution/pom.xml new file mode 100644 index 000000000..a2d3bb85e --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/pom.xml @@ -0,0 +1,31 @@ + + + + 4.0.0 + + org.onap.ccsdk.apps.blueprintsprocessor + functions + 0.4.0-SNAPSHOT + + org.onap.ccsdk.apps.blueprintsprocessor.functions + resource-resolution + jar + Blueprints Processor Resolution Service + Blueprints Processor Resolution Service + + diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionComponent.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionComponent.kt new file mode 100644 index 000000000..ff1a01d58 --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionComponent.kt @@ -0,0 +1,39 @@ +/* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.apps.blueprintsprocessor.services.resolution + +import org.onap.ccsdk.apps.blueprintsprocessor.core.factory.ComponentNode +import org.springframework.stereotype.Component + +@Component("component-resource-resolution") +open class ResourceResolutionComponent : ComponentNode { + override fun validate(context: MutableMap, componentContext: MutableMap) { + TODO("not implemented") //To change body of created functions use File | Settings | File Templates. + } + + override fun process(context: MutableMap, componentContext: MutableMap) { + TODO("not implemented") //To change body of created functions use File | Settings | File Templates. + } + + override fun errorHandle(context: MutableMap, componentContext: MutableMap) { + TODO("not implemented") //To change body of created functions use File | Settings | File Templates. + } + + override fun reTrigger(context: MutableMap, componentContext: MutableMap) { + TODO("not implemented") //To change body of created functions use File | Settings | File Templates. + } +} \ No newline at end of file diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionService.kt new file mode 100644 index 000000000..3ee7e41ff --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionService.kt @@ -0,0 +1,79 @@ +/* + * Copyright © 2017-2018 AT&T Intellectual Property. + * Modifications Copyright © 2018 IBM. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.apps.blueprintsprocessor.services.resolution + +import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ResourceResolutionInput +import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ResourceResolutionOutput +import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.Status +import org.onap.ccsdk.apps.blueprintsprocessor.core.factory.ResourceAssignmentProcessorFactory +import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException +import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment +import org.onap.ccsdk.apps.controllerblueprints.resource.dict.utils.BulkResourceSequencingUtils +import org.springframework.stereotype.Service + +/** + * ResourceResolutionService + * @author Brinda Santh + * 8/14/2018 + */ + +@Service +class ResourceResolutionService(private val resourceAssignmentProcessorFactory: ResourceAssignmentProcessorFactory) { + + fun resolveResource(resourceResolutionInput: ResourceResolutionInput): ResourceResolutionOutput { + val resourceResolutionOutput = ResourceResolutionOutput() + resourceResolutionOutput.actionIdentifiers = resourceResolutionInput.actionIdentifiers + resourceResolutionOutput.commonHeader = resourceResolutionInput.commonHeader + resourceResolutionOutput.resourceAssignments = resourceResolutionInput.resourceAssignments + + val context = hashMapOf() + + process(resourceResolutionOutput.resourceAssignments, context) + + val status = Status() + status.code = 200 + status.message = "Success" + resourceResolutionOutput.status = status + + return resourceResolutionOutput + } + + fun process(resourceAssignments: MutableList, context: MutableMap): Unit { + + val bulkSequenced = BulkResourceSequencingUtils.process(resourceAssignments) + + bulkSequenced.map { batchResourceAssignments -> + batchResourceAssignments.filter { it.name != "*" && it.name != "start" } + .map { resourceAssignment -> + val dictionarySource = resourceAssignment.dictionarySource + val processorInstanceName = "resource-assignment-processor-".plus(dictionarySource) + val resourceAssignmentProcessor = resourceAssignmentProcessorFactory.getInstance(processorInstanceName) + ?: throw BluePrintProcessorException("failed to get resource processor for instance name($processorInstanceName) " + + "for resource assignment(${resourceAssignment.name})") + try { + resourceAssignmentProcessor.validate(resourceAssignment, context) + resourceAssignmentProcessor.process(resourceAssignment, context) + } catch (e: Exception) { + resourceAssignmentProcessor.errorHandle(resourceAssignment, context) + throw BluePrintProcessorException(e) + } + + } + } + } +} diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/DefaultResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/DefaultResourceAssignmentProcessor.kt new file mode 100644 index 000000000..9580ca49a --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/DefaultResourceAssignmentProcessor.kt @@ -0,0 +1,49 @@ +/* + * Copyright © 2017-2018 AT&T Intellectual Property. + * Modifications Copyright © 2018 IBM. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.apps.blueprintsprocessor.services.resolution.processor + +import com.att.eelf.configuration.EELFManager +import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment +import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignmentProcessor +import org.springframework.stereotype.Service + +/** + * DefaultResourceAssignmentProcessor + * + * @author Brinda Santh + */ +@Service("resource-assignment-processor-default") +open class DefaultResourceAssignmentProcessor : ResourceAssignmentProcessor { + private val log = EELFManager.getInstance().getLogger(DefaultResourceAssignmentProcessor::class.java) + + override fun validate(resourceAssignment: ResourceAssignment, context: MutableMap) { + log.info("Validation Resource Assignments") + } + + override fun process(resourceAssignment: ResourceAssignment, context: MutableMap) { + log.info("Processing Resource Assignments") + } + + override fun errorHandle(resourceAssignment: ResourceAssignment, context: MutableMap) { + log.info("ErrorHandle Resource Assignments") + } + + override fun reTrigger(resourceAssignment: ResourceAssignment, context: MutableMap) { + log.info("Re Trigger Resource Assignments") + } +} \ No newline at end of file diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/InputResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/InputResourceAssignmentProcessor.kt new file mode 100644 index 000000000..05f7d5cdd --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/InputResourceAssignmentProcessor.kt @@ -0,0 +1,49 @@ +/* + * Copyright © 2017-2018 AT&T Intellectual Property. + * Modifications Copyright © 2018 IBM. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.apps.blueprintsprocessor.services.resolution.processor + +import com.att.eelf.configuration.EELFManager +import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment +import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignmentProcessor +import org.springframework.stereotype.Service + +/** + * InputResourceAssignmentProcessor + * + * @author Brinda Santh + */ +@Service("resource-assignment-processor-input") +open class InputResourceAssignmentProcessor : ResourceAssignmentProcessor { + private val log = EELFManager.getInstance().getLogger(InputResourceAssignmentProcessor::class.java) + + override fun validate(resourceAssignment: ResourceAssignment, context: MutableMap) { + log.info("Validation Resource Assignments") + } + + override fun process(resourceAssignment: ResourceAssignment, context: MutableMap) { + log.info("Processing Resource Assignments") + } + + override fun errorHandle(resourceAssignment: ResourceAssignment, context: MutableMap) { + log.info("ErrorHandle Resource Assignments") + } + + override fun reTrigger(resourceAssignment: ResourceAssignment, context: MutableMap) { + log.info("Re Trigger Resource Assignments") + } +} \ No newline at end of file diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/MDSALResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/MDSALResourceAssignmentProcessor.kt new file mode 100644 index 000000000..9d54cd46a --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/MDSALResourceAssignmentProcessor.kt @@ -0,0 +1,48 @@ +/* + * Copyright © 2018 IBM. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.apps.blueprintsprocessor.services.resolution.processor + +import com.att.eelf.configuration.EELFManager +import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment +import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignmentProcessor +import org.springframework.stereotype.Service + +/** + * MDSALResourceAssignmentProcessor + * + * @author Brinda Santh + */ +@Service("resource-assignment-processor-mdsal") +open class MDSALResourceAssignmentProcessor : ResourceAssignmentProcessor { + private val log = EELFManager.getInstance().getLogger(MDSALResourceAssignmentProcessor::class.java) + + override fun validate(resourceAssignment: ResourceAssignment, context: MutableMap) { + log.info("Validation Resource Assignments") + } + + override fun process(resourceAssignment: ResourceAssignment, context: MutableMap) { + log.info("Processing Resource Assignments") + } + + override fun errorHandle(resourceAssignment: ResourceAssignment, context: MutableMap) { + log.info("ErrorHandle Resource Assignments") + } + + override fun reTrigger(resourceAssignment: ResourceAssignment, context: MutableMap) { + log.info("Re Trigger Resource Assignments") + } +} \ No newline at end of file diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/SdncResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/SdncResourceAssignmentProcessor.kt new file mode 100644 index 000000000..4b11f580e --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/SdncResourceAssignmentProcessor.kt @@ -0,0 +1,50 @@ +/* + * Copyright © 2018 IBM. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.apps.blueprintsprocessor.services.resolution.processor + +import com.att.eelf.configuration.EELFManager +import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment +import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignmentProcessor +import org.springframework.stereotype.Service + +/** + * SdncResourceAssignmentProcessor + * + * @author Brinda Santh + */ +@Service("resource-assignment-processor-db") +open class SdncResourceAssignmentProcessor : ResourceAssignmentProcessor { + + private val log = EELFManager.getInstance().getLogger(SdncResourceAssignmentProcessor::class.java) + + override fun validate(resourceAssignment: ResourceAssignment, context: MutableMap) { + log.info("Validation Resource Assignments") + } + + override fun process(resourceAssignment: ResourceAssignment, context: MutableMap) { + log.info("Processing Resource Assignments") + } + + override fun errorHandle(resourceAssignment: ResourceAssignment, context: MutableMap) { + log.info("ErrorHandle Resource Assignments") + } + + override fun reTrigger(resourceAssignment: ResourceAssignment, context: MutableMap) { + log.info("Re Trigger Resource Assignments") + } + +} \ No newline at end of file diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/java/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionServiceTest.java b/ms/blueprintsprocessor/functions/resource-resolution/src/test/java/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionServiceTest.java new file mode 100644 index 000000000..0768c6099 --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/java/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionServiceTest.java @@ -0,0 +1,88 @@ +/* + * Copyright © 2017-2018 AT&T Intellectual Property. + * Modifications Copyright © 2018 IBM. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.apps.blueprintsprocessor.services.resolution; + +import com.fasterxml.jackson.databind.node.ObjectNode; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.io.FileUtils; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ResourceResolutionInput; +import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ResourceResolutionOutput; +import org.onap.ccsdk.apps.blueprintsprocessor.core.factory.ResourceAssignmentProcessorFactory; +import org.onap.ccsdk.apps.blueprintsprocessor.services.resolution.processor.DefaultResourceAssignmentProcessor; +import org.onap.ccsdk.apps.blueprintsprocessor.services.resolution.processor.InputResourceAssignmentProcessor; +import org.onap.ccsdk.apps.blueprintsprocessor.services.resolution.processor.MDSALResourceAssignmentProcessor; +import org.onap.ccsdk.apps.blueprintsprocessor.services.resolution.processor.SdncResourceAssignmentProcessor; +import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils; +import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringRunner; + +import java.io.File; +import java.nio.charset.Charset; +import java.util.List; + +/** + * ResourceResolutionServiceTest + * + * @author Brinda Santh DATE : 8/15/2018 + */ +@RunWith(SpringRunner.class) +@ContextConfiguration(classes = {ResourceResolutionService.class, ResourceAssignmentProcessorFactory.class, + InputResourceAssignmentProcessor.class, DefaultResourceAssignmentProcessor.class, + SdncResourceAssignmentProcessor.class, MDSALResourceAssignmentProcessor.class}) +public class ResourceResolutionServiceTest { + private static Logger log = LoggerFactory.getLogger(ResourceResolutionServiceTest.class); + + @Autowired + private ResourceResolutionService resourceResolutionService; + + @Test + public void testResolveResource() throws Exception { + + Assert.assertNotNull("failed to create ResourceResolutionService", resourceResolutionService); + + String resourceResolutionInputContent = FileUtils.readFileToString( + new File("src/test/resources/payload/requests/sample-resourceresolution-request.json"), Charset.defaultCharset()); + + ResourceResolutionInput resourceResolutionInput = JacksonUtils.readValue(resourceResolutionInputContent, ResourceResolutionInput.class); + Assert.assertNotNull("failed to populate resourceResolutionInput request ", resourceResolutionInput); + + String resourceAssignmentContent = FileUtils.readFileToString( + new File("src/test/resources/mapping/db/resource-assignments-simple.json"), Charset.defaultCharset()); + List batchResourceAssignment = + JacksonUtils.getListFromJson(resourceAssignmentContent, ResourceAssignment.class); + + Assert.assertTrue("failed to create ResourceAssignment from file", CollectionUtils.isNotEmpty(batchResourceAssignment)); + resourceResolutionInput.setResourceAssignments(batchResourceAssignment); + + ObjectNode inputContent = (ObjectNode) JacksonUtils.jsonNodeFromFile("src/test/resources/payload/inputs/input.json"); + Assert.assertNotNull("failed to populate input payload ", inputContent); + resourceResolutionInput.setPayload(inputContent); + log.info("ResourceResolutionInput : {}", JacksonUtils.getJson(resourceResolutionInput, true)); + + ResourceResolutionOutput resourceResolutionOutput = resourceResolutionService.resolveResource(resourceResolutionInput); + Assert.assertNotNull("failed to populate output", resourceResolutionOutput); + + } +} diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-array.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-array.json new file mode 100644 index 000000000..679b92db4 --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-array.json @@ -0,0 +1,35 @@ +{ + "locations": { + "name": "locations", + "data-type": "list", + "entry-schema": "dt-location", + "source": { + "db": { + "query": "SELECT db-country, db-state FROM DEVICE_PROFILE WHERE profile_name = :profile_name", + "input-key-mapping": { + "profile_name": "profile_name" + }, + "output-key-mapping": { + "db-country": "country", + "db-state": "state" + } + } + }, + "candidate-dependency": { + "db": { + "names": [ + "profile_name" + ] + } + } + }, + "profile_name": { + "name": "profile_name", + "data-type": "string", + "source": { + "input": { + + } + } + } +} diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-complex.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-complex.json new file mode 100644 index 000000000..32d04b690 --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-complex.json @@ -0,0 +1,27 @@ +{ + "location": { + "name": "location", + "data-type": "dt-location", + "source": { + "db": { + "query": "SELECT db-country, db-state FROM DEVICE_PROFILE WHERE profile_name = :profile_name", + "input-key-mapping": { + "profile_name": "profile_name" + }, + "output-key-mapping": { + "db-country": "country", + "db-state": "state" + } + } + } + }, + "profile_name": { + "name": "profile_name", + "data-type": "string", + "source": { + "input": { + + } + } + } +} diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-simple.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-simple.json new file mode 100644 index 000000000..841404f22 --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/db-simple.json @@ -0,0 +1,26 @@ +{ + "country": { + "name": "country", + "data-type": "string", + "source": { + "db": { + "query": "SELECT country FROM DEVICE_PROFILE WHERE profile_name = :profile_name", + "input-key-mapping": { + "profile_name": "profile_name" + }, + "output-key-mapping": { + "country": "country" + } + } + } + }, + "profile_name": { + "name": "profile_name", + "data-type": "string", + "source": { + "input": { + + } + } + } +} diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/dt-location.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/dt-location.json new file mode 100644 index 000000000..52e0a7967 --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/dt-location.json @@ -0,0 +1,15 @@ +{ + "version": "1.0.0", + "description": "test Data Type", + "properties": { + "country": { + "required": true, + "type": "string" + }, + "state": { + "required": false, + "type": "string" + } + }, + "derived_from": "tosca.datatypes.Root" +} diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/resource-assignments-simple.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/resource-assignments-simple.json new file mode 100644 index 000000000..ddcf32eed --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/db/resource-assignments-simple.json @@ -0,0 +1,22 @@ +[ + { + "name": "country", + "input-param": true, + "property": { + "type": "string" + }, + "dictionary-name": "country", + "dictionary-source": "db", + "dependencies": ["state"] + }, + { + "name": "state", + "input-param": true, + "property": { + "type": "string" + }, + "dictionary-name": "state", + "dictionary-source": "input", + "dependencies": [] + } +] diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/payload/inputs/input.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/payload/inputs/input.json new file mode 100644 index 000000000..cd6fac128 --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/payload/inputs/input.json @@ -0,0 +1,18 @@ +{ + "api-ver": "2.00", + "originator-id": "MSO", + "request-id": "123456", + "service-instance-id": "ibcx0001vm001", + "service-type": "AVPN", + "vnf-type": "vUSP - vDBE-IPX HUB", + "vnf-id": 123456, + "service-template-name": "VRR-baseconfiguration", + "service-template-version": "1.0.0", + "action-name": "resource-assignment-action", + "group-name": "sample group name", + "bundle-id": "sample bundle id", + "bundle-mac": [ + "Sample bundle mac", + "Sample bundle mac" + ] +} diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/payload/requests/sample-resourceresolution-request.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/payload/requests/sample-resourceresolution-request.json new file mode 100644 index 000000000..e8830a8a2 --- /dev/null +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/payload/requests/sample-resourceresolution-request.json @@ -0,0 +1,22 @@ +{ + "actionIdentifiers": { + "actionName": "sample-action", + "blueprintName": "sample-blurprint", + "blueprintVersion": "1.0.0", + "mode": "sync" + }, + "commonHeader": { + "flags": { + "force": true, + "ttl": 3600 + }, + "originatorId": "sdnc", + "requestId": "123456-1000", + "subRequestId": "sub-123456-1000", + "timestamp": "2012-04-23T18:25:43.511Z" + }, + "payload": { + }, + "resourceAssignments": [ + ] +} diff --git a/ms/blueprintsprocessor/modules/commons/core/pom.xml b/ms/blueprintsprocessor/modules/commons/core/pom.xml index 094f42b7a..626a27a37 100644 --- a/ms/blueprintsprocessor/modules/commons/core/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/core/pom.xml @@ -17,27 +17,27 @@ ~ limitations under the License. --> - 4.0.0 - - org.onap.ccsdk.apps.blueprintsprocessor - commons - 0.4.0-SNAPSHOT - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + + org.onap.ccsdk.apps.blueprintsprocessor + commons + 0.4.0-SNAPSHOT + - core - jar - Blueprints Processor Core - Blueprints Processor Core + core + jar + Blueprints Processor Core + Blueprints Processor Core - - - org.onap.ccsdk.apps.blueprintsprocessor - db-lib - - - org.onap.ccsdk.apps.blueprintsprocessor - rest-lib - - + + + org.onap.ccsdk.apps.blueprintsprocessor + db-lib + + + org.onap.ccsdk.apps.blueprintsprocessor + rest-lib + + diff --git a/ms/blueprintsprocessor/modules/commons/pom.xml b/ms/blueprintsprocessor/modules/commons/pom.xml index c080f817c..7bfec58c9 100644 --- a/ms/blueprintsprocessor/modules/commons/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/pom.xml @@ -35,16 +35,8 @@ - com.fasterxml.jackson.module - jackson-module-kotlin - - - org.jetbrains.kotlin - kotlin-stdlib-jdk8 - - - org.jetbrains.kotlin - kotlin-reflect + org.onap.ccsdk.apps.controllerblueprints + resource-dict org.jetbrains.kotlin diff --git a/ms/blueprintsprocessor/modules/inbounds/pom.xml b/ms/blueprintsprocessor/modules/inbounds/pom.xml index f03e5557b..e26af0f0f 100644 --- a/ms/blueprintsprocessor/modules/inbounds/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/pom.xml @@ -33,16 +33,13 @@ selfservice-api - - - org.onap.ccsdk.apps.blueprintsprocessor - execution-service + workflow-service - org.onap.ccsdk.apps.blueprintsprocessor - resolution-service + org.onap.ccsdk.apps.blueprintsprocessor.functions + resource-resolution org.springframework.boot diff --git a/ms/blueprintsprocessor/modules/pom.xml b/ms/blueprintsprocessor/modules/pom.xml index 93f312b8f..0230cd7e5 100644 --- a/ms/blueprintsprocessor/modules/pom.xml +++ b/ms/blueprintsprocessor/modules/pom.xml @@ -17,56 +17,32 @@ ~ limitations under the License. --> - 4.0.0 - - org.onap.ccsdk.apps.blueprintsprocessor - parent - 0.4.0-SNAPSHOT - ../parent - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + + org.onap.ccsdk.apps.blueprintsprocessor + parent + 0.4.0-SNAPSHOT + ../parent + - modules - pom - Blueprints Processor Modules POM - Blueprints Processor Modules - - - commons - outbounds - services - inbounds - - - - - org.powermock - powermock-api-mockito2 - test - - - org.springframework.boot - spring-boot-starter-test - test - - - org.jetbrains.kotlin - kotlin-test-junit - test - - - io.projectreactor - reactor-test - test - - + modules + pom + Blueprints Processor Modules POM + Blueprints Processor Modules + + commons + outbounds + services + inbounds + org.jetbrains.kotlin kotlin-maven-plugin - ${kotlin.version} + ${kotlin.maven.version} compile diff --git a/ms/blueprintsprocessor/modules/services/execution-service/pom.xml b/ms/blueprintsprocessor/modules/services/execution-service/pom.xml index 158496df1..4f0e6c0b2 100644 --- a/ms/blueprintsprocessor/modules/services/execution-service/pom.xml +++ b/ms/blueprintsprocessor/modules/services/execution-service/pom.xml @@ -31,7 +31,37 @@ org.onap.ccsdk.apps.blueprintsprocessor - db-service + core + + + org.onap.ccsdk.apps.controllerblueprints + resource-dict + + + + org.onap.ccsdk.sli.core + sli-provider + + + + org.powermock + powermock-api-mockito2 + test + + + org.springframework.boot + spring-boot-starter-test + test + + + org.jetbrains.kotlin + kotlin-test-junit + test + + + io.projectreactor + reactor-test + test diff --git a/ms/blueprintsprocessor/modules/services/pom.xml b/ms/blueprintsprocessor/modules/services/pom.xml index d175f129f..d2f2e0cb4 100644 --- a/ms/blueprintsprocessor/modules/services/pom.xml +++ b/ms/blueprintsprocessor/modules/services/pom.xml @@ -30,14 +30,6 @@ execution-service - resolution-service workflow-service - - - - org.onap.ccsdk.apps.blueprintsprocessor - core - - diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/pom.xml b/ms/blueprintsprocessor/modules/services/resolution-service/pom.xml deleted file mode 100644 index 21464c14e..000000000 --- a/ms/blueprintsprocessor/modules/services/resolution-service/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - 4.0.0 - - org.onap.ccsdk.apps.blueprintsprocessor - services - 0.4.0-SNAPSHOT - - resolution-service - jar - Blueprints Processor Resolution Service - Blueprints Processor Resolution Service - - - - org.onap.ccsdk.apps.blueprintsprocessor - db-service - - - diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionComponent.kt b/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionComponent.kt deleted file mode 100644 index ff1a01d58..000000000 --- a/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionComponent.kt +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.onap.ccsdk.apps.blueprintsprocessor.services.resolution - -import org.onap.ccsdk.apps.blueprintsprocessor.core.factory.ComponentNode -import org.springframework.stereotype.Component - -@Component("component-resource-resolution") -open class ResourceResolutionComponent : ComponentNode { - override fun validate(context: MutableMap, componentContext: MutableMap) { - TODO("not implemented") //To change body of created functions use File | Settings | File Templates. - } - - override fun process(context: MutableMap, componentContext: MutableMap) { - TODO("not implemented") //To change body of created functions use File | Settings | File Templates. - } - - override fun errorHandle(context: MutableMap, componentContext: MutableMap) { - TODO("not implemented") //To change body of created functions use File | Settings | File Templates. - } - - override fun reTrigger(context: MutableMap, componentContext: MutableMap) { - TODO("not implemented") //To change body of created functions use File | Settings | File Templates. - } -} \ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionService.kt b/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionService.kt deleted file mode 100644 index 3ee7e41ff..000000000 --- a/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionService.kt +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * Modifications Copyright © 2018 IBM. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.onap.ccsdk.apps.blueprintsprocessor.services.resolution - -import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ResourceResolutionInput -import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ResourceResolutionOutput -import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.Status -import org.onap.ccsdk.apps.blueprintsprocessor.core.factory.ResourceAssignmentProcessorFactory -import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException -import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment -import org.onap.ccsdk.apps.controllerblueprints.resource.dict.utils.BulkResourceSequencingUtils -import org.springframework.stereotype.Service - -/** - * ResourceResolutionService - * @author Brinda Santh - * 8/14/2018 - */ - -@Service -class ResourceResolutionService(private val resourceAssignmentProcessorFactory: ResourceAssignmentProcessorFactory) { - - fun resolveResource(resourceResolutionInput: ResourceResolutionInput): ResourceResolutionOutput { - val resourceResolutionOutput = ResourceResolutionOutput() - resourceResolutionOutput.actionIdentifiers = resourceResolutionInput.actionIdentifiers - resourceResolutionOutput.commonHeader = resourceResolutionInput.commonHeader - resourceResolutionOutput.resourceAssignments = resourceResolutionInput.resourceAssignments - - val context = hashMapOf() - - process(resourceResolutionOutput.resourceAssignments, context) - - val status = Status() - status.code = 200 - status.message = "Success" - resourceResolutionOutput.status = status - - return resourceResolutionOutput - } - - fun process(resourceAssignments: MutableList, context: MutableMap): Unit { - - val bulkSequenced = BulkResourceSequencingUtils.process(resourceAssignments) - - bulkSequenced.map { batchResourceAssignments -> - batchResourceAssignments.filter { it.name != "*" && it.name != "start" } - .map { resourceAssignment -> - val dictionarySource = resourceAssignment.dictionarySource - val processorInstanceName = "resource-assignment-processor-".plus(dictionarySource) - val resourceAssignmentProcessor = resourceAssignmentProcessorFactory.getInstance(processorInstanceName) - ?: throw BluePrintProcessorException("failed to get resource processor for instance name($processorInstanceName) " + - "for resource assignment(${resourceAssignment.name})") - try { - resourceAssignmentProcessor.validate(resourceAssignment, context) - resourceAssignmentProcessor.process(resourceAssignment, context) - } catch (e: Exception) { - resourceAssignmentProcessor.errorHandle(resourceAssignment, context) - throw BluePrintProcessorException(e) - } - - } - } - } -} diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/DefaultResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/DefaultResourceAssignmentProcessor.kt deleted file mode 100644 index 9580ca49a..000000000 --- a/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/DefaultResourceAssignmentProcessor.kt +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * Modifications Copyright © 2018 IBM. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.onap.ccsdk.apps.blueprintsprocessor.services.resolution.processor - -import com.att.eelf.configuration.EELFManager -import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment -import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignmentProcessor -import org.springframework.stereotype.Service - -/** - * DefaultResourceAssignmentProcessor - * - * @author Brinda Santh - */ -@Service("resource-assignment-processor-default") -open class DefaultResourceAssignmentProcessor : ResourceAssignmentProcessor { - private val log = EELFManager.getInstance().getLogger(DefaultResourceAssignmentProcessor::class.java) - - override fun validate(resourceAssignment: ResourceAssignment, context: MutableMap) { - log.info("Validation Resource Assignments") - } - - override fun process(resourceAssignment: ResourceAssignment, context: MutableMap) { - log.info("Processing Resource Assignments") - } - - override fun errorHandle(resourceAssignment: ResourceAssignment, context: MutableMap) { - log.info("ErrorHandle Resource Assignments") - } - - override fun reTrigger(resourceAssignment: ResourceAssignment, context: MutableMap) { - log.info("Re Trigger Resource Assignments") - } -} \ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/InputResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/InputResourceAssignmentProcessor.kt deleted file mode 100644 index 05f7d5cdd..000000000 --- a/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/InputResourceAssignmentProcessor.kt +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * Modifications Copyright © 2018 IBM. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.onap.ccsdk.apps.blueprintsprocessor.services.resolution.processor - -import com.att.eelf.configuration.EELFManager -import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment -import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignmentProcessor -import org.springframework.stereotype.Service - -/** - * InputResourceAssignmentProcessor - * - * @author Brinda Santh - */ -@Service("resource-assignment-processor-input") -open class InputResourceAssignmentProcessor : ResourceAssignmentProcessor { - private val log = EELFManager.getInstance().getLogger(InputResourceAssignmentProcessor::class.java) - - override fun validate(resourceAssignment: ResourceAssignment, context: MutableMap) { - log.info("Validation Resource Assignments") - } - - override fun process(resourceAssignment: ResourceAssignment, context: MutableMap) { - log.info("Processing Resource Assignments") - } - - override fun errorHandle(resourceAssignment: ResourceAssignment, context: MutableMap) { - log.info("ErrorHandle Resource Assignments") - } - - override fun reTrigger(resourceAssignment: ResourceAssignment, context: MutableMap) { - log.info("Re Trigger Resource Assignments") - } -} \ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/MDSALResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/MDSALResourceAssignmentProcessor.kt deleted file mode 100644 index 9d54cd46a..000000000 --- a/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/MDSALResourceAssignmentProcessor.kt +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright © 2018 IBM. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.onap.ccsdk.apps.blueprintsprocessor.services.resolution.processor - -import com.att.eelf.configuration.EELFManager -import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment -import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignmentProcessor -import org.springframework.stereotype.Service - -/** - * MDSALResourceAssignmentProcessor - * - * @author Brinda Santh - */ -@Service("resource-assignment-processor-mdsal") -open class MDSALResourceAssignmentProcessor : ResourceAssignmentProcessor { - private val log = EELFManager.getInstance().getLogger(MDSALResourceAssignmentProcessor::class.java) - - override fun validate(resourceAssignment: ResourceAssignment, context: MutableMap) { - log.info("Validation Resource Assignments") - } - - override fun process(resourceAssignment: ResourceAssignment, context: MutableMap) { - log.info("Processing Resource Assignments") - } - - override fun errorHandle(resourceAssignment: ResourceAssignment, context: MutableMap) { - log.info("ErrorHandle Resource Assignments") - } - - override fun reTrigger(resourceAssignment: ResourceAssignment, context: MutableMap) { - log.info("Re Trigger Resource Assignments") - } -} \ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/SdncResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/SdncResourceAssignmentProcessor.kt deleted file mode 100644 index 4b11f580e..000000000 --- a/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/processor/SdncResourceAssignmentProcessor.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright © 2018 IBM. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.onap.ccsdk.apps.blueprintsprocessor.services.resolution.processor - -import com.att.eelf.configuration.EELFManager -import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment -import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignmentProcessor -import org.springframework.stereotype.Service - -/** - * SdncResourceAssignmentProcessor - * - * @author Brinda Santh - */ -@Service("resource-assignment-processor-db") -open class SdncResourceAssignmentProcessor : ResourceAssignmentProcessor { - - private val log = EELFManager.getInstance().getLogger(SdncResourceAssignmentProcessor::class.java) - - override fun validate(resourceAssignment: ResourceAssignment, context: MutableMap) { - log.info("Validation Resource Assignments") - } - - override fun process(resourceAssignment: ResourceAssignment, context: MutableMap) { - log.info("Processing Resource Assignments") - } - - override fun errorHandle(resourceAssignment: ResourceAssignment, context: MutableMap) { - log.info("ErrorHandle Resource Assignments") - } - - override fun reTrigger(resourceAssignment: ResourceAssignment, context: MutableMap) { - log.info("Re Trigger Resource Assignments") - } - -} \ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/java/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionServiceTest.java b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/java/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionServiceTest.java deleted file mode 100644 index 0768c6099..000000000 --- a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/java/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionServiceTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * Modifications Copyright © 2018 IBM. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.onap.ccsdk.apps.blueprintsprocessor.services.resolution; - -import com.fasterxml.jackson.databind.node.ObjectNode; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.io.FileUtils; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ResourceResolutionInput; -import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ResourceResolutionOutput; -import org.onap.ccsdk.apps.blueprintsprocessor.core.factory.ResourceAssignmentProcessorFactory; -import org.onap.ccsdk.apps.blueprintsprocessor.services.resolution.processor.DefaultResourceAssignmentProcessor; -import org.onap.ccsdk.apps.blueprintsprocessor.services.resolution.processor.InputResourceAssignmentProcessor; -import org.onap.ccsdk.apps.blueprintsprocessor.services.resolution.processor.MDSALResourceAssignmentProcessor; -import org.onap.ccsdk.apps.blueprintsprocessor.services.resolution.processor.SdncResourceAssignmentProcessor; -import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils; -import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringRunner; - -import java.io.File; -import java.nio.charset.Charset; -import java.util.List; - -/** - * ResourceResolutionServiceTest - * - * @author Brinda Santh DATE : 8/15/2018 - */ -@RunWith(SpringRunner.class) -@ContextConfiguration(classes = {ResourceResolutionService.class, ResourceAssignmentProcessorFactory.class, - InputResourceAssignmentProcessor.class, DefaultResourceAssignmentProcessor.class, - SdncResourceAssignmentProcessor.class, MDSALResourceAssignmentProcessor.class}) -public class ResourceResolutionServiceTest { - private static Logger log = LoggerFactory.getLogger(ResourceResolutionServiceTest.class); - - @Autowired - private ResourceResolutionService resourceResolutionService; - - @Test - public void testResolveResource() throws Exception { - - Assert.assertNotNull("failed to create ResourceResolutionService", resourceResolutionService); - - String resourceResolutionInputContent = FileUtils.readFileToString( - new File("src/test/resources/payload/requests/sample-resourceresolution-request.json"), Charset.defaultCharset()); - - ResourceResolutionInput resourceResolutionInput = JacksonUtils.readValue(resourceResolutionInputContent, ResourceResolutionInput.class); - Assert.assertNotNull("failed to populate resourceResolutionInput request ", resourceResolutionInput); - - String resourceAssignmentContent = FileUtils.readFileToString( - new File("src/test/resources/mapping/db/resource-assignments-simple.json"), Charset.defaultCharset()); - List batchResourceAssignment = - JacksonUtils.getListFromJson(resourceAssignmentContent, ResourceAssignment.class); - - Assert.assertTrue("failed to create ResourceAssignment from file", CollectionUtils.isNotEmpty(batchResourceAssignment)); - resourceResolutionInput.setResourceAssignments(batchResourceAssignment); - - ObjectNode inputContent = (ObjectNode) JacksonUtils.jsonNodeFromFile("src/test/resources/payload/inputs/input.json"); - Assert.assertNotNull("failed to populate input payload ", inputContent); - resourceResolutionInput.setPayload(inputContent); - log.info("ResourceResolutionInput : {}", JacksonUtils.getJson(resourceResolutionInput, true)); - - ResourceResolutionOutput resourceResolutionOutput = resourceResolutionService.resolveResource(resourceResolutionInput); - Assert.assertNotNull("failed to populate output", resourceResolutionOutput); - - } -} diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-array.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-array.json deleted file mode 100644 index 679b92db4..000000000 --- a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-array.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "locations": { - "name": "locations", - "data-type": "list", - "entry-schema": "dt-location", - "source": { - "db": { - "query": "SELECT db-country, db-state FROM DEVICE_PROFILE WHERE profile_name = :profile_name", - "input-key-mapping": { - "profile_name": "profile_name" - }, - "output-key-mapping": { - "db-country": "country", - "db-state": "state" - } - } - }, - "candidate-dependency": { - "db": { - "names": [ - "profile_name" - ] - } - } - }, - "profile_name": { - "name": "profile_name", - "data-type": "string", - "source": { - "input": { - - } - } - } -} diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-complex.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-complex.json deleted file mode 100644 index 32d04b690..000000000 --- a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-complex.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "location": { - "name": "location", - "data-type": "dt-location", - "source": { - "db": { - "query": "SELECT db-country, db-state FROM DEVICE_PROFILE WHERE profile_name = :profile_name", - "input-key-mapping": { - "profile_name": "profile_name" - }, - "output-key-mapping": { - "db-country": "country", - "db-state": "state" - } - } - } - }, - "profile_name": { - "name": "profile_name", - "data-type": "string", - "source": { - "input": { - - } - } - } -} diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-simple.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-simple.json deleted file mode 100644 index 841404f22..000000000 --- a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-simple.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "country": { - "name": "country", - "data-type": "string", - "source": { - "db": { - "query": "SELECT country FROM DEVICE_PROFILE WHERE profile_name = :profile_name", - "input-key-mapping": { - "profile_name": "profile_name" - }, - "output-key-mapping": { - "country": "country" - } - } - } - }, - "profile_name": { - "name": "profile_name", - "data-type": "string", - "source": { - "input": { - - } - } - } -} diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/dt-location.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/dt-location.json deleted file mode 100644 index 52e0a7967..000000000 --- a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/dt-location.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "version": "1.0.0", - "description": "test Data Type", - "properties": { - "country": { - "required": true, - "type": "string" - }, - "state": { - "required": false, - "type": "string" - } - }, - "derived_from": "tosca.datatypes.Root" -} diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/resource-assignments-simple.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/resource-assignments-simple.json deleted file mode 100644 index ddcf32eed..000000000 --- a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/resource-assignments-simple.json +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "name": "country", - "input-param": true, - "property": { - "type": "string" - }, - "dictionary-name": "country", - "dictionary-source": "db", - "dependencies": ["state"] - }, - { - "name": "state", - "input-param": true, - "property": { - "type": "string" - }, - "dictionary-name": "state", - "dictionary-source": "input", - "dependencies": [] - } -] diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/inputs/input.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/inputs/input.json deleted file mode 100644 index cd6fac128..000000000 --- a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/inputs/input.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api-ver": "2.00", - "originator-id": "MSO", - "request-id": "123456", - "service-instance-id": "ibcx0001vm001", - "service-type": "AVPN", - "vnf-type": "vUSP - vDBE-IPX HUB", - "vnf-id": 123456, - "service-template-name": "VRR-baseconfiguration", - "service-template-version": "1.0.0", - "action-name": "resource-assignment-action", - "group-name": "sample group name", - "bundle-id": "sample bundle id", - "bundle-mac": [ - "Sample bundle mac", - "Sample bundle mac" - ] -} diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/requests/sample-resourceresolution-request.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/requests/sample-resourceresolution-request.json deleted file mode 100644 index e8830a8a2..000000000 --- a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/requests/sample-resourceresolution-request.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "actionIdentifiers": { - "actionName": "sample-action", - "blueprintName": "sample-blurprint", - "blueprintVersion": "1.0.0", - "mode": "sync" - }, - "commonHeader": { - "flags": { - "force": true, - "ttl": 3600 - }, - "originatorId": "sdnc", - "requestId": "123456-1000", - "subRequestId": "sub-123456-1000", - "timestamp": "2012-04-23T18:25:43.511Z" - }, - "payload": { - }, - "resourceAssignments": [ - ] -} diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml b/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml index 5809c06d5..5caeac135 100644 --- a/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml +++ b/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml @@ -38,6 +38,27 @@ org.onap.ccsdk.sli.core sli-provider + + + org.powermock + powermock-api-mockito2 + test + + + org.springframework.boot + spring-boot-starter-test + test + + + org.jetbrains.kotlin + kotlin-test-junit + test + + + io.projectreactor + reactor-test + test + diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/resources/logback.xml b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/resources/logback.xml new file mode 100644 index 000000000..a816a06c5 --- /dev/null +++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/resources/logback.xml @@ -0,0 +1,35 @@ + + + + + + + %d{HH:mm:ss.SSS} %-5level %logger{100} - %msg%n + + + + + + + + + + + + + diff --git a/ms/blueprintsprocessor/parent/pom.xml b/ms/blueprintsprocessor/parent/pom.xml index a53ea2dfd..761fdc724 100644 --- a/ms/blueprintsprocessor/parent/pom.xml +++ b/ms/blueprintsprocessor/parent/pom.xml @@ -32,13 +32,15 @@ 2.0.6.RELEASE 5.0.10.RELEASE - 1.3.0 + 1.3.10 + 1.3.0 1.0.1 1.0.0 0.3.1 26.0-jre 2.9.2 1.4.197 + 1.2.2 1.7.4 @@ -58,6 +60,11 @@ eelf-core ${eelf.version} + + org.onap.logging-analytics + logging-slf4j + ${onap.logger.slf4j} + @@ -124,6 +131,10 @@ org.mariadb.jdbc * + + org.powermock + * + @@ -144,11 +155,6 @@ core ${project.version} - - org.onap.ccsdk.apps.blueprintsprocessor - db-service - ${project.version} - org.onap.ccsdk.apps.blueprintsprocessor execution-service @@ -161,17 +167,19 @@ org.onap.ccsdk.apps.blueprintsprocessor - resolution-service + resource-api ${project.version} org.onap.ccsdk.apps.blueprintsprocessor - resource-api + selfservice-api ${project.version} + + - org.onap.ccsdk.apps.blueprintsprocessor - selfservice-api + org.onap.ccsdk.apps.blueprintsprocessor.functions + resource-resolution ${project.version} @@ -226,6 +234,7 @@ com.h2database h2 ${h2database.version} + test @@ -242,20 +251,60 @@ - - + + + com.att.eelf + eelf-core + - org.onap.ccsdk.apps.controllerblueprints - resource-dict + org.onap.logging-analytics + logging-slf4j + + + org.apache.commons + commons-lang3 + + + commons-collections + commons-collections + + + commons-io + commons-io + + + com.jayway.jsonpath + json-path + + + io.springfox + springfox-swagger2 + + + io.springfox + springfox-swagger-ui + + + org.jetbrains.kotlin + kotlin-stdlib + + + org.jetbrains.kotlin + kotlin-stdlib-jdk8 + + + com.fasterxml.jackson.module + jackson-module-kotlin + org.jetbrains.kotlin kotlin-maven-plugin - ${kotlin.version} + ${kotlin.maven.version} compile diff --git a/ms/blueprintsprocessor/pom.xml b/ms/blueprintsprocessor/pom.xml index 740407dc5..4e119b773 100644 --- a/ms/blueprintsprocessor/pom.xml +++ b/ms/blueprintsprocessor/pom.xml @@ -43,6 +43,7 @@ parent modules + functions application -- cgit 1.2.3-korg From 38f6f0ab60ef32af3af21aace397fe16a790dce7 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 8 Jan 2019 14:40:54 -0500 Subject: Prepare for release build Prepare for release of early ODL-Oxygen based CCSDK Dublin Change-Id: I63929ef52de41309905ee31e3fbcf49b64063059 Issue-ID: CCSDK-870 Signed-off-by: Timoney, Dan (dt5972) --- ms/blueprintsprocessor/application/pom.xml | 3 +-- ms/blueprintsprocessor/functions/netconf-executor/pom.xml | 7 ++----- ms/blueprintsprocessor/functions/pom.xml | 7 ++----- ms/blueprintsprocessor/functions/python-executor/pom.xml | 7 ++----- ms/blueprintsprocessor/functions/resource-resolution/pom.xml | 3 +-- ms/blueprintsprocessor/modules/commons/core/pom.xml | 3 +-- ms/blueprintsprocessor/modules/commons/pom.xml | 3 +-- ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml | 3 +-- ms/blueprintsprocessor/modules/inbounds/pom.xml | 3 +-- ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml | 3 +-- ms/blueprintsprocessor/modules/outbounds/pom.xml | 3 +-- ms/blueprintsprocessor/modules/pom.xml | 3 +-- ms/blueprintsprocessor/modules/services/execution-service/pom.xml | 3 +-- ms/blueprintsprocessor/modules/services/pom.xml | 3 +-- ms/blueprintsprocessor/modules/services/workflow-service/pom.xml | 7 ++----- ms/blueprintsprocessor/parent/pom.xml | 3 +-- ms/blueprintsprocessor/pom.xml | 4 +--- 17 files changed, 21 insertions(+), 47 deletions(-) (limited to 'ms/blueprintsprocessor/modules/services/workflow-service/pom.xml') diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml index 796cde639..19208071b 100644 --- a/ms/blueprintsprocessor/application/pom.xml +++ b/ms/blueprintsprocessor/application/pom.xml @@ -16,8 +16,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + 4.0.0 org.onap.ccsdk.apps.blueprintsprocessor diff --git a/ms/blueprintsprocessor/functions/netconf-executor/pom.xml b/ms/blueprintsprocessor/functions/netconf-executor/pom.xml index 94103b598..131261d11 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/pom.xml +++ b/ms/blueprintsprocessor/functions/netconf-executor/pom.xml @@ -14,10 +14,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - - + org.onap.ccsdk.apps.blueprintsprocessor functions @@ -37,4 +34,4 @@ - \ No newline at end of file + diff --git a/ms/blueprintsprocessor/functions/pom.xml b/ms/blueprintsprocessor/functions/pom.xml index 6a560be2f..4de42beec 100644 --- a/ms/blueprintsprocessor/functions/pom.xml +++ b/ms/blueprintsprocessor/functions/pom.xml @@ -14,10 +14,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - - + org.onap.ccsdk.apps.blueprintsprocessor parent @@ -62,4 +59,4 @@ test - \ No newline at end of file + diff --git a/ms/blueprintsprocessor/functions/python-executor/pom.xml b/ms/blueprintsprocessor/functions/python-executor/pom.xml index 4f9cc7458..ba97d22b3 100644 --- a/ms/blueprintsprocessor/functions/python-executor/pom.xml +++ b/ms/blueprintsprocessor/functions/python-executor/pom.xml @@ -14,10 +14,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - - + functions org.onap.ccsdk.apps.blueprintsprocessor @@ -38,4 +35,4 @@ - \ No newline at end of file + diff --git a/ms/blueprintsprocessor/functions/resource-resolution/pom.xml b/ms/blueprintsprocessor/functions/resource-resolution/pom.xml index 858be70cd..07ae44bdc 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/pom.xml +++ b/ms/blueprintsprocessor/functions/resource-resolution/pom.xml @@ -14,8 +14,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + 4.0.0 org.onap.ccsdk.apps.blueprintsprocessor diff --git a/ms/blueprintsprocessor/modules/commons/core/pom.xml b/ms/blueprintsprocessor/modules/commons/core/pom.xml index 5e0c966d2..bc6019da9 100644 --- a/ms/blueprintsprocessor/modules/commons/core/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/core/pom.xml @@ -16,8 +16,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + 4.0.0 org.onap.ccsdk.apps.blueprintsprocessor diff --git a/ms/blueprintsprocessor/modules/commons/pom.xml b/ms/blueprintsprocessor/modules/commons/pom.xml index f38ccabff..0c027d457 100644 --- a/ms/blueprintsprocessor/modules/commons/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/pom.xml @@ -14,8 +14,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + 4.0.0 org.onap.ccsdk.apps.blueprintsprocessor diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml index da6194add..230001490 100644 --- a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml @@ -14,8 +14,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + 4.0.0 org.onap.ccsdk.apps.blueprintsprocessor diff --git a/ms/blueprintsprocessor/modules/inbounds/pom.xml b/ms/blueprintsprocessor/modules/inbounds/pom.xml index 91912c833..695c54e22 100644 --- a/ms/blueprintsprocessor/modules/inbounds/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/pom.xml @@ -14,8 +14,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + 4.0.0 org.onap.ccsdk.apps.blueprintsprocessor diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml index 4fa56feb7..ece517226 100644 --- a/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml @@ -14,8 +14,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + 4.0.0 org.onap.ccsdk.apps.blueprintsprocessor diff --git a/ms/blueprintsprocessor/modules/outbounds/pom.xml b/ms/blueprintsprocessor/modules/outbounds/pom.xml index 07403d960..e7e4d7c9b 100644 --- a/ms/blueprintsprocessor/modules/outbounds/pom.xml +++ b/ms/blueprintsprocessor/modules/outbounds/pom.xml @@ -14,8 +14,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + 4.0.0 org.onap.ccsdk.apps.blueprintsprocessor diff --git a/ms/blueprintsprocessor/modules/pom.xml b/ms/blueprintsprocessor/modules/pom.xml index f0de54f5f..210320758 100644 --- a/ms/blueprintsprocessor/modules/pom.xml +++ b/ms/blueprintsprocessor/modules/pom.xml @@ -16,8 +16,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + 4.0.0 org.onap.ccsdk.apps.blueprintsprocessor diff --git a/ms/blueprintsprocessor/modules/services/execution-service/pom.xml b/ms/blueprintsprocessor/modules/services/execution-service/pom.xml index f9e519106..1b86fafd6 100644 --- a/ms/blueprintsprocessor/modules/services/execution-service/pom.xml +++ b/ms/blueprintsprocessor/modules/services/execution-service/pom.xml @@ -14,8 +14,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + 4.0.0 org.onap.ccsdk.apps.blueprintsprocessor diff --git a/ms/blueprintsprocessor/modules/services/pom.xml b/ms/blueprintsprocessor/modules/services/pom.xml index d2f2e0cb4..ae434fbaf 100644 --- a/ms/blueprintsprocessor/modules/services/pom.xml +++ b/ms/blueprintsprocessor/modules/services/pom.xml @@ -14,8 +14,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + 4.0.0 org.onap.ccsdk.apps.blueprintsprocessor diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml b/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml index 5caeac135..f681ba572 100644 --- a/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml +++ b/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml @@ -14,10 +14,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - - + org.onap.ccsdk.apps.blueprintsprocessor services @@ -62,4 +59,4 @@ - \ No newline at end of file + diff --git a/ms/blueprintsprocessor/parent/pom.xml b/ms/blueprintsprocessor/parent/pom.xml index 369b84b4e..935ed64d8 100644 --- a/ms/blueprintsprocessor/parent/pom.xml +++ b/ms/blueprintsprocessor/parent/pom.xml @@ -16,8 +16,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + 4.0.0 org.onap.ccsdk.apps diff --git a/ms/blueprintsprocessor/pom.xml b/ms/blueprintsprocessor/pom.xml index c6840b4ac..2020781e9 100644 --- a/ms/blueprintsprocessor/pom.xml +++ b/ms/blueprintsprocessor/pom.xml @@ -14,9 +14,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - - + 4.0.0 org.onap.ccsdk.apps -- cgit 1.2.3-korg From d7d47b415d9e1b509e18c85f3e33e980a91ad872 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Fri, 4 Jan 2019 10:43:33 -0500 Subject: Update to use correct parent pom Updated neng microservice to use springboot v1 parent as opposed to odlparent. Without that change, javadoc was failing when compiled with Fluorine version of odlparent-lite parent pom. Change-Id: I677278d90869f493c281c7c5432b271dd43e7513 Issue-ID: CCSDK-870 Signed-off-by: Timoney, Dan (dt5972) --- ms/blueprintsprocessor/application/pom.xml | 2 +- ms/blueprintsprocessor/functions/netconf-executor/pom.xml | 2 +- ms/blueprintsprocessor/functions/pom.xml | 2 +- ms/blueprintsprocessor/functions/python-executor/pom.xml | 2 +- ms/blueprintsprocessor/functions/resource-resolution/pom.xml | 2 +- ms/blueprintsprocessor/modules/commons/core/pom.xml | 2 +- ms/blueprintsprocessor/modules/commons/db-lib/pom.xml | 5 ++--- ms/blueprintsprocessor/modules/commons/pom.xml | 2 +- ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml | 2 +- ms/blueprintsprocessor/modules/inbounds/pom.xml | 2 +- ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml | 2 +- ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml | 5 ++--- ms/blueprintsprocessor/modules/outbounds/pom.xml | 2 +- ms/blueprintsprocessor/modules/pom.xml | 2 +- ms/blueprintsprocessor/modules/services/execution-service/pom.xml | 2 +- ms/blueprintsprocessor/modules/services/pom.xml | 2 +- ms/blueprintsprocessor/modules/services/workflow-service/pom.xml | 2 +- ms/blueprintsprocessor/parent/pom.xml | 4 ++-- ms/blueprintsprocessor/pom.xml | 2 +- 19 files changed, 22 insertions(+), 24 deletions(-) (limited to 'ms/blueprintsprocessor/modules/services/workflow-service/pom.xml') diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml index 19208071b..679a8b909 100644 --- a/ms/blueprintsprocessor/application/pom.xml +++ b/ms/blueprintsprocessor/application/pom.xml @@ -21,7 +21,7 @@ org.onap.ccsdk.apps.blueprintsprocessor parent - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT ../parent application diff --git a/ms/blueprintsprocessor/functions/netconf-executor/pom.xml b/ms/blueprintsprocessor/functions/netconf-executor/pom.xml index 3128b641a..51c625025 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/pom.xml +++ b/ms/blueprintsprocessor/functions/netconf-executor/pom.xml @@ -18,7 +18,7 @@ org.onap.ccsdk.apps.blueprintsprocessor functions - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT 4.0.0 org.onap.ccsdk.apps.blueprintsprocessor.functions diff --git a/ms/blueprintsprocessor/functions/pom.xml b/ms/blueprintsprocessor/functions/pom.xml index 4de42beec..2a952f88e 100644 --- a/ms/blueprintsprocessor/functions/pom.xml +++ b/ms/blueprintsprocessor/functions/pom.xml @@ -18,7 +18,7 @@ org.onap.ccsdk.apps.blueprintsprocessor parent - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT ../parent 4.0.0 diff --git a/ms/blueprintsprocessor/functions/python-executor/pom.xml b/ms/blueprintsprocessor/functions/python-executor/pom.xml index ba97d22b3..120ded780 100644 --- a/ms/blueprintsprocessor/functions/python-executor/pom.xml +++ b/ms/blueprintsprocessor/functions/python-executor/pom.xml @@ -18,7 +18,7 @@ functions org.onap.ccsdk.apps.blueprintsprocessor - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT 4.0.0 diff --git a/ms/blueprintsprocessor/functions/resource-resolution/pom.xml b/ms/blueprintsprocessor/functions/resource-resolution/pom.xml index 07ae44bdc..2f08c5807 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/pom.xml +++ b/ms/blueprintsprocessor/functions/resource-resolution/pom.xml @@ -19,7 +19,7 @@ org.onap.ccsdk.apps.blueprintsprocessor functions - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT org.onap.ccsdk.apps.blueprintsprocessor.functions resource-resolution diff --git a/ms/blueprintsprocessor/modules/commons/core/pom.xml b/ms/blueprintsprocessor/modules/commons/core/pom.xml index bc6019da9..42710b517 100644 --- a/ms/blueprintsprocessor/modules/commons/core/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/core/pom.xml @@ -21,7 +21,7 @@ org.onap.ccsdk.apps.blueprintsprocessor commons - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT core diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml index cf265fc37..53c9b185f 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml @@ -14,13 +14,12 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + 4.0.0 org.onap.ccsdk.apps.blueprintsprocessor commons - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT db-lib diff --git a/ms/blueprintsprocessor/modules/commons/pom.xml b/ms/blueprintsprocessor/modules/commons/pom.xml index 0c027d457..4df89857e 100644 --- a/ms/blueprintsprocessor/modules/commons/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/pom.xml @@ -19,7 +19,7 @@ org.onap.ccsdk.apps.blueprintsprocessor modules - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT commons diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml index 230001490..82e8cd731 100644 --- a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml @@ -19,7 +19,7 @@ org.onap.ccsdk.apps.blueprintsprocessor commons - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT rest-lib diff --git a/ms/blueprintsprocessor/modules/inbounds/pom.xml b/ms/blueprintsprocessor/modules/inbounds/pom.xml index 695c54e22..1384b8a10 100644 --- a/ms/blueprintsprocessor/modules/inbounds/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/pom.xml @@ -19,7 +19,7 @@ org.onap.ccsdk.apps.blueprintsprocessor modules - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT inbounds diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml index ece517226..6395963be 100644 --- a/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml @@ -19,7 +19,7 @@ org.onap.ccsdk.apps.blueprintsprocessor inbounds - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT resource-api diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml index 2c6da2e7f..db6fdd27e 100644 --- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml @@ -14,13 +14,12 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + 4.0.0 org.onap.ccsdk.apps.blueprintsprocessor inbounds - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT selfservice-api diff --git a/ms/blueprintsprocessor/modules/outbounds/pom.xml b/ms/blueprintsprocessor/modules/outbounds/pom.xml index e7e4d7c9b..e957c881d 100644 --- a/ms/blueprintsprocessor/modules/outbounds/pom.xml +++ b/ms/blueprintsprocessor/modules/outbounds/pom.xml @@ -19,7 +19,7 @@ org.onap.ccsdk.apps.blueprintsprocessor modules - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT outbounds diff --git a/ms/blueprintsprocessor/modules/pom.xml b/ms/blueprintsprocessor/modules/pom.xml index 210320758..5cc31c46e 100644 --- a/ms/blueprintsprocessor/modules/pom.xml +++ b/ms/blueprintsprocessor/modules/pom.xml @@ -21,7 +21,7 @@ org.onap.ccsdk.apps.blueprintsprocessor parent - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT ../parent diff --git a/ms/blueprintsprocessor/modules/services/execution-service/pom.xml b/ms/blueprintsprocessor/modules/services/execution-service/pom.xml index 1b86fafd6..035f14d90 100644 --- a/ms/blueprintsprocessor/modules/services/execution-service/pom.xml +++ b/ms/blueprintsprocessor/modules/services/execution-service/pom.xml @@ -19,7 +19,7 @@ org.onap.ccsdk.apps.blueprintsprocessor services - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT execution-service diff --git a/ms/blueprintsprocessor/modules/services/pom.xml b/ms/blueprintsprocessor/modules/services/pom.xml index ae434fbaf..8cb3c6f1d 100644 --- a/ms/blueprintsprocessor/modules/services/pom.xml +++ b/ms/blueprintsprocessor/modules/services/pom.xml @@ -19,7 +19,7 @@ org.onap.ccsdk.apps.blueprintsprocessor modules - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT services diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml b/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml index f681ba572..6e3dade65 100644 --- a/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml +++ b/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml @@ -18,7 +18,7 @@ org.onap.ccsdk.apps.blueprintsprocessor services - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT 4.0.0 diff --git a/ms/blueprintsprocessor/parent/pom.xml b/ms/blueprintsprocessor/parent/pom.xml index 935ed64d8..b44236b88 100644 --- a/ms/blueprintsprocessor/parent/pom.xml +++ b/ms/blueprintsprocessor/parent/pom.xml @@ -21,7 +21,7 @@ org.onap.ccsdk.apps blueprintsprocessor - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT org.onap.ccsdk.apps.blueprintsprocessor parent @@ -37,7 +37,7 @@ 1.16.1 3.6.1 1.0.0 - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT 26.0-jre 2.7.1 2.9.2 diff --git a/ms/blueprintsprocessor/pom.xml b/ms/blueprintsprocessor/pom.xml index 2020781e9..df4932cd8 100644 --- a/ms/blueprintsprocessor/pom.xml +++ b/ms/blueprintsprocessor/pom.xml @@ -19,7 +19,7 @@ org.onap.ccsdk.apps ccsdk-apps-ms - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT blueprintsprocessor pom -- cgit 1.2.3-korg From a5f9b6f46959a3686e47c361340a8238b358eccb Mon Sep 17 00:00:00 2001 From: Steve Alphonse Siani Date: Mon, 21 Jan 2019 11:55:48 -0500 Subject: ControllerBlueprint blueprintsProcessor container Change-Id: I77df77757c276fca705091c1566c386f842269c4 Issue-ID: CCSDK-949 Signed-off-by: Steve Alphonse Siani --- ms/blueprintsprocessor/application/etc/logback.xml | 36 ++++ ms/blueprintsprocessor/application/etc/run.source | 12 ++ .../opt/app/onap/config/application.properties | 36 ++++ .../application/opt/app/onap/config/logback.xml | 36 ++++ ms/blueprintsprocessor/application/pom.xml | 85 ++++++++- .../src/main/resources/application-dev.properties | 36 ++++ .../src/main/resources/application.properties | 7 +- .../src/test/resources/application.properties | 2 + ms/blueprintsprocessor/distribution/pom.xml | 196 +++++++++++++++++++++ .../distribution/src/main/dc/docker-compose.yaml | 33 ++++ .../distribution/src/main/docker/Dockerfile | 20 +++ .../distribution/src/main/docker/distribution.xml | 69 ++++++++ .../distribution/src/main/docker/startService.sh | 9 + ms/blueprintsprocessor/functions/pom.xml | 0 .../modules/commons/db-lib/pom.xml | 4 + ms/blueprintsprocessor/modules/commons/pom.xml | 2 + .../modules/commons/rest-lib/pom.xml | 4 + .../modules/inbounds/resource-api/pom.xml | 20 +-- .../modules/inbounds/selfservice-api/pom.xml | 7 + ms/blueprintsprocessor/modules/outbounds/pom.xml | 20 +-- .../modules/services/execution-service/pom.xml | 4 + ms/blueprintsprocessor/modules/services/pom.xml | 2 + .../modules/services/workflow-service/pom.xml | 4 + ms/blueprintsprocessor/parent/pom.xml | 11 ++ ms/blueprintsprocessor/pom.xml | 56 +++--- 25 files changed, 662 insertions(+), 49 deletions(-) create mode 100755 ms/blueprintsprocessor/application/etc/logback.xml create mode 100755 ms/blueprintsprocessor/application/etc/run.source create mode 100755 ms/blueprintsprocessor/application/opt/app/onap/config/application.properties create mode 100755 ms/blueprintsprocessor/application/opt/app/onap/config/logback.xml mode change 100644 => 100755 ms/blueprintsprocessor/application/pom.xml create mode 100755 ms/blueprintsprocessor/application/src/main/resources/application-dev.properties mode change 100644 => 100755 ms/blueprintsprocessor/application/src/main/resources/application.properties create mode 100755 ms/blueprintsprocessor/distribution/pom.xml create mode 100755 ms/blueprintsprocessor/distribution/src/main/dc/docker-compose.yaml create mode 100755 ms/blueprintsprocessor/distribution/src/main/docker/Dockerfile create mode 100755 ms/blueprintsprocessor/distribution/src/main/docker/distribution.xml create mode 100755 ms/blueprintsprocessor/distribution/src/main/docker/startService.sh mode change 100644 => 100755 ms/blueprintsprocessor/functions/pom.xml mode change 100644 => 100755 ms/blueprintsprocessor/modules/commons/pom.xml mode change 100644 => 100755 ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml mode change 100644 => 100755 ms/blueprintsprocessor/modules/services/pom.xml mode change 100644 => 100755 ms/blueprintsprocessor/parent/pom.xml mode change 100644 => 100755 ms/blueprintsprocessor/pom.xml (limited to 'ms/blueprintsprocessor/modules/services/workflow-service/pom.xml') diff --git a/ms/blueprintsprocessor/application/etc/logback.xml b/ms/blueprintsprocessor/application/etc/logback.xml new file mode 100755 index 000000000..a97bb8c3d --- /dev/null +++ b/ms/blueprintsprocessor/application/etc/logback.xml @@ -0,0 +1,36 @@ + + + + + + + %d{HH:mm:ss.SSS} %-5level %logger{100} - %msg%n + + + + + + + + + + + + + + diff --git a/ms/blueprintsprocessor/application/etc/run.source b/ms/blueprintsprocessor/application/etc/run.source new file mode 100755 index 000000000..7557ab126 --- /dev/null +++ b/ms/blueprintsprocessor/application/etc/run.source @@ -0,0 +1,12 @@ +java -classpath "/etc:${APP_HOME}/lib/*:/lib/*:/src:/schema:/generated-sources:${APP_CONFIG_HOME}:${APP_HOME}" \ +-DappName=${APPLICATIONNAME} -DappVersion=${BUNDLEVERSION} \ +-DrouteOffer=${ROUTEOFFER} \ +-DVERSION_ROUTEOFFER_ENVCONTEXT=${BUNDLEVERSION}/${STICKYSELECTORKEY}/${ENVCONTEXT} \ +-DSecurityFilePath=/etc \ +-DREST_NAME_NORMALIZER_PATTERN_FILE=/etc/PatternInputs.txt \ +-Dms_name=org.onap.ccsdk.apps.blueprintsprocessor \ +-Dlogging.config=${APP_CONFIG_HOME}/logback.xml \ +-Djava.security.egd=file:/dev/./urandom \ +-DAPPNAME=${APP_NAME} -DAPPENV=${APP_ENV} -DAPPVERSION=${APP_VERSION} -DNAMESPACE=${NAMESPACE} \ +-Dspring.config.location=${APP_CONFIG_HOME}/ \ +org.onap.ccsdk.apps.blueprintsprocessor.BlueprintProcessorApplication diff --git a/ms/blueprintsprocessor/application/opt/app/onap/config/application.properties b/ms/blueprintsprocessor/application/opt/app/onap/config/application.properties new file mode 100755 index 000000000..c4880b676 --- /dev/null +++ b/ms/blueprintsprocessor/application/opt/app/onap/config/application.properties @@ -0,0 +1,36 @@ +# +# Copyright � 2017-2018 AT&T Intellectual Property. +# Modifications Copyright © 2019 Bell Canada. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +#logging.level.web=DEBUG + +# Web server config +server.port=8080 + +blueprintsprocessor.grpcEnable=false +blueprintsprocessor.httpPort=8080 +blueprintsprocessor.grpcPort=9111 +# Blueprint Processor File Execution and Handling Properties +blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy +blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive +# Primary Database Configuration +blueprintsprocessor.db.primary.url=jdbc:mysql://db:3306/sdnctl +blueprintsprocessor.db.primary.username=sdnctl +blueprintsprocessor.db.primary.password=sdnctl +blueprintsprocessor.db.primary.driverClassName=org.mariadb.jdbc.Driver +blueprintsprocessor.db.primary.hibernateHbm2ddlAuto=validate +blueprintsprocessor.db.primary.hibernateDDLAuto=none +blueprintsprocessor.db.primary.hibernateNamingStrategy=org.hibernate.cfg.ImprovedNamingStrategy +blueprintsprocessor.db.primary.hibernateDialect=org.hibernate.dialect.MySQL5InnoDBDialect \ No newline at end of file diff --git a/ms/blueprintsprocessor/application/opt/app/onap/config/logback.xml b/ms/blueprintsprocessor/application/opt/app/onap/config/logback.xml new file mode 100755 index 000000000..a97bb8c3d --- /dev/null +++ b/ms/blueprintsprocessor/application/opt/app/onap/config/logback.xml @@ -0,0 +1,36 @@ + + + + + + + %d{HH:mm:ss.SSS} %-5level %logger{100} - %msg%n + + + + + + + + + + + + + + diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml old mode 100644 new mode 100755 index 679a8b909..06752b793 --- a/ms/blueprintsprocessor/application/pom.xml +++ b/ms/blueprintsprocessor/application/pom.xml @@ -3,6 +3,7 @@ ~ Copyright © 2017-2018 AT&T Intellectual Property. ~ ~ Modifications Copyright © 2018 IBM. + ~ Modifications Copyright © 2019 Bell Canada. ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. @@ -30,6 +31,10 @@ Blueprints Processor Application + + org.onap.ccsdk.apps.controllerblueprints + core + org.springframework.boot spring-boot-devtools @@ -69,13 +74,91 @@ test - + + + + ${basedir}/etc + ${basedir}/target/etc + true + + **/* + + + + + ${basedir}/src/main/resources + ${basedir}/target/src/main/resources + true + + **/* + + + + src/main/resources + + **/* + + true + + org.springframework.boot spring-boot-maven-plugin + + maven-resources-plugin + 2.6 + + + copy-dockerfile + + copy-resources + + validate + + ${basedir}/target/docker-stage + + + src/main/docker + + * + + true + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + ant-test + package + + + + + + + run + + + + + + maven-compiler-plugin + 3.1 + + + 1.8 + 1.8 + + diff --git a/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties new file mode 100755 index 000000000..6bfa2407b --- /dev/null +++ b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties @@ -0,0 +1,36 @@ +# +# Copyright � 2017-2018 AT&T Intellectual Property. +# Modifications Copyright © 2019 IBM, Bell Canada. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +#logging.level.web=DEBUG + +# Web server config +server.port=8080 + +blueprintsprocessor.grpcEnable=false +blueprintsprocessor.httpPort=8080 +blueprintsprocessor.grpcPort=9111 +# Blueprint Processor File Execution and Handling Properties +blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy +blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive +# Primary Database Configuration +blueprintsprocessor.db.primary.url=jdbc:mysql://localhost:3306/sdnctl +blueprintsprocessor.db.primary.username=sdnctl +blueprintsprocessor.db.primary.password=sdnctl +blueprintsprocessor.db.primary.driverClassName=org.mariadb.jdbc.Driver +blueprintsprocessor.db.primary.hibernateHbm2ddlAuto=update +blueprintsprocessor.db.primary.hibernateDDLAuto=none +blueprintsprocessor.db.primary.hibernateNamingStrategy=org.hibernate.cfg.ImprovedNamingStrategy +blueprintsprocessor.db.primary.hibernateDialect=org.hibernate.dialect.MySQL5InnoDBDialect \ No newline at end of file diff --git a/ms/blueprintsprocessor/application/src/main/resources/application.properties b/ms/blueprintsprocessor/application/src/main/resources/application.properties old mode 100644 new mode 100755 index fa1a1e6e4..62695207b --- a/ms/blueprintsprocessor/application/src/main/resources/application.properties +++ b/ms/blueprintsprocessor/application/src/main/resources/application.properties @@ -1,5 +1,6 @@ # # Copyright � 2017-2018 AT&T Intellectual Property. +# Modifications Copyright © 2019 IBM, Bell Canada. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,6 +15,10 @@ # limitations under the License. # #logging.level.web=DEBUG + +# Web server config +server.port=8080 + blueprintsprocessor.grpcEnable=false blueprintsprocessor.httpPort=8080 blueprintsprocessor.grpcPort=9111 @@ -21,7 +26,7 @@ blueprintsprocessor.grpcPort=9111 blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive # Primary Database Configuration -blueprintsprocessor.db.primary.url=jdbc:mysql://localhost:3306/sdnctl +blueprintsprocessor.db.primary.url=jdbc:mysql://db:3306/sdnctl blueprintsprocessor.db.primary.username=sdnctl blueprintsprocessor.db.primary.password=sdnctl blueprintsprocessor.db.primary.driverClassName=org.mariadb.jdbc.Driver diff --git a/ms/blueprintsprocessor/application/src/test/resources/application.properties b/ms/blueprintsprocessor/application/src/test/resources/application.properties index f896ee058..d21264c0d 100644 --- a/ms/blueprintsprocessor/application/src/test/resources/application.properties +++ b/ms/blueprintsprocessor/application/src/test/resources/application.properties @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# Web server config +server.port=8080 # Blueprint Processor File Execution and Handling Properties blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive diff --git a/ms/blueprintsprocessor/distribution/pom.xml b/ms/blueprintsprocessor/distribution/pom.xml new file mode 100755 index 000000000..fb5e3c128 --- /dev/null +++ b/ms/blueprintsprocessor/distribution/pom.xml @@ -0,0 +1,196 @@ + + + + 4.0.0 + + org.onap.ccsdk.apps.blueprintsprocessor + parent + 0.4.1-SNAPSHOT + ../parent + + distribution + pom + Blueprints Processor Distribution + + maven + org.onap.ccsdk.apps + blueprintsprocessor + onap/ccsdk-blueprintsprocessor + ${https_proxy} + deploy + true + + + + + org.onap.ccsdk.apps.blueprintsprocessor + application + + + + + + maven-resources-plugin + 2.6 + + + copy-dockerfile + + copy-resources + + validate + + ${basedir}/target/docker-stage + + + src/main/docker + + * + + true + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + ant-test + package + + + + + + + run + + + + + + + maven-assembly-plugin + 3.1.0 + + + ${basedir}/target/docker-stage + + src/main/docker/distribution.xml + + posix + + + + ${assembly.id} + package + + single + + + + + + org.codehaus.groovy.maven + gmaven-plugin + 1.0 + + + validate + + execute + + + + println project.properties['ccsdk.project.version'] + def versionArray + if (project.properties['ccsdk.project.version'] != null ) { + versionArray = project.properties['ccsdk.project.version'].split('\\.') + } + + if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT")) + { + project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest" + } else { + project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest" + } + + println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'] + + + + + + + + + + + + docker + + + + io.fabric8 + docker-maven-plugin + 0.26.1 + false + + + + ${image.name} + + try + ${basedir}/target/docker-stage + + ${project.version} + ${project.version}-STAGING-${maven.build.timestamp} + ${project.docker.latesttag.version} + + + + + true + + + + generate-images + package + + build + + + + push-images + ${docker.push.phase} + + build + push + + + + + + + + + + \ No newline at end of file diff --git a/ms/blueprintsprocessor/distribution/src/main/dc/docker-compose.yaml b/ms/blueprintsprocessor/distribution/src/main/dc/docker-compose.yaml new file mode 100755 index 000000000..c0eade509 --- /dev/null +++ b/ms/blueprintsprocessor/distribution/src/main/dc/docker-compose.yaml @@ -0,0 +1,33 @@ +version: '3.3' + +services: + db: + image: mariadb:latest + container_name: ccsdk-mariadb + ports: + - "3306:3306" + volumes: + - ~/vm_mysql:/var/lib/mysql + restart: always + environment: + MYSQL_ROOT_PASSWORD: sdnctl + MYSQL_DATABASE: sdnctl + MYSQL_USER: sdnctl + MYSQL_PASSWORD: sdnctl + blueprints-processor: + depends_on: + - db + image: onap/ccsdk-blueprintsprocessor:latest + container_name: bp-rest + ports: + - "8000:8080" + restart: always + volumes: + - ~/share/vm_ms/blueprintsprocessor/config:/opt/app/onap/config + - ~/share/vm_ms/blueprintsprocessor/logs:/logs + environment: + APPLICATIONNAME: BlueprintsProcessor + BUNDLEVERSION: 1.0.0 + APP_CONFIG_HOME: /opt/app/onap/config + STICKYSELECTORKEY: + ENVCONTEXT: dev \ No newline at end of file diff --git a/ms/blueprintsprocessor/distribution/src/main/docker/Dockerfile b/ms/blueprintsprocessor/distribution/src/main/docker/Dockerfile new file mode 100755 index 000000000..213623299 --- /dev/null +++ b/ms/blueprintsprocessor/distribution/src/main/docker/Dockerfile @@ -0,0 +1,20 @@ +FROM anapsix/alpine-java:8_jdk + +ENV HTTP_PROXY ${HTTP_PROXY} +ENV HTTPS_PROXY ${HTTPS_PROXY} + +RUN apk add --no-cache curl + +COPY startService.sh /startService.sh +RUN chmod 777 /startService.sh && dos2unix /startService.sh + +COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz + +RUN (mkdir -p /source /opt/app/onap) && (tar -xzf /source.tar.gz -C /source) \ +&& (mv /source/@project.build.finalName@ /source/app) \ +&& (cp -rf /source/app/opt/app/onap/lib /opt/app/onap/) \ +&& (cp -rf /source/app/etc /) \ +&& (cp -rf /source/app/config /) \ +&& (rm -rf /source) + +ENTRYPOINT /startService.sh \ No newline at end of file diff --git a/ms/blueprintsprocessor/distribution/src/main/docker/distribution.xml b/ms/blueprintsprocessor/distribution/src/main/docker/distribution.xml new file mode 100755 index 000000000..b538b73bb --- /dev/null +++ b/ms/blueprintsprocessor/distribution/src/main/docker/distribution.xml @@ -0,0 +1,69 @@ + + + + + + ${assembly.id} + + tar.gz + + + + /opt/app/onap/lib + ${artifact.groupId}-${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension} + + + + + + + ${project.basedir}/../application/src/main/resources + + application.properties + logback.xml + + ./ + true + + + ${project.basedir}/src/main/docker + + Dockerfile + startService.sh + + ./ + true + + + ${project.basedir}/../application/src/main/resources + src/main/resources + true + + + ${project.basedir}/../application/opt/app/onap/config + ./config + true + + + ${project.basedir}/../application/etc + ./etc + true + + + \ No newline at end of file diff --git a/ms/blueprintsprocessor/distribution/src/main/docker/startService.sh b/ms/blueprintsprocessor/distribution/src/main/docker/startService.sh new file mode 100755 index 000000000..79bcbc064 --- /dev/null +++ b/ms/blueprintsprocessor/distribution/src/main/docker/startService.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +nodeName=BlueprintsProcessor_1.0.0_$(cat /proc/self/cgroup | grep docker | sed s/\\//\\n/g | tail -1) + +echo "APP Config HOME : ${APP_CONFIG_HOME}" +export APP_HOME=/opt/app/onap + +cp -rf /config /opt/app/onap/ +source /etc/run.source diff --git a/ms/blueprintsprocessor/functions/pom.xml b/ms/blueprintsprocessor/functions/pom.xml old mode 100644 new mode 100755 diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml index 53c9b185f..590c87f0f 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml @@ -28,6 +28,10 @@ Blueprints Processor DB Lib + + org.onap.ccsdk.apps.controllerblueprints + core + org.onap.ccsdk.apps.controllerblueprints db-resources diff --git a/ms/blueprintsprocessor/modules/commons/pom.xml b/ms/blueprintsprocessor/modules/commons/pom.xml old mode 100644 new mode 100755 index 4df89857e..8d900a895 --- a/ms/blueprintsprocessor/modules/commons/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/pom.xml @@ -2,6 +2,8 @@ - 4.0.0 - - org.onap.ccsdk.apps.blueprintsprocessor - inbounds - 0.4.1-SNAPSHOT - + 4.0.0 + + org.onap.ccsdk.apps.blueprintsprocessor + inbounds + 0.4.1-SNAPSHOT + - resource-api - jar - Blueprints Processor Resource API - Blueprints Processor Resource API + resource-api + jar + Blueprints Processor Resource API + Blueprints Processor Resource API diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml old mode 100644 new mode 100755 index c510734da..a15632b7a --- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml @@ -2,6 +2,8 @@ - 4.0.0 - - org.onap.ccsdk.apps.blueprintsprocessor - modules - 0.4.1-SNAPSHOT - + 4.0.0 + + org.onap.ccsdk.apps.blueprintsprocessor + modules + 0.4.1-SNAPSHOT + - outbounds - pom - Blueprints Processor Outbounds POM - Blueprints Processor Outbounds + outbounds + pom + Blueprints Processor Outbounds POM + Blueprints Processor Outbounds diff --git a/ms/blueprintsprocessor/modules/services/execution-service/pom.xml b/ms/blueprintsprocessor/modules/services/execution-service/pom.xml index 035f14d90..96bb09f2f 100644 --- a/ms/blueprintsprocessor/modules/services/execution-service/pom.xml +++ b/ms/blueprintsprocessor/modules/services/execution-service/pom.xml @@ -28,6 +28,10 @@ Blueprints Processor Execution Service + + org.onap.ccsdk.apps.controllerblueprints + core + org.onap.ccsdk.apps.blueprintsprocessor core diff --git a/ms/blueprintsprocessor/modules/services/pom.xml b/ms/blueprintsprocessor/modules/services/pom.xml old mode 100644 new mode 100755 index 8cb3c6f1d..469899d04 --- a/ms/blueprintsprocessor/modules/services/pom.xml +++ b/ms/blueprintsprocessor/modules/services/pom.xml @@ -2,6 +2,8 @@ + + org.onap.ccsdk.apps.blueprintsprocessor + application + ${project.version} + org.onap.ccsdk.apps.blueprintsprocessor db-lib @@ -304,6 +310,11 @@ resource-dict ${project.version} + + org.onap.ccsdk.apps.controllerblueprints + core + ${project.version} + diff --git a/ms/blueprintsprocessor/pom.xml b/ms/blueprintsprocessor/pom.xml old mode 100644 new mode 100755 index df4932cd8..774e177e0 --- a/ms/blueprintsprocessor/pom.xml +++ b/ms/blueprintsprocessor/pom.xml @@ -1,6 +1,7 @@ - 4.0.0 - - org.onap.ccsdk.apps - ccsdk-apps-ms - 0.4.1-SNAPSHOT - - blueprintsprocessor - pom - Blueprints Processor Root - Blueprints Processor Root + 4.0.0 + + org.onap.ccsdk.apps + ccsdk-apps-ms + 0.4.1-SNAPSHOT + + blueprintsprocessor + pom + Blueprints Processor Root + Blueprints Processor Root - - BlueprintsProcessor - UTF-8 - UTF-8 - yyyyMMdd'T'HHmmss'Z' - ${maven.build.timestamp} - 1.8 - 1.8 - 1.8 - ${project.version} - + + BlueprintsProcessor + UTF-8 + UTF-8 + yyyyMMdd'T'HHmmss'Z' + ${maven.build.timestamp} + 1.8 + 1.8 + 1.8 + ${project.version} + - - parent - modules - functions - application - + + parent + modules + functions + application + distribution + -- cgit 1.2.3-korg From 2ecd4e75058a2f7623ba07a6b66391972ae99981 Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh" Date: Thu, 7 Feb 2019 14:51:50 -0500 Subject: Refactor components core and resource dict modules Change-Id: I04e9e723d68a38ecefe48206e67fddbe43c55854 Issue-ID: CCSDK-1047 Signed-off-by: Muthuramalingam, Brinda Santh --- ms/blueprintsprocessor/application/pom.xml | 2 +- .../functions/python/executor/ComponentJythonExecutorTest.kt | 3 --- ms/blueprintsprocessor/modules/commons/db-lib/pom.xml | 3 ++- ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml | 3 ++- ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml | 3 ++- ms/blueprintsprocessor/modules/services/execution-service/pom.xml | 3 ++- ms/blueprintsprocessor/modules/services/workflow-service/pom.xml | 3 ++- ms/blueprintsprocessor/parent/pom.xml | 2 +- 8 files changed, 12 insertions(+), 10 deletions(-) (limited to 'ms/blueprintsprocessor/modules/services/workflow-service/pom.xml') diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml index 06752b793..9ad2ccbf1 100755 --- a/ms/blueprintsprocessor/application/pom.xml +++ b/ms/blueprintsprocessor/application/pom.xml @@ -33,7 +33,7 @@ org.onap.ccsdk.apps.controllerblueprints - core + blueprint-core org.springframework.boot diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/python/executor/ComponentJythonExecutorTest.kt b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/python/executor/ComponentJythonExecutorTest.kt index 83cf59c29..96d683cc1 100644 --- a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/python/executor/ComponentJythonExecutorTest.kt +++ b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/python/executor/ComponentJythonExecutorTest.kt @@ -17,11 +17,8 @@ package org.onap.ccsdk.apps.blueprintsprocessor.functions.python.executor import com.fasterxml.jackson.databind.JsonNode -import com.fasterxml.jackson.databind.node.JsonNodeFactory import org.junit.Test import org.junit.runner.RunWith -import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ActionIdentifiers -import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.CommonHeader import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants import org.onap.ccsdk.apps.controllerblueprints.core.asJsonNode diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml index 590c87f0f..7c5aecb7a 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml @@ -1,6 +1,7 @@ - - 4.0.0 - - org.onap.ccsdk.apps.blueprintsprocessor - commons - 0.4.1-SNAPSHOT - - - core - jar - Blueprints Processor Core - Blueprints Processor Core - - - org.springframework.boot - spring-boot-starter-webflux - - - diff --git a/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/BluePrintCoreConfiguration.kt b/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/BluePrintCoreConfiguration.kt deleted file mode 100644 index 07e494a1a..000000000 --- a/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/BluePrintCoreConfiguration.kt +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.onap.ccsdk.apps.blueprintsprocessor.core - -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.beans.factory.annotation.Value -import org.springframework.boot.context.properties.bind.Binder -import org.springframework.boot.context.properties.source.ConfigurationPropertySources -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration -import org.springframework.core.env.Environment - - -@Configuration -open class BluePrintCoreConfiguration { - - @Value("\${blueprintsprocessor.blueprintDeployPath}") - lateinit var deployPath: String - - @Value("\${blueprintsprocessor.blueprintArchivePath}") - lateinit var archivePath: String - -} - -@Configuration -open class BlueprintPropertyConfiguration { - @Autowired - lateinit var environment: Environment - - @Bean - open fun bluePrintPropertyBinder(): Binder { - val configurationPropertySource = ConfigurationPropertySources.get(environment) - return Binder(configurationPropertySource) - } -} \ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/BluePrintProperties.kt b/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/BluePrintProperties.kt deleted file mode 100644 index 10b8ceb5e..000000000 --- a/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/BluePrintProperties.kt +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.onap.ccsdk.apps.blueprintsprocessor.core - -import org.springframework.boot.context.properties.bind.Bindable -import org.springframework.boot.context.properties.bind.Binder -import org.springframework.stereotype.Service - -@Service -open class BluePrintProperties(var bluePrintPropertyBinder: Binder) { - - fun propertyBeanType(prefix: String, type: Class): T { - return bluePrintPropertyBinder.bind(prefix, Bindable.of(type)).get() - } -} \ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt b/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt deleted file mode 100644 index 41bbd1dfd..000000000 --- a/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * Modifications Copyright © 2018 IBM. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.onap.ccsdk.apps.blueprintsprocessor.core.api.data - -import com.fasterxml.jackson.annotation.JsonFormat -import com.fasterxml.jackson.databind.node.ObjectNode -import io.swagger.annotations.ApiModelProperty -import java.util.* - -/** - * BlueprintProcessorData - * @author Brinda Santh - * DATE : 8/15/2018 - */ - -open class ExecutionServiceInput { - @get:ApiModelProperty(required = true) - lateinit var commonHeader: CommonHeader - @get:ApiModelProperty(required = true) - lateinit var actionIdentifiers: ActionIdentifiers - @get:ApiModelProperty(required = true) - lateinit var payload: ObjectNode -} - -open class ExecutionServiceOutput { - @get:ApiModelProperty(required = true) - lateinit var commonHeader: CommonHeader - @get:ApiModelProperty(required = true) - lateinit var actionIdentifiers: ActionIdentifiers - @get:ApiModelProperty(required = true) - var status: Status = Status() - @get:ApiModelProperty(required = true) - lateinit var payload: ObjectNode -} - -const val ACTION_MODE_ASYNC = "async" -const val ACTION_MODE_SYNC = "sync" - -open class ActionIdentifiers { - @get:ApiModelProperty(required = false) - lateinit var blueprintName: String - @get:ApiModelProperty(required = false) - lateinit var blueprintVersion: String - @get:ApiModelProperty(required = true) - lateinit var actionName: String - @get:ApiModelProperty(required = true, allowableValues = "sync, async") - lateinit var mode: String -} - -open class CommonHeader { - @get:ApiModelProperty(required = true, example = "2012-04-23T18:25:43.511Z") - @get:JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") - var timestamp: Date = Date() - @get:ApiModelProperty(required = true) - lateinit var originatorId: String - @get:ApiModelProperty(required = true) - lateinit var requestId: String - @get:ApiModelProperty(required = true) - lateinit var subRequestId: String - @get:ApiModelProperty(required = false) - var flags: Flags? = null -} - -open class Flags { - var isForce: Boolean = false - @get:ApiModelProperty(value = "3600") - var ttl: Int = 3600 -} - -open class Status { - @get:ApiModelProperty(required = true) - var code: Int = 200 - @get:ApiModelProperty(required = true) - var eventType: String = "EVENT-ACTION-RESPONSE" - @get:ApiModelProperty(required = true, example = "2012-04-23T18:25:43.511Z") - @get:JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") - var timestamp: Date = Date() - @get:ApiModelProperty(required = false) - var errorMessage: String? = null - @get:ApiModelProperty(required = true) - var message: String = "success" -} - -open class BluePrintManagementInput { - @get:ApiModelProperty(required = true) - lateinit var commonHeader: CommonHeader - @get:ApiModelProperty(required = false) - lateinit var blueprintName: String - @get:ApiModelProperty(required = false) - lateinit var blueprintVersion: String - @get:ApiModelProperty(required = true) - lateinit var fileChunk: FileChunk -} - -open class FileChunk { - @get:ApiModelProperty(required = true) - lateinit var chunk: ByteArray -} - -open class BluePrintManagementOutput { - @get:ApiModelProperty(required = true) - lateinit var commonHeader: CommonHeader - @get:ApiModelProperty(required = true) - var status: Status = Status() -} - - - diff --git a/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/factory/ComponentNodeFactory.kt b/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/factory/ComponentNodeFactory.kt deleted file mode 100644 index 66643ee0f..000000000 --- a/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/factory/ComponentNodeFactory.kt +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * Modifications Copyright © 2018 IBM. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.onap.ccsdk.apps.blueprintsprocessor.core.factory - -import com.att.eelf.configuration.EELFManager -import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException -import org.springframework.context.ApplicationContext -import org.springframework.context.ApplicationContextAware - -/** - * ComponentNode - * - * @author Brinda Santh - */ -interface ComponentNode { - - @Throws(BluePrintProcessorException::class) - fun validate(context: MutableMap, componentContext: MutableMap) - - @Throws(BluePrintProcessorException::class) - fun process(context: MutableMap, componentContext: MutableMap) - - @Throws(BluePrintProcessorException::class) - fun errorHandle(context: MutableMap, componentContext: MutableMap) - - @Throws(BluePrintProcessorException::class) - fun reTrigger(context: MutableMap, componentContext: MutableMap) -} - -/** - * ComponentNodeFactory - * - * @author Brinda Santh - */ -open class ComponentNodeFactory : ApplicationContextAware { - private val log = EELFManager.getInstance().getLogger(ComponentNodeFactory::class.java) - - var componentNodes: MutableMap = hashMapOf() - - fun getInstance(instanceName: String): ComponentNode? { - log.trace("looking for Component Nodes : {}", instanceName) - return componentNodes.get(instanceName) - } - - fun injectInstance(instanceName: String, componentNode: ComponentNode) { - this.componentNodes[instanceName] = componentNode - } - - override fun setApplicationContext(context: ApplicationContext) { - componentNodes = context.getBeansOfType(ComponentNode::class.java) - log.info("Injected Component Nodes : {}", componentNodes) - } -} \ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/utils/PayloadUtils.kt b/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/utils/PayloadUtils.kt deleted file mode 100644 index 31dca33b8..000000000 --- a/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/utils/PayloadUtils.kt +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright © 2017-2018 AT&T Intellectual Property. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.onap.ccsdk.apps.blueprintsprocessor.core.utils - -import com.fasterxml.jackson.databind.JsonNode -import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants -import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService - - -class PayloadUtils { - - companion object { - - fun prepareInputsFromWorkflowPayload(bluePrintRuntimeService: BluePrintRuntimeService<*>, payload: JsonNode, workflowName: String) { - val input = payload.get("$workflowName-request") - bluePrintRuntimeService.assignWorkflowInputs(workflowName, input) - } - - fun prepareDynamicInputsFromWorkflowPayload(bluePrintRuntimeService: BluePrintRuntimeService<*>, payload: JsonNode, workflowName: String) { - val input = payload.get("$workflowName-request") - val propertyFields = input.get("$workflowName-properties") - prepareDynamicInputsFromComponentPayload(bluePrintRuntimeService, propertyFields) - } - - fun prepareDynamicInputsFromComponentPayload(bluePrintRuntimeService: BluePrintRuntimeService<*>, payload: JsonNode) { - payload.fields().forEach { property -> - val path = StringBuilder(BluePrintConstants.PATH_INPUTS) - .append(BluePrintConstants.PATH_DIVIDER).append(property.key).toString() - bluePrintRuntimeService.put(path, property.value) - } - } - } -} \ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/commons/core/src/main/resources/application.properties b/ms/blueprintsprocessor/modules/commons/core/src/main/resources/application.properties deleted file mode 100644 index 2ce871476..000000000 --- a/ms/blueprintsprocessor/modules/commons/core/src/main/resources/application.properties +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright © 2017-2018 AT&T Intellectual Property. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - diff --git a/ms/blueprintsprocessor/modules/commons/core/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/BluePrintPropertiesTest.kt b/ms/blueprintsprocessor/modules/commons/core/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/BluePrintPropertiesTest.kt deleted file mode 100644 index 66de11fde..000000000 --- a/ms/blueprintsprocessor/modules/commons/core/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/BluePrintPropertiesTest.kt +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright © 2019 Bell Canada - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.onap.ccsdk.apps.blueprintsprocessor.core - -// TODO -open class BluePrintPropertiesTest \ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml index 7c5aecb7a..1f8251bda 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml @@ -36,16 +36,14 @@ org.onap.ccsdk.apps.controllerblueprints db-resources - ${project.version} org.onap.ccsdk.apps.controllerblueprints blueprint-validation - ${project.version} org.onap.ccsdk.apps.blueprintsprocessor - core + processor-core org.springframework.boot diff --git a/ms/blueprintsprocessor/modules/commons/pom.xml b/ms/blueprintsprocessor/modules/commons/pom.xml index 9d5dc51c4..e1c07ddb9 100755 --- a/ms/blueprintsprocessor/modules/commons/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/pom.xml @@ -3,6 +3,7 @@ ~ Copyright © 2017-2018 AT&T Intellectual Property. ~ ~ Modifications Copyright © 2019 Bell Canada. + ~ Modifications Copyright © 2019 IBM. ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. @@ -16,7 +17,8 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + 4.0.0 org.onap.ccsdk.apps.blueprintsprocessor @@ -30,9 +32,9 @@ Blueprints Processor Commons + processor-core db-lib rest-lib - core dmaap-lib @@ -41,6 +43,11 @@ resource-dict + + io.mockk + mockk + test + org.powermock powermock-api-mockito2 @@ -56,6 +63,11 @@ kotlin-test-junit test + + org.jetbrains.kotlinx + kotlinx-coroutines-test + test + io.projectreactor reactor-test diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/pom.xml b/ms/blueprintsprocessor/modules/commons/processor-core/pom.xml new file mode 100644 index 000000000..aadff9c9f --- /dev/null +++ b/ms/blueprintsprocessor/modules/commons/processor-core/pom.xml @@ -0,0 +1,37 @@ + + + + 4.0.0 + + org.onap.ccsdk.apps.blueprintsprocessor + commons + 0.4.1-SNAPSHOT + + + processor-core + jar + Blueprints Processor Core + Blueprints Processor Core + + + org.springframework.boot + spring-boot-starter-webflux + + + diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/BluePrintCoreConfiguration.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/BluePrintCoreConfiguration.kt new file mode 100644 index 000000000..07e494a1a --- /dev/null +++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/BluePrintCoreConfiguration.kt @@ -0,0 +1,49 @@ +/* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.apps.blueprintsprocessor.core + +import org.springframework.beans.factory.annotation.Autowired +import org.springframework.beans.factory.annotation.Value +import org.springframework.boot.context.properties.bind.Binder +import org.springframework.boot.context.properties.source.ConfigurationPropertySources +import org.springframework.context.annotation.Bean +import org.springframework.context.annotation.Configuration +import org.springframework.core.env.Environment + + +@Configuration +open class BluePrintCoreConfiguration { + + @Value("\${blueprintsprocessor.blueprintDeployPath}") + lateinit var deployPath: String + + @Value("\${blueprintsprocessor.blueprintArchivePath}") + lateinit var archivePath: String + +} + +@Configuration +open class BlueprintPropertyConfiguration { + @Autowired + lateinit var environment: Environment + + @Bean + open fun bluePrintPropertyBinder(): Binder { + val configurationPropertySource = ConfigurationPropertySources.get(environment) + return Binder(configurationPropertySource) + } +} \ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/BluePrintProperties.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/BluePrintProperties.kt new file mode 100644 index 000000000..10b8ceb5e --- /dev/null +++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/BluePrintProperties.kt @@ -0,0 +1,29 @@ +/* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.apps.blueprintsprocessor.core + +import org.springframework.boot.context.properties.bind.Bindable +import org.springframework.boot.context.properties.bind.Binder +import org.springframework.stereotype.Service + +@Service +open class BluePrintProperties(var bluePrintPropertyBinder: Binder) { + + fun propertyBeanType(prefix: String, type: Class): T { + return bluePrintPropertyBinder.bind(prefix, Bindable.of(type)).get() + } +} \ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt new file mode 100644 index 000000000..41bbd1dfd --- /dev/null +++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt @@ -0,0 +1,123 @@ +/* + * Copyright © 2017-2018 AT&T Intellectual Property. + * Modifications Copyright © 2018 IBM. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.apps.blueprintsprocessor.core.api.data + +import com.fasterxml.jackson.annotation.JsonFormat +import com.fasterxml.jackson.databind.node.ObjectNode +import io.swagger.annotations.ApiModelProperty +import java.util.* + +/** + * BlueprintProcessorData + * @author Brinda Santh + * DATE : 8/15/2018 + */ + +open class ExecutionServiceInput { + @get:ApiModelProperty(required = true) + lateinit var commonHeader: CommonHeader + @get:ApiModelProperty(required = true) + lateinit var actionIdentifiers: ActionIdentifiers + @get:ApiModelProperty(required = true) + lateinit var payload: ObjectNode +} + +open class ExecutionServiceOutput { + @get:ApiModelProperty(required = true) + lateinit var commonHeader: CommonHeader + @get:ApiModelProperty(required = true) + lateinit var actionIdentifiers: ActionIdentifiers + @get:ApiModelProperty(required = true) + var status: Status = Status() + @get:ApiModelProperty(required = true) + lateinit var payload: ObjectNode +} + +const val ACTION_MODE_ASYNC = "async" +const val ACTION_MODE_SYNC = "sync" + +open class ActionIdentifiers { + @get:ApiModelProperty(required = false) + lateinit var blueprintName: String + @get:ApiModelProperty(required = false) + lateinit var blueprintVersion: String + @get:ApiModelProperty(required = true) + lateinit var actionName: String + @get:ApiModelProperty(required = true, allowableValues = "sync, async") + lateinit var mode: String +} + +open class CommonHeader { + @get:ApiModelProperty(required = true, example = "2012-04-23T18:25:43.511Z") + @get:JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") + var timestamp: Date = Date() + @get:ApiModelProperty(required = true) + lateinit var originatorId: String + @get:ApiModelProperty(required = true) + lateinit var requestId: String + @get:ApiModelProperty(required = true) + lateinit var subRequestId: String + @get:ApiModelProperty(required = false) + var flags: Flags? = null +} + +open class Flags { + var isForce: Boolean = false + @get:ApiModelProperty(value = "3600") + var ttl: Int = 3600 +} + +open class Status { + @get:ApiModelProperty(required = true) + var code: Int = 200 + @get:ApiModelProperty(required = true) + var eventType: String = "EVENT-ACTION-RESPONSE" + @get:ApiModelProperty(required = true, example = "2012-04-23T18:25:43.511Z") + @get:JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") + var timestamp: Date = Date() + @get:ApiModelProperty(required = false) + var errorMessage: String? = null + @get:ApiModelProperty(required = true) + var message: String = "success" +} + +open class BluePrintManagementInput { + @get:ApiModelProperty(required = true) + lateinit var commonHeader: CommonHeader + @get:ApiModelProperty(required = false) + lateinit var blueprintName: String + @get:ApiModelProperty(required = false) + lateinit var blueprintVersion: String + @get:ApiModelProperty(required = true) + lateinit var fileChunk: FileChunk +} + +open class FileChunk { + @get:ApiModelProperty(required = true) + lateinit var chunk: ByteArray +} + +open class BluePrintManagementOutput { + @get:ApiModelProperty(required = true) + lateinit var commonHeader: CommonHeader + @get:ApiModelProperty(required = true) + var status: Status = Status() +} + + + diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/factory/ComponentNodeFactory.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/factory/ComponentNodeFactory.kt new file mode 100644 index 000000000..9c6e50752 --- /dev/null +++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/factory/ComponentNodeFactory.kt @@ -0,0 +1,68 @@ +/* + * Copyright © 2017-2018 AT&T Intellectual Property. + * Modifications Copyright © 2018 IBM. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.apps.blueprintsprocessor.core.factory + +import com.att.eelf.configuration.EELFManager +import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException +import org.springframework.context.ApplicationContext +import org.springframework.context.ApplicationContextAware + +/** + * ComponentNode + * + * @author Brinda Santh + */ +interface ComponentNode { + + @Throws(BluePrintProcessorException::class) + fun validate(context: MutableMap, componentContext: MutableMap) + + @Throws(BluePrintProcessorException::class) + fun process(context: MutableMap, componentContext: MutableMap) + + @Throws(BluePrintProcessorException::class) + fun errorHandle(context: MutableMap, componentContext: MutableMap) + + @Throws(BluePrintProcessorException::class) + fun reTrigger(context: MutableMap, componentContext: MutableMap) +} + +/** + * ComponentNodeFactory + * + * @author Brinda Santh + */ +open class ComponentNodeFactory : ApplicationContextAware { + private val log = EELFManager.getInstance().getLogger(ComponentNodeFactory::class.java) + + var componentNodes: MutableMap = hashMapOf() + + fun getInstance(instanceName: String): ComponentNode? { + log.trace("looking for Component Nodes : {}", instanceName) + return componentNodes.get(instanceName) + } + + fun injectInstance(instanceName: String, componentNode: ComponentNode) { + this.componentNodes[instanceName] = componentNode + } + + override fun setApplicationContext(context: ApplicationContext) { + componentNodes = context.getBeansOfType(ComponentNode::class.java) + log.info("Injected Component Nodes : {}", componentNodes) + } +} \ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/utils/PayloadUtils.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/utils/PayloadUtils.kt new file mode 100644 index 000000000..31dca33b8 --- /dev/null +++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/utils/PayloadUtils.kt @@ -0,0 +1,47 @@ +/* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.apps.blueprintsprocessor.core.utils + +import com.fasterxml.jackson.databind.JsonNode +import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants +import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintRuntimeService + + +class PayloadUtils { + + companion object { + + fun prepareInputsFromWorkflowPayload(bluePrintRuntimeService: BluePrintRuntimeService<*>, payload: JsonNode, workflowName: String) { + val input = payload.get("$workflowName-request") + bluePrintRuntimeService.assignWorkflowInputs(workflowName, input) + } + + fun prepareDynamicInputsFromWorkflowPayload(bluePrintRuntimeService: BluePrintRuntimeService<*>, payload: JsonNode, workflowName: String) { + val input = payload.get("$workflowName-request") + val propertyFields = input.get("$workflowName-properties") + prepareDynamicInputsFromComponentPayload(bluePrintRuntimeService, propertyFields) + } + + fun prepareDynamicInputsFromComponentPayload(bluePrintRuntimeService: BluePrintRuntimeService<*>, payload: JsonNode) { + payload.fields().forEach { property -> + val path = StringBuilder(BluePrintConstants.PATH_INPUTS) + .append(BluePrintConstants.PATH_DIVIDER).append(property.key).toString() + bluePrintRuntimeService.put(path, property.value) + } + } + } +} \ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/resources/application.properties b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/resources/application.properties new file mode 100644 index 000000000..c10e96ee2 --- /dev/null +++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/resources/application.properties @@ -0,0 +1,16 @@ +# +# Copyright © 2017-2018 AT&T Intellectual Property. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/BluePrintPropertiesTest.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/BluePrintPropertiesTest.kt new file mode 100644 index 000000000..66de11fde --- /dev/null +++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/BluePrintPropertiesTest.kt @@ -0,0 +1,20 @@ +/* + * Copyright © 2019 Bell Canada + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.ccsdk.apps.blueprintsprocessor.core + +// TODO +open class BluePrintPropertiesTest \ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml index f1d978965..8659089e2 100644 --- a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml @@ -34,7 +34,7 @@ org.onap.ccsdk.apps.blueprintsprocessor - core + processor-core diff --git a/ms/blueprintsprocessor/modules/inbounds/pom.xml b/ms/blueprintsprocessor/modules/inbounds/pom.xml index d7c0cc4f3..273abd51b 100644 --- a/ms/blueprintsprocessor/modules/inbounds/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/pom.xml @@ -1,6 +1,7 @@ + + io.mockk + mockk + test + + + org.powermock + powermock-api-mockito2 + test + + + org.springframework.boot + spring-boot-starter-test + test + + + org.jetbrains.kotlin + kotlin-test-junit + test + + + org.jetbrains.kotlinx + kotlinx-coroutines-test + test + + + io.projectreactor + reactor-test + test + + diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml b/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml index 4f929064d..634d2233d 100644 --- a/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml +++ b/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml @@ -40,27 +40,6 @@ org.onap.ccsdk.sli.core sli-provider - - - org.powermock - powermock-api-mockito2 - test - - - org.springframework.boot - spring-boot-starter-test - test - - - org.jetbrains.kotlin - kotlin-test-junit - test - - - io.projectreactor - reactor-test - test - diff --git a/ms/blueprintsprocessor/parent/pom.xml b/ms/blueprintsprocessor/parent/pom.xml index 045ce7119..210943ae3 100755 --- a/ms/blueprintsprocessor/parent/pom.xml +++ b/ms/blueprintsprocessor/parent/pom.xml @@ -264,10 +264,10 @@ - + org.onap.ccsdk.apps.blueprintsprocessor - application + processor-core ${project.version} @@ -282,7 +282,7 @@ org.onap.ccsdk.apps.blueprintsprocessor - core + dmaap-lib ${project.version} @@ -305,6 +305,11 @@ selfservice-api ${project.version} + + org.onap.ccsdk.apps.blueprintsprocessor + application + ${project.version} + @@ -328,7 +333,7 @@ ${project.version} - + org.onap.ccsdk.apps.controllerblueprints resource-dict @@ -344,6 +349,11 @@ blueprint-scripts ${project.version} + + org.onap.ccsdk.apps.controllerblueprints + db-resources + ${project.version} + org.onap.ccsdk.apps.controllerblueprints blueprint-validation @@ -357,6 +367,7 @@ ${h2database.version} test + io.mockk -- cgit 1.2.3-korg From 5da3a8132b004c2a3b626fba6c54867bed7051c0 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Tue, 19 Mar 2019 16:31:51 -0400 Subject: Compile against Fluorine SR2 Updated to compile against Fluorine SR2 Change-Id: I434068531ce4a661a04c20201e0fddf3f6b92f47 Issue-ID: CCSDK-1156 Signed-off-by: Timoney, Dan (dt5972) --- ms/blueprintsprocessor/application/pom.xml | 2 +- ms/blueprintsprocessor/distribution/pom.xml | 2 +- ms/blueprintsprocessor/functions/cli-executor/pom.xml | 9 +++------ ms/blueprintsprocessor/functions/netconf-executor/pom.xml | 2 +- ms/blueprintsprocessor/functions/pom.xml | 2 +- ms/blueprintsprocessor/functions/python-executor/pom.xml | 2 +- ms/blueprintsprocessor/functions/resource-resolution/pom.xml | 2 +- ms/blueprintsprocessor/functions/restconf-executor/pom.xml | 2 +- ms/blueprintsprocessor/modules/commons/db-lib/pom.xml | 2 +- ms/blueprintsprocessor/modules/commons/dmaap-lib/pom.xml | 2 +- ms/blueprintsprocessor/modules/commons/pom.xml | 2 +- ms/blueprintsprocessor/modules/commons/processor-core/pom.xml | 2 +- ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml | 2 +- ms/blueprintsprocessor/modules/inbounds/pom.xml | 2 +- ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml | 2 +- ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml | 2 +- ms/blueprintsprocessor/modules/outbounds/pom.xml | 2 +- ms/blueprintsprocessor/modules/pom.xml | 2 +- .../modules/services/execution-service/pom.xml | 2 +- ms/blueprintsprocessor/modules/services/pom.xml | 2 +- ms/blueprintsprocessor/modules/services/workflow-service/pom.xml | 2 +- ms/blueprintsprocessor/parent/pom.xml | 2 +- ms/blueprintsprocessor/pom.xml | 2 +- 23 files changed, 25 insertions(+), 28 deletions(-) (limited to 'ms/blueprintsprocessor/modules/services/workflow-service/pom.xml') diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml index ff7680d50..8757a0367 100755 --- a/ms/blueprintsprocessor/application/pom.xml +++ b/ms/blueprintsprocessor/application/pom.xml @@ -22,7 +22,7 @@ org.onap.ccsdk.apps.blueprintsprocessor parent - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT ../parent application diff --git a/ms/blueprintsprocessor/distribution/pom.xml b/ms/blueprintsprocessor/distribution/pom.xml index 8fcad07b4..2bd16e5c0 100755 --- a/ms/blueprintsprocessor/distribution/pom.xml +++ b/ms/blueprintsprocessor/distribution/pom.xml @@ -19,7 +19,7 @@ org.onap.ccsdk.apps.blueprintsprocessor parent - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT ../parent distribution diff --git a/ms/blueprintsprocessor/functions/cli-executor/pom.xml b/ms/blueprintsprocessor/functions/cli-executor/pom.xml index 52a789077..9077c13c6 100644 --- a/ms/blueprintsprocessor/functions/cli-executor/pom.xml +++ b/ms/blueprintsprocessor/functions/cli-executor/pom.xml @@ -14,14 +14,11 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - - + functions org.onap.ccsdk.apps.blueprintsprocessor - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT 4.0.0 cli-executor @@ -37,4 +34,4 @@ - \ No newline at end of file + diff --git a/ms/blueprintsprocessor/functions/netconf-executor/pom.xml b/ms/blueprintsprocessor/functions/netconf-executor/pom.xml index 3041132de..2e6d77edc 100644 --- a/ms/blueprintsprocessor/functions/netconf-executor/pom.xml +++ b/ms/blueprintsprocessor/functions/netconf-executor/pom.xml @@ -18,7 +18,7 @@ org.onap.ccsdk.apps.blueprintsprocessor functions - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT 4.0.0 org.onap.ccsdk.apps.blueprintsprocessor.functions diff --git a/ms/blueprintsprocessor/functions/pom.xml b/ms/blueprintsprocessor/functions/pom.xml index 4bc0159f9..5bc26d5f4 100755 --- a/ms/blueprintsprocessor/functions/pom.xml +++ b/ms/blueprintsprocessor/functions/pom.xml @@ -19,7 +19,7 @@ org.onap.ccsdk.apps.blueprintsprocessor parent - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT ../parent 4.0.0 diff --git a/ms/blueprintsprocessor/functions/python-executor/pom.xml b/ms/blueprintsprocessor/functions/python-executor/pom.xml index 120ded780..e0c617493 100644 --- a/ms/blueprintsprocessor/functions/python-executor/pom.xml +++ b/ms/blueprintsprocessor/functions/python-executor/pom.xml @@ -18,7 +18,7 @@ functions org.onap.ccsdk.apps.blueprintsprocessor - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT 4.0.0 diff --git a/ms/blueprintsprocessor/functions/resource-resolution/pom.xml b/ms/blueprintsprocessor/functions/resource-resolution/pom.xml index 840124fa2..eafdb9a01 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/pom.xml +++ b/ms/blueprintsprocessor/functions/resource-resolution/pom.xml @@ -19,7 +19,7 @@ org.onap.ccsdk.apps.blueprintsprocessor functions - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT org.onap.ccsdk.apps.blueprintsprocessor.functions resource-resolution diff --git a/ms/blueprintsprocessor/functions/restconf-executor/pom.xml b/ms/blueprintsprocessor/functions/restconf-executor/pom.xml index e81c52765..1ee23d3d0 100644 --- a/ms/blueprintsprocessor/functions/restconf-executor/pom.xml +++ b/ms/blueprintsprocessor/functions/restconf-executor/pom.xml @@ -18,7 +18,7 @@ functions org.onap.ccsdk.apps.blueprintsprocessor - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT 4.0.0 org.onap.ccsdk.apps.blueprintsprocessor.functions diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml index 1f8251bda..045c871ff 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor commons - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT db-lib diff --git a/ms/blueprintsprocessor/modules/commons/dmaap-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/dmaap-lib/pom.xml index 0dd3da350..6ad7d8433 100644 --- a/ms/blueprintsprocessor/modules/commons/dmaap-lib/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/dmaap-lib/pom.xml @@ -23,7 +23,7 @@ org.onap.ccsdk.apps.blueprintsprocessor commons - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT dmaap-lib diff --git a/ms/blueprintsprocessor/modules/commons/pom.xml b/ms/blueprintsprocessor/modules/commons/pom.xml index 07d7551f5..205fd94c5 100755 --- a/ms/blueprintsprocessor/modules/commons/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/pom.xml @@ -22,7 +22,7 @@ org.onap.ccsdk.apps.blueprintsprocessor modules - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT commons diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/pom.xml b/ms/blueprintsprocessor/modules/commons/processor-core/pom.xml index aadff9c9f..32e4b3d4a 100644 --- a/ms/blueprintsprocessor/modules/commons/processor-core/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/processor-core/pom.xml @@ -21,7 +21,7 @@ org.onap.ccsdk.apps.blueprintsprocessor commons - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT processor-core diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml index 0c8e163fc..1ed157dcc 100644 --- a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor commons - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT rest-lib diff --git a/ms/blueprintsprocessor/modules/inbounds/pom.xml b/ms/blueprintsprocessor/modules/inbounds/pom.xml index 273abd51b..060c7e42d 100644 --- a/ms/blueprintsprocessor/modules/inbounds/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor modules - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT inbounds diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml index dcf42c207..26ce4a8c7 100644 --- a/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml @@ -19,7 +19,7 @@ org.onap.ccsdk.apps.blueprintsprocessor inbounds - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT resource-api diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml index abd76dc1e..0c6b8e77d 100755 --- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml @@ -22,7 +22,7 @@ org.onap.ccsdk.apps.blueprintsprocessor inbounds - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT selfservice-api diff --git a/ms/blueprintsprocessor/modules/outbounds/pom.xml b/ms/blueprintsprocessor/modules/outbounds/pom.xml index b6c26e67f..3fb7e382b 100644 --- a/ms/blueprintsprocessor/modules/outbounds/pom.xml +++ b/ms/blueprintsprocessor/modules/outbounds/pom.xml @@ -19,7 +19,7 @@ org.onap.ccsdk.apps.blueprintsprocessor modules - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT outbounds diff --git a/ms/blueprintsprocessor/modules/pom.xml b/ms/blueprintsprocessor/modules/pom.xml index 5cc31c46e..26500f50d 100644 --- a/ms/blueprintsprocessor/modules/pom.xml +++ b/ms/blueprintsprocessor/modules/pom.xml @@ -21,7 +21,7 @@ org.onap.ccsdk.apps.blueprintsprocessor parent - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT ../parent diff --git a/ms/blueprintsprocessor/modules/services/execution-service/pom.xml b/ms/blueprintsprocessor/modules/services/execution-service/pom.xml index 42d2e074d..913ce4671 100644 --- a/ms/blueprintsprocessor/modules/services/execution-service/pom.xml +++ b/ms/blueprintsprocessor/modules/services/execution-service/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps.blueprintsprocessor services - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT execution-service diff --git a/ms/blueprintsprocessor/modules/services/pom.xml b/ms/blueprintsprocessor/modules/services/pom.xml index 4388eeb9b..ee5b73cc7 100755 --- a/ms/blueprintsprocessor/modules/services/pom.xml +++ b/ms/blueprintsprocessor/modules/services/pom.xml @@ -22,7 +22,7 @@ org.onap.ccsdk.apps.blueprintsprocessor modules - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT services diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml b/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml index 634d2233d..4331eec77 100644 --- a/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml +++ b/ms/blueprintsprocessor/modules/services/workflow-service/pom.xml @@ -19,7 +19,7 @@ org.onap.ccsdk.apps.blueprintsprocessor services - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT 4.0.0 diff --git a/ms/blueprintsprocessor/parent/pom.xml b/ms/blueprintsprocessor/parent/pom.xml index 48f18eff6..46eba5afa 100755 --- a/ms/blueprintsprocessor/parent/pom.xml +++ b/ms/blueprintsprocessor/parent/pom.xml @@ -22,7 +22,7 @@ org.onap.ccsdk.apps blueprintsprocessor - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT org.onap.ccsdk.apps.blueprintsprocessor parent diff --git a/ms/blueprintsprocessor/pom.xml b/ms/blueprintsprocessor/pom.xml index 774e177e0..2f2576786 100755 --- a/ms/blueprintsprocessor/pom.xml +++ b/ms/blueprintsprocessor/pom.xml @@ -20,7 +20,7 @@ org.onap.ccsdk.apps ccsdk-apps-ms - 0.4.1-SNAPSHOT + 0.4.2-SNAPSHOT blueprintsprocessor pom -- cgit 1.2.3-korg