aboutsummaryrefslogtreecommitdiffstats
path: root/blueprints-processor/plugin
diff options
context:
space:
mode:
authorSingal, Kapil (ks220y) <ks220y@att.com>2018-09-04 21:38:51 -0400
committerSingal, Kapil (ks220y) <ks220y@att.com>2018-09-04 21:55:26 -0400
commit021d63c68b4d5fbb8cf5e34549d5b17bce488df3 (patch)
tree181a618982073d7e05b41282c98981f5a8466776 /blueprints-processor/plugin
parent79db143e7f121f28c6b8d44d66d86601ffc95ba4 (diff)
Blueprints Processor Default Resource Assignment
Creating SDN Blueprints Processor Default Resource Assignment Processor Change-Id: Ib2475eb220218c95eda62b5cefe4eed38e9f756e Issue-ID: CCSDK-501 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com>
Diffstat (limited to 'blueprints-processor/plugin')
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/main/java/org/onap/ccsdk/config/assignment/processor/DefaultResourceProcessor.java107
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/java/org/onap/ccsdk/config/assignment/processor/DefaultResourceProcessorTest.java127
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/default/default-simple.json35
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/default/resource-assignments-simple.json35
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/dependency.json110
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/input/input.json18
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/input/inputValidateTest.json18
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/resource_assignment.json407
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/resource_assignment/resource_assignment.json417
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/resource_assignment/velocity/base-config-template.vtl40
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/vpe-201802-baseconfig/dict.json172
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/vpe-201802-baseconfig/input-complex.json49
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/vpe-201802-baseconfig/velocity/base-config-template.vtl40
-rw-r--r--blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/vpe-201802-baseconfig/vpe-201802-baseconfig.json639
14 files changed, 2214 insertions, 0 deletions
diff --git a/blueprints-processor/plugin/assignment-provider/src/main/java/org/onap/ccsdk/config/assignment/processor/DefaultResourceProcessor.java b/blueprints-processor/plugin/assignment-provider/src/main/java/org/onap/ccsdk/config/assignment/processor/DefaultResourceProcessor.java
new file mode 100644
index 000000000..aac13cb9d
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/main/java/org/onap/ccsdk/config/assignment/processor/DefaultResourceProcessor.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.assignment.processor;
+
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.lang3.StringUtils;
+import org.onap.ccsdk.config.assignment.service.ConfigAssignmentUtils;
+import org.onap.ccsdk.config.data.adaptor.service.ConfigResourceService;
+import org.onap.ccsdk.config.model.ConfigModelConstant;
+import org.onap.ccsdk.config.model.ConfigModelException;
+import org.onap.ccsdk.config.model.data.ResourceAssignment;
+import org.onap.ccsdk.config.model.service.ComponentNode;
+import org.onap.ccsdk.config.model.utils.ResourceAssignmentUtils;
+import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
+import org.onap.ccsdk.sli.core.sli.SvcLogicException;
+
+public class DefaultResourceProcessor implements ComponentNode {
+
+ public DefaultResourceProcessor(ConfigResourceService configResourceService) {}
+
+ @Override
+ public Boolean preCondition(Map<String, String> inParams, SvcLogicContext ctx, Map<String, Object> componentContext)
+ throws SvcLogicException {
+ return Boolean.TRUE;
+ }
+
+ @Override
+ public void preProcess(Map<String, String> inParams, SvcLogicContext ctx, Map<String, Object> componentContext)
+ throws SvcLogicException {
+ // Auto-generated method stub
+ }
+
+ @Override
+ public void process(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
+ // Auto-generated method stub
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void process(Map<String, String> inParams, SvcLogicContext ctx, Map<String, Object> componentContext)
+ throws SvcLogicException {
+ try {
+ List<ResourceAssignment> batchResourceAssignment =
+ (List<ResourceAssignment>) componentContext.get(ConfigModelConstant.PROPERTY_RESOURCE_ASSIGNMENTS);
+
+ if (batchResourceAssignment != null && !batchResourceAssignment.isEmpty()) {
+ for (ResourceAssignment resourceAssignment : batchResourceAssignment) {
+ processResourceAssignment(ctx, componentContext, resourceAssignment);
+ }
+ }
+ } catch (Exception e) {
+ throw new SvcLogicException(String.format("DefaultResourceProcessor Exception : (%s)", e), e);
+ }
+
+ }
+
+ private void processResourceAssignment(SvcLogicContext ctx, Map<String, Object> componentContext,
+ ResourceAssignment resourceAssignment) throws ConfigModelException, SvcLogicException {
+ if (resourceAssignment != null && StringUtils.isNotBlank(resourceAssignment.getName())
+ && resourceAssignment.getProperty() != null) {
+ try {
+ // Check if It has Input
+ Object value = ConfigAssignmentUtils.getContextKeyValue(ctx, resourceAssignment.getName());
+ if (value == null) {
+ value = resourceAssignment.getProperty().getDefaultValue();
+ }
+
+ // if value is null don't call setResourceDataValue to populate the value
+ if (value != null) {
+ ResourceAssignmentUtils.setResourceDataValue(componentContext, resourceAssignment, value);
+ }
+
+ // Check the value has populated for mandatory case
+ ResourceAssignmentUtils.assertTemplateKeyValueNotNull(componentContext, resourceAssignment);
+ } catch (Exception e) {
+ ResourceAssignmentUtils.setFailedResourceDataValue(componentContext, resourceAssignment,
+ e.getMessage());
+ throw new SvcLogicException(
+ String.format("Failed in template key (%s) assignments with : (%s)", resourceAssignment, e), e);
+ }
+ }
+ }
+
+ @Override
+ public void postProcess(Map<String, String> inParams, SvcLogicContext ctx, Map<String, Object> componentContext)
+ throws SvcLogicException {
+ // Auto-generated method stub
+
+ }
+
+}
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/java/org/onap/ccsdk/config/assignment/processor/DefaultResourceProcessorTest.java b/blueprints-processor/plugin/assignment-provider/src/test/java/org/onap/ccsdk/config/assignment/processor/DefaultResourceProcessorTest.java
new file mode 100644
index 000000000..7e8d14201
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/java/org/onap/ccsdk/config/assignment/processor/DefaultResourceProcessorTest.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2018 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.ccsdk.config.assignment.processor;
+
+import static org.mockito.Matchers.any;
+import java.io.File;
+import java.nio.charset.Charset;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.commons.io.FileUtils;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.stubbing.Answer;
+import org.onap.ccsdk.config.assignment.service.ConfigResourceAssignmentTestUtils;
+import org.onap.ccsdk.config.data.adaptor.domain.TransactionLog;
+import org.onap.ccsdk.config.data.adaptor.service.ConfigResourceService;
+import org.onap.ccsdk.config.model.ConfigModelConstant;
+import org.onap.ccsdk.config.model.data.ResourceAssignment;
+import org.onap.ccsdk.config.model.data.dict.ResourceDefinition;
+import org.onap.ccsdk.config.model.utils.TransformationUtils;
+import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
+import org.onap.ccsdk.sli.core.sli.SvcLogicException;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
+@RunWith(MockitoJUnitRunner.class)
+public class DefaultResourceProcessorTest {
+
+ private static EELFLogger logger = EELFManager.getInstance().getLogger(DefaultResourceProcessorTest.class);
+
+ @Mock
+ private ConfigResourceService configResourceService;
+
+ @SuppressWarnings("unchecked")
+ @Before
+ public void before() {
+ MockitoAnnotations.initMocks(this);
+
+ try {
+ Mockito.doAnswer(new Answer<Void>() {
+ @Override
+ public Void answer(InvocationOnMock invocationOnMock) throws Throwable {
+ Object[] args = invocationOnMock.getArguments();
+ if (args != null) {
+ logger.trace("Transaction info " + Arrays.asList(args));
+ }
+ return null;
+ }
+ }).when(configResourceService).save(any(TransactionLog.class));
+
+ } catch (SvcLogicException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testDefaultSimpleProcess() throws Exception {
+ logger.info(" ******************************* testDefaultSimpleProcess ***************************");
+
+ String recipeName = "sample-recipe";
+
+ String resourceassignmentContent = FileUtils.readFileToString(
+ new File("src/test/resources/mapping/default/resource-assignments-simple.json"),
+ Charset.defaultCharset());
+ List<ResourceAssignment> batchResourceAssignment =
+ TransformationUtils.getListfromJson(resourceassignmentContent, ResourceAssignment.class);
+
+ String dictionaryContent = FileUtils.readFileToString(
+ new File("src/test/resources/mapping/default/default-simple.json"), Charset.defaultCharset());
+ Map<String, ResourceDefinition> dictionaries =
+ ConfigResourceAssignmentTestUtils.getMapfromJson(dictionaryContent);
+
+ DefaultResourceProcessor defaultResourceProcessor = new DefaultResourceProcessor(configResourceService);
+ Map<String, Object> componentContext = new HashMap<>();
+ componentContext.put(ConfigModelConstant.PROPERTY_RESOURCE_ASSIGNMENTS, batchResourceAssignment);
+ componentContext.put(ConfigModelConstant.PROPERTY_ACTION_NAME, recipeName);
+ componentContext.put(ConfigModelConstant.PROPERTY_TEMPLATE_NAME, "sample-template");
+ componentContext.put(ConfigModelConstant.PROPERTY_DICTIONARIES, dictionaries);
+ componentContext.put(ConfigModelConstant.PROPERTY_DICTIONARY_KEY_DOT + recipeName + ".profile_name", "sample");
+
+ Map<String, String> inParams = new HashMap<>();
+ SvcLogicContext ctx = new SvcLogicContext();
+ defaultResourceProcessor.process(inParams, ctx, componentContext);
+ logger.trace(" componentContext " + componentContext);
+
+ Assert.assertEquals("Failed to populate default country value ", "US",
+ componentContext.get(ConfigModelConstant.PROPERTY_RECIPE_KEY_DOT + "sample-recipe.country"));
+ Assert.assertEquals("Failed to populate default country value ", "US",
+ componentContext.get(ConfigModelConstant.PROPERTY_DICTIONARY_KEY_DOT + "sample-recipe.country"));
+
+ Assert.assertEquals("Failed to populate default port value ", 830,
+ componentContext.get(ConfigModelConstant.PROPERTY_RECIPE_KEY_DOT + "sample-recipe.port"));
+ Assert.assertEquals("Failed to populate default port value ", 830,
+ componentContext.get(ConfigModelConstant.PROPERTY_DICTIONARY_KEY_DOT + "sample-recipe.port"));
+
+ Assert.assertEquals("Failed to populate default voip-enabled value ", true,
+ componentContext.get(ConfigModelConstant.PROPERTY_RECIPE_KEY_DOT + "sample-recipe.voip-enabled"));
+ Assert.assertEquals("Failed to populate default voip-enabled value ", true,
+ componentContext.get(ConfigModelConstant.PROPERTY_DICTIONARY_KEY_DOT + "sample-recipe.voip-enabled"));
+
+ }
+
+}
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/default/default-simple.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/default/default-simple.json
new file mode 100644
index 000000000..fca0dde83
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/default/default-simple.json
@@ -0,0 +1,35 @@
+{
+ "country": {
+ "name": "country",
+ "property": {
+ "type": "string"
+ },
+ "sources": {
+ "default": {
+ "type": "source-default"
+ }
+ }
+ },
+ "port": {
+ "name": "port",
+ "property": {
+ "type": "integer"
+ },
+ "sources": {
+ "default": {
+ "type": "source-default"
+ }
+ }
+ },
+ "voip-enabled": {
+ "name": "voip-enabled",
+ "property": {
+ "type": "boolean"
+ },
+ "sources": {
+ "default": {
+ "type": "source-default"
+ }
+ }
+ }
+}
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/default/resource-assignments-simple.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/default/resource-assignments-simple.json
new file mode 100644
index 000000000..fc92710a5
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/default/resource-assignments-simple.json
@@ -0,0 +1,35 @@
+[
+ {
+ "name": "country",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "default": "US"
+ },
+ "dictionary-name": "country",
+ "dictionary-source": "default",
+ "dependencies": []
+ },
+ {
+ "name": "port",
+ "input-param": true,
+ "property": {
+ "type": "integer",
+ "default": 830
+ },
+ "dictionary-name": "port",
+ "dictionary-source": "default",
+ "dependencies": []
+ },
+ {
+ "name": "voip-enabled",
+ "input-param": true,
+ "property": {
+ "type": "boolean",
+ "default": true
+ },
+ "dictionary-name": "voip-enabled",
+ "dictionary-source": "default",
+ "dependencies": []
+ }
+]
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/dependency.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/dependency.json
new file mode 100644
index 000000000..e08539c0d
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/mapping/dependency.json
@@ -0,0 +1,110 @@
+[
+ {
+ "name": "vnf-id",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "vnf-id",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "service-instance-id",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "service-instance-id",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "bundle-id",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "bundle-id",
+ "dictionary-source": "mdsal",
+ "dependencies": [
+ "vnf-id"
+ ]
+ },
+ {
+ "name": "bundle-ip",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "bundle-ip",
+ "dictionary-source": "mdsal",
+ "dependencies": [
+ "vnf-id"
+ ]
+ },
+ {
+ "name": "bundle-mac",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "bundle-mac",
+ "dictionary-source": "mdsal",
+ "dependencies": [
+ "vnf-id",
+ "bundle-id"
+ ]
+ },
+ {
+ "name": "managed-ip",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "managed-ip",
+ "dictionary-source": "mdsal",
+ "dependencies": [
+ "loopback-ip"
+ ]
+ },
+ {
+ "name": "vnf-name",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "vnf-name",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "managed-ip1",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "managed-ip1",
+ "dictionary-source": "mdsal",
+ "dependencies": [
+ "loopback-ip"
+ ]
+ },
+ {
+ "name": "loopback-ip",
+ "input-param": true,
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "loopback-ip",
+ "dictionary-source": "db",
+ "dependencies": [
+ "bundle-mac"
+ ]
+ }
+]
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/input/input.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/input/input.json
new file mode 100644
index 000000000..cd6fac128
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/input/input.json
@@ -0,0 +1,18 @@
+{
+ "api-ver": "2.00",
+ "originator-id": "MSO",
+ "request-id": "123456",
+ "service-instance-id": "ibcx0001vm001",
+ "service-type": "AVPN",
+ "vnf-type": "vUSP - vDBE-IPX HUB",
+ "vnf-id": 123456,
+ "service-template-name": "VRR-baseconfiguration",
+ "service-template-version": "1.0.0",
+ "action-name": "resource-assignment-action",
+ "group-name": "sample group name",
+ "bundle-id": "sample bundle id",
+ "bundle-mac": [
+ "Sample bundle mac",
+ "Sample bundle mac"
+ ]
+}
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/input/inputValidateTest.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/input/inputValidateTest.json
new file mode 100644
index 000000000..354ca577b
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/input/inputValidateTest.json
@@ -0,0 +1,18 @@
+{
+ "api-ver": "2.00",
+ "originator-id": "MSO",
+ "request-id": "123456",
+ "service-instance-id": "ibcx0001vm001",
+ "service-type": "AVPN",
+ "vnf-type": "vUSP - vDBE-IPX HUB",
+ "vnf-id": "",
+ "service-template-name": "VRR-baseconfiguration",
+ "service-template-version": "1.0.0",
+ "action-name": "resource-assignment-action",
+ "group-name": "sample group name",
+ "bundle-id": "sample bundle id",
+ "bundle-mac": [
+ "Sample bundle mac",
+ "Sample bundle mac"
+ ]
+}
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/resource_assignment.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/resource_assignment.json
new file mode 100644
index 000000000..030af7b4f
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/resource_assignment.json
@@ -0,0 +1,407 @@
+{
+ "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"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "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"
+ }
+ }
+ },
+ "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": {
+ "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": {
+
+ }
+ }
+ }
+ }
+ },
+ "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"
+ },
+ "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"
+ },
+ "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"
+ }
+ },
+ "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"
+ }
+ }
+}
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/resource_assignment/resource_assignment.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/resource_assignment/resource_assignment.json
new file mode 100644
index 000000000..30c7f49c4
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/resource_assignment/resource_assignment.json
@@ -0,0 +1,417 @@
+{
+ "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"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "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"
+ }
+ }
+ },
+ "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": {
+ "type": "component-resource-assignment",
+ "interfaces": {
+ "org-onap-ccsdk-config-assignment-service-ConfigAssignmentNode": {
+ "operations": {
+ "process": {
+ "inputs": {
+ "service-template-name": "VRR-baseconfiguration",
+ "service-template-version": "1.0.0",
+ "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": {
+
+ }
+ }
+ }
+ }
+ },
+ "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"
+ },
+ "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"
+ },
+ "service-template-name": {
+ "required": true,
+ "type": "string"
+ },
+ "service-template-version": {
+ "required": true,
+ "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"
+ },
+ "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"
+ }
+ },
+ "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"
+ }
+ }
+}
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/resource_assignment/velocity/base-config-template.vtl b/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/resource_assignment/velocity/base-config-template.vtl
new file mode 100644
index 000000000..92dba1024
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/resource_assignment/velocity/base-config-template.vtl
@@ -0,0 +1,40 @@
+ <config>
+ <configuration>
+ <groups>
+ <name>${group-name}</name>
+ <routing-instances>
+ <instance>
+ <name>&lt;*&gt;</name>
+ <protocols>
+ <pim>
+ <dense-groups>
+ <dynamic-reject />
+ <pim-dense-group-type>
+ <name>224.0.1.40/32</name>
+ </pim-dense-group-type>
+ <pim-dense-group-type>
+ <name>224.0.1.39/32</name>
+ </pim-dense-group-type>
+ <pim-dense-group-type>
+ <name>224.0.0.0/4</name>
+ <reject />
+ </pim-dense-group-type>
+ </dense-groups>
+ <rp>
+ <auto-rp>
+ <discovery />
+ </auto-rp>
+ </rp>
+ <interface>
+ <name>&lt;*&gt;</name>
+ <disable />
+ <priority>1000</priority>
+ </interface>
+ <reset-tracking-bit />
+ </pim>
+ </protocols>
+ </instance>
+ </routing-instances>
+ </groups>
+ </configuration>
+ </config> \ No newline at end of file
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/vpe-201802-baseconfig/dict.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/vpe-201802-baseconfig/dict.json
new file mode 100644
index 000000000..f7b09d5af
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/vpe-201802-baseconfig/dict.json
@@ -0,0 +1,172 @@
+[
+ {
+ "name": "adiod-unicast-route-reflectors",
+ "resourcePath": "vnf/protocol/adiod-unicast-route-reflectors",
+ "resourceType": "ATT",
+ "dataType": "list",
+ "entrySchema": "dt-adiod-unicast-route-reflectors",
+ "definition": "{\r\n \"tags\" : \"ADIOD3\",\r\n \"name\" : \"adiod-unicast-route-reflectors\",\r\n \"description\" : \"dd\",\r\n \"updated-by\" : \"ks220y@att.com\",\r\n \"resource-type\" : \"ATT\",\r\n \"resource-path\" : \"vnf/protocol/adiod-unicast-route-reflectors\",\r\n \"data-type\" : \"list\",\r\n \"entry-schema\" : \"dt-adiod-unicast-route-reflectors\",\r\n \"source\" : {\r\n \"input\" : { },\r\n \"network-resource-discovery\" : {\r\n \"input-key-mapping\" : {\r\n \"complex-code-char8\" : \"complex-code-char8\"\r\n },\r\n \"output-key-mapping\" : {\r\n \"adiod-unicast-route-reflectors\" : \"adiod-unicast-route-reflectors\"\r\n }\r\n }\r\n },\r\n \"candidate-dependency\" : {\r\n \"network-resource-discovery\" : {\r\n \"names\" : [ \"complex-code-char8\" ]\r\n }\r\n }\r\n}",
+ "description": "dd",
+ "tags": "ADIOD3",
+ "creationDate": "2017-11-16T17:31:38.000+0000",
+ "updatedBy": "ks220y@att.com"
+ },
+ {
+ "name": "adiod-vpnv4-route-reflectors",
+ "resourcePath": "vnf/servers/adiod-vpnv4-route-reflectors",
+ "resourceType": "ATT",
+ "dataType": "list",
+ "entrySchema": "dt-adiod-vpnv4-route-reflectors",
+ "definition": "{\r\n \"tags\" : \"ADIOD3\",\r\n \"name\" : \"adiod-vpnv4-route-reflectors\",\r\n \"description\" : \"To be provided\",\r\n \"updated-by\" : \"ks220y@att.com\",\r\n \"resource-type\" : \"ATT\",\r\n \"resource-path\" : \"vnf/servers/adiod-vpnv4-route-reflectors\",\r\n \"data-type\" : \"list\",\r\n \"entry-schema\" : \"dt-adiod-vpnv4-route-reflectors\",\r\n \"source\" : {\r\n \"input\" : { }\r\n }\r\n}",
+ "description": "To be provided",
+ "tags": "ADIOD3",
+ "creationDate": "2017-11-16T17:31:38.000+0000",
+ "updatedBy": "ks220y@att.com"
+ },
+ {
+ "name": "asn-region",
+ "resourcePath": "vnf/protocols/asn-region",
+ "resourceType": "ATT",
+ "dataType": "string",
+ "definition": "{\r\n \"tags\" : \"ADIOD3\",\r\n \"name\" : \"asn-region\",\r\n \"description\" : \"To be provided\",\r\n \"updated-by\" : \"ks220y@att.com\",\r\n \"resource-type\" : \"ATT\",\r\n \"resource-path\" : \"vnf/protocols/asn-region\",\r\n \"data-type\" : \"string\",\r\n \"source\" : {\r\n \"input\" : { },\r\n \"network-resource-discovery\" : {\r\n \"input-key-mapping\" : {\r\n \"hostname\" : \"hostname\"\r\n },\r\n \"output-key-mapping\" : {\r\n \"asn-region\" : \"asn-region\"\r\n }\r\n }\r\n },\r\n \"candidate-dependency\" : {\r\n \"network-resource-discovery\" : {\r\n \"names\" : [ \"hostname\" ]\r\n }\r\n }\r\n}",
+ "description": "To be provided",
+ "tags": "ADIOD3",
+ "creationDate": "2017-11-17T11:31:29.000+0000",
+ "updatedBy": "ks220y@att.com"
+ },
+ {
+ "name": "bundle-id",
+ "resourcePath": "vnf/interface/bundle-id",
+ "resourceType": "ATT",
+ "dataType": "string",
+ "definition": "{\r\n \"tags\" : \"ADIOD3\",\r\n \"name\" : \"bundle-id\",\r\n \"description\" : \"To be provided\",\r\n \"updated-by\" : \"ks220y@att.com\",\r\n \"resource-type\" : \"ATT\",\r\n \"resource-path\" : \"vnf/interface/bundle-id\",\r\n \"data-type\" : \"string\",\r\n \"source\" : {\r\n \"input\" : { },\r\n \"network-resource-discovery\" : {\r\n \"input-key-mapping\" : {\r\n \"hostname\" : \"hostname\"\r\n },\r\n \"output-key-mapping\" : {\r\n \"bundle-id\" : \"bundle-id\"\r\n }\r\n }\r\n },\r\n \"candidate-dependency\" : {\r\n \"network-resource-discovery\" : {\r\n \"names\" : [ \"hostname\" ]\r\n }\r\n }\r\n}",
+ "description": "To be provided",
+ "tags": "ADIOD3",
+ "creationDate": "2017-11-16T17:31:39.000+0000",
+ "updatedBy": "ks220y@att.com"
+ },
+ {
+ "name": "lo0-local-ipv4-address",
+ "resourcePath": "vnf/interface/lo0-local-ipv4",
+ "resourceType": "ATT",
+ "dataType": "ipv4-address",
+ "definition": "{\r\n \"tags\" : \"ADIOD3\",\r\n \"name\" : \"lo0-local-ipv4-address\",\r\n \"description\" : \"To be provided\",\r\n \"updated-by\" : \"ks220y@att.com\",\r\n \"resource-type\" : \"ATT\",\r\n \"resource-path\" : \"vnf/interface/lo0-local-ipv4\",\r\n \"data-type\" : \"string\",\r\n \"source\" : {\r\n \"input\" : { },\r\n \"network-resource-discovery\" : {\r\n \"input-key-mapping\" : {\r\n \"hostname\" : \"hostname\"\r\n },\r\n \"output-key-mapping\" : {\r\n \"lo0-local-ipv4\" : \"lo0-local-ipv4\"\r\n }\r\n }\r\n },\r\n \"candidate-dependency\" : {\r\n \"network-resource-discovery\" : {\r\n \"names\" : [ \"hostname\" ]\r\n }\r\n }\r\n}",
+ "description": "To be provided",
+ "tags": "ADIOD3",
+ "creationDate": "2017-11-16T17:31:40.000+0000",
+ "updatedBy": "ks220y@att.com"
+ },
+ {
+ "name": "lo10-local-ipv4-address",
+ "resourcePath": "vnf/interface/lo10-local-ipv4",
+ "resourceType": "ATT",
+ "dataType": "ipv4-address",
+ "definition": "{\r\n \"tags\" : \"ADIOD3\",\r\n \"name\" : \"lo10-local-ipv4-address\",\r\n \"description\" : \"To be provided\",\r\n \"updated-by\" : \"ks220y@att.com\",\r\n \"resource-type\" : \"ATT\",\r\n \"resource-path\" : \"vnf/interface/lo10-local-ipv4\",\r\n \"data-type\" : \"string\",\r\n \"source\" : {\r\n \"input\" : { },\r\n \"network-resource-discovery\" : {\r\n \"input-key-mapping\" : {\r\n \"hostname\" : \"hostname\"\r\n },\r\n \"output-key-mapping\" : {\r\n \"lo10-local-ipv4\" : \"lo10-local-ipv4\"\r\n }\r\n }\r\n },\r\n \"candidate-dependency\" : {\r\n \"network-resource-discovery\" : {\r\n \"names\" : [ \"hostname\" ]\r\n }\r\n }\r\n}",
+ "description": "To be provided",
+ "tags": "ADIOD3",
+ "creationDate": "2017-11-16T17:31:41.000+0000",
+ "updatedBy": "ks220y@att.com"
+ },
+ {
+ "name": "oam-remote-ipv4-address",
+ "resourcePath": "vnf/oam-remote-ipv4-address",
+ "resourceType": "ATT",
+ "dataType": "string",
+ "definition": "{\r\n \"tags\" : \"ADIOD3\",\r\n \"name\" : \"oam-remote-ipv4-address\",\r\n \"description\" : \"To be provided\",\r\n \"updated-by\" : \"ks220y@att.com\",\r\n \"resource-type\" : \"ATT\",\r\n \"resource-path\" : \"vnf/oam-remote-ipv4-address\",\r\n \"data-type\" : \"string\",\r\n \"source\" : {\r\n \"input\" : {\r\n \"key\" : \"oam-remote-ipv4-address\"\r\n },\r\n \"mdsal\" : {\r\n \"base\" : \"sdnc-gc\",\r\n \"type\" : \"JSON\",\r\n \"url-path\" : \"/restconf/config/L3VNF-API\",\r\n \"path\" : \"/${services/service-list/$service-instance-id/service-data/vnf-topology-information/vnf-assignments/vnf-vms/$oam-ipv4-ip-type/vm-networks/$oam-network-role/v4-assigned-ip-list/$oam-vm-type\",\r\n \"input-key-mapping\" : {\r\n \"service-instance-id\" : \"service-instance-id\",\r\n \"oam-network-role\" : \"oam-network-role\",\r\n \"oam-ipv4-ip-type\" : \"oam-ipv4-ip-type\",\r\n \"oam-vm-type\" : \"oam-vm-type\"\r\n },\r\n \"output-key-mapping\" : {\r\n \"oam-remote-ipv4-address\" : \"ipv4-gateway-prefix\"\r\n }\r\n }\r\n },\r\n \"candidate-dependency\" : {\r\n \"mdsal\" : {\r\n \"names\" : [ \"service-instance-id\", \"oam-network-role\", \"oam-v4-ip-type \", \"oam-vm-type\" ]\r\n }\r\n }\r\n}",
+ "description": "To be provided",
+ "tags": "ADIOD3",
+ "creationDate": "2017-11-16T10:52:24.000+0000",
+ "updatedBy": "ks220y@att.com"
+ },
+ {
+ "name": "ospf-area",
+ "resourcePath": "/ospf-area",
+ "resourceType": "ATT",
+ "dataType": "string",
+ "definition": "{\r\n \"tags\" : \"ADIOD3\",\r\n \"name\" : \"ospf-area\",\r\n \"description\" : \"ospf-area\",\r\n \"updated-by\" : \"ks220y@att.com\",\r\n \"resource-type\" : \"ATT\",\r\n \"resource-path\" : \"/ospf-area\",\r\n \"data-type\" : \"string\",\r\n \"source\" : {\r\n \"input\" : {\r\n \"key\" : \"ospf-area\"\r\n },\r\n \"network-resource-discovery\" : {\r\n \"input-key-mapping\" : {\r\n \"hostname\" : \"mainResource\"\r\n },\r\n \"output-key-mapping\" : {\r\n \"ospf-area\" : \"ospf-area\"\r\n }\r\n }\r\n }\r\n}",
+ "description": "ospf-area",
+ "tags": "ADIOD3",
+ "creationDate": "2017-11-16T10:52:24.000+0000",
+ "updatedBy": "ks220y@att.com"
+ },
+ {
+ "name": "ospf-cost",
+ "resourcePath": "/ospf-cost",
+ "resourceType": "ATT",
+ "dataType": "string",
+ "definition": "{\r\n \"tags\" : \"ADIOD3\",\r\n \"name\" : \"ospf-cost\",\r\n \"description\" : \"ospf-cost\",\r\n \"updated-by\" : \"ks220y@att.com\",\r\n \"resource-type\" : \"ATT\",\r\n \"resource-path\" : \"/ospf-cost\",\r\n \"data-type\" : \"string\",\r\n \"source\" : {\r\n \"input\" : {\r\n \"key\" : \"ospf-cost\"\r\n },\r\n \"network-resource-discovery\" : {\r\n \"input-key-mapping\" : {\r\n \"hostname\" : \"mainResource\"\r\n },\r\n \"output-key-mapping\" : {\r\n \"ospf-cost\" : \"ospf-cost\"\r\n }\r\n }\r\n }\r\n}",
+ "description": "ospf-cost",
+ "tags": "ADIOD3",
+ "creationDate": "2017-11-16T10:52:25.000+0000",
+ "updatedBy": "ks220y@att.com"
+ },
+ {
+ "name": "si-local-ipv4-address",
+ "resourcePath": "vnf/interface/si-local-ipv4",
+ "resourceType": "ATT",
+ "dataType": "string",
+ "definition": "{\r\n \"tags\" : \"ADIOD3\",\r\n \"name\" : \"si-local-ipv4-address\",\r\n \"description\" : \"To be provided\",\r\n \"updated-by\" : \"ks220y@att.com\",\r\n \"resource-type\" : \"ATT\",\r\n \"resource-path\" : \"vnf/interface/si-local-ipv4\",\r\n \"data-type\" : \"string\",\r\n \"source\" : {\r\n \"input\" : { },\r\n \"network-resource-discovery\" : {\r\n \"input-key-mapping\" : {\r\n \"hostname\" : \"hostname\"\r\n },\r\n \"output-key-mapping\" : {\r\n \"si-local-ipv4\" : \"si-local-ipv4\"\r\n }\r\n }\r\n },\r\n \"candidate-dependency\" : {\r\n \"network-resource-discovery\" : {\r\n \"names\" : [ \"hostname\" ]\r\n }\r\n }\r\n}",
+ "description": "To be provided",
+ "tags": "ADIOD3",
+ "creationDate": "2017-11-16T10:52:25.000+0000",
+ "updatedBy": "ks220y@att.com"
+ },
+ {
+ "name": "tacacs-server-ipv4-addresses",
+ "resourcePath": "vnf/servers/tacacs-server-ipv4-addresses",
+ "resourceType": "ATT",
+ "dataType": "list",
+ "entrySchema": "dt-tacacs-server-ipv4-addresses",
+ "definition": "{\r\n \"tags\" : \"ADIOD3\",\r\n \"name\" : \"tacacs-server-ipv4-addresses\",\r\n \"description\" : \"to be provided\",\r\n \"updated-by\" : \"ks220y@att.com\",\r\n \"resource-type\" : \"ATT\",\r\n \"resource-path\" : \"vnf/servers/tacacs-server-ipv4-addresses\",\r\n \"data-type\" : \"list\",\r\n \"entry-schema\" : \"dt-tacacs-server-ipv4-addresses\",\r\n \"source\" : {\r\n \"input\" : { },\r\n \"network-resource-discovery\" : {\r\n \"input-key-mapping\" : {\r\n \"region\" : \"region\",\r\n \"complex-code-char8\" : \"complex-code-char8\",\r\n \"tacacs-domain-name\" : \"tacacs-domain-name\"\r\n },\r\n \"output-key-mapping\" : {\r\n \"tacacs-server-ipv4-addresses\" : \"tacacs-server-ipv4-addresses\"\r\n }\r\n }\r\n },\r\n \"candidate-dependency\" : {\r\n \"network-resource-discovery\" : {\r\n \"names\" : [ \"region\", \"complex-code-char8\", \"tacacs-domain-name\" ]\r\n }\r\n }\r\n}",
+ "description": "to be provided",
+ "tags": "ADIOD3",
+ "creationDate": "2017-11-16T17:31:43.000+0000",
+ "updatedBy": "ks220y@att.com"
+ },
+ {
+ "name": "uplink-1-unit",
+ "resourcePath": "vnf/interface/uplink-1-unit",
+ "resourceType": "ATT",
+ "dataType": "string",
+ "definition": "{\r\n \"tags\" : \"ADIOD3\",\r\n \"name\" : \"uplink-1-unit\",\r\n \"description\" : \"To be provided\",\r\n \"updated-by\" : \"ks220y@att.com\",\r\n \"resource-type\" : \"ATT\",\r\n \"resource-path\" : \"vnf/interface/uplink-1-unit\",\r\n \"data-type\" : \"string\",\r\n \"source\" : {\r\n \"input\" : { },\r\n \"network-resource-discovery\" : {\r\n \"input-key-mapping\" : {\r\n \"hostname\" : \"hostname\"\r\n },\r\n \"output-key-mapping\" : {\r\n \"uplink-1-unit\" : \"uplink-1-unit\"\r\n }\r\n }\r\n },\r\n \"candidate-dependency\" : {\r\n \"network-resource-discovery\" : {\r\n \"names\" : [ \"hostname\" ]\r\n }\r\n }\r\n}",
+ "description": "To be provided",
+ "tags": "ADIOD3",
+ "creationDate": "2017-11-16T17:31:44.000+0000",
+ "updatedBy": "ks220y@att.com"
+ },
+ {
+ "name": "uplink-2-unit",
+ "resourcePath": "vnf/interface/uplink-2-unit",
+ "resourceType": "ATT",
+ "dataType": "string",
+ "definition": "{\r\n \"tags\" : \"ADIOD3\",\r\n \"name\" : \"uplink-2-unit\",\r\n \"description\" : \"To be provided\",\r\n \"updated-by\" : \"ks220y@att.com\",\r\n \"resource-type\" : \"ATT\",\r\n \"resource-path\" : \"vnf/interface/uplink-2-unit\",\r\n \"data-type\" : \"string\",\r\n \"source\" : {\r\n \"input\" : { },\r\n \"network-resource-discovery\" : {\r\n \"input-key-mapping\" : {\r\n \"hostname\" : \"hostname\"\r\n },\r\n \"output-key-mapping\" : {\r\n \"uplink-2-unit\" : \"uplink-2-unit\"\r\n }\r\n }\r\n },\r\n \"candidate-dependency\" : {\r\n \"network-resource-discovery\" : {\r\n \"names\" : [ \"hostname\" ]\r\n }\r\n }\r\n}",
+ "description": "To be provided",
+ "tags": "ADIOD3",
+ "creationDate": "2017-11-16T17:31:45.000+0000",
+ "updatedBy": "ks220y@att.com"
+ },
+ {
+ "name": "wan-aggregate-ipv4-addresses",
+ "resourcePath": "vnf/wan-aggregate-ipv4-addresses",
+ "resourceType": "ATT",
+ "dataType": "list",
+ "entrySchema": "dt-v4-aggregate",
+ "definition": "{\r\n \"tags\" : \"wan-aggregate-ipv4-addresses, tosca.datatypes.Root, data_type, ks220y@att.com\",\r\n \"name\" : \"wan-aggregate-ipv4-addresses\",\r\n \"description\" : \"To be provided\",\r\n \"updated-by\" : \"ks220y@att.com\",\r\n \"resource-type\" : \"ATT\",\r\n \"resource-path\" : \"vnf/wan-aggregate-ipv4-addresses\",\r\n \"data-type\" : \"list\",\r\n \"entry-schema\" : \"dt-v4-aggregate\",\r\n \"source\" : {\r\n \"input\" : { },\r\n \"mdsal\" : {\r\n \"base\" : \"sdnc-gc\",\r\n \"type\" : \"JSON\",\r\n \"url-path\" : \"/restconf/config/L3VNF-API\",\r\n \"path\" : \"/${services/service-list/$service-instance-id/service-data/vnf-topology-information/vnf-assignments/vnf-vms/$oam-ipv4-ip-type/vm-networks/$oam-network-role/v4-assigned-ip-list/$oam-vm-type\",\r\n \"input-key-mapping\" : {\r\n \"service-instance-id\" : \"service-instance-id\",\r\n \"oam-network-role\" : \"oam-network-role\",\r\n \"oam-ipv4-ip-type\" : \"oam-ipv4-ip-type\",\r\n \"oam-vm-type\" : \"oam-vm-type\"\r\n },\r\n \"output-key-mapping\" : {\r\n \"wan-aggregate-ipv4-addresses\" : \"v4-ip-prefix-length\"\r\n }\r\n }\r\n },\r\n \"candidate-dependency\" : {\r\n \"mdsal\" : {\r\n \"names\" : [ \"service-instance-id\", \"oam-network-role\", \"oam-v4-ip-type \", \"oam-vm-type\" ]\r\n }\r\n }\r\n}",
+ "description": "To be provided",
+ "tags": "wan-aggregate-ipv4-addresses, tosca.datatypes.Root, data_type, ks220y@att.com",
+ "creationDate": "2017-11-16T17:31:45.000+0000",
+ "updatedBy": "ks220y@att.com"
+ },
+ {
+ "name": "wan-aggregate-ipv6-addresses",
+ "resourcePath": "vnf/wan-aggregate-ipv6-addresses",
+ "resourceType": "ATT",
+ "dataType": "list",
+ "entrySchema": "dt-v6-aggregate",
+ "definition": "{\r\n \"tags\" : \"ADIOD3\",\r\n \"name\" : \"wan-aggregate-ipv6-addresses\",\r\n \"description\" : \"To be provided\",\r\n \"updated-by\" : \"ks220y@att.com\",\r\n \"resource-type\" : \"ATT\",\r\n \"resource-path\" : \"vnf/wan-aggregate-ipv6-addresses\",\r\n \"data-type\" : \"list\",\r\n \"entry-schema\" : \"dt-v6-aggregate\",\r\n \"source\" : {\r\n \"input\" : { },\r\n \"mdsal\" : {\r\n \"base\" : \"sdnc-gc\",\r\n \"type\" : \"JSON\",\r\n \"url-path\" : \"/restconf/config/L3VNF-API\",\r\n \"path\" : \"/${services/service-list/$service-instance-id/service-data/vnf-topology-information/vnf-assignments/vnf-vms/VCO\",\r\n \"input-key-mapping\" : {\r\n \"service-instance-id\" : \"service-instance-id\",\r\n \"oam-network-role\" : \"oam-network-role\",\r\n \"oam-ipv4-ip-type\" : \"oam-ipv4-ip-type\",\r\n \"oam-vm-type\" : \"oam-vm-type\"\r\n },\r\n \"output-key-mapping\" : {\r\n \"wan-aggregate-ipv6.addresses\" : \"v4-ip-prefix-length\"\r\n }\r\n }\r\n },\r\n \"candidate-dependency\" : {\r\n \"mdsal\" : {\r\n \"names\" : [ \"service-instance-id\", \"oam-network-role\", \"oam-v4-ip-type \", \"oam-vm-type\" ]\r\n }\r\n }\r\n}",
+ "description": "To be provided",
+ "tags": "ADIOD3",
+ "creationDate": "2017-11-16T17:31:46.000+0000",
+ "updatedBy": "ks220y@att.com"
+ }
+]
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/vpe-201802-baseconfig/input-complex.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/vpe-201802-baseconfig/input-complex.json
new file mode 100644
index 000000000..70865015c
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/vpe-201802-baseconfig/input-complex.json
@@ -0,0 +1,49 @@
+{
+ "request-id": "1234",
+ "service-instance-id": "adsfdsf",
+ "action-name": "resource-assignment-action",
+ "scope-type": "vnf-type",
+ "hostname": "sample-host",
+ "resource-assignment-request": {
+ "uplink-2-unit": "sample-uplink-2-unit",
+ "bundle-mac": "sample-bundle-mac",
+ "wan-aggregate-ipv6-addresses": [
+ {
+ "v6-address": "sample-v6-address",
+ "v6-plen": "sample-v6-plen"
+ }
+ ],
+ "ospf-area": "sample-ospf-area",
+ "ospf-cost": 10.0,
+ "bundle-id": "bundle-id",
+ "adiod-unicast-route-reflectors": [
+ {
+ "v4-address": "sample-v4-address",
+ "name": "sample-name"
+ }
+ ],
+ "oam-remote-ipv4-address": "",
+ "adiod-vpnv4-route-reflectors": [
+ {
+ "v4-address": "sample-v4-address",
+ "name": "sample-name"
+ }
+ ],
+ "lo10-local-ipv4-address": "sample-lo10-local-ipv4-address",
+ "wan-aggregate-ipv4-addresses": [
+ {
+ "v4-address": "sample-v4-address",
+ "v4-plen": 0
+ }
+ ],
+ "lo0-local-ipv4-address": "sample-lo0-local-ipv4-address",
+ "uplink-1-unit": "sample-uplink-1-unit",
+ "tacacs-server-ipv4-addresses": [
+ {
+ "tacacs-server-ipv4-address": "sample-tacacs-server-ipv4-address"
+ }
+ ],
+ "asn-region": "sample-asn-region",
+ "si-local-ipv4-address": "sample-si-local-ipv4-address"
+ }
+}
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/vpe-201802-baseconfig/velocity/base-config-template.vtl b/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/vpe-201802-baseconfig/velocity/base-config-template.vtl
new file mode 100644
index 000000000..92dba1024
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/vpe-201802-baseconfig/velocity/base-config-template.vtl
@@ -0,0 +1,40 @@
+ <config>
+ <configuration>
+ <groups>
+ <name>${group-name}</name>
+ <routing-instances>
+ <instance>
+ <name>&lt;*&gt;</name>
+ <protocols>
+ <pim>
+ <dense-groups>
+ <dynamic-reject />
+ <pim-dense-group-type>
+ <name>224.0.1.40/32</name>
+ </pim-dense-group-type>
+ <pim-dense-group-type>
+ <name>224.0.1.39/32</name>
+ </pim-dense-group-type>
+ <pim-dense-group-type>
+ <name>224.0.0.0/4</name>
+ <reject />
+ </pim-dense-group-type>
+ </dense-groups>
+ <rp>
+ <auto-rp>
+ <discovery />
+ </auto-rp>
+ </rp>
+ <interface>
+ <name>&lt;*&gt;</name>
+ <disable />
+ <priority>1000</priority>
+ </interface>
+ <reset-tracking-bit />
+ </pim>
+ </protocols>
+ </instance>
+ </routing-instances>
+ </groups>
+ </configuration>
+ </config> \ No newline at end of file
diff --git a/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/vpe-201802-baseconfig/vpe-201802-baseconfig.json b/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/vpe-201802-baseconfig/vpe-201802-baseconfig.json
new file mode 100644
index 000000000..ed1fe4093
--- /dev/null
+++ b/blueprints-processor/plugin/assignment-provider/src/test/resources/service_templates/vpe-201802-baseconfig/vpe-201802-baseconfig.json
@@ -0,0 +1,639 @@
+{
+ "metadata": {
+ "author": "ks220y@att.com",
+ "service-template-name": "vpe-201802-baseconfig",
+ "service-template-version": "1.0.0",
+ "release": "1802",
+ "service-type": "ADIOD",
+ "vnf-type": "VPE"
+ },
+ "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"
+ },
+ "resource-assignment-request": {
+ "description": "This is Dynamic Data type for the receipe resource-assignment-action.",
+ "required": false,
+ "type": "dt-resource-assignment-request"
+ }
+ },
+ "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": "wan-aggregate-ipv6-addresses",
+ "input-param": true,
+ "property": {
+ "type": "list",
+ "entry_schema": {
+ "type": "dt-v6-aggregate"
+ }
+ },
+ "dictionary-name": "wan-aggregate-ipv6-addresses",
+ "dictionary-source": "input"
+ },
+ {
+ "name": "wan-aggregate-ipv4-addresses",
+ "input-param": true,
+ "property": {
+ "type": "list",
+ "entry_schema": {
+ "type": "dt-v4-aggregate"
+ }
+ },
+ "dictionary-name": "wan-aggregate-ipv4-addresses",
+ "dictionary-source": "input"
+ },
+ {
+ "name": "tacacs-server-ipv4-addresses",
+ "input-param": true,
+ "property": {
+ "type": "list",
+ "entry_schema": {
+ "type": "dt-tacacs-server-ipv4"
+ }
+ },
+ "dictionary-name": "tacacs-server-ipv4-addresses",
+ "dictionary-source": "input"
+ },
+ {
+ "name": "oam-remote-ipv4-address",
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "oam-remote-ipv4-address",
+ "dictionary-source": "input"
+ },
+ {
+ "name": "si-local-ipv4-address",
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "si-local-ipv4-address",
+ "dictionary-source": "input"
+ },
+ {
+ "name": "lo0-local-ipv4-address",
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "lo0-local-ipv4-address",
+ "dictionary-source": "input"
+ },
+ {
+ "name": "asn-region",
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "asn-region",
+ "dictionary-source": "input"
+ },
+ {
+ "name": "adiod-unicast-route-reflectors",
+ "input-param": true,
+ "property": {
+ "type": "list",
+ "entry_schema": {
+ "type": "dt-adiod-unicast-route-reflector"
+ }
+ },
+ "dictionary-name": "adiod-unicast-route-reflectors",
+ "dictionary-source": "input"
+ },
+ {
+ "name": "adiod-vpnv4-route-reflectors",
+ "input-param": true,
+ "property": {
+ "type": "list",
+ "entry_schema": {
+ "type": "dt-adiod-vpnv4-route-reflector"
+ }
+ },
+ "dictionary-name": "adiod-vpnv4-route-reflectors",
+ "dictionary-source": "input"
+ },
+ {
+ "name": "bundle-id",
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "bundle-id",
+ "dictionary-source": "input"
+ },
+ {
+ "name": "uplink-1-unit",
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "uplink-1-unit",
+ "dictionary-source": "input"
+ },
+ {
+ "name": "uplink-2-unit",
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "uplink-2-unit",
+ "dictionary-source": "input"
+ },
+ {
+ "name": "ospf-area",
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "ospf-area",
+ "dictionary-source": "input"
+ },
+ {
+ "name": "ospf-cost",
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "ospf-cost",
+ "dictionary-source": "input"
+ },
+ {
+ "name": "lo10-local-ipv4-address",
+ "property": {
+ "type": "string"
+ },
+ "dictionary-name": "lo10-local-ipv4-address",
+ "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"
+ }
+ }
+ },
+ "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\" : \"hostname\" }"
+ },
+ "outputs": {
+ "resource-assignment-params": "",
+ "status": ""
+ }
+ }
+ }
+ }
+ },
+ "capabilities": {
+ "component-node": {
+
+ }
+ }
+ }
+ }
+ },
+ "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"
+ },
+ "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"
+ },
+ "artifact-config-template": {
+ "description": "This is Configuration Velocity Template",
+ "version": "1.0.0",
+ "properties": {
+ "action-names": {
+ "required": true,
+ "type": "list",
+ "entry_schema": {
+ "type": "string"
+ }
+ }
+ },
+ "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"
+ }
+ },
+ "data_types": {
+ "dt-v4-aggregate": {
+ "version": "1.0.0",
+ "description": "This is dt-v4-aggregate Data Type",
+ "properties": {
+ "v4-address": {
+ "required": true,
+ "type": "string"
+ },
+ "v4-plen": {
+ "required": false,
+ "type": "integer"
+ }
+ },
+ "derived_from": "tosca.datatypes.Root"
+ },
+ "dt-tacacs-server-ipv4": {
+ "version": "1.0.0",
+ "description": "This is dt-tacacs-server-ipv4 Data Type",
+ "properties": {
+ "tacacs-server-ipv4-address": {
+ "required": true,
+ "type": "string"
+ }
+ },
+ "derived_from": "tosca.datatypes.Root"
+ },
+ "dt-adiod-vpnv4-route-reflector": {
+ "version": "1.0.0",
+ "description": "This is dt-adiod-unicast-route-reflector Data Type",
+ "properties": {
+ "v4-address": {
+ "required": true,
+ "type": "string"
+ },
+ "name": {
+ "required": false,
+ "type": "string"
+ }
+ },
+ "derived_from": "tosca.datatypes.Root"
+ },
+ "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"
+ }
+ },
+ "status": {
+ "required": false,
+ "type": "string"
+ },
+ "message": {
+ "required": false,
+ "type": "string"
+ },
+ "updated-date": {
+ "required": false,
+ "type": "string"
+ },
+ "updated-by": {
+ "required": false,
+ "type": "string"
+ }
+ },
+ "derived_from": "tosca.datatypes.Root"
+ },
+ "dt-adiod-unicast-route-reflector": {
+ "version": "1.0.0",
+ "description": "This is dt-adiod-unicast-route-reflector Data Type",
+ "properties": {
+ "v4-address": {
+ "required": true,
+ "type": "string"
+ },
+ "name": {
+ "required": false,
+ "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"
+ },
+ "dt-v6-aggregate": {
+ "version": "1.0.0",
+ "description": "This is dt-v6-aggregate Data Type",
+ "properties": {
+ "v6-address": {
+ "required": true,
+ "type": "string"
+ },
+ "v6-plen": {
+ "required": false,
+ "type": "string"
+ }
+ },
+ "derived_from": "tosca.datatypes.Root"
+ },
+ "dt-resource-assignment-request": {
+ "version": "1.0.0",
+ "description": "This is Dynamic Data type definition generated from resource mapping for the config template name base-config-template.",
+ "properties": {
+ "uplink-2-unit": {
+ "type": "string"
+ },
+ "bundle-mac": {
+ "required": true,
+ "type": "string"
+ },
+ "wan-aggregate-ipv6-addresses": {
+ "type": "list",
+ "entry_schema": {
+ "type": "dt-v6-aggregate"
+ }
+ },
+ "ospf-area": {
+ "type": "string"
+ },
+ "ospf-cost": {
+ "type": "string"
+ },
+ "bundle-id": {
+ "type": "string"
+ },
+ "adiod-unicast-route-reflectors": {
+ "type": "list",
+ "entry_schema": {
+ "type": "dt-adiod-unicast-route-reflector"
+ }
+ },
+ "oam-remote-ipv4-address": {
+ "type": "string"
+ },
+ "adiod-vpnv4-route-reflectors": {
+ "type": "list",
+ "entry_schema": {
+ "type": "dt-adiod-vpnv4-route-reflector"
+ }
+ },
+ "lo10-local-ipv4-address": {
+ "type": "string"
+ },
+ "wan-aggregate-ipv4-addresses": {
+ "type": "list",
+ "entry_schema": {
+ "type": "dt-v4-aggregate"
+ }
+ },
+ "lo0-local-ipv4-address": {
+ "type": "string"
+ },
+ "uplink-1-unit": {
+ "type": "string"
+ },
+ "tacacs-server-ipv4-addresses": {
+ "type": "list",
+ "entry_schema": {
+ "type": "dt-tacacs-server-ipv4"
+ }
+ },
+ "asn-region": {
+ "type": "string"
+ },
+ "si-local-ipv4-address": {
+ "type": "string"
+ }
+ },
+ "derived_from": "tosca.datatypes.Dynamic"
+ }
+ }
+}