summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-03-22 16:06:26 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-22 16:06:26 +0000
commit87c6f4e04224d6fc4f9747b581c894aa46496b3f (patch)
tree3cf0c6bef4d9eec3c80f11b903276684eb737b18 /ms/controllerblueprints
parent594346cf32493eb556a0c71126006f960d854f1d (diff)
parent3476ae694de004c83600bb7a1a58ee94f9cf9f87 (diff)
Merge "Ressource resolution using configurable database"
Diffstat (limited to 'ms/controllerblueprints')
-rwxr-xr-xms/controllerblueprints/application/src/main/resources/application-dev.properties2
-rwxr-xr-xms/controllerblueprints/application/src/main/resources/application.properties2
-rwxr-xr-xms/controllerblueprints/application/src/test/resources/application.properties2
-rw-r--r--ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt2
-rw-r--r--ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java6
-rwxr-xr-xms/controllerblueprints/modules/service/src/test/resources/application.properties2
6 files changed, 9 insertions, 7 deletions
diff --git a/ms/controllerblueprints/application/src/main/resources/application-dev.properties b/ms/controllerblueprints/application/src/main/resources/application-dev.properties
index 1c9029d5b..3401ece04 100755
--- a/ms/controllerblueprints/application/src/main/resources/application-dev.properties
+++ b/ms/controllerblueprints/application/src/main/resources/application-dev.properties
@@ -49,7 +49,7 @@ spring.jpa.hibernate.ddl-auto=none
spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
# Load Resource Source Mappings
-resourceSourceMappings=primary-db=source-primary-db,input=source-input,default=source-default,primary-config-data=source-rest,capability=source-capability
+resourceSourceMappings=processor-db=source-processor-db,input=source-input,default=source-default,primary-config-data=source-rest,capability=source-capability
# Controller Blueprints Core Configuration
controllerblueprints.blueprintDeployPath=/etc/blueprints/deploy
controllerblueprints.blueprintArchivePath=/etc/blueprints/archive
diff --git a/ms/controllerblueprints/application/src/main/resources/application.properties b/ms/controllerblueprints/application/src/main/resources/application.properties
index 034093888..8789c24ec 100755
--- a/ms/controllerblueprints/application/src/main/resources/application.properties
+++ b/ms/controllerblueprints/application/src/main/resources/application.properties
@@ -52,7 +52,7 @@ spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
# Load Resource Source Mappings
-resourceSourceMappings=primary-db=source-primary-db,input=source-input,default=source-default,primary-config-data=source-rest,capability=source-capability
+resourceSourceMappings=processor-db=source-processor-db,input=source-input,default=source-default,primary-config-data=source-rest,capability=source-capability
# Controller Blueprints Core Configuration
controllerblueprints.blueprintDeployPath=/etc/blueprints/deploy
diff --git a/ms/controllerblueprints/application/src/test/resources/application.properties b/ms/controllerblueprints/application/src/test/resources/application.properties
index e0369aea4..8ad9f2c09 100755
--- a/ms/controllerblueprints/application/src/test/resources/application.properties
+++ b/ms/controllerblueprints/application/src/test/resources/application.properties
@@ -33,7 +33,7 @@ swagger.contact.url=www.onap.com
swagger.contact.email=brindasanth@onap.com
# Load Resource Source Mappings
-resourceSourceMappings=primary-db=source-primary-db,input=source-input,default=source-default,primary-config-data=source-rest,capability=source-capability
+resourceSourceMappings=processor-db=source-processor-db,input=source-input,default=source-default,primary-config-data=source-rest,capability=source-capability
# Controller Blueprints Core Configuration
controllerblueprints.blueprintDeployPath=./target/blueprints/deploy
diff --git a/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt b/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt
index d33a2f04b..75368684c 100644
--- a/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt
+++ b/ms/controllerblueprints/modules/resource-dict/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/resource/dict/ResourceDictionaryConstants.kt
@@ -24,6 +24,8 @@ package org.onap.ccsdk.apps.controllerblueprints.resource.dict
object ResourceDictionaryConstants {
const val SOURCE_INPUT = "input"
const val SOURCE_DEFAULT = "default"
+ //const val SOURCE_PRIMARY_CONFIG_DATA = "rest"
+ const val SOURCE_PROCESSOR_DB = "processor-db"
const val SOURCE_PRIMARY_CONFIG_DATA = "primary-config-data"
const val SOURCE_PRIMARY_DB = "primary-db"
diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java
index e4ddac131..45fc739d7 100644
--- a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java
+++ b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/apps/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java
@@ -59,9 +59,9 @@ public class ResourceDictionaryUtilsTest {
Assert.assertEquals("Expected First source Default, but.", ResourceDictionaryConstants.SOURCE_DEFAULT, resourceAssignment.getDictionarySource());
// To Check Assigned Source
- resourceAssignment.setDictionarySource(ResourceDictionaryConstants.SOURCE_PRIMARY_DB);
+ resourceAssignment.setDictionarySource(ResourceDictionaryConstants.SOURCE_PROCESSOR_DB);
ResourceDictionaryUtils.populateSourceMapping(resourceAssignment, resourceDefinition);
- Assert.assertEquals("Expected Assigned source DB, but.", ResourceDictionaryConstants.SOURCE_PRIMARY_DB, resourceAssignment.getDictionarySource());
+ Assert.assertEquals("Expected Assigned source DB, but.", ResourceDictionaryConstants.SOURCE_PROCESSOR_DB, resourceAssignment.getDictionarySource());
}
@@ -78,7 +78,7 @@ public class ResourceDictionaryUtilsTest {
Assert.assertEquals("Expected source Input, but.", ResourceDictionaryConstants.SOURCE_INPUT, inputFirstSource);
// TO check the multiple Source
- sources.put(ResourceDictionaryConstants.SOURCE_PRIMARY_DB, new NodeTemplate());
+ sources.put(ResourceDictionaryConstants.SOURCE_PROCESSOR_DB, new NodeTemplate());
String multipleFirstSource = ResourceDictionaryUtils.findFirstSource(sources);
Assert.assertEquals("Expected source Input, but.", ResourceDictionaryConstants.SOURCE_INPUT, multipleFirstSource);
diff --git a/ms/controllerblueprints/modules/service/src/test/resources/application.properties b/ms/controllerblueprints/modules/service/src/test/resources/application.properties
index 20450f445..011bad32c 100755
--- a/ms/controllerblueprints/modules/service/src/test/resources/application.properties
+++ b/ms/controllerblueprints/modules/service/src/test/resources/application.properties
@@ -20,7 +20,7 @@ logging.level.org.springframework.web=INFO
logging.level.org.hibernate.SQL=warn
logging.level.org.hibernate.type.descriptor.sql=debug
# Load Resource Source Mappings
-resourceSourceMappings=primary-db=source-primary-db,input=source-input,default=source-default,primary-config-data=source-rest,capability=source-capability
+resourceSourceMappings=processor-db=source-processor-db,input=source-input,default=source-default,primary-config-data=source-rest,capability=source-capability
# Controller Blueprints Core Configuration
controllerblueprints.blueprintDeployPath=./target/blueprints/deploy
controllerblueprints.blueprintArchivePath=./target/blueprints/archive