summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints
diff options
context:
space:
mode:
Diffstat (limited to 'ms/controllerblueprints')
-rw-r--r--ms/controllerblueprints/application/load/model_type/node_type/component-netconf-executor.json4
-rw-r--r--ms/controllerblueprints/application/opt/app/onap/config/application.properties9
-rw-r--r--ms/controllerblueprints/application/src/test/resources/application.properties9
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/artifact_type/artifact-mapping-resource.json8
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/artifact_type/artifact-script-python.json8
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/artifact_type/artifact-template-velocity.json8
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/data_type/datatype-resource-assignment.json46
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/data_type/dt-license-key.json11
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/data_type/dt-v4-aggregate.json15
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/node_type/artifact-config-template.json37
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/node_type/component-config-generator.json72
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/node_type/component-netconf-edit.json95
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/node_type/component-netconf-executor.json79
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/node_type/component-netconf-get.json61
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/node_type/component-resource-assignment.json68
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/node_type/component-transaction-netconf.json93
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/node_type/dg-activate-netconf.json66
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/node_type/dg-config-generator.json65
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/node_type/dg-resource-assign-activate.json70
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/node_type/dg-resource-assignment.json65
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/node_type/source-db.json44
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/node_type/source-default.json18
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/node_type/source-input.json18
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/node_type/source-rest.json61
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/node_type/tosca.nodes.ResourceSource.json5
-rw-r--r--ms/controllerblueprints/modules/service/load/model_type/node_type/vnf-netconf-device.json42
-rw-r--r--ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/DataBaseInitService.java14
-rw-r--r--ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepository.kt5
-rw-r--r--ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepositoryTest.java27
-rw-r--r--ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRestTest.java15
-rw-r--r--ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ServiceTemplateRestTest.java5
-rw-r--r--ms/controllerblueprints/modules/service/src/test/resources/application.properties9
-rw-r--r--ms/controllerblueprints/modules/service/src/test/resources/model_type/data_type/datatype-property.json (renamed from ms/controllerblueprints/modules/service/load/model_type/data_type/datatype-property.json)0
33 files changed, 71 insertions, 1081 deletions
diff --git a/ms/controllerblueprints/application/load/model_type/node_type/component-netconf-executor.json b/ms/controllerblueprints/application/load/model_type/node_type/component-netconf-executor.json
index aed667aa..240caf3f 100644
--- a/ms/controllerblueprints/application/load/model_type/node_type/component-netconf-executor.json
+++ b/ms/controllerblueprints/application/load/model_type/node_type/component-netconf-executor.json
@@ -23,12 +23,12 @@
"required": true,
"type": "string"
},
- "service-template-name": {
+ "template-name": {
"description": "Service Template Name",
"required": true,
"type": "string"
},
- "service-template-version": {
+ "template-version": {
"description": "Service Template Version",
"required": true,
"type": "string"
diff --git a/ms/controllerblueprints/application/opt/app/onap/config/application.properties b/ms/controllerblueprints/application/opt/app/onap/config/application.properties
index 3b6033e7..2d355d65 100644
--- a/ms/controllerblueprints/application/opt/app/onap/config/application.properties
+++ b/ms/controllerblueprints/application/opt/app/onap/config/application.properties
@@ -1,5 +1,6 @@
#
-# Copyright © 2017-2018 AT&T Intellectual Property.
+# 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.
@@ -48,4 +49,8 @@ spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
#Load Blueprints
# blueprints.load.initial-data may be overridden by ENV variables
blueprints.load.initial-data=true
-blueprints.load.path=load \ No newline at end of file
+load.dataTypePath=load/model_type/data_type
+load.nodeTypePath=load/model_type/node_type
+load.artifactTypePath=load/model_type/artifact_type
+load.resourceDictionaryPath=load/resource_dictionary
+load.blueprintsPath=load/blueprints \ No newline at end of file
diff --git a/ms/controllerblueprints/application/src/test/resources/application.properties b/ms/controllerblueprints/application/src/test/resources/application.properties
index a63ed5b7..3bcbbd9c 100644
--- a/ms/controllerblueprints/application/src/test/resources/application.properties
+++ b/ms/controllerblueprints/application/src/test/resources/application.properties
@@ -1,5 +1,6 @@
#
-# Copyright © 2017-2018 AT&T Intellectual Property.
+# 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.
@@ -28,4 +29,8 @@ swagger.contact.email=brindasanth@onap.com
#Load Blueprints
# blueprints.load.initial-data may be overridden by ENV variables
blueprints.load.initial-data=true
-blueprints.load.path=load \ No newline at end of file
+load.dataTypePath=load/model_type/data_type
+load.nodeTypePath=load/model_type/node_type
+load.artifactTypePath=load/model_type/artifact_type
+load.resourceDictionaryPath=load/resource_dictionary
+load.blueprintsPath=load/blueprints \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/artifact_type/artifact-mapping-resource.json b/ms/controllerblueprints/modules/service/load/model_type/artifact_type/artifact-mapping-resource.json
deleted file mode 100644
index 0a3261b0..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/artifact_type/artifact-mapping-resource.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "description": " Velocity Template Resource Mapping File used along with Configuration template",
- "version": "1.0.0",
- "file_ext": [
- "json"
- ],
- "derived_from": "tosca.artifacts.Implementation"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/artifact_type/artifact-script-python.json b/ms/controllerblueprints/modules/service/load/model_type/artifact_type/artifact-script-python.json
deleted file mode 100644
index b48d2b62..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/artifact_type/artifact-script-python.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "description": " Kotlin Script Template used for Configuration",
- "version": "1.0.0",
- "file_ext": [
- "py"
- ],
- "derived_from": "tosca.artifacts.Implementation"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/artifact_type/artifact-template-velocity.json b/ms/controllerblueprints/modules/service/load/model_type/artifact_type/artifact-template-velocity.json
deleted file mode 100644
index 9395d397..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/artifact_type/artifact-template-velocity.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "description": " Velocity Template used for Configuration",
- "version": "1.0.0",
- "file_ext": [
- "vtl"
- ],
- "derived_from": "tosca.artifacts.Implementation"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/data_type/datatype-resource-assignment.json b/ms/controllerblueprints/modules/service/load/model_type/data_type/datatype-resource-assignment.json
deleted file mode 100644
index cc9816eb..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/data_type/datatype-resource-assignment.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "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"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/data_type/dt-license-key.json b/ms/controllerblueprints/modules/service/load/model_type/data_type/dt-license-key.json
deleted file mode 100644
index e9c312b7..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/data_type/dt-license-key.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "version": "1.0.0",
- "description": "This is dt-plicense-key Data Type",
- "properties": {
- "license-key": {
- "required": true,
- "type": "string"
- }
- },
- "derived_from": "tosca.datatypes.Root"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/data_type/dt-v4-aggregate.json b/ms/controllerblueprints/modules/service/load/model_type/data_type/dt-v4-aggregate.json
deleted file mode 100644
index 842a7f80..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/data_type/dt-v4-aggregate.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "version": "1.0.0",
- "description": "This is dt-v4-aggregate Data Type",
- "properties": {
- "ipv4-address": {
- "required": true,
- "type": "string"
- },
- "ipv4-plen": {
- "required": false,
- "type": "integer"
- }
- },
- "derived_from": "tosca.datatypes.Root"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/node_type/artifact-config-template.json b/ms/controllerblueprints/modules/service/load/model_type/node_type/artifact-config-template.json
deleted file mode 100644
index be9bbfc0..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/node_type/artifact-config-template.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "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"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/node_type/component-config-generator.json b/ms/controllerblueprints/modules/service/load/model_type/node_type/component-config-generator.json
deleted file mode 100644
index 764f9e89..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/node_type/component-config-generator.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "description": "This is Generate Configuration Component API",
- "version": "1.0.0",
- "capabilities": {
- "component-node": {
- "type": "tosca.capabilities.Node"
- }
- },
- "interfaces": {
- "org-openecomp-sdnc-config-generator-service-ConfigGeneratorNode": {
- "operations": {
- "process": {
- "inputs": {
- "template-data": {
- "description": "Conditional : JSON string which is used to mash with template. Either template-data or ( resource-id and resource-type ) should be present",
- "required": false,
- "type": "string"
- },
- "template-content": {
- "description": "Conditional : Dynamic Template used to generate Configuration.",
- "required": false,
- "type": "string"
- },
- "resource-type": {
- "description": "Conditional : resource-type used to pull the data content from the data base. Either template-data or ( resource-id and resource-type ) should be present",
- "required": false,
- "type": "string"
- },
- "request-id": {
- "description": "Request Id used to store the generated configuration, in the database along with the template-name",
- "required": true,
- "type": "string"
- },
- "resource-id": {
- "description": "Conditional : Id used to pull the data content from the data base. Either template-data or ( resource-id and resource-type ) should be present",
- "required": false,
- "type": "string"
- },
- "action-name": {
- "description": "Conditional : Action Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",
- "required": false,
- "type": "string"
- },
- "template-name": {
- "description": "Conditional : Name of the Artifact Node Template, to get the template Content. If template-content is present, then content wont be reterived from the Artifact Node Template.",
- "required": true,
- "type": "string"
- }
- },
- "outputs": {
- "generated-config": {
- "description": "Generated Configuration for the Template adn Resource Data",
- "required": true,
- "type": "string"
- },
- "mask-info": {
- "description": "If template contains mask encription keys, then this mask-info field will be generated, This JSON Content alligns to the bean org.onap.ccsdk.apps.controllerblueprints.core.data.custom.MaskInfo ",
- "required": false,
- "type": "string"
- },
- "status": {
- "description": "Status of the Component Execution ( success or failure )",
- "required": true,
- "type": "string"
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Component"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/node_type/component-netconf-edit.json b/ms/controllerblueprints/modules/service/load/model_type/node_type/component-netconf-edit.json
deleted file mode 100644
index 144e1dde..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/node_type/component-netconf-edit.json
+++ /dev/null
@@ -1,95 +0,0 @@
-{
- "description": "This is Netconf Edit Configuration Component API",
- "version": "1.0.0",
- "capabilities": {
- "component-node": {
- "type": "tosca.capabilities.Node"
- }
- },
- "interfaces": {
- "org-openecomp-sdnc-netconf-adaptor-service-SimpleNetconfEditConfigNode": {
- "operations": {
- "process": {
- "inputs": {
- "template-name": {
- "description": "Template name used by the Components during processing",
- "required": false,
- "type": "string"
- },
- "rpc-message": {
- "description": "If the message is Neconf RPC message,It should be true or false.",
- "required": false,
- "type": "boolean",
- "default": false
- },
- "wait": {
- "description": "Delay time in sec before performing edit-config action.",
- "required": false,
- "type": "integer",
- "default": 0
- },
- "unlock": {
- "description": "If unLock command has to send before Edit Configuration.",
- "required": false,
- "type": "boolean",
- "default": false
- },
- "config-target": {
- "required": false,
- "type": "string"
- },
- "commit": {
- "description": "Issue commit command to the device after performing edit-config action.",
- "required": false,
- "type": "boolean",
- "default": false
- },
- "edit-default-operation": {
- "required": false,
- "type": "string"
- },
- "content": {
- "description": "Static messgae content, If this is not set, need to have Requirement relationship to Artifact contents.",
- "required": false,
- "type": "string"
- },
- "lock": {
- "description": "Issue lock command to the device before performing edit-config action.",
- "required": false,
- "type": "boolean",
- "default": false
- },
- "post-restart-wait": {
- "description": "If Restart command should be issued before the Edit Operation, Provide the time to wait after restart. 0 meanno restart required or wait time in sec ex : 3000 for 5 ",
- "required": false,
- "type": "integer",
- "default": 0
- },
- "pre-restart-wait": {
- "description": "If Restart command should be issued after the Edit Operation, Provide the time to wait after restart. 0 meanno restart required or wait time in sec ex : 3000 for 5 ",
- "required": false,
- "type": "integer",
- "default": 0
- },
- "message-time-out": {
- "required": false,
- "type": "integer",
- "default": 30
- }
- },
- "outputs": {
- "rpc-response-message": {
- "type": "string"
- },
- "status": {
- "description": "Status of the Component Execution ( success or failure )",
- "required": true,
- "type": "string"
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Component"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/node_type/component-netconf-executor.json b/ms/controllerblueprints/modules/service/load/model_type/node_type/component-netconf-executor.json
deleted file mode 100644
index 240caf3f..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/node_type/component-netconf-executor.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "description": "This is Netconf Transaction Configuration Component API",
- "version": "1.0.0",
- "capabilities": {
- "component-node": {
- "type": "tosca.capabilities.Node"
- }
- },
- "requirements": {
- "netconf-connection": {
- "capability": "netconf",
- "node": "vnf-netconf-device",
- "relationship": "tosca.relationships.ConnectsTo"
- }
- },
- "interfaces": {
- "org-openecomp-sdnc-netconf-adaptor-service-NetconfExecutorNode": {
- "operations": {
- "process": {
- "inputs": {
- "request-id": {
- "description": "Request Id used to store the generated configuration, in the database along with the template-name",
- "required": true,
- "type": "string"
- },
- "template-name": {
- "description": "Service Template Name",
- "required": true,
- "type": "string"
- },
- "template-version": {
- "description": "Service Template Version",
- "required": true,
- "type": "string"
- },
- "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"
- },
- "resource-type": {
- "description": "Resource Type 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"
- },
- "resource-id": {
- "description": "Resource Id 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"
- },
- "reservation-id": {
- "description": "Reservation Id used to send to NPM",
- "required": false,
- "type": "string"
- },
- "execution-script": {
- "description": "Python Script to Execute for this Component action, It should refer any one of Prython Artifact Definition for this Node Template.",
- "required": true,
- "type": "string"
- }
- },
- "outputs": {
- "response-data": {
- "description": "Execution Response Data in JSON format.",
- "required": false,
- "type": "string"
- },
- "status": {
- "description": "Status of the Component Execution ( success or failure )",
- "required": true,
- "type": "string"
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Component"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/node_type/component-netconf-get.json b/ms/controllerblueprints/modules/service/load/model_type/node_type/component-netconf-get.json
deleted file mode 100644
index 1659bf41..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/node_type/component-netconf-get.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "description": "This is Netconf Get Running Configuration Component API",
- "version": "1.0.0",
- "capabilities": {
- "component-node": {
- "type": "tosca.capabilities.Node"
- }
- },
- "interfaces": {
- "org-openecomp-sdnc-netconf-adaptor-service-SimpleNetconfGetConfigNode": {
- "operations": {
- "process": {
- "inputs": {
- "template-name": {
- "description": "Template name used by the Components during processing",
- "required": false,
- "type": "string"
- },
- "rpc-message": {
- "description": "It should be true, If the message is Neconf RPC message, It should be false If it is plain Config message.",
- "required": false,
- "type": "boolean",
- "default": false
- },
- "wait": {
- "required": false,
- "type": "integer",
- "default": 0
- },
- "lock": {
- "required": false,
- "type": "boolean",
- "default": false
- },
- "content": {
- "description": "Static messgae content, If this is not set, need to have Requirement relationship to Artifact contents.",
- "required": false,
- "type": "string"
- },
- "message-time-out": {
- "required": false,
- "type": "integer",
- "default": 30
- }
- },
- "outputs": {
- "config-message": {
- "type": "string"
- },
- "status": {
- "description": "Status of the Component Execution ( success or failure )",
- "required": true,
- "type": "string"
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Component"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/node_type/component-resource-assignment.json b/ms/controllerblueprints/modules/service/load/model_type/node_type/component-resource-assignment.json
deleted file mode 100644
index 34c02848..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/node_type/component-resource-assignment.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "description": "This is Resource Assignment Component API",
- "version": "1.0.0",
- "capabilities": {
- "component-node": {
- "type": "tosca.capabilities.Node"
- }
- },
- "interfaces": {
- "org-openecomp-sdnc-config-assignment-service-ConfigAssignmentNode": {
- "operations": {
- "process": {
- "inputs": {
- "service-template-name": {
- "description": "Service Template Name.",
- "required": true,
- "type": "string"
- },
- "service-template-version": {
- "description": "Service Template Version.",
- "required": true,
- "type": "string"
- },
- "resource-type": {
- "description": "Request type.",
- "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, Unique Id for the request.",
- "required": true,
- "type": "string"
- },
- "resource-id": {
- "description": "Resource Id.",
- "required": true,
- "type": "string"
- },
- "action-name": {
- "description": "Action Name of the process",
- "required": true,
- "type": "string"
- }
- },
- "outputs": {
- "resource-assignment-params": {
- "required": true,
- "type": "string"
- },
- "status": {
- "required": true,
- "type": "string"
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Component"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/node_type/component-transaction-netconf.json b/ms/controllerblueprints/modules/service/load/model_type/node_type/component-transaction-netconf.json
deleted file mode 100644
index 7c374584..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/node_type/component-transaction-netconf.json
+++ /dev/null
@@ -1,93 +0,0 @@
-{
- "description": "This is Netconf Transaction Configuration Component API",
- "version": "1.0.0",
- "capabilities": {
- "component-node": {
- "type": "tosca.capabilities.Node"
- }
- },
- "requirements": {
- "netconf-connection": {
- "capability": "netconf",
- "node": "vnf-netconf-device",
- "relationship": "tosca.relationships.ConnectsTo"
- }
- },
- "interfaces": {
- "org-openecomp-sdnc-netconf-adaptor-service-NetconfTransactionNode": {
- "operations": {
- "process": {
- "inputs": {
- "rollback": {
- "required": false,
- "type": "boolean"
- },
- "assignment-action-name": {
- "description": "Assignment 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": true,
- "type": "string"
- },
- "transaction-components": {
- "description": "Components used to used for the atomic transaction, Default Handlers are org.openecomp.sdnc.netconf.adaptor.service.SimpleNetconfEditConfigNode and org.openecomp.sdnc.netconf.adaptor.service.SimpleNetconfGetConfigNode",
- "required": true,
- "type": "list",
- "entry_schema": {
- "type": "string"
- }
- },
- "resource-type": {
- "description": "Resource Type 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"
- },
- "initialise-sftp": {
- "required": false,
- "type": "boolean"
- },
- "request-id": {
- "description": "Request Id used to store the generated configuration, in the database along with the template-name",
- "required": true,
- "type": "string"
- },
- "initialise-ssh": {
- "required": false,
- "type": "boolean"
- },
- "lock": {
- "required": false,
- "type": "boolean",
- "default": false
- },
- "unlock": {
- "description": "If unLock command has to send before Edit Configuration.",
- "required": false,
- "type": "boolean",
- "default": false
- },
- "resource-id": {
- "description": "Resource Id 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"
- },
- "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"
- }
- },
- "outputs": {
- "rpc-response-message": {
- "type": "string"
- },
- "status": {
- "description": "Status of the Component Execution ( success or failure )",
- "required": true,
- "type": "string"
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Component"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/node_type/dg-activate-netconf.json b/ms/controllerblueprints/modules/service/load/model_type/node_type/dg-activate-netconf.json
deleted file mode 100644
index a9d16edd..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/node_type/dg-activate-netconf.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "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"
- },
- "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-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"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/node_type/dg-config-generator.json b/ms/controllerblueprints/modules/service/load/model_type/node_type/dg-config-generator.json
deleted file mode 100644
index 6794b3c8..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/node_type/dg-config-generator.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "description": "This is Activate DG for Config Generator Directed Graph",
- "version": "1.0.0",
- "properties": {
- "mode": {
- "required": false,
- "type": "string",
- "default": "sync"
- },
- "version": {
- "required": false,
- "type": "string",
- "default": "LATEST"
- },
- "is-start-flow": {
- "required": false,
- "type": "boolean",
- "default": false
- }
- },
- "capabilities": {
- "dg-node": {
- "type": "tosca.capabilities.Node"
- },
- "content": {
- "type": "tosca.capability.Content",
- "properties": {
- "type": {
- "required": false,
- "type": "string",
- "default": "json"
- },
- "content": {
- "required": true,
- "type": "string"
- }
- }
- }
- },
- "requirements": {
- "component-dependency": {
- "capability": "component-node",
- "node": "component-config-generator",
- "relationship": "tosca.relationships.DependsOn"
- }
- },
- "interfaces": {
- "CONFIG": {
- "operations": {
- "GenerateConfiguration": {
- "inputs": {
- "params": {
- "required": false,
- "type": "list",
- "entry_schema": {
- "type": "datatype-property"
- }
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.DG"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/node_type/dg-resource-assign-activate.json b/ms/controllerblueprints/modules/service/load/model_type/node_type/dg-resource-assign-activate.json
deleted file mode 100644
index 22a4d813..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/node_type/dg-resource-assign-activate.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "description": "This is Resource Assign and Activate 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"
- },
- "content": {
- "type": "tosca.capability.Content",
- "properties": {
- "type": {
- "required": false,
- "type": "string",
- "default": "json"
- },
- "content": {
- "required": false,
- "type": "string"
- }
- }
- }
- },
- "requirements": {
- "ra-component": {
- "capability": "component-node",
- "node": "component-resource-assignment",
- "relationship": "tosca.relationships.DependsOn"
- },
- "netconf-component": {
- "capability": "component-node",
- "node": "component-netconf-executor",
- "relationship": "tosca.relationships.DependsOn"
- }
- },
- "interfaces": {
- "CONFIG": {
- "operations": {
- "ResourceAssignAndActivate": {
- "inputs": {
- "params": {
- "required": false,
- "type": "list",
- "entry_schema": {
- "type": "datatype-property"
- }
- }
- }
- }
- }
- }
- },
- "derived_from": "tosca.nodes.DG"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/node_type/dg-resource-assignment.json b/ms/controllerblueprints/modules/service/load/model_type/node_type/dg-resource-assignment.json
deleted file mode 100644
index 7c01faa1..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/node_type/dg-resource-assignment.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "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": false,
- "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"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/node_type/source-db.json b/ms/controllerblueprints/modules/service/load/model_type/node_type/source-db.json
deleted file mode 100644
index 661a9503..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/node_type/source-db.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "description": "This is Database Resource Source Node Type",
- "version": "1.0.0",
- "properties": {
- "type": {
- "required": true,
- "type": "string",
- "constraints": [
- {
- "valid_values": [
- "SQL",
- "PLSQL"
- ]
- }
- ]
- },
- "query": {
- "required": true,
- "type": "string"
- },
- "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"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/node_type/source-default.json b/ms/controllerblueprints/modules/service/load/model_type/node_type/source-default.json
deleted file mode 100644
index 13e234e1..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/node_type/source-default.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "description": "This is Default 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"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/node_type/source-input.json b/ms/controllerblueprints/modules/service/load/model_type/node_type/source-input.json
deleted file mode 100644
index 126ea30b..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/node_type/source-input.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "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"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/node_type/source-rest.json b/ms/controllerblueprints/modules/service/load/model_type/node_type/source-rest.json
deleted file mode 100644
index f8dd8b6f..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/node_type/source-rest.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "description": "This is Rest Resource Source Node Type",
- "version": "1.0.0",
- "properties": {
- "type": {
- "required": false,
- "type": "string",
- "default": "JSON",
- "constraints": [
- {
- "valid_values": [
- "JSON"
- ]
- }
- ]
- },
- "url-path": {
- "required": true,
- "type": "string"
- },
- "path": {
- "required": true,
- "type": "string"
- },
- "expression-type": {
- "required": false,
- "type": "string",
- "default": "JSON_PATH",
- "constraints": [
- {
- "valid_values": [
- "JSON_PATH",
- "JSON_POINTER"
- ]
- }
- ]
- },
- "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"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/node_type/tosca.nodes.ResourceSource.json b/ms/controllerblueprints/modules/service/load/model_type/node_type/tosca.nodes.ResourceSource.json
deleted file mode 100644
index 2ef553e2..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/node_type/tosca.nodes.ResourceSource.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "description": "TOSCA base type for Resource Sources",
- "version": "1.0.0",
- "derived_from": "tosca.nodes.Root"
-} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/node_type/vnf-netconf-device.json b/ms/controllerblueprints/modules/service/load/model_type/node_type/vnf-netconf-device.json
deleted file mode 100644
index 54573bad..00000000
--- a/ms/controllerblueprints/modules/service/load/model_type/node_type/vnf-netconf-device.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "description": "This is VNF Device with Netconf Capability",
- "version": "1.0.0",
- "capabilities": {
- "netconf": {
- "type": "tosca.capability.Netconf",
- "properties": {
- "login-key": {
- "required": true,
- "type": "string",
- "default": "sdnc"
- },
- "login-account": {
- "required": true,
- "type": "string",
- "default": "sdnc-tacacs"
- },
- "source": {
- "required": true,
- "type": "string",
- "default": "npm"
- },
- "target-ip-address": {
- "required": true,
- "type": "string"
- },
- "port-number": {
- "required": true,
- "type": "integer",
- "default": 830
- },
- "connection-time-out": {
- "required": false,
- "type": "integer",
- "default": 30
- }
- }
- }
- },
- "derived_from": "tosca.nodes.Vnf"
-
-}
diff --git a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/DataBaseInitService.java b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/DataBaseInitService.java
index 88680929..c6d80cfb 100644
--- a/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/DataBaseInitService.java
+++ b/ms/controllerblueprints/modules/service/src/main/java/org/onap/ccsdk/apps/controllerblueprints/service/DataBaseInitService.java
@@ -60,16 +60,19 @@ import java.util.List;
public class DataBaseInitService {
private static EELFLogger log = EELFManager.getInstance().getLogger(DataBaseInitService.class);
- @Value("${blueprints.load.path}")
- private String modelLoadPath;
private ModelTypeService modelTypeService;
private ResourceDictionaryService resourceDictionaryService;
private ConfigModelService configModelService;
+ @Value("${load.dataTypePath}")
private String dataTypePath;
+ @Value("${load.nodeTypePath}")
private String nodeTypePath;
+ @Value("${load.artifactTypePath}")
private String artifactTypePath;
+ @Value("${load.resourceDictionaryPath}")
private String resourceDictionaryPath;
+ @Value("${load.blueprintsPath}")
private String bluePrintsPath;
@Autowired
@@ -94,13 +97,6 @@ public class DataBaseInitService {
@PostConstruct
@SuppressWarnings("unused")
private void initDatabase() {
- log.info("loading Blueprints from DIR : {}", modelLoadPath);
- dataTypePath = modelLoadPath + "/model_type/data_type";
- nodeTypePath = modelLoadPath + "/model_type/node_type";
- artifactTypePath = modelLoadPath + "/model_type/artifact_type";
- resourceDictionaryPath = modelLoadPath + "/resource_dictionary";
- bluePrintsPath = modelLoadPath + "/blueprints";
-
log.info("loading dataTypePath from DIR : {}", dataTypePath);
log.info("loading nodeTypePath from DIR : {}", nodeTypePath);
log.info("loading artifactTypePath from DIR : {}", artifactTypePath);
diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepository.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepository.kt
index 92172a2e..064b5c38 100644
--- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepository.kt
+++ b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/repository/ResourceDictionaryReactRepository.kt
@@ -22,6 +22,7 @@ import org.springframework.stereotype.Service
import reactor.core.publisher.Flux
import reactor.core.publisher.Mono
import reactor.core.scheduler.Schedulers
+
/**
* ResourceDictionaryReactRepository.
*
@@ -30,6 +31,10 @@ import reactor.core.scheduler.Schedulers
@Service
open class ResourceDictionaryReactRepository(private val resourceDictionaryRepository: ResourceDictionaryRepository) {
+ fun save(resourceDictionary: ResourceDictionary): Mono<ResourceDictionary> {
+ return Mono.justOrEmpty(resourceDictionaryRepository.save(resourceDictionary))
+ }
+
fun findByName(name: String): Mono<ResourceDictionary> {
return Mono.justOrEmpty(resourceDictionaryRepository.findByName(name))
}
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 db111885..1e740ec3 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
@@ -17,11 +17,14 @@
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;
import org.junit.runners.MethodSorters;
import org.onap.ccsdk.apps.controllerblueprints.TestApplication;
+import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;
+import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceDefinition;
import org.onap.ccsdk.apps.controllerblueprints.service.domain.ResourceDictionary;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
@@ -30,6 +33,7 @@ import org.springframework.test.context.junit4.SpringRunner;
import java.util.Arrays;
import java.util.List;
+
/**
* ResourceDictionaryReactRepositoryTest.
*
@@ -45,6 +49,16 @@ public class ResourceDictionaryReactRepositoryTest {
@Autowired
protected ResourceDictionaryReactRepository resourceDictionaryReactRepository;
+ @Before
+ public void init() {
+ ResourceDefinition resourceDefinition = JacksonUtils.readValueFromFile("load/resource_dictionary/db-source" +
+ ".json", ResourceDefinition.class);
+
+ ResourceDictionary resourceDictionary = transformResourceDictionary(resourceDefinition);
+ ResourceDictionary dbResourceDictionary = resourceDictionaryReactRepository.save(resourceDictionary).block();
+ Assert.assertNotNull("Failed to query React Resource Dictionary by Name", dbResourceDictionary);
+ }
+
@Test
public void test01FindByNameReact() throws Exception {
ResourceDictionary dbResourceDictionary = resourceDictionaryReactRepository.findByName("db-source").block();
@@ -64,4 +78,17 @@ public class ResourceDictionaryReactRepositoryTest {
resourceDictionaryReactRepository.findByTagsContainingIgnoreCase("db-source").collectList().block();
Assert.assertNotNull("Failed to query React Resource Dictionary by Tags", dbTagsResourceDictionaries);
}
+
+ private ResourceDictionary transformResourceDictionary(ResourceDefinition resourceDefinition) {
+ ResourceDictionary resourceDictionary = new ResourceDictionary();
+ resourceDictionary.setName(resourceDefinition.getName());
+ resourceDictionary.setDataType(resourceDefinition.getProperty().getType());
+ resourceDictionary.setDescription(resourceDefinition.getProperty().getDescription());
+ resourceDictionary.setResourcePath(resourceDefinition.getResourcePath());
+ resourceDictionary.setResourceType(resourceDefinition.getResourceType());
+ resourceDictionary.setTags(resourceDefinition.getTags());
+ resourceDictionary.setUpdatedBy(resourceDefinition.getUpdatedBy());
+ resourceDictionary.setDefinition(resourceDefinition);
+ return resourceDictionary;
+ }
}
diff --git a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRestTest.java b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRestTest.java
index c28abe2d..c7147490 100644
--- a/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRestTest.java
+++ b/ms/controllerblueprints/modules/service/src/test/java/org/onap/ccsdk/apps/controllerblueprints/service/rs/ModelTypeRestTest.java
@@ -1,5 +1,6 @@
/*
* 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.
@@ -54,13 +55,14 @@ public class ModelTypeRestTest {
@After
- public void tearDown() {}
+ public void tearDown() {
+ }
@Test
public void test01SaveModelType() throws Exception {
- log.info( "**************** test01SaveModelType ********************");
+ log.info("**************** test01SaveModelType ********************");
- String content = FileUtils.readFileToString(new File("load/model_type/data_type/datatype-property.json"), Charset.defaultCharset());
+ String content = JacksonUtils.getClassPathFileContent("model_type/data_type/datatype-property.json");
ModelType modelType = new ModelType();
modelType.setDefinitionType(BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE);
modelType.setDerivedFrom(BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT);
@@ -72,7 +74,7 @@ public class ModelTypeRestTest {
+ BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE);
modelType.setUpdatedBy("xxxxxx@xxx.com");
modelType = modelTypeRest.saveModelType(modelType);
- log.info( "Saved Mode {}", modelType.toString());
+ log.info("Saved Mode {}", modelType.toString());
Assert.assertNotNull("Failed to get Saved ModelType", modelType);
Assert.assertNotNull("Failed to get Saved ModelType, Id", modelType.getModelName());
@@ -90,7 +92,7 @@ public class ModelTypeRestTest {
@Test
public void test02SearchModelTypes() throws Exception {
- log.info( "*********************** test02SearchModelTypes ***************************");
+ log.info("*********************** test02SearchModelTypes ***************************");
String tags = "test-datatype";
@@ -102,7 +104,7 @@ public class ModelTypeRestTest {
@Test
public void test03GetModelType() throws Exception {
- log.info( "************************* test03GetModelType *********************************");
+ log.info("************************* test03GetModelType *********************************");
ModelType dbModelType = modelTypeRest.getModelTypeByName(modelName);
Assert.assertNotNull("Failed to get response for api call getModelByName ", dbModelType);
Assert.assertNotNull("Failed to get Id for api call getModelByName ", dbModelType.getModelName());
@@ -125,5 +127,4 @@ public class ModelTypeRestTest {
}
-
}
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 217eb8f0..faa10825 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
@@ -1,5 +1,6 @@
/*
* 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.
@@ -127,10 +128,10 @@ public class ServiceTemplateRestTest {
public void test05AutoMap() throws Exception {
log.info("*********** test05AutoMap *******************************************");
- String resourceassignmentContent = FileUtils.readFileToString(
+ String resourceAssignmentContent = FileUtils.readFileToString(
new File("src/test/resources/resourcedictionary/automap.json"), Charset.defaultCharset());
List<ResourceAssignment> batchResourceAssignment =
- JacksonUtils.getListFromJson(resourceassignmentContent, ResourceAssignment.class);
+ JacksonUtils.getListFromJson(resourceAssignmentContent, ResourceAssignment.class);
AutoMapResponse autoMapResponse = serviceTemplateRest.autoMap(batchResourceAssignment);
Assert.assertNotNull("Failed to get ResourceAssignments, Return object is Null",
diff --git a/ms/controllerblueprints/modules/service/src/test/resources/application.properties b/ms/controllerblueprints/modules/service/src/test/resources/application.properties
index a13e1684..b17663e9 100644
--- a/ms/controllerblueprints/modules/service/src/test/resources/application.properties
+++ b/ms/controllerblueprints/modules/service/src/test/resources/application.properties
@@ -1,5 +1,6 @@
#
-# Copyright © 2017-2018 AT&T Intellectual Property.
+# 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.
@@ -64,4 +65,8 @@ logging.level.org.hibernate.type.descriptor.sql=debug
blueprints.load.initial-data=true
-blueprints.load.path=load \ No newline at end of file
+load.dataTypePath=./../../application/load/model_type/data_type
+load.nodeTypePath=./../../application/load/model_type/node_type
+load.artifactTypePath=./../../application/load/model_type/artifact_type
+load.resourceDictionaryPath=load/resource_dictionary
+load.blueprintsPath=./../../application/load/blueprints \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/model_type/data_type/datatype-property.json b/ms/controllerblueprints/modules/service/src/test/resources/model_type/data_type/datatype-property.json
index 5584b10e..5584b10e 100644
--- a/ms/controllerblueprints/modules/service/load/model_type/data_type/datatype-property.json
+++ b/ms/controllerblueprints/modules/service/src/test/resources/model_type/data_type/datatype-property.json