From 1e162f0f179b73834cf66bd8607e3ac705c47b9c Mon Sep 17 00:00:00 2001 From: Brinda Santh Date: Tue, 11 Sep 2018 20:55:46 -0400 Subject: Blueprints Processor Service Add Input, default, mdsal and sdnc db resource processor prototype. Change-Id: I1ad8c4ea5d7cdf5793af23ac52b7152d1a58b762 Issue-ID: CCSDK-548 Signed-off-by: Brinda Santh --- .../core/api/data/BlueprintProcessorData.kt | 21 +++------------------ .../core/factory/ComponentNodeFactory.kt | 15 ++++++++++++--- .../factory/ResourceAssignmentProcessorFactory.kt | 10 +++++++--- 3 files changed, 22 insertions(+), 24 deletions(-) (limited to 'ms/blueprintsprocessor/modules/commons') 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 index 4836cd243..6fed53e6f 100644 --- 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 @@ -1,5 +1,6 @@ /* * 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. @@ -21,22 +22,6 @@ import com.fasterxml.jackson.databind.node.ObjectNode import io.swagger.annotations.ApiModelProperty import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment -/* - * 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. - */ - /** * BlueprintProcessorData * @author Brinda Santh @@ -49,7 +34,7 @@ open class ResourceResolutionInput { @get:ApiModelProperty(required=true) lateinit var actionIdentifiers: ActionIdentifiers @get:ApiModelProperty(required=true) - lateinit var resourceAssignments: List + lateinit var resourceAssignments: MutableList @get:ApiModelProperty(required=true ) lateinit var payload: ObjectNode } @@ -62,7 +47,7 @@ open class ResourceResolutionOutput { @get:ApiModelProperty(required=true) lateinit var status: Status @get:ApiModelProperty(required=true) - lateinit var resourceAssignments: List + lateinit var resourceAssignments: MutableList } open class ExecutionServiceInput { 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 index f42613cc0..feacbcab7 100644 --- 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 @@ -1,5 +1,6 @@ /* * 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. @@ -18,12 +19,15 @@ package org.onap.ccsdk.apps.blueprintsprocessor.core.factory import com.att.eelf.configuration.EELFManager import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException -import org.slf4j.Logger -import org.slf4j.LoggerFactory import org.springframework.context.ApplicationContext import org.springframework.context.ApplicationContextAware import org.springframework.stereotype.Service +/** + * ComponentNode + * + * @author Brinda Santh + */ interface ComponentNode { @Throws(BluePrintProcessorException::class) @@ -39,8 +43,13 @@ interface ComponentNode { fun reTrigger(context: MutableMap, componentContext: MutableMap) } +/** + * ComponentNodeFactory + * + * @author Brinda Santh + */ @Service -class ComponentNodeFactory : ApplicationContextAware { +open class ComponentNodeFactory : ApplicationContextAware { private val log = EELFManager.getInstance().getLogger(ComponentNodeFactory::class.java) var componentNodes: MutableMap = hashMapOf() diff --git a/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/factory/ResourceAssignmentProcessorFactory.kt b/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/factory/ResourceAssignmentProcessorFactory.kt index 8104c104b..01a110d59 100644 --- a/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/factory/ResourceAssignmentProcessorFactory.kt +++ b/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/factory/ResourceAssignmentProcessorFactory.kt @@ -1,5 +1,6 @@ /* * 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. @@ -18,14 +19,17 @@ package org.onap.ccsdk.apps.blueprintsprocessor.core.factory import com.att.eelf.configuration.EELFManager import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignmentProcessor -import org.slf4j.Logger -import org.slf4j.LoggerFactory import org.springframework.context.ApplicationContext import org.springframework.context.ApplicationContextAware import org.springframework.stereotype.Service +/** + * ResourceAssignmentProcessorFactory + * + * @author Brinda Santh + */ @Service -class ResourceAssignmentProcessorFactory : ApplicationContextAware { +open class ResourceAssignmentProcessorFactory : ApplicationContextAware { private val log = EELFManager.getInstance().getLogger(ResourceAssignmentProcessorFactory::class.java) -- cgit 1.2.3-korg