aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/service/load
diff options
context:
space:
mode:
authorBrinda Santh <brindasanth@in.ibm.com>2018-08-26 16:20:04 -0400
committerBrinda Santh <brindasanth@in.ibm.com>2018-08-26 16:20:04 -0400
commit48c15ed0d02d98acac81773d84e928d0bd5ff07d (patch)
tree0a9e7bfad8689014e2e86984c1dc1d0dc7e4378f /ms/controllerblueprints/modules/service/load
parent7b23a92a3d079940193eaf141ff8494851b49d61 (diff)
Controller Blueprints Microservice
Add Standardized resource definition in Initial data loading and Dictionary management services. Change-Id: Ib33ba2ecf3cb1e1fb9b5dea71532e6bc8280bcbb Issue-ID: CCSDK-487 Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/controllerblueprints/modules/service/load')
-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/resource_dictionary/db-source.json25
-rw-r--r--ms/controllerblueprints/modules/service/load/resource_dictionary/input-source.json16
-rw-r--r--ms/controllerblueprints/modules/service/load/resource_dictionary/v4-ip-type.json29
8 files changed, 187 insertions, 29 deletions
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
new file mode 100644
index 000000000..661a9503b
--- /dev/null
+++ b/ms/controllerblueprints/modules/service/load/model_type/node_type/source-db.json
@@ -0,0 +1,44 @@
+{
+ "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
new file mode 100644
index 000000000..13e234e1b
--- /dev/null
+++ b/ms/controllerblueprints/modules/service/load/model_type/node_type/source-default.json
@@ -0,0 +1,18 @@
+{
+ "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
new file mode 100644
index 000000000..126ea30bd
--- /dev/null
+++ b/ms/controllerblueprints/modules/service/load/model_type/node_type/source-input.json
@@ -0,0 +1,18 @@
+{
+ "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
new file mode 100644
index 000000000..f8dd8b6fc
--- /dev/null
+++ b/ms/controllerblueprints/modules/service/load/model_type/node_type/source-rest.json
@@ -0,0 +1,61 @@
+{
+ "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
new file mode 100644
index 000000000..2ef553e24
--- /dev/null
+++ b/ms/controllerblueprints/modules/service/load/model_type/node_type/tosca.nodes.ResourceSource.json
@@ -0,0 +1,5 @@
+{
+ "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/resource_dictionary/db-source.json b/ms/controllerblueprints/modules/service/load/resource_dictionary/db-source.json
index 862523544..cd4e282b4 100644
--- a/ms/controllerblueprints/modules/service/load/resource_dictionary/db-source.json
+++ b/ms/controllerblueprints/modules/service/load/resource_dictionary/db-source.json
@@ -1,20 +1,25 @@
{
"name": "bundle-id",
- "description": "name of the ",
+ "property" :{
+ "description": "name of the ",
+ "type": "string"
+ },
"resource-type": "ONAP",
"resource-path": "vnf/bundle-id",
"updated-by": "brindasanth@onap.com",
- "data-type": "String",
"tags": "bundle-id, brindasanth@onap.com",
- "source": {
+ "sources": {
"db": {
- "query": "SELECT bundle-id FROM DEVICE_PROFILE WHERE profile_name = :profile_name",
- "input-key-mapping": {
- "profile_name": "profile_name"
- },
- "output-key-mapping": {
- "db-country": "country",
- "db-state": "state"
+ "type": "source-db",
+ "properties": {
+ "query": "SELECT db-country, db-state FROM DEVICE_PROFILE WHERE profile_name = :profile_name",
+ "input-key-mapping": {
+ "profile_name": "profile_name"
+ },
+ "output-key-mapping": {
+ "db-country": "country",
+ "db-state": "state"
+ }
}
}
},
diff --git a/ms/controllerblueprints/modules/service/load/resource_dictionary/input-source.json b/ms/controllerblueprints/modules/service/load/resource_dictionary/input-source.json
index 35736b663..c34c252b3 100644
--- a/ms/controllerblueprints/modules/service/load/resource_dictionary/input-source.json
+++ b/ms/controllerblueprints/modules/service/load/resource_dictionary/input-source.json
@@ -1,17 +1,19 @@
{
"name": "action-name",
+ "property" :{
+ "description": "name of the ",
+ "type": "string"
+ },
"resource-path": "action-name",
"resource-type": "ONAP",
- "description": "To be provided",
- "valid-values": null,
- "sample-value": null,
"updated-by": "brindasanth@onap.com",
"tags": null,
- "default": null,
- "data-type": "string",
- "source": {
+ "sources": {
"input": {
- "key": "action-name"
+ "type": "source-input",
+ "properties": {
+ "key": "action-name"
+ }
}
}
} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/service/load/resource_dictionary/v4-ip-type.json b/ms/controllerblueprints/modules/service/load/resource_dictionary/v4-ip-type.json
index c6c0f9851..349183bd9 100644
--- a/ms/controllerblueprints/modules/service/load/resource_dictionary/v4-ip-type.json
+++ b/ms/controllerblueprints/modules/service/load/resource_dictionary/v4-ip-type.json
@@ -1,14 +1,19 @@
{
- "tags": "v4-ip-type, tosca.datatypes.Root, data_type, brindasanth@onap.com",
- "name": "v4-ip-type",
- "description": "To be provided",
- "updated-by": "brindasanth@onap.com",
- "resource-type": "ONAP",
- "resource-path": "vnf/v4-ip-type",
- "data-type": "string",
- "source": {
- "input": {
-
- }
- }
+ "name": "v4-ip-type",
+ "property": {
+ "description": "name of the ",
+ "type": "string"
+ },
+ "resource-path": "vnf/v4-ip-type",
+ "resource-type": "ONAP",
+ "updated-by": "brindasanth@onap.com",
+ "tags": null,
+ "sources": {
+ "input": {
+ "type": "source-input",
+ "properties": {
+ "key": "v4-ip-type"
+ }
+ }
+ }
} \ No newline at end of file