summaryrefslogtreecommitdiffstats
path: root/blueprints-processor
diff options
context:
space:
mode:
Diffstat (limited to 'blueprints-processor')
-rw-r--r--blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/dict/SourcesProperties.java10
-rw-r--r--blueprints-processor/plugin/model-provider/src/test/java/org/onap/ccsdk/config/model/validator/ServiceTemplateValidationTest.java4
-rw-r--r--blueprints-processor/plugin/model-provider/src/test/java/org/onap/ccsdk/config/params/service/ServiceTemplateCreateUtils.java104
-rw-r--r--blueprints-processor/plugin/model-provider/src/test/resources/dictionary/dictionary_schema.json307
-rw-r--r--blueprints-processor/plugin/model-provider/src/test/resources/service_templates/default.json1211
-rw-r--r--blueprints-processor/plugin/model-provider/src/test/resources/service_templates/vrr_config.json2
6 files changed, 674 insertions, 964 deletions
diff --git a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/dict/SourcesProperties.java b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/dict/SourcesProperties.java
index 581763127..5be164768 100644
--- a/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/dict/SourcesProperties.java
+++ b/blueprints-processor/plugin/model-provider/src/main/java/org/onap/ccsdk/config/model/data/dict/SourcesProperties.java
@@ -23,8 +23,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
public class SourcesProperties {
- private String key;
-
@JsonProperty(value = "name")
private String name;
@@ -52,14 +50,6 @@ public class SourcesProperties {
@JsonProperty("key-dependencies")
private List<String> dependencies;
- public String getKey() {
- return key;
- }
-
- public void setKey(String key) {
- this.key = key;
- }
-
public String getName() {
return name;
}
diff --git a/blueprints-processor/plugin/model-provider/src/test/java/org/onap/ccsdk/config/model/validator/ServiceTemplateValidationTest.java b/blueprints-processor/plugin/model-provider/src/test/java/org/onap/ccsdk/config/model/validator/ServiceTemplateValidationTest.java
index 5776b51a7..4c5e6a99c 100644
--- a/blueprints-processor/plugin/model-provider/src/test/java/org/onap/ccsdk/config/model/validator/ServiceTemplateValidationTest.java
+++ b/blueprints-processor/plugin/model-provider/src/test/java/org/onap/ccsdk/config/model/validator/ServiceTemplateValidationTest.java
@@ -38,10 +38,6 @@ public class ServiceTemplateValidationTest {
serviceTemplateContent = IOUtils.toString(ServiceTemplateValidationTest.class.getClassLoader()
.getResourceAsStream("service_templates/resource_assignment.json"), Charset.defaultCharset());
serviceTemplateValidator.validateServiceTemplate(serviceTemplateContent);
- logger.info(" **************** Activate Netconf *****************");
- serviceTemplateContent = IOUtils.toString(ServiceTemplateValidationTest.class.getClassLoader()
- .getResourceAsStream("service_templates/download_config.json"), Charset.defaultCharset());
- serviceTemplateValidator.validateServiceTemplate(serviceTemplateContent);
} catch (Exception e) {
e.printStackTrace();
}
diff --git a/blueprints-processor/plugin/model-provider/src/test/java/org/onap/ccsdk/config/params/service/ServiceTemplateCreateUtils.java b/blueprints-processor/plugin/model-provider/src/test/java/org/onap/ccsdk/config/params/service/ServiceTemplateCreateUtils.java
index 6bfa9033e..52f540565 100644
--- a/blueprints-processor/plugin/model-provider/src/test/java/org/onap/ccsdk/config/params/service/ServiceTemplateCreateUtils.java
+++ b/blueprints-processor/plugin/model-provider/src/test/java/org/onap/ccsdk/config/params/service/ServiceTemplateCreateUtils.java
@@ -45,12 +45,9 @@ public class ServiceTemplateCreateUtils {
String formattedServiceTemplateContent = TransformationUtils.getJson(serviceTemplate, true);
- FileUtils.writeStringToFile(new File("src/test/resources/service_templates/_default.json"),
+ FileUtils.writeStringToFile(new File("src/test/resources/service_templates/default.json"),
formattedServiceTemplateContent, Charset.defaultCharset());
- createNetconfdownloadNodeTemplate(serviceTemplate);
- createRestconfdownloadNodeTemplate(serviceTemplate);
- // createResourceAssignmentNodeTemplate(serviceTemplate);
createVrrNodeTemplate(serviceTemplate);
createDictionarySchema();
@@ -90,105 +87,6 @@ public class ServiceTemplateCreateUtils {
}
- public void createNetconfdownloadNodeTemplate(ServiceTemplate serviceTemplate) throws IOException {
- if (serviceTemplate != null) {
- ServiceTemplate workingServiceTemplate = new ServiceTemplate();
- workingServiceTemplate.setMetadata(serviceTemplate.getMetadata());
-
- Map<String, DataType> data_types = new HashMap<String, DataType>();
- data_types.put("datatype-property", serviceTemplate.getDataTypes().get("datatype-property"));
- data_types.put("datatype-resource-assignment",
- serviceTemplate.getDataTypes().get("datatype-resource-assignment"));
- workingServiceTemplate.setDataTypes(data_types);
-
- TopologyTemplate topology_template = new TopologyTemplate();
- Map<String, NodeTemplate> node_templates = new HashMap<String, NodeTemplate>();
-
- Map<String, NodeTemplate> node_Templates = serviceTemplate.getTopologyTemplate().getNodeTemplates();
-
- node_templates.put("activate-action", node_Templates.get("activate-action"));
- node_templates.put("base-config-template", node_Templates.get("base-config-template"));
- node_templates.put("vrr-netconf-device", node_Templates.get("vrr-netconf-device"));
- node_templates.put("get-netconf-config", node_Templates.get("get-netconf-config"));
- node_templates.put("edit-netconf-config", node_Templates.get("edit-netconf-config"));
- node_templates.put("transaction-netconf-baseconfig", node_Templates.get("transaction-netconf-baseconfig"));
-
- topology_template.setNodeTemplates(node_templates);
- topology_template.setInputs(serviceTemplate.getTopologyTemplate().getInputs());
-
- Map<String, NodeType> node_types = new HashMap<String, NodeType>();
- node_types.put("dg-activate-netconf", serviceTemplate.getNodeTypes().get("dg-activate-netconf"));
- node_types.put("artifact-config-template", serviceTemplate.getNodeTypes().get("artifact-config-template"));
- node_types.put("component-transaction-netconf",
- serviceTemplate.getNodeTypes().get("component-transaction-netconf"));
- node_types.put("component-netconf-edit", serviceTemplate.getNodeTypes().get("component-netconf-edit"));
- node_types.put("component-netconf-get", serviceTemplate.getNodeTypes().get("component-netconf-get"));
- node_types.put("vnf-netconf-device", serviceTemplate.getNodeTypes().get("vnf-netconf-device"));
-
- workingServiceTemplate.setNodeTypes(node_types);
- workingServiceTemplate.setTopologyTemplate(topology_template);
-
- String workingServiceTemplateContent = TransformationUtils.getJson(workingServiceTemplate, true);
-
- FileUtils.writeStringToFile(new File("src/test/resources/service_templates/download_config.json"),
- workingServiceTemplateContent, Charset.defaultCharset());
-
- File lcmFile = new File(
- "../../../adaptors/netconf-adaptor/provider/src/test/resources/service_templates/download_config.json");
- FileUtils.writeStringToFile(lcmFile, workingServiceTemplateContent, Charset.defaultCharset());
-
- }
- }
-
- public void createRestconfdownloadNodeTemplate(ServiceTemplate serviceTemplate) throws IOException {
- if (serviceTemplate != null) {
- ServiceTemplate workingServiceTemplate = new ServiceTemplate();
- workingServiceTemplate.setMetadata(serviceTemplate.getMetadata());
-
- Map<String, DataType> data_types = new HashMap<String, DataType>();
- data_types.put("datatype-property", serviceTemplate.getDataTypes().get("datatype-property"));
- data_types.put("datatype-resource-assignment",
- serviceTemplate.getDataTypes().get("datatype-resource-assignment"));
- workingServiceTemplate.setDataTypes(data_types);
-
- TopologyTemplate topology_template = new TopologyTemplate();
- Map<String, NodeTemplate> node_templates = new HashMap<String, NodeTemplate>();
-
- Map<String, NodeTemplate> node_Templates = serviceTemplate.getTopologyTemplate().getNodeTemplates();
- node_templates.put("activate-restconf-action", node_Templates.get("activate-restconf-action"));
- node_templates.put("base-config-template", node_Templates.get("base-config-template"));
- node_templates.put("vrr-restconf-device", node_Templates.get("vrr-restconf-device"));
- node_templates.put("edit-restconf-config", node_Templates.get("edit-restconf-config"));
- node_templates.put("transaction-restconf-baseconfig",
- node_Templates.get("transaction-restconf-baseconfig"));
-
- topology_template.setNodeTemplates(node_templates);
- topology_template.setInputs(serviceTemplate.getTopologyTemplate().getInputs());
-
- Map<String, NodeType> node_types = new HashMap<String, NodeType>();
- node_types.put("dg-activate-restconf", serviceTemplate.getNodeTypes().get("dg-activate-restconf"));
- node_types.put("artifact-config-template", serviceTemplate.getNodeTypes().get("artifact-config-template"));
- node_types.put("component-transaction-restconf",
- serviceTemplate.getNodeTypes().get("component-transaction-restconf"));
- node_types.put("component-restconf", serviceTemplate.getNodeTypes().get("component-restconf"));
- node_types.put("vnf-restconf-device", serviceTemplate.getNodeTypes().get("vnf-restconf-device"));
-
- workingServiceTemplate.setNodeTypes(node_types);
- workingServiceTemplate.setTopologyTemplate(topology_template);
-
- String workingServiceTemplateContent = TransformationUtils.getJson(workingServiceTemplate, true);
-
- FileUtils.writeStringToFile(new File("src/test/resources/service_templates/restconf_download_config.json"),
- workingServiceTemplateContent, Charset.defaultCharset());
-
- File lcmFile = new File(
- "../../../adaptors/netconf-adaptor/provider/src/test/resources/service_templates/restconf_download_config.json");
- FileUtils.writeStringToFile(lcmFile, workingServiceTemplateContent, Charset.defaultCharset());
-
- }
-
- }
-
public void createResourceAssignmentNodeTemplate(ServiceTemplate serviceTemplate) throws IOException {
if (serviceTemplate != null) {
ServiceTemplate workingServiceTemplate = new ServiceTemplate();
diff --git a/blueprints-processor/plugin/model-provider/src/test/resources/dictionary/dictionary_schema.json b/blueprints-processor/plugin/model-provider/src/test/resources/dictionary/dictionary_schema.json
index dd297ab87..809db7dea 100644
--- a/blueprints-processor/plugin/model-provider/src/test/resources/dictionary/dictionary_schema.json
+++ b/blueprints-processor/plugin/model-provider/src/test/resources/dictionary/dictionary_schema.json
@@ -2,260 +2,117 @@
"type": "object",
"properties": {
"resource-path": {
+ "tags": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string",
+ "required": true
+ },
"type": "string",
"required": true
},
- "description": {
- "type": "string"
- },
- "updated-by": {
- "type": "string"
- },
- "data-type": {
- "type": "string",
- "required": true
- },
- "sources": {
+ "property": {
"type": "object",
- "required": true,
"properties": {
- "input": {
- "type": "object",
- "properties": {
- "key": {
- "type": "string"
- }
- }
- },
- "component": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "required": true
- },
- "input-key-mapping": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- },
- "output-key-mapping": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- }
- }
- },
"default": {
"type": "any"
},
- "aai": {
- "type": "any"
- },
- "mdsal": {
+ "entry_schema": {
"type": "object",
"properties": {
- "path": {
- "type": "string",
- "required": true
- },
- "url-path": {
- "type": "string",
- "required": true
- },
- "input-key-mapping": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- },
"type": {
- "type": "string",
- "required": true
- },
- "output-key-mapping": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- },
- "base": {
- "type": "string",
- "required": true
- }
- }
- },
- "network-resource-discovery": {
- "type": "object",
- "properties": {
- "input-key-mapping": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- },
- "output-key-mapping": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- }
- }
- },
- "db": {
- "type": "object",
- "properties": {
- "query": {
- "type": "string",
- "required": true
- },
- "input-key-mapping": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- },
- "type": {
- "type": "string",
- "required": true
- },
- "output-key-mapping": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- },
- "base": {
- "type": "string",
- "required": true
- }
- }
- },
- "policy": {
- "type": "object",
- "properties": {
- "input-key-mapping": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- },
- "output-key-mapping": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "candidate-dependency": {
- "type": "object",
- "properties": {
- "input": {
- "type": "object",
- "properties": {
- "names": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "string"
}
}
},
- "component": {
- "type": "object",
- "properties": {
- "names": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
+ "description": {
+ "type": "string"
},
- "aai": {
- "type": "object",
- "properties": {
- "names": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
+ "type": {
+ "type": "string"
},
- "mdsal": {
- "type": "object",
- "properties": {
- "names": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "constraints": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "any"
}
}
},
- "network-resource-discovery": {
- "type": "object",
- "properties": {
- "names": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
+ "value": {
+ "type": "any"
},
- "db": {
- "type": "object",
- "properties": {
- "names": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
+ "required": {
+ "type": "boolean"
},
- "policy": {
- "type": "object",
- "properties": {
- "names": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
+ "status": {
+ "type": "string"
}
}
},
- "tags": {
- "type": "string"
- },
- "default": {
- "type": "any"
- },
- "name": {
- "type": "string",
- "required": true
- },
- "valid-values": {
- "type": "string"
- },
"resource-type": {
"type": "string",
"required": true
},
- "sample-value": {
+ "updated-by": {
"type": "string"
},
- "entry-schema": {
- "type": "string"
+ "sources": {
+ "type": "object",
+ "required": true,
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "required": true
+ },
+ "properties": {
+ "type": "object",
+ "required": true,
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "key": {
+ "type": "string"
+ },
+ "path": {
+ "type": "string"
+ },
+ "url-path": {
+ "type": "string"
+ },
+ "query": {
+ "type": "string"
+ },
+ "input-key-mapping": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "output-key-mapping": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "key-dependencies": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
}
}
-}
+} \ No newline at end of file
diff --git a/blueprints-processor/plugin/model-provider/src/test/resources/service_templates/default.json b/blueprints-processor/plugin/model-provider/src/test/resources/service_templates/default.json
index a2fc77541..f7dc5940a 100644
--- a/blueprints-processor/plugin/model-provider/src/test/resources/service_templates/default.json
+++ b/blueprints-processor/plugin/model-provider/src/test/resources/service_templates/default.json
@@ -1,622 +1,591 @@
{
- "tosca_definitions_version": "sdn_config_1_0_0",
- "metadata": {
- "author": "ks220y@att.com",
- "service-template-name": "VRR-baseconfiguration",
- "service-template-version": "1.0.0",
- "release": "1802",
- "service-type": "AVPN",
- "vnf-type": "VRR"
- },
- "topology_template": {
- "inputs": {
- "request-id": {
- "required": true,
- "type": "string"
- },
- "service-instance-id": {
- "required": true,
- "type": "string"
- },
- "action-name": {
- "required": true,
- "type": "string"
- },
- "scope-type": {
- "required": true,
- "type": "string"
- },
- "hostname": {
- "required": true,
- "type": "string"
- }
- },
- "node_templates": {
- "base-config-template": {
- "type": "artifact-config-template",
- "properties": {
- "action-names": [
- "resource-assignment-action"
- ]
- },
- "capabilities": {
- "content": {
- "properties": {
- "content": "db://base-config-template"
- }
- },
- "mapping": {
- "properties": {
- "mapping": [
- {
- "name": "vnf-id",
- "input-param": true,
- "property": {
- "type": "string",
- "required": true
- },
- "dictionary-name": "vnf-id",
- "dictionary-source": "input"
- },
- {
- "name": "group-name",
- "input-param": true,
- "property": {
- "type": "string",
- "required": true
- },
- "dictionary-name": "group-name",
- "dictionary-source": "input"
- }
- ]
- }
- }
- }
- },
- "licence-template": {
- "type": "artifact-config-template",
- "properties": {
- "action-names": [
- "resource-assignment-action"
- ]
- },
- "capabilities": {
- "content": {
- "properties": {
- "content": "db://licence-template"
- }
- },
- "mapping": {
- "properties": {
- "mapping": [
- {
- "name": "bundle-id",
- "input-param": true,
- "property": {
- "type": "string"
- },
- "dictionary-name": "bundle-id",
- "dictionary-source": "input"
- },
- {
- "name": "bundle-mac",
- "input-param": true,
- "property": {
- "type": "string",
- "required": true
- },
- "dictionary-name": "bundle-mac",
- "dictionary-source": "input"
- }
- ]
- }
- }
- }
- },
- "resource-assignment-action": {
- "type": "dg-resource-assignment",
- "interfaces": {
- "CONFIG": {
- "operations": {
- "ResourceAssignment": {
-
- }
- }
- }
- },
- "capabilities": {
- "dg-node": {
-
- }
- },
- "requirements": {
- "component-dependency": {
- "capability": "component-node",
- "node": "resource-assignment",
- "relationship": "tosca.relationships.DependsOn"
- }
- }
- },
- "config-generator-action": {
- "type": "dg-config-generator",
- "interfaces": {
- "CONFIG": {
- "operations": {
- "GenerateConfiguration": {
-
- }
- }
- }
- },
- "capabilities": {
- "dg-node": {
-
- }
- },
- "requirements": {
- "component-dependency": {
- "capability": "component-node",
- "node": "generate-configuration",
- "relationship": "tosca.relationships.DependsOn"
- }
- }
- },
- "resource-assignment": {
- "type": "component-resource-assignment",
- "interfaces": {
- "org-onap-ccsdk-config-assignment-service-ConfigAssignmentNode": {
- "operations": {
- "process": {
- "inputs": {
- "action-name": "{ \"get_input\" : \"action-name\" }",
- "resource-type": "vnf-type",
- "template-names": [
- "base-config-template",
- "licence-template"
- ],
- "request-id": "{ \"get_input\" : \"request-id\" }",
- "resource-id": "{ \"get_input\" : \"vnf-id\" }"
- },
- "outputs": {
- "resource-assignment-params": "",
- "status": ""
- }
- }
- }
- }
- },
- "capabilities": {
- "component-node": {
-
- }
- }
- },
- "generate-configuration": {
- "type": "component-config-generator",
- "interfaces": {
- "org-onap-ccsdk-config-generator-service-ConfigGeneratorNode": {
- "operations": {
- "process": {
- "inputs": {
- "action-name": "{ \"get_input\" : \"action-name\" }",
- "resource-type": "vnf-type",
- "request-id": "{ \"get_input\" : \"request-id\" }",
- "resource-id": "{ \"get_input\" : \"vnf-id\" }",
- "template-name": "base-config-template"
- },
- "outputs": {
- "generated-config": "",
- "status": ""
- }
- }
- }
- }
- },
- "capabilities": {
- "component-node": {
-
- }
- }
- }
- }
- },
- "artifact_types": {
- "artifact-template-velocity": {
- "description": " Velocity Template used for Configuration",
- "version": "1.0.0",
- "file_ext": [
- "vtl"
- ],
- "derived_from": "tosca.artifacts.Implementation"
- },
- "artifact-mapping-resource": {
- "description": " Velocity Template Resource Mapping File used along with Configuration template",
- "version": "1.0.0",
- "file_ext": [
- "json"
- ],
- "derived_from": "tosca.artifacts.Implementation"
- },
- "artifact-script-python": {
- "description": " Python Script Template used for Configuration",
- "version": "1.0.0",
- "file_ext": [
- "py"
- ],
- "derived_from": "tosca.artifacts.Implementation"
- }
- },
- "node_types": {
- "dg-resource-assignment": {
- "description": "This is Resource Assignment Directed Graph",
- "version": "1.0.0",
- "properties": {
- "mode": {
- "required": false,
- "type": "string",
- "default": "sync"
- },
- "version": {
- "required": false,
- "type": "string",
- "default": "LATEST"
- },
- "is-start-flow": {
- "required": false,
- "type": "boolean",
- "default": "false"
- }
- },
- "capabilities": {
- "dg-node": {
- "type": "tosca.capabilities.Node"
- },
- "content": {
- "type": "tosca.capability.Content",
- "properties": {
- "type": {
- "required": false,
- "type": "string",
- "default": "json"
- },
- "content": {
- "required": true,
- "type": "string"
- }
- }
- }
- },
- "requirements": {
- "component-dependency": {
- "capability": "component-node",
- "node": "component-resource-assignment",
- "relationship": "tosca.relationships.DependsOn"
- }
- },
- "interfaces": {
- "CONFIG": {
- "operations": {
- "ResourceAssignment": {
- "inputs": {
- "params": {
- "required": false,
- "type": "list",
- "entry_schema": {
- "type": "datatype-property"
- }
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.DG"
- },
- "dg-config-generator": {
- "description": "This is Activate DG for Config Generator Directed Graph",
- "version": "1.0.0",
- "properties": {
- "mode": {
- "required": false,
- "type": "string",
- "default": "sync"
- },
- "version": {
- "required": false,
- "type": "string",
- "default": "LATEST"
- },
- "is-start-flow": {
- "required": false,
- "type": "boolean",
- "default": "false"
- }
- },
- "capabilities": {
- "dg-node": {
- "type": "tosca.capabilities.Node"
- },
- "content": {
- "type": "tosca.capability.Content",
- "properties": {
- "type": {
- "required": false,
- "type": "string",
- "default": "json"
- },
- "content": {
- "required": true,
- "type": "string"
- }
- }
- }
- },
- "requirements": {
- "component-dependency": {
- "capability": "component-node",
- "node": "component-config-generator",
- "relationship": "tosca.relationships.DependsOn"
- }
- },
- "interfaces": {
- "CONFIG": {
- "operations": {
- "GenerateConfiguration": {
- "inputs": {
- "params": {
- "required": false,
- "type": "list",
- "entry_schema": {
- "type": "datatype-property"
- }
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.DG"
- },
- "artifact-config-template": {
- "description": "This is Configuration Velocity Template",
- "version": "1.0.0",
- "properties": {
- "action-names": {
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
- }
- },
- "content": {
- "required": false,
- "type": "string"
- },
- "mapping": {
- "required": false,
- "type": "list",
- "entry_schema": {
- "type": "datatype-resource-assignment"
- }
- }
- },
- "capabilities": {
- "content": {
- "type": "tosca.capability.Content",
- "properties": {
- "content": {
- "required": true,
- "type": "string"
- }
- }
- },
- "mapping": {
- "type": "tosca.capability.Mapping",
- "properties": {
- "mapping": {
- "required": false,
- "type": "list",
- "entry_schema": {
- "type": "datatype-resource-assignment"
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Artifact"
- },
- "component-resource-assignment": {
- "description": "This is Resource Assignment Component API",
- "version": "1.0.0",
- "capabilities": {
- "component-node": {
- "type": "tosca.capabilities.Node"
- }
- },
- "interfaces": {
- "org-onap-ccsdk-config-assignment-service-ConfigAssignmentNode": {
- "operations": {
- "process": {
- "inputs": {
- "action-name": {
- "description": "Action Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
- "required": false,
- "type": "string"
- },
- "handler-name": {
- "description": "Name of the Artifact Node Template, to get the template Content. If template-content is present, then content wont be reterived from the Artifact Node Template.",
- "required": true,
- "type": "string"
- },
- "resource-type": {
- "required": false,
- "type": "string"
- },
- "template-names": {
- "description": "Name of the Artifact Node Templates, to get the template Content.",
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
- }
- },
- "request-id": {
- "description": "Request Id used to store the generated configuration, in the database along with the template-name",
- "required": true,
- "type": "string"
- },
- "resource-id": {
- "description": "Id used to pull the data content from the data base. Either template-data or resource-id should be present",
- "required": true,
- "type": "string"
- }
- },
- "outputs": {
- "resource-assignment-params": {
- "required": true,
- "type": "string"
- },
- "status": {
- "required": true,
- "type": "string"
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Component"
- },
- "component-config-generator": {
- "description": "This is Generate Configuration Component API",
- "version": "1.0.0",
- "capabilities": {
- "component-node": {
- "type": "tosca.capabilities.Node"
- }
- },
- "interfaces": {
- "org-onap-ccsdk-config-generator-service-ConfigGeneratorNode": {
- "operations": {
- "process": {
- "inputs": {
- "template-data": {
- "description": "Conditional : JSON string which is used to mash with template. Either template-data or ( resource-id and resource-type ) should be present",
- "required": false,
- "type": "string"
- },
- "action-name": {
- "description": "Conditional : Action Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
- "required": false,
- "type": "string"
- },
- "template-content": {
- "description": "Conditional : Dynamic Template used to generate Configuration.",
- "required": false,
- "type": "string"
- },
- "resource-type": {
- "description": "Conditional : resource-type used to pull the data content from the data base. Either template-data or ( resource-id and resource-type ) should be present",
- "required": false,
- "type": "string"
- },
- "request-id": {
- "description": "Request Id used to store the generated configuration, in the database along with the template-name",
- "required": true,
- "type": "string"
- },
- "resource-id": {
- "description": "Conditional : Id used to pull the data content from the data base. Either template-data or ( resource-id and resource-type ) should be present",
- "required": false,
- "type": "string"
- },
- "template-name": {
- "description": "Conditional : Name of the Artifact Node Template, to get the template Content. If template-content is present, then content wont be reterived from the Artifact Node Template.",
- "required": true,
- "type": "string"
- }
- },
- "outputs": {
- "generated-config": {
- "description": "Generated Configuration for the Template adn Resource Data",
- "required": true,
- "type": "string"
- },
- "mask-info": {
- "description": "If template contains mask encription keys, then this mask-info field will be generated, This JSON Content alligns to the bean org.onap.ccsdk.config.model.data.custom.MaskInfo ",
- "required": false,
- "type": "string"
- },
- "status": {
- "description": "Status of the Component Execution ( success or failure )",
- "required": true,
- "type": "string"
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Component"
- }
- },
- "data_types": {
- "datatype-resource-assignment": {
- "version": "1.0.0",
- "description": "This is Resource Assignment Data Type",
- "properties": {
- "property": {
- "required": true,
- "type": "datatype-property"
- },
- "input-param": {
- "required": true,
- "type": "boolean"
- },
- "dictionary-name": {
- "required": false,
- "type": "string"
- },
- "dictionary-source": {
- "required": false,
- "type": "string"
- },
- "dependencies": {
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
- }
- }
- },
- "derived_from": "tosca.datatypes.Root"
- },
- "datatype-property": {
- "version": "1.0.0",
- "description": "This is Entry point Input Data Type, which is dynamic datatype, The parameter names will be populated during the Design time for each inputs",
- "properties": {
- "type": {
- "required": true,
- "type": "string"
- },
- "description": {
- "required": false,
- "type": "string"
- },
- "required": {
- "required": false,
- "type": "boolean"
- },
- "default": {
- "required": false,
- "type": "string"
- },
- "entry_schema": {
- "required": false,
- "type": "string"
- }
- },
- "derived_from": "tosca.datatypes.Root"
- }
- }
-}
+ "metadata" : {
+ "author" : "ks220y@att.com",
+ "service-template-name" : "VRR-baseconfiguration",
+ "service-template-version" : "1.0.0",
+ "release" : "1802",
+ "service-type" : "AVPN",
+ "vnf-type" : "VRR"
+ },
+ "tosca_definitions_version" : "sdn_config_1_0_0",
+ "topology_template" : {
+ "inputs" : {
+ "request-id" : {
+ "required" : true,
+ "type" : "string"
+ },
+ "service-instance-id" : {
+ "required" : true,
+ "type" : "string"
+ },
+ "action-name" : {
+ "required" : true,
+ "type" : "string"
+ },
+ "scope-type" : {
+ "required" : true,
+ "type" : "string"
+ },
+ "hostname" : {
+ "required" : true,
+ "type" : "string"
+ }
+ },
+ "node_templates" : {
+ "base-config-template" : {
+ "type" : "artifact-config-template",
+ "properties" : {
+ "action-names" : [ "resource-assignment-action" ]
+ },
+ "capabilities" : {
+ "content" : {
+ "properties" : {
+ "content" : "db://base-config-template"
+ }
+ },
+ "mapping" : {
+ "properties" : {
+ "mapping" : [ {
+ "name" : "vnf-id",
+ "input-param" : true,
+ "property" : {
+ "type" : "string",
+ "required" : true
+ },
+ "dictionary-name" : "vnf-id",
+ "dictionary-source" : "input"
+ }, {
+ "name" : "group-name",
+ "input-param" : true,
+ "property" : {
+ "type" : "string",
+ "required" : true
+ },
+ "dictionary-name" : "group-name",
+ "dictionary-source" : "input"
+ } ]
+ }
+ }
+ }
+ },
+ "licence-template" : {
+ "type" : "artifact-config-template",
+ "properties" : {
+ "action-names" : [ "resource-assignment-action" ]
+ },
+ "capabilities" : {
+ "content" : {
+ "properties" : {
+ "content" : "db://licence-template"
+ }
+ },
+ "mapping" : {
+ "properties" : {
+ "mapping" : [ {
+ "name" : "bundle-id",
+ "input-param" : true,
+ "property" : {
+ "type" : "string"
+ },
+ "dictionary-name" : "bundle-id",
+ "dictionary-source" : "input"
+ }, {
+ "name" : "bundle-mac",
+ "input-param" : true,
+ "property" : {
+ "type" : "string",
+ "required" : true
+ },
+ "dictionary-name" : "bundle-mac",
+ "dictionary-source" : "input"
+ } ]
+ }
+ }
+ }
+ },
+ "resource-assignment-action" : {
+ "type" : "dg-resource-assignment",
+ "interfaces" : {
+ "CONFIG" : {
+ "operations" : {
+ "ResourceAssignment" : { }
+ }
+ }
+ },
+ "capabilities" : {
+ "dg-node" : { }
+ },
+ "requirements" : {
+ "component-dependency" : {
+ "capability" : "component-node",
+ "node" : "resource-assignment",
+ "relationship" : "tosca.relationships.DependsOn"
+ }
+ }
+ },
+ "config-generator-action" : {
+ "type" : "dg-config-generator",
+ "interfaces" : {
+ "CONFIG" : {
+ "operations" : {
+ "GenerateConfiguration" : { }
+ }
+ }
+ },
+ "capabilities" : {
+ "dg-node" : { }
+ },
+ "requirements" : {
+ "component-dependency" : {
+ "capability" : "component-node",
+ "node" : "generate-configuration",
+ "relationship" : "tosca.relationships.DependsOn"
+ }
+ }
+ },
+ "resource-assignment" : {
+ "type" : "component-resource-assignment",
+ "interfaces" : {
+ "org-onap-ccsdk-config-assignment-service-ConfigAssignmentNode" : {
+ "operations" : {
+ "process" : {
+ "inputs" : {
+ "action-name" : "{ \"get_input\" : \"action-name\" }",
+ "resource-type" : "vnf-type",
+ "template-names" : [ "base-config-template", "licence-template" ],
+ "request-id" : "{ \"get_input\" : \"request-id\" }",
+ "resource-id" : "{ \"get_input\" : \"vnf-id\" }"
+ },
+ "outputs" : {
+ "resource-assignment-params" : "",
+ "status" : ""
+ }
+ }
+ }
+ }
+ },
+ "capabilities" : {
+ "component-node" : { }
+ }
+ },
+ "generate-configuration" : {
+ "type" : "component-config-generator",
+ "interfaces" : {
+ "org-onap-ccsdk-config-generator-service-ConfigGeneratorNode" : {
+ "operations" : {
+ "process" : {
+ "inputs" : {
+ "action-name" : "{ \"get_input\" : \"action-name\" }",
+ "resource-type" : "vnf-type",
+ "request-id" : "{ \"get_input\" : \"request-id\" }",
+ "resource-id" : "{ \"get_input\" : \"vnf-id\" }",
+ "template-name" : "base-config-template"
+ },
+ "outputs" : {
+ "generated-config" : "",
+ "status" : ""
+ }
+ }
+ }
+ }
+ },
+ "capabilities" : {
+ "component-node" : { }
+ }
+ }
+ }
+ },
+ "artifact_types" : {
+ "artifact-template-velocity" : {
+ "description" : " Velocity Template used for Configuration",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.artifacts.Implementation",
+ "file_ext" : [ "vtl" ]
+ },
+ "artifact-mapping-resource" : {
+ "description" : " Velocity Template Resource Mapping File used along with Configuration template",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.artifacts.Implementation",
+ "file_ext" : [ "json" ]
+ },
+ "artifact-script-python" : {
+ "description" : " Python Script Template used for Configuration",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.artifacts.Implementation",
+ "file_ext" : [ "py" ]
+ }
+ },
+ "node_types" : {
+ "dg-resource-assignment" : {
+ "description" : "This is Resource Assignment Directed Graph",
+ "version" : "1.0.0",
+ "properties" : {
+ "mode" : {
+ "required" : false,
+ "type" : "string",
+ "default" : "sync"
+ },
+ "version" : {
+ "required" : false,
+ "type" : "string",
+ "default" : "LATEST"
+ },
+ "is-start-flow" : {
+ "required" : false,
+ "type" : "boolean",
+ "default" : "false"
+ }
+ },
+ "capabilities" : {
+ "dg-node" : {
+ "type" : "tosca.capabilities.Node"
+ },
+ "content" : {
+ "type" : "tosca.capability.Content",
+ "properties" : {
+ "type" : {
+ "required" : false,
+ "type" : "string",
+ "default" : "json"
+ },
+ "content" : {
+ "required" : true,
+ "type" : "string"
+ }
+ }
+ }
+ },
+ "requirements" : {
+ "component-dependency" : {
+ "capability" : "component-node",
+ "node" : "component-resource-assignment",
+ "relationship" : "tosca.relationships.DependsOn"
+ }
+ },
+ "interfaces" : {
+ "CONFIG" : {
+ "operations" : {
+ "ResourceAssignment" : {
+ "inputs" : {
+ "params" : {
+ "required" : false,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "datatype-property"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "derived_from" : "tosca.nodes.DG"
+ },
+ "dg-config-generator" : {
+ "description" : "This is Activate DG for Config Generator Directed Graph",
+ "version" : "1.0.0",
+ "properties" : {
+ "mode" : {
+ "required" : false,
+ "type" : "string",
+ "default" : "sync"
+ },
+ "version" : {
+ "required" : false,
+ "type" : "string",
+ "default" : "LATEST"
+ },
+ "is-start-flow" : {
+ "required" : false,
+ "type" : "boolean",
+ "default" : "false"
+ }
+ },
+ "capabilities" : {
+ "dg-node" : {
+ "type" : "tosca.capabilities.Node"
+ },
+ "content" : {
+ "type" : "tosca.capability.Content",
+ "properties" : {
+ "type" : {
+ "required" : false,
+ "type" : "string",
+ "default" : "json"
+ },
+ "content" : {
+ "required" : true,
+ "type" : "string"
+ }
+ }
+ }
+ },
+ "requirements" : {
+ "component-dependency" : {
+ "capability" : "component-node",
+ "node" : "component-config-generator",
+ "relationship" : "tosca.relationships.DependsOn"
+ }
+ },
+ "interfaces" : {
+ "CONFIG" : {
+ "operations" : {
+ "GenerateConfiguration" : {
+ "inputs" : {
+ "params" : {
+ "required" : false,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "datatype-property"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "derived_from" : "tosca.nodes.DG"
+ },
+ "artifact-config-template" : {
+ "description" : "This is Configuration Velocity Template",
+ "version" : "1.0.0",
+ "properties" : {
+ "action-names" : {
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ },
+ "content" : {
+ "required" : false,
+ "type" : "string"
+ },
+ "mapping" : {
+ "required" : false,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "datatype-resource-assignment"
+ }
+ }
+ },
+ "capabilities" : {
+ "content" : {
+ "type" : "tosca.capability.Content",
+ "properties" : {
+ "content" : {
+ "required" : true,
+ "type" : "string"
+ }
+ }
+ },
+ "mapping" : {
+ "type" : "tosca.capability.Mapping",
+ "properties" : {
+ "mapping" : {
+ "required" : false,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "datatype-resource-assignment"
+ }
+ }
+ }
+ }
+ },
+ "derived_from" : "tosca.nodes.Artifact"
+ },
+ "component-resource-assignment" : {
+ "description" : "This is Resource Assignment Component API",
+ "version" : "1.0.0",
+ "capabilities" : {
+ "component-node" : {
+ "type" : "tosca.capabilities.Node"
+ }
+ },
+ "interfaces" : {
+ "org-onap-ccsdk-config-assignment-service-ConfigAssignmentNode" : {
+ "operations" : {
+ "process" : {
+ "inputs" : {
+ "action-name" : {
+ "description" : "Action Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
+ "required" : false,
+ "type" : "string"
+ },
+ "handler-name" : {
+ "description" : "Name of the Artifact Node Template, to get the template Content. If template-content is present, then content wont be reterived from the Artifact Node Template.",
+ "required" : true,
+ "type" : "string"
+ },
+ "resource-type" : {
+ "required" : false,
+ "type" : "string"
+ },
+ "template-names" : {
+ "description" : "Name of the Artifact Node Templates, to get the template Content.",
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ },
+ "request-id" : {
+ "description" : "Request Id used to store the generated configuration, in the database along with the template-name",
+ "required" : true,
+ "type" : "string"
+ },
+ "resource-id" : {
+ "description" : "Id used to pull the data content from the data base. Either template-data or resource-id should be present",
+ "required" : true,
+ "type" : "string"
+ }
+ },
+ "outputs" : {
+ "resource-assignment-params" : {
+ "required" : true,
+ "type" : "string"
+ },
+ "status" : {
+ "required" : true,
+ "type" : "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "derived_from" : "tosca.nodes.Component"
+ },
+ "component-config-generator" : {
+ "description" : "This is Generate Configuration Component API",
+ "version" : "1.0.0",
+ "capabilities" : {
+ "component-node" : {
+ "type" : "tosca.capabilities.Node"
+ }
+ },
+ "interfaces" : {
+ "org-onap-ccsdk-config-generator-service-ConfigGeneratorNode" : {
+ "operations" : {
+ "process" : {
+ "inputs" : {
+ "template-data" : {
+ "description" : "Conditional : JSON string which is used to mash with template. Either template-data or ( resource-id and resource-type ) should be present",
+ "required" : false,
+ "type" : "string"
+ },
+ "action-name" : {
+ "description" : "Conditional : Action Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
+ "required" : false,
+ "type" : "string"
+ },
+ "template-content" : {
+ "description" : "Conditional : Dynamic Template used to generate Configuration.",
+ "required" : false,
+ "type" : "string"
+ },
+ "resource-type" : {
+ "description" : "Conditional : resource-type used to pull the data content from the data base. Either template-data or ( resource-id and resource-type ) should be present",
+ "required" : false,
+ "type" : "string"
+ },
+ "request-id" : {
+ "description" : "Request Id used to store the generated configuration, in the database along with the template-name",
+ "required" : true,
+ "type" : "string"
+ },
+ "resource-id" : {
+ "description" : "Conditional : Id used to pull the data content from the data base. Either template-data or ( resource-id and resource-type ) should be present",
+ "required" : false,
+ "type" : "string"
+ },
+ "template-name" : {
+ "description" : "Conditional : Name of the Artifact Node Template, to get the template Content. If template-content is present, then content wont be reterived from the Artifact Node Template.",
+ "required" : true,
+ "type" : "string"
+ }
+ },
+ "outputs" : {
+ "generated-config" : {
+ "description" : "Generated Configuration for the Template adn Resource Data",
+ "required" : true,
+ "type" : "string"
+ },
+ "mask-info" : {
+ "description" : "If template contains mask encription keys, then this mask-info field will be generated, This JSON Content alligns to the bean org.onap.ccsdk.config.model.data.custom.MaskInfo ",
+ "required" : false,
+ "type" : "string"
+ },
+ "status" : {
+ "description" : "Status of the Component Execution ( success or failure )",
+ "required" : true,
+ "type" : "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "derived_from" : "tosca.nodes.Component"
+ }
+ },
+ "data_types" : {
+ "datatype-resource-assignment" : {
+ "version" : "1.0.0",
+ "description" : "This is Resource Assignment Data Type",
+ "properties" : {
+ "property" : {
+ "required" : true,
+ "type" : "datatype-property"
+ },
+ "input-param" : {
+ "required" : true,
+ "type" : "boolean"
+ },
+ "dictionary-name" : {
+ "required" : false,
+ "type" : "string"
+ },
+ "dictionary-source" : {
+ "required" : false,
+ "type" : "string"
+ },
+ "dependencies" : {
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ }
+ },
+ "derived_from" : "tosca.datatypes.Root"
+ },
+ "datatype-property" : {
+ "version" : "1.0.0",
+ "description" : "This is Entry point Input Data Type, which is dynamic datatype, The parameter names will be populated during the Design time for each inputs",
+ "properties" : {
+ "type" : {
+ "required" : true,
+ "type" : "string"
+ },
+ "description" : {
+ "required" : false,
+ "type" : "string"
+ },
+ "required" : {
+ "required" : false,
+ "type" : "boolean"
+ },
+ "default" : {
+ "required" : false,
+ "type" : "string"
+ },
+ "entry_schema" : {
+ "required" : false,
+ "type" : "string"
+ }
+ },
+ "derived_from" : "tosca.datatypes.Root"
+ }
+ }
+} \ No newline at end of file
diff --git a/blueprints-processor/plugin/model-provider/src/test/resources/service_templates/vrr_config.json b/blueprints-processor/plugin/model-provider/src/test/resources/service_templates/vrr_config.json
index 525136f6d..fdfb12799 100644
--- a/blueprints-processor/plugin/model-provider/src/test/resources/service_templates/vrr_config.json
+++ b/blueprints-processor/plugin/model-provider/src/test/resources/service_templates/vrr_config.json
@@ -168,4 +168,4 @@
}
}
}
-}
+} \ No newline at end of file