diff options
author | Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com> | 2018-11-12 12:32:25 -0500 |
---|---|---|
committer | Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com> | 2018-11-12 12:32:25 -0500 |
commit | 2c505b980ea8942ba84fb99278dd1c34a5b5873c (patch) | |
tree | ac10df19ed9c0c5e571a2dcb5d58e43db2df36dc /components/core/src/main | |
parent | c8f708adf9cdb0789fd29cce64a5fb0e89bfb7ca (diff) |
Controller Blueprints Component Core
Modify test case blueprint data pointing to model catalog location.
Change-Id: I601eddf899516b01ae8624c96aa13c5e236c8e5b
Issue-ID: CCSDK-678
Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Diffstat (limited to 'components/core/src/main')
2 files changed, 2 insertions, 53 deletions
diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintParserFactory.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintParserFactory.kt deleted file mode 100644 index 83233abc1..000000000 --- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/factory/BluePrintParserFactory.kt +++ /dev/null @@ -1,51 +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.controllerblueprints.core.factory
-
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintParserDefaultService
-import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintParserService
-import com.att.eelf.configuration.EELFLogger
-import com.att.eelf.configuration.EELFManager
-
-/**
- *
- * BluePrintParserFactory
- * @author Brinda Santh
- */
-
-object BluePrintParserFactory {
- private val log: EELFLogger = EELFManager.getInstance().getLogger(this::class.toString())
-
- var bluePrintParserServices: MutableMap<String, BluePrintParserService> = HashMap()
-
- init {
- log.info("Initialised default BluePrintParser Service ")
- bluePrintParserServices.put(org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants.TYPE_DEFAULT, BluePrintParserDefaultService())
- }
-
- fun register(key:String, bluePrintParserService: BluePrintParserService){
- bluePrintParserServices.put(key, bluePrintParserService)
- }
-
- /**
- * Called by clients to get a Blueprint Parser for the Blueprint parser type
- */
- fun instance(key : String) : BluePrintParserService? {
- return bluePrintParserServices.get(key)
- }
-}
-
diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/PropertyAssignmentService.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/PropertyAssignmentService.kt index 5b511f158..947eb41e0 100644 --- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/PropertyAssignmentService.kt +++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/service/PropertyAssignmentService.kt @@ -197,8 +197,8 @@ If Property Assignment is Expression. }
fun artifactContent(artifactDefinition: ArtifactDefinition): String {
- val bluePrintBasePath: String = bluePrintRuntimeService.get(BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH) as? String
- ?: throw BluePrintException(format("failed to get property (%s) from context", BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH))
+ val bluePrintBasePath: String = bluePrintRuntimeService.get(BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH)?.asText()
+ ?: throw BluePrintException("failed to get property (${BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH}) from getStore")
if (artifactDefinition.repository != null) {
TODO()
|