aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/service
diff options
context:
space:
mode:
authorBrinda Santh <brindasanth@in.ibm.com>2019-08-29 22:40:48 -0400
committerBrinda Santh <brindasanth@in.ibm.com>2019-08-29 22:40:48 -0400
commit0fbfc6eab2d42c8ee2f8601db43813a4e33ffc4d (patch)
tree240a92c46f7bc1a46605c6aa895c0ec6c56e936e /ms/controllerblueprints/modules/service
parentb12d13b0b78b7e87912c07a7c946cbbfcee41d47 (diff)
Resolve duplicate application property values
Change-Id: I0813ff96388bce77eba9fbc9eff0eccf59a6be6a Issue-ID: CCSDK-1663 Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/controllerblueprints/modules/service')
-rw-r--r--ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/BluePrintDesignerCoreConfiguration.kt (renamed from ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/ControllerBluePrintCoreConfiguration.kt)15
-rw-r--r--ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/controller/BlueprintModelControllerTest.kt10
-rwxr-xr-xms/controllerblueprints/modules/service/src/test/resources/application.properties24
3 files changed, 25 insertions, 24 deletions
diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/ControllerBluePrintCoreConfiguration.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/BluePrintDesignerCoreConfiguration.kt
index 790c61ebc..c69a94430 100644
--- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/ControllerBluePrintCoreConfiguration.kt
+++ b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/BluePrintDesignerCoreConfiguration.kt
@@ -1,5 +1,6 @@
/*
* Copyright © 2017-2018 AT&T Intellectual Property.
+ * 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.
@@ -27,34 +28,34 @@ import org.springframework.core.env.Environment
import org.springframework.stereotype.Service
@Configuration
-open class ControllerBluePrintCoreConfiguration(private val bluePrintProperties: ControllerBlueprintProperties) {
+open class BluePrintDesignerCoreConfiguration(private val bluePrintProperties: BluePrintDesignerProperties) {
companion object {
- const val PREFIX_BLUEPRINT_LOAD_CONFIGURATION = "controllerblueprints"
+ const val PREFIX_BLUEPRINT_LOAD_CONFIGURATION = "blueprintsprocessor"
}
@Bean
- open fun bluePrintLoadConfiguration(): BluePrintLoadConfiguration {
+ open fun bluePrintDesignerLoadConfiguration(): BluePrintLoadConfiguration {
return bluePrintProperties
.propertyBeanType(PREFIX_BLUEPRINT_LOAD_CONFIGURATION, BluePrintLoadConfiguration::class.java)
}
}
@Configuration
-open class ControllerBlueprintPropertyConfiguration {
+open class BlueprintDesignerPropertyConfiguration {
@Autowired
lateinit var environment: Environment
@Bean
- open fun controllerBluePrintPropertyBinder(): Binder {
+ open fun bluePrintDesignerPropertyBinder(): Binder {
val configurationPropertySource = ConfigurationPropertySources.get(environment)
return Binder(configurationPropertySource)
}
}
@Service
-open class ControllerBlueprintProperties(private var bluePrintPropertyBinder: Binder) {
+open class BluePrintDesignerProperties(private var bluePrintDesignerPropertyBinder: Binder) {
fun <T> propertyBeanType(prefix: String, type: Class<T>): T {
- return bluePrintPropertyBinder.bind(prefix, Bindable.of(type)).get()
+ return bluePrintDesignerPropertyBinder.bind(prefix, Bindable.of(type)).get()
}
} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/controller/BlueprintModelControllerTest.kt b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/controller/BlueprintModelControllerTest.kt
index 64bd3ff3e..1ef717a5c 100644
--- a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/controller/BlueprintModelControllerTest.kt
+++ b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/controller/BlueprintModelControllerTest.kt
@@ -28,8 +28,8 @@ import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.onap.ccsdk.cds.controllerblueprints.TestApplication
import org.onap.ccsdk.cds.controllerblueprints.core.*
-import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintPathConfiguration
-import org.onap.ccsdk.cds.controllerblueprints.service.ControllerBluePrintCoreConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.service.BluePrintDesignerCoreConfiguration
import org.onap.ccsdk.cds.controllerblueprints.service.domain.BlueprintModelSearch
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
@@ -62,7 +62,7 @@ import kotlin.test.assertTrue
@RunWith(SpringRunner::class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
-@ContextConfiguration(classes = [TestApplication::class, ControllerBluePrintCoreConfiguration::class])
+@ContextConfiguration(classes = [TestApplication::class, BluePrintDesignerCoreConfiguration::class])
@ComponentScan(basePackages = ["org.onap.ccsdk.cds.controllerblueprints"])
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@EnableAutoConfiguration
@@ -77,7 +77,7 @@ class BlueprintModelControllerTest {
@Autowired
lateinit var webTestClient: WebTestClient
- private var bluePrintLoadConfiguration: BluePrintPathConfiguration? = null
+ private var bluePrintLoadConfiguration: BluePrintLoadConfiguration? = null
private val blueprintDir = "./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
private var zipBlueprintFileName: String? = null
@@ -89,7 +89,7 @@ class BlueprintModelControllerTest {
fun setUp() {
assertNotNull(webTestClient, " Failed to create WebTestClient")
- bluePrintLoadConfiguration = BluePrintPathConfiguration().apply {
+ bluePrintLoadConfiguration = BluePrintLoadConfiguration().apply {
blueprintArchivePath = "./target/blueprints/archive"
blueprintWorkingPath = "./target/blueprints/work"
blueprintDeployPath = "./target/blueprints/deploy"
diff --git a/ms/controllerblueprints/modules/service/src/test/resources/application.properties b/ms/controllerblueprints/modules/service/src/test/resources/application.properties
index c3afe13d8..ac83276e6 100755
--- a/ms/controllerblueprints/modules/service/src/test/resources/application.properties
+++ b/ms/controllerblueprints/modules/service/src/test/resources/application.properties
@@ -22,20 +22,20 @@ logging.level.org.hibernate.type.descriptor.sql=debug
# Load Resource Source Mappings
resourceSourceMappings=processor-db=source-db,input=source-input,default=source-default,sdnc=source-rest,aai-data=source-rest,capability=source-capability
# Controller Blueprints Core Configuration
-controllerblueprints.blueprintDeployPath=./target/blueprints/deploy
-controllerblueprints.blueprintArchivePath=./target/blueprints/archive
-controllerblueprints.blueprintWorkingPath=./target/blueprints/work
+blueprintsprocessor.blueprintDeployPath=./target/blueprints/deploy
+blueprintsprocessor.blueprintArchivePath=./target/blueprints/archive
+blueprintsprocessor.blueprintWorkingPath=./target/blueprints/work
# Controller Blueprint Load Configurations
-controllerblueprints.loadInitialData=false
-controllerblueprints.loadBluePrint=false
-controllerblueprints.loadBluePrintPaths=./../../../../components/model-catalog/blueprint-model/test-blueprint
-controllerblueprints.loadModelType=false
-controllerblueprints.loadModeTypePaths=./../../../../components/model-catalog/definition-type/starter-type
-controllerblueprints.loadResourceDictionary=false
-controllerblueprints.loadResourceDictionaryPaths=./../../../../components/model-catalog/resource-dictionary/starter-dictionary
+blueprintsprocessor.loadInitialData=false
+blueprintsprocessor.loadBluePrint=false
+blueprintsprocessor.loadBluePrintPaths=./../../../../components/model-catalog/blueprint-model/test-blueprint
+blueprintsprocessor.loadModelType=false
+blueprintsprocessor.loadModeTypePaths=./../../../../components/model-catalog/definition-type/starter-type
+blueprintsprocessor.loadResourceDictionary=false
+blueprintsprocessor.loadResourceDictionaryPaths=./../../../../components/model-catalog/resource-dictionary/starter-dictionary
# CBA file extension
-controllerblueprints.loadCbaExtension=zip
+blueprintsprocessor.loadCbaExtension=zip
# CBA examples for tests cases
-controllerblueprints.loadBlueprintsExamplesPath=./../../../../components/model-catalog/blueprint-model/test-blueprint
+blueprintsprocessor.loadBlueprintsExamplesPath=./../../../../components/model-catalog/blueprint-model/test-blueprint