aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules
diff options
context:
space:
mode:
Diffstat (limited to 'ms/controllerblueprints/modules')
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/pom.xml2
-rw-r--r--ms/controllerblueprints/modules/blueprint-scripts/pom.xml2
-rw-r--r--ms/controllerblueprints/modules/blueprint-validation/pom.xml2
-rw-r--r--ms/controllerblueprints/modules/db-resources/pom.xml2
-rw-r--r--ms/controllerblueprints/modules/pom.xml2
-rw-r--r--ms/controllerblueprints/modules/resource-dict/pom.xml2
-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
-rw-r--r--ms/controllerblueprints/modules/service/pom.xml2
-rw-r--r--ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt15
-rwxr-xr-xms/controllerblueprints/modules/service/src/test/resources/application.properties2
11 files changed, 28 insertions, 11 deletions
diff --git a/ms/controllerblueprints/modules/blueprint-core/pom.xml b/ms/controllerblueprints/modules/blueprint-core/pom.xml
index ca47b59a..ee321b71 100644
--- a/ms/controllerblueprints/modules/blueprint-core/pom.xml
+++ b/ms/controllerblueprints/modules/blueprint-core/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
<artifactId>modules</artifactId>
- <version>0.4.1-SNAPSHOT</version>
+ <version>0.4.2-SNAPSHOT</version>
</parent>
<artifactId>blueprint-core</artifactId>
<name>Controller Blueprints Core</name>
diff --git a/ms/controllerblueprints/modules/blueprint-scripts/pom.xml b/ms/controllerblueprints/modules/blueprint-scripts/pom.xml
index cb2c33ed..81f0cc77 100644
--- a/ms/controllerblueprints/modules/blueprint-scripts/pom.xml
+++ b/ms/controllerblueprints/modules/blueprint-scripts/pom.xml
@@ -18,7 +18,7 @@
<parent>
<artifactId>modules</artifactId>
<groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
- <version>0.4.1-SNAPSHOT</version>
+ <version>0.4.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blueprint-scripts</artifactId>
diff --git a/ms/controllerblueprints/modules/blueprint-validation/pom.xml b/ms/controllerblueprints/modules/blueprint-validation/pom.xml
index 59b0e095..7ac6a020 100644
--- a/ms/controllerblueprints/modules/blueprint-validation/pom.xml
+++ b/ms/controllerblueprints/modules/blueprint-validation/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
<artifactId>modules</artifactId>
- <version>0.4.1-SNAPSHOT</version>
+ <version>0.4.2-SNAPSHOT</version>
</parent>
<artifactId>blueprint-validation</artifactId>
<name>Controller Blueprints Validation Service</name>
diff --git a/ms/controllerblueprints/modules/db-resources/pom.xml b/ms/controllerblueprints/modules/db-resources/pom.xml
index b2f4370b..d1c3c44c 100644
--- a/ms/controllerblueprints/modules/db-resources/pom.xml
+++ b/ms/controllerblueprints/modules/db-resources/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
<artifactId>modules</artifactId>
- <version>0.4.1-SNAPSHOT</version>
+ <version>0.4.2-SNAPSHOT</version>
</parent>
<artifactId>db-resources</artifactId>
<name>Controller Blueprints DB Resources</name>
diff --git a/ms/controllerblueprints/modules/pom.xml b/ms/controllerblueprints/modules/pom.xml
index 1ef81ea4..9275921e 100644
--- a/ms/controllerblueprints/modules/pom.xml
+++ b/ms/controllerblueprints/modules/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
<artifactId>parent</artifactId>
- <version>0.4.1-SNAPSHOT</version>
+ <version>0.4.2-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
<artifactId>modules</artifactId>
diff --git a/ms/controllerblueprints/modules/resource-dict/pom.xml b/ms/controllerblueprints/modules/resource-dict/pom.xml
index edffdfb6..22533dbe 100644
--- a/ms/controllerblueprints/modules/resource-dict/pom.xml
+++ b/ms/controllerblueprints/modules/resource-dict/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
<artifactId>modules</artifactId>
- <version>0.4.1-SNAPSHOT</version>
+ <version>0.4.2-SNAPSHOT</version>
</parent>
<artifactId>resource-dict</artifactId>
<name>Controller Blueprints Resource Dictionary</name>
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 d33a2f04..75368684 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 e4ddac13..45fc739d 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/pom.xml b/ms/controllerblueprints/modules/service/pom.xml
index 73fe0739..7ca7e0db 100644
--- a/ms/controllerblueprints/modules/service/pom.xml
+++ b/ms/controllerblueprints/modules/service/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
<artifactId>modules</artifactId>
- <version>0.4.1-SNAPSHOT</version>
+ <version>0.4.2-SNAPSHOT</version>
</parent>
<artifactId>service</artifactId>
<name>Controller Blueprints Service</name>
diff --git a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt
index 48183f4c..e0ecf039 100644
--- a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt
+++ b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt
@@ -31,6 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.TestPropertySource
import org.springframework.test.context.junit4.SpringRunner
+import java.io.File
import java.nio.file.Paths
@RunWith(SpringRunner::class)
@@ -81,11 +82,20 @@ class BluePrintEnhancerServiceImplTest {
testComponentInvokeEnhancementAndValidation(basePath, "golden-enhance")
}
+ @Test
+ @Throws(Exception::class)
+ fun testCapabilityRestconfEnhancementAndValidation() {
+ val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/capability_restconf"
+ testComponentInvokeEnhancementAndValidation(basePath, "capability_restconf-enhance")
+
+ }
private fun testComponentInvokeEnhancementAndValidation(basePath: String, targetDirName: String) {
val targetPath = Paths.get("target", targetDirName).toUri().path
+ deleteTargetDirectory(targetPath)
+
val bluePrintContext = bluePrintEnhancerService.enhance(basePath, targetPath)
Assert.assertNotNull("failed to get blueprintContext ", bluePrintContext)
@@ -94,4 +104,9 @@ class BluePrintEnhancerServiceImplTest {
Assert.assertTrue("blueprint($basePath) validation failed ", valid)
}
+ private fun deleteTargetDirectory(targetPath: String) {
+ val targetDirectory = File(targetPath)
+ targetDirectory.deleteRecursively()
+ }
+
} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/src/test/resources/application.properties b/ms/controllerblueprints/modules/service/src/test/resources/application.properties
index 20450f44..011bad32 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