aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/service/src/test
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-09-06 20:18:24 +0000
committerMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-09-06 20:49:58 +0000
commit92c807d2bd54d8221597acc2e84f15ad2ada0b7b (patch)
treead262f5f1642a7feb69315d3415dbdeb0c71316e /ms/controllerblueprints/modules/service/src/test
parent2c91cf47dcfc3014dd669627e214b2e8ec34ce4a (diff)
Controller Blueprints Microservice
Add Blueprint Dervied from NodeType, Requirement Definitions and Assignments validations. Change-Id: I1cc643b5a83c5a707c8e3ae1342a439f122da55e Issue-ID: CCSDK-484 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Diffstat (limited to 'ms/controllerblueprints/modules/service/src/test')
-rw-r--r--ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidationTest.java5
-rw-r--r--ms/controllerblueprints/modules/service/src/test/resources/enhance/enhanced-template.json28
2 files changed, 26 insertions, 7 deletions
diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidationTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidationTest.java
index 93ea4c498..46b725f87 100644
--- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidationTest.java
+++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidationTest.java
@@ -37,16 +37,15 @@ public class ServiceTemplateValidationTest {
public void testBluePrintDirs() {
List<String> dirs = ConfigModelUtils.getBlueprintNames("load/blueprints");
Assert.assertNotNull("Failed to get blueprint directories", dirs);
- Assert.assertEquals("Failed to get actual directories", 2, dirs.size());
+ Assert.assertEquals("Failed to get actual directories", 1, dirs.size());
}
@Test
public void validateServiceTemplate() throws Exception {
- validateServiceTemplate("load/blueprints/baseconfiguration/Definitions/activation-blueprint.json");
validateServiceTemplate("load/blueprints/vrr-test/Definitions/vrr-test.json");
}
- //@Test
+ @Test
public void validateEnhancedServiceTemplate() throws Exception {
ServiceTemplate serviceTemplate = JacksonUtils
.readValueFromClassPathFile("enhance/enhanced-template.json", ServiceTemplate.class);
diff --git a/ms/controllerblueprints/modules/service/src/test/resources/enhance/enhanced-template.json b/ms/controllerblueprints/modules/service/src/test/resources/enhance/enhanced-template.json
index c3f257382..9f8af1aaf 100644
--- a/ms/controllerblueprints/modules/service/src/test/resources/enhance/enhanced-template.json
+++ b/ms/controllerblueprints/modules/service/src/test/resources/enhance/enhanced-template.json
@@ -215,6 +215,11 @@
},
"derived_from" : "tosca.nodes.DG"
},
+ "tosca.nodes.Component" : {
+ "description" : "This is default Component Node",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.nodes.Root"
+ },
"component-resource-assignment" : {
"description" : "This is Resource Assignment Component API",
"version" : "1.0.0",
@@ -283,6 +288,11 @@
},
"derived_from" : "tosca.nodes.Component"
},
+ "tosca.nodes.DG" : {
+ "description" : "This is Directed Graph Node Type",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.nodes.Root"
+ },
"artifact-config-template" : {
"description" : "This is Configuration Velocity Template",
"version" : "1.0.0",
@@ -361,6 +371,11 @@
},
"derived_from" : "tosca.nodes.Vnf"
},
+ "tosca.nodes.Vnf" : {
+ "description" : "This is VNF Node Type",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.nodes.Root"
+ },
"component-netconf-executor" : {
"description" : "This is Netconf Transaction Configuration Component API",
"version" : "1.0.0",
@@ -386,12 +401,12 @@
"required" : true,
"type" : "string"
},
- "service-template-name" : {
+ "template-name" : {
"description" : "Service Template Name",
"required" : true,
"type" : "string"
},
- "service-template-version" : {
+ "template-version" : {
"description" : "Service Template Version",
"required" : true,
"type" : "string"
@@ -440,6 +455,11 @@
},
"derived_from" : "tosca.nodes.Component"
},
+ "tosca.nodes.Artifact" : {
+ "description" : "This is Deprecated Artifact Node Type.",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.nodes.Root"
+ },
"dg-activate-netconf" : {
"description" : "This is Download Netconf Directed Graph",
"version" : "1.0.0",
@@ -571,8 +591,8 @@
},
"inputs" : {
"action-name" : "{ \"get_input\" : \"action-name\" }",
- "template_name" : "{ \"get_attribute\" : \"template_name\" }",
- "service-template-version" : "{ \"get_attribute\" : \"service-template-version\" }",
+ "template-name" : "{ \"get_attribute\" : \"template_name\" }",
+ "template-version" : "{ \"get_attribute\" : \"template_version\" }",
"resource-type" : "vnf-type",
"request-id" : "{ \"get_input\" : \"request-id\" }",
"resource-id" : "{ \"get_input\" : \"hostname\" }",