summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/service/src/test
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-09-13 00:20:34 +0000
committerMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-09-13 00:47:05 +0000
commit99f4a1e766cf27d35fb7b68b4904d1e49e7fa787 (patch)
tree726b9e9930942816b06061a0bf017d3db06f1a8b /ms/controllerblueprints/modules/service/src/test
parent30bdb24f421db1d3703cfea707a8a6865adedb88 (diff)
Controller Blueprints Microservice
Add resource assignment enhancement and validation to blueprint validation and enhancement. Change-Id: I547760012e7014cfbb7a1e3a1d8ffb77edc9b6a2 Issue-ID: CCSDK-562 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Diffstat (limited to 'ms/controllerblueprints/modules/service/src/test')
-rw-r--r--ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/ResourceAssignmentEnhancerServiceTest.java17
-rw-r--r--ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepositoryTest.java6
-rw-r--r--ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRestTest.java2
-rw-r--r--ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ServiceTemplateRestTest.java4
-rw-r--r--ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidationTest.java10
-rw-r--r--ms/controllerblueprints/modules/service/src/test/resources/application.properties4
-rw-r--r--ms/controllerblueprints/modules/service/src/test/resources/enhance/enhance-resource-assignment.json62
-rw-r--r--ms/controllerblueprints/modules/service/src/test/resources/enhance/enhance-template.json10
-rw-r--r--ms/controllerblueprints/modules/service/src/test/resources/enhance/enhanced-template.json312
-rw-r--r--ms/controllerblueprints/modules/service/src/test/resources/enhance/simple-enrich.json37
-rw-r--r--ms/controllerblueprints/modules/service/src/test/resources/logback.xml5
-rw-r--r--ms/controllerblueprints/modules/service/src/test/resources/resourcedictionary/automap.json9
12 files changed, 323 insertions, 155 deletions
diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/ResourceAssignmentEnhancerServiceTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/ResourceAssignmentEnhancerServiceTest.java
index 7d16f50fa..e279ec9c0 100644
--- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/ResourceAssignmentEnhancerServiceTest.java
+++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/ResourceAssignmentEnhancerServiceTest.java
@@ -16,12 +16,17 @@
package org.onap.ccsdk.apps.controllerblueprints.service.enhancer;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
import org.junit.Assert;
+import org.junit.Before;
import org.junit.Test;
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException;
import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate;
import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonReactorUtils;
+import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;
import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment;
+import org.onap.ccsdk.apps.controllerblueprints.resource.dict.factory.ResourceSourceMappingFactory;
import org.onap.ccsdk.apps.controllerblueprints.resource.dict.service.ResourceDefinitionFileRepoService;
import org.onap.ccsdk.apps.controllerblueprints.resource.dict.service.ResourceDefinitionRepoService;
@@ -33,18 +38,28 @@ import java.util.List;
* @author Brinda Santh
*/
public class ResourceAssignmentEnhancerServiceTest {
+ private static EELFLogger log = EELFManager.getInstance().getLogger(ResourceAssignmentEnhancerServiceTest.class);
+
+ @Before
+ public void setUp(){
+ ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("db", "source-db");
+ ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("input", "source-input");
+ ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("default", "source-default");
+ ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("mdsal", "source-rest");
+ }
@Test
public void testEnhanceBluePrint() throws BluePrintException {
List<ResourceAssignment> resourceAssignments = JacksonReactorUtils
- .getListFromClassPathFile("enhance/simple-enrich.json", ResourceAssignment.class).block();
+ .getListFromClassPathFile("enhance/enhance-resource-assignment.json", ResourceAssignment.class).block();
Assert.assertNotNull("Failed to get Resource Assignment", resourceAssignments);
ResourceDefinitionRepoService resourceDefinitionRepoService = new ResourceDefinitionFileRepoService("./../../application/load");
ResourceAssignmentEnhancerService resourceAssignmentEnhancerService =
new ResourceAssignmentEnhancerDefaultService(resourceDefinitionRepoService);
ServiceTemplate serviceTemplate = resourceAssignmentEnhancerService.enhanceBluePrint(resourceAssignments);
Assert.assertNotNull("Failed to get Enriched service Template", serviceTemplate);
+ log.trace("Enhanced Service Template : {}", JacksonUtils.getJson(serviceTemplate, true));
}
}
diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepositoryTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepositoryTest.java
index ab939ffa1..b2e290186 100644
--- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepositoryTest.java
+++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepositoryTest.java
@@ -1,5 +1,6 @@
/*
* Copyright © 2018 IBM.
+ * Modifications Copyright © 2017-2018 AT&T Intellectual Property.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +18,6 @@
package org.onap.ccsdk.apps.controllerblueprints.service.repository;
import org.junit.Assert;
-import org.junit.Before;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -55,7 +55,7 @@ public class ResourceDictionaryReactRepositoryTest {
@Test
@Commit
public void test01Save() {
- ResourceDefinition resourceDefinition = JacksonUtils.readValueFromFile("./../../application/load/resource_dictionary/db-source" +
+ ResourceDefinition resourceDefinition = JacksonUtils.readValueFromFile("./../../application/load/resource_dictionary/sample-db-source" +
".json", ResourceDefinition.class);
Assert.assertNotNull("Failed to get resourceDefinition from content", resourceDefinition);
resourceDefinition.setName(sourceName);
@@ -88,7 +88,7 @@ public class ResourceDictionaryReactRepositoryTest {
@Test
@Commit
public void test05Delete() {
- resourceDictionaryReactRepository.deleteByName("db-source").block();
+ resourceDictionaryReactRepository.deleteByName(sourceName).block();
}
private ResourceDictionary transformResourceDictionary(ResourceDefinition resourceDefinition) {
diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRestTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRestTest.java
index ac786d0e9..272cdd08f 100644
--- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRestTest.java
+++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ResourceDictionaryRestTest.java
@@ -42,7 +42,7 @@ import java.util.List;
@RunWith(SpringRunner.class)
-@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
+@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {"blueprints.load.initial-data=true"})
@ContextConfiguration(classes = {TestApplication.class})
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class ResourceDictionaryRestTest {
diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ServiceTemplateRestTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ServiceTemplateRestTest.java
index faa10825f..37cc61d1c 100644
--- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ServiceTemplateRestTest.java
+++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ServiceTemplateRestTest.java
@@ -45,7 +45,7 @@ import java.util.List;
@RunWith(SpringRunner.class)
-@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
+@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {"blueprints.load.initial-data=true"})
@ContextConfiguration(classes = {TestApplication.class})
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class ServiceTemplateRestTest {
@@ -143,7 +143,7 @@ public class ServiceTemplateRestTest {
List<ResourceAssignment> autoMappedResourceAssignment = autoMapResponse.getResourceAssignments();
autoMappedResourceAssignment.forEach(resourceAssignment -> {
- if ("bundle-id".equals(resourceAssignment.getName())) {
+ if ("sample-db-source".equals(resourceAssignment.getName())) {
Assert.assertEquals("Failed to assign default first source", "db",
resourceAssignment.getDictionarySource());
}
diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidationTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidationTest.java
index 46b725f87..5f34b5510 100644
--- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidationTest.java
+++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/validator/ServiceTemplateValidationTest.java
@@ -19,9 +19,11 @@ package org.onap.ccsdk.apps.controllerblueprints.service.validator;
import org.apache.commons.io.FileUtils;
import org.junit.Assert;
+import org.junit.Before;
import org.junit.Test;
import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate;
import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;
+import org.onap.ccsdk.apps.controllerblueprints.resource.dict.factory.ResourceSourceMappingFactory;
import org.onap.ccsdk.apps.controllerblueprints.service.utils.ConfigModelUtils;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
@@ -33,6 +35,14 @@ import java.util.List;
public class ServiceTemplateValidationTest {
private static EELFLogger log = EELFManager.getInstance().getLogger(ServiceTemplateValidationTest.class);
+ @Before
+ public void setUp(){
+ ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("db", "source-db");
+ ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("input", "source-input");
+ ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("default", "source-default");
+ ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("mdsal", "source-rest");
+ }
+
@Test
public void testBluePrintDirs() {
List<String> dirs = ConfigModelUtils.getBlueprintNames("load/blueprints");
diff --git a/ms/controllerblueprints/modules/service/src/test/resources/application.properties b/ms/controllerblueprints/modules/service/src/test/resources/application.properties
index 3a913b701..397f3b138 100644
--- a/ms/controllerblueprints/modules/service/src/test/resources/application.properties
+++ b/ms/controllerblueprints/modules/service/src/test/resources/application.properties
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-
+spring.main.banner-mode=off
spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS = false
@@ -23,7 +23,7 @@ logging.level.org.hibernate.SQL=warn
logging.level.org.hibernate.type.descriptor.sql=debug
-blueprints.load.initial-data=true
+blueprints.load.initial-data=false
load.dataTypePath=./../../application/load/model_type/data_type
load.nodeTypePath=./../../application/load/model_type/node_type
load.artifactTypePath=./../../application/load/model_type/artifact_type
diff --git a/ms/controllerblueprints/modules/service/src/test/resources/enhance/enhance-resource-assignment.json b/ms/controllerblueprints/modules/service/src/test/resources/enhance/enhance-resource-assignment.json
new file mode 100644
index 000000000..3715becad
--- /dev/null
+++ b/ms/controllerblueprints/modules/service/src/test/resources/enhance/enhance-resource-assignment.json
@@ -0,0 +1,62 @@
+[
+ {
+ "name": "rs-db-source",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "sample-db-source",
+ "dictionary-source": "db",
+ "dependencies": [
+ "input-source"
+ ]
+ },
+ {
+ "name": "ra-default-source",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "sample-default-source",
+ "dictionary-source": "default",
+ "dependencies": []
+ },
+ {
+ "name": "ra-input-source",
+ "input-param": true,
+ "property": {
+ "type": "string",
+ "required": true
+ },
+ "dictionary-name": "sample-input-source",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "ra-list-input-source",
+ "input-param": true,
+ "property": {
+ "type": "list",
+ "required": true,
+ "entry_schema": {
+ "type": "string"
+ }
+ },
+ "dictionary-name": "ra-list-input-source",
+ "dictionary-source": "input",
+ "dependencies": []
+ },
+ {
+ "name": "ra-complex-input-source",
+ "input-param": true,
+ "property": {
+ "type": "dt-v4-aggregate",
+ "required": true
+ },
+ "dictionary-name": "sample-mdsal-source",
+ "dictionary-source": "mdsal",
+ "dependencies": []
+ }
+]
diff --git a/ms/controllerblueprints/modules/service/src/test/resources/enhance/enhance-template.json b/ms/controllerblueprints/modules/service/src/test/resources/enhance/enhance-template.json
index 70d03e0a8..782ed505c 100644
--- a/ms/controllerblueprints/modules/service/src/test/resources/enhance/enhance-template.json
+++ b/ms/controllerblueprints/modules/service/src/test/resources/enhance/enhance-template.json
@@ -218,13 +218,13 @@
"properties": {
"mapping": [
{
- "name": "bundle-mac",
+ "name": "rs-db-source",
"property": {
"required": true,
"type": "string"
},
"input-param": false,
- "dictionary-name": "bundle-mac",
+ "dictionary-name": "sample-db-source",
"dictionary-source": "db",
"dependencies": [
"hostname"
@@ -232,7 +232,7 @@
"version": 0
},
{
- "name": "wan-aggregate-ipv4-addresses",
+ "name": "mdsal-source",
"property": {
"description": "",
"required": true,
@@ -242,7 +242,7 @@
}
},
"input-param": false,
- "dictionary-name": "wan-aggregate-ipv4-addresses",
+ "dictionary-name": "sample-mdsal-source",
"dictionary-source": "mdsal",
"dependencies": [
"service-instance-id"
@@ -313,7 +313,7 @@
}
},
"input-param": false,
- "dictionary-name": "licenses",
+ "dictionary-name": "sample-licenses",
"dictionary-source": "mdsal",
"dependencies": [
"service-instance-id"
diff --git a/ms/controllerblueprints/modules/service/src/test/resources/enhance/enhanced-template.json b/ms/controllerblueprints/modules/service/src/test/resources/enhance/enhanced-template.json
index bf3deffb5..531d756be 100644
--- a/ms/controllerblueprints/modules/service/src/test/resources/enhance/enhanced-template.json
+++ b/ms/controllerblueprints/modules/service/src/test/resources/enhance/enhanced-template.json
@@ -114,10 +114,6 @@
"description" : "This is Dynamic Data type definition generated from resource mapping for the config template name base-config-template.",
"version" : "1.0.0",
"properties" : {
- "bundle-mac" : {
- "required" : true,
- "type" : "string"
- },
"hostname" : {
"required" : true,
"type" : "string"
@@ -129,13 +125,9 @@
"type" : "dt-license-key"
}
},
- "wan-aggregate-ipv4-addresses" : {
- "description" : "",
+ "rs-db-source" : {
"required" : true,
- "type" : "list",
- "entry_schema" : {
- "type" : "dt-v4-aggregate"
- }
+ "type" : "string"
},
"service" : {
"required" : true,
@@ -144,6 +136,14 @@
"service-instance-id" : {
"required" : true,
"type" : "string"
+ },
+ "mdsal-source" : {
+ "description" : "",
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "dt-v4-aggregate"
+ }
}
},
"derived_from" : "tosca.datatypes.Dynamic"
@@ -206,6 +206,127 @@
"version" : "1.0.0",
"derived_from" : "tosca.nodes.Root"
},
+ "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.capabilities.Content",
+ "properties" : {
+ "content" : {
+ "required" : true,
+ "type" : "string"
+ }
+ }
+ },
+ "mapping" : {
+ "type" : "tosca.capabilities.Mapping",
+ "properties" : {
+ "mapping" : {
+ "required" : false,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "datatype-resource-assignment"
+ }
+ }
+ }
+ }
+ },
+ "derived_from" : "tosca.nodes.Artifact"
+ },
+ "tosca.nodes.Vnf" : {
+ "description" : "This is VNF Node Type",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.nodes.Root"
+ },
+ "tosca.nodes.Artifact" : {
+ "description" : "This is Deprecated Artifact Node Type.",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.nodes.Root"
+ },
+ "dg-activate-netconf" : {
+ "description" : "This is Download Netconf Directed Graph",
+ "version" : "1.0.0",
+ "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"
+ }
+ },
+ "requirements" : {
+ "component-dependency" : {
+ "capability" : "component-node",
+ "node" : "component-netconf-executor",
+ "relationship" : "tosca.relationships.DependsOn"
+ }
+ },
+ "interfaces" : {
+ "CONFIG" : {
+ "operations" : {
+ "ActivateNetconf" : {
+ "inputs" : {
+ "params" : {
+ "required" : false,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "datatype-property"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "derived_from" : "tosca.nodes.DG"
+ },
+ "source-input" : {
+ "description" : "This is Input Resource Source Node Type",
+ "version" : "1.0.0",
+ "properties" : {
+ "key" : {
+ "required" : false,
+ "type" : "string"
+ },
+ "key-dependencies" : {
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ }
+ },
+ "derived_from" : "tosca.nodes.ResourceSource"
+ },
+ "tosca.nodes.ResourceSource" : {
+ "description" : "TOSCA base type for Resource Sources",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.nodes.Root"
+ },
"component-resource-assignment" : {
"description" : "This is Resource Assignment Component API",
"version" : "1.0.0",
@@ -279,42 +400,44 @@
"version" : "1.0.0",
"derived_from" : "tosca.nodes.Root"
},
- "artifact-config-template" : {
- "description" : "This is Configuration Velocity Template",
+ "source-db" : {
+ "description" : "This is Database Resource Source Node Type",
"version" : "1.0.0",
"properties" : {
- "action-names" : {
+ "type" : {
"required" : true,
- "type" : "list",
+ "type" : "string",
+ "constraints" : [ {
+ "valid_values" : [ "SQL", "PLSQL" ]
+ } ]
+ },
+ "query" : {
+ "required" : true,
+ "type" : "string"
+ },
+ "input-key-mapping" : {
+ "required" : false,
+ "type" : "map",
"entry_schema" : {
"type" : "string"
}
- }
- },
- "capabilities" : {
- "content" : {
- "type" : "tosca.capabilities.Content",
- "properties" : {
- "content" : {
- "required" : true,
- "type" : "string"
- }
+ },
+ "output-key-mapping" : {
+ "required" : false,
+ "type" : "map",
+ "entry_schema" : {
+ "type" : "string"
}
},
- "mapping" : {
- "type" : "tosca.capabilities.Mapping",
- "properties" : {
- "mapping" : {
- "required" : false,
- "type" : "list",
- "entry_schema" : {
- "type" : "datatype-resource-assignment"
- }
- }
+ "key-dependencies" : {
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
}
}
},
- "derived_from" : "tosca.nodes.Artifact"
+ "derived_from" : "tosca.nodes.ResourceSource"
},
"vnf-netconf-device" : {
"description" : "This is VNF Device with Netconf Capability",
@@ -357,10 +480,57 @@
},
"derived_from" : "tosca.nodes.Vnf"
},
- "tosca.nodes.Vnf" : {
- "description" : "This is VNF Node Type",
+ "source-rest" : {
+ "description" : "This is Rest Resource Source Node Type",
"version" : "1.0.0",
- "derived_from" : "tosca.nodes.Root"
+ "properties" : {
+ "type" : {
+ "required" : false,
+ "type" : "string",
+ "constraints" : [ {
+ "valid_values" : [ "JSON" ]
+ } ],
+ "default" : "JSON"
+ },
+ "url-path" : {
+ "required" : true,
+ "type" : "string"
+ },
+ "path" : {
+ "required" : true,
+ "type" : "string"
+ },
+ "expression-type" : {
+ "required" : false,
+ "type" : "string",
+ "constraints" : [ {
+ "valid_values" : [ "JSON_PATH", "JSON_POINTER" ]
+ } ],
+ "default" : "JSON_PATH"
+ },
+ "input-key-mapping" : {
+ "required" : false,
+ "type" : "map",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ },
+ "output-key-mapping" : {
+ "required" : false,
+ "type" : "map",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ },
+ "key-dependencies" : {
+ "required" : true,
+ "type" : "list",
+ "entry_schema" : {
+ "type" : "string"
+ }
+ }
+ },
+ "derived_from" : "tosca.nodes.ResourceSource"
},
"component-netconf-executor" : {
"description" : "This is Netconf Transaction Configuration Component API",
@@ -440,62 +610,6 @@
}
},
"derived_from" : "tosca.nodes.Component"
- },
- "tosca.nodes.Artifact" : {
- "description" : "This is Deprecated Artifact Node Type.",
- "version" : "1.0.0",
- "derived_from" : "tosca.nodes.Root"
- },
- "dg-activate-netconf" : {
- "description" : "This is Download Netconf Directed Graph",
- "version" : "1.0.0",
- "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"
- }
- },
- "requirements" : {
- "component-dependency" : {
- "capability" : "component-node",
- "node" : "component-netconf-executor",
- "relationship" : "tosca.relationships.DependsOn"
- }
- },
- "interfaces" : {
- "CONFIG" : {
- "operations" : {
- "ActivateNetconf" : {
- "inputs" : {
- "params" : {
- "required" : false,
- "type" : "list",
- "entry_schema" : {
- "type" : "datatype-property"
- }
- }
- }
- }
- }
- }
- },
- "derived_from" : "tosca.nodes.DG"
}
},
"topology_template" : {
@@ -704,18 +818,18 @@
"mapping" : {
"properties" : {
"mapping" : [ {
- "name" : "bundle-mac",
+ "name" : "rs-db-source",
"property" : {
"required" : true,
"type" : "string"
},
"input-param" : false,
- "dictionary-name" : "bundle-mac",
+ "dictionary-name" : "sample-db-source",
"dictionary-source" : "db",
"dependencies" : [ "hostname" ],
"version" : 0
}, {
- "name" : "wan-aggregate-ipv4-addresses",
+ "name" : "mdsal-source",
"property" : {
"description" : "",
"required" : true,
@@ -725,7 +839,7 @@
}
},
"input-param" : false,
- "dictionary-name" : "wan-aggregate-ipv4-addresses",
+ "dictionary-name" : "sample-mdsal-source",
"dictionary-source" : "mdsal",
"dependencies" : [ "service-instance-id" ],
"version" : 0
@@ -787,7 +901,7 @@
}
},
"input-param" : false,
- "dictionary-name" : "licenses",
+ "dictionary-name" : "sample-licenses",
"dictionary-source" : "mdsal",
"dependencies" : [ "service-instance-id" ],
"version" : 0
diff --git a/ms/controllerblueprints/modules/service/src/test/resources/enhance/simple-enrich.json b/ms/controllerblueprints/modules/service/src/test/resources/enhance/simple-enrich.json
deleted file mode 100644
index 641da80a2..000000000
--- a/ms/controllerblueprints/modules/service/src/test/resources/enhance/simple-enrich.json
+++ /dev/null
@@ -1,37 +0,0 @@
-[
- {
- "name": "rs-db-source",
- "input-param": true,
- "property": {
- "type": "string",
- "required": true
- },
- "dictionary-name": "db-source",
- "dictionary-source": "db",
- "dependencies": [
- "input-source"
- ]
- },
- {
- "name": "ra-default-source",
- "input-param": true,
- "property": {
- "type": "string",
- "required": true
- },
- "dictionary-name": "default-source",
- "dictionary-source": "default",
- "dependencies": []
- },
- {
- "name": "ra-input-source",
- "input-param": true,
- "property": {
- "type": "string",
- "required": true
- },
- "dictionary-name": "input-source",
- "dictionary-source": "input",
- "dependencies": []
- }
-]
diff --git a/ms/controllerblueprints/modules/service/src/test/resources/logback.xml b/ms/controllerblueprints/modules/service/src/test/resources/logback.xml
index 4a04cfdca..7b7ef7565 100644
--- a/ms/controllerblueprints/modules/service/src/test/resources/logback.xml
+++ b/ms/controllerblueprints/modules/service/src/test/resources/logback.xml
@@ -1,5 +1,6 @@
<!--
~ Copyright © 2018 IBM.
+ ~ Modifications Copyright © 2017-2018 AT&T Intellectual Property.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
@@ -27,8 +28,8 @@
</appender>
- <logger name="org.springframework" level="info"/>
- <logger name="org.springframework.web" level="info"/>
+ <logger name="org.springframework" level="warn"/>
+ <logger name="org.springframework.web" level="warn"/>
<logger name="org.hibernate" level="error"/>
<logger name="org.onap.ccsdk.apps" level="info"/>
diff --git a/ms/controllerblueprints/modules/service/src/test/resources/resourcedictionary/automap.json b/ms/controllerblueprints/modules/service/src/test/resources/resourcedictionary/automap.json
index 5a2a4ec02..c6dd7948b 100644
--- a/ms/controllerblueprints/modules/service/src/test/resources/resourcedictionary/automap.json
+++ b/ms/controllerblueprints/modules/service/src/test/resources/resourcedictionary/automap.json
@@ -1,11 +1,14 @@
[
{
- "name": "input-source"
+ "name": "sample-input-source"
},
{
- "name": "v4-ip-type"
+ "name": "sample-default-source"
},
{
- "name": "db-source"
+ "name": "sample-db-source"
+ },
+ {
+ "name": "sample-mdsal-source"
}
] \ No newline at end of file