aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/service/src
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
commit44bff49a6a45f2c4d31020501cb1c0b2eeb1b0fd (patch)
treeeadfe5d1475d726ff104e88ef82a5f8be1d2d5e0 /ms/controllerblueprints/modules/service/src
parentb1843e450c2d799caa69f14f1e123dfb3fa35890 (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')
-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 93ea4c49..46b725f8 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 c3f25738..9f8af1aa 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\" }",