diff options
author | JakobKrieg <jakob.krieg@bcmsolutions.de> | 2020-10-23 13:28:42 +0200 |
---|---|---|
committer | Jozsef Csongvai <jozsef.csongvai@bell.ca> | 2020-10-28 21:33:48 +0000 |
commit | 7b6da0e35be54ac5ce92458454a6e8d0b83031fd (patch) | |
tree | 5b04ceae67d11e86262cd22145f7ff80b01a181b /components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions | |
parent | cf1e08373c11c19ef6acf6f1390225c6e9ccf4eb (diff) |
Simplify PNF-DEMO CBA
- fix reference issues causing enrichment/validation to fail
- remove redundant data dictionaries
- remove redundant template & mapping
- rename node-templates for clarity
- add workflow outputs for better feedback
- remove bash scripts which belong in documentation
Issue-ID: CCSDK-2859
Change-Id: I12095f37ff20fcfeee6af43aef3bd221b2ab1ef7
Signed-off-by: JakobKrieg <jakob.krieg@bcmsolutions.de>
Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca>
Diffstat (limited to 'components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions')
5 files changed, 241 insertions, 460 deletions
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/data_types.json b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/data_types.json index b95918518..b1335f689 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/data_types.json +++ b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/data_types.json @@ -1,162 +1,15 @@ { - "data_types": { - "dt-config-assign-properties": { - "description": "Dynamic DataType definition for workflow(config-assign).", - "version": "1.0.0", - "properties": { - "netconf-server-port": { - "description": "", - "required": true, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "pnf-ipv4-address": { - "description": "", - "required": true, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "netconf-username": { - "description": "", - "required": true, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "pnf-id": { - "description": "", - "required": true, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "netconf-password": { - "description": "", - "required": true, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "stream-count": { - "description": "", - "required": true, - "type": "integer", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } + "data_types" : { + "dt-config-assign-properties" : { + "description" : "Dynamic DataType definition for workflow(config-assign).", + "version" : "1.0.0", + "properties" : { + "stream-count" : { + "required" : true, + "type" : "integer" } }, - "derived_from": "tosca.datatypes.Dynamic" - }, - "dt-config-deploy-properties": { - "description": "Dynamic DataType definition for workflow(config-assign).", - "version": "1.0.0", - "properties": { - "netconf-server-port": { - "description": "", - "required": true, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "pnf-ipv4-address": { - "description": "", - "required": true, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "netconf-username": { - "description": "", - "required": true, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "pnf-id": { - "description": "", - "required": true, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "netconf-password": { - "description": "", - "required": true, - "type": "string", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - }, - "stream-count": { - "description": "", - "required": true, - "type": "integer", - "status": "", - "constraints": [ - {} - ], - "entry_schema": { - "type": "" - } - } - }, - "derived_from": "tosca.datatypes.Dynamic" + "derived_from" : "tosca.datatypes.Dynamic" } } }
\ No newline at end of file diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/node_types.json b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/node_types.json index 30d0749b2..1c9a6e011 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/node_types.json +++ b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/node_types.json @@ -1,5 +1,77 @@ { "node_types" : { + "component-netconf-executor" : { + "description" : "This is Netconf Transaction Configuration Component API", + "version" : "1.0.0", + "attributes" : { + "response-data" : { + "required" : false, + "type" : "json" + } + }, + "capabilities" : { + "component-node" : { + "type" : "tosca.capabilities.Node" + } + }, + "requirements" : { + "netconf-connection" : { + "capability" : "netconf", + "node" : "vnf-netconf-device", + "relationship" : "tosca.relationships.ConnectsTo" + } + }, + "interfaces" : { + "ComponentNetconfExecutor" : { + "operations" : { + "process" : { + "inputs" : { + "script-type" : { + "description" : "Script type, kotlin type is supported", + "required" : true, + "type" : "string", + "constraints" : [ { + "valid_values" : [ "kotlin", "jython", "internal" ] + } ], + "default" : "internal" + }, + "script-class-reference" : { + "description" : "Kotlin Script class name or jython script name.", + "required" : true, + "type" : "string" + }, + "instance-dependencies" : { + "description" : "Instance names to inject to Jython or Kotlin Script.", + "required" : true, + "type" : "list", + "entry_schema" : { + "type" : "string" + } + }, + "dynamic-properties" : { + "description" : "Dynamic Json Content or DSL Json reference.", + "required" : false, + "type" : "json" + } + }, + "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" + }, "component-resource-resolution" : { "description" : "This is Resource Assignment Component API", "version" : "1.0.0", @@ -100,69 +172,6 @@ }, "derived_from" : "tosca.nodes.Component" }, - "component-script-executor" : { - "description" : "This is CLI Transaction Configuration Component API", - "version" : "1.0.0", - "attributes" : { - "response-data" : { - "required" : false, - "type" : "json" - } - }, - "capabilities" : { - "component-node" : { - "type" : "tosca.capabilities.Node" - } - }, - "interfaces" : { - "ComponentScriptExecutor" : { - "operations" : { - "process" : { - "inputs" : { - "script-type" : { - "description" : "Script type, kotlin type is supported", - "required" : true, - "type" : "string", - "constraints" : [ { - "valid_values" : [ "kotlin", "jython", "internal" ] - } ], - "default" : "internal" - }, - "script-class-reference" : { - "description" : "Kotlin Script class name or jython script name.", - "required" : true, - "type" : "string" - }, - "dynamic-properties" : { - "description" : "Dynamic Json Content or DSL Json reference.", - "required" : false, - "type" : "json" - } - }, - "outputs" : { - "response-data" : { - "description" : "Execution Response Data.", - "required" : false, - "type" : "string" - }, - "status" : { - "description" : "Status of the Component Execution ( success or failure )", - "required" : true, - "type" : "string" - } - } - } - } - } - }, - "derived_from" : "tosca.nodes.Component" - }, - "source-default" : { - "description" : "This is Default Resource Source Node Type", - "version" : "1.0.0", - "properties" : { }, - "derived_from" : "tosca.nodes.ResourceSource" - }, "source-input" : { "description" : "This is Input Resource Source Node Type", "version" : "1.0.0", @@ -221,6 +230,32 @@ "default" : 30 } } + }, + "restconf" : { + "type" : "tosca.capabilities.Restconf", + "properties" : { + "login-key" : { + "required" : true, + "type" : "string" + }, + "login-account" : { + "required" : true, + "type" : "string" + }, + "target-ip-address" : { + "required" : true, + "type" : "string" + }, + "port-number" : { + "required" : true, + "type" : "integer" + }, + "connection-time-out" : { + "required" : false, + "type" : "integer", + "default" : 30 + } + } } }, "derived_from" : "tosca.nodes.Vnf" diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/pnf_netconf.json b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/pnf_netconf.json index 57f408a41..4ea8ed4d8 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/pnf_netconf.json +++ b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/pnf_netconf.json @@ -1,192 +1,163 @@ { - "tosca_definitions_version": "controller_blueprint_1_0_0", - "metadata": { - "template_author": "Aarna Services", - "author_email": "vmuthukrishnan@aarnanetworks.com", - "user_groups": "ADMIN, OPERATION", - "template_name": "pnf_netconf", - "template_version": "1.0.0", - "template_tags": "pnf_netconf", - "template_type": "DEFAULT" + "tosca_definitions_version" : "controller_blueprint_1_0_0", + "metadata" : { + "template_author" : "Aarna Services", + "author_email" : "aarna_services@aarnanetworks.com", + "user_groups" : "ADMIN, OPERATION", + "template_name" : "pnf_netconf", + "template_version" : "1.0.0", + "template_tags" : "pnf_netconf", + "template_type" : "DEFAULT" }, - "imports": [ - { - "file": "Definitions/data_types.json" - }, - { - "file": "Definitions/relationship_types.json" - }, - { - "file": "Definitions/artifact_types.json" - }, - { - "file": "Definitions/node_types.json" - }, - { - "file": "Definitions/policy_types.json" - } - ], - "dsl_definitions": { - "config-deploy-properties": { - "resolution-key": { - "get_input": "resolution-key" + "imports" : [ { + "file" : "Definitions/data_types.json" + }, { + "file" : "Definitions/relationship_types.json" + }, { + "file" : "Definitions/artifact_types.json" + }, { + "file" : "Definitions/node_types.json" + }, { + "file" : "Definitions/policy_types.json" + } ], + "dsl_definitions" : { + "config-deploy-properties" : { + "resolution-key" : { + "get_input" : "resolution-key" } } }, - "topology_template": { - "workflows": { - "config-assign": { - "steps": { - "activate-process": { - "description": "Create a configlet", - "target": "config-assign", - "activities": [ - { - "call_operation": "" - } - ] + "topology_template" : { + "workflows" : { + "config-assign" : { + "steps" : { + "assign" : { + "description" : "Assign values to payload", + "target" : "resolve-data" } }, - "inputs": { - "resolution-key": { - "required": true, - "type": "string" - }, - "store-result": { - "required": true, - "type": "boolean" + "inputs" : { + "resolution-key" : { + "required" : true, + "type" : "string" }, - "config-assign-properties": { - "description": "Dynamic PropertyDefinition for workflow(config-assign).", - "required": true, - "type": "dt-config-assign-properties" + "config-assign-properties" : { + "description" : "Dynamic PropertyDefinition for workflow(config-assign).", + "required" : true, + "type" : "dt-config-assign-properties" + } + }, + "outputs" : { + "resolved-payload" : { + "type" : "string", + "value" : { + "get_attribute" : [ "resolve-data", "assignment-params" ] + } } } }, - "config-deploy": { - "steps": { - "imperative-workflow-step-1": { - "description": "execute restconf", - "target": "execute", - "activities": [ - { - "call_operation": "ComponentScriptExecutor.process" - } - ] + "config-deploy" : { + "steps" : { + "deploy" : { + "description" : "deploy stored payload to pnf", + "target" : "execute-netconf" } }, - "inputs": { - "resolution-key": { - "required": true, - "type": "string" - }, - "netconf-password": { - "required": true, - "type": "string" + "inputs" : { + "resolution-key" : { + "required" : true, + "type" : "string" }, - "netconf-username": { - "required": true, - "type": "string" + "netconf-password" : { + "required" : true, + "type" : "string" }, - "pnf-ipv4-address": { - "required": true, - "type": "string" + "netconf-username" : { + "required" : true, + "type" : "string" }, - "config-deploy-properties": { - "description": "Dynamic PropertyDefinition for workflow(config-assign).", - "required": true, - "type": "dt-config-assign-properties" + "pnf-ipv4-address" : { + "required" : true, + "type" : "string" + } + }, + "outputs" : { + "pnf-response" : { + "type" : "string", + "value" : { + "get_attribute" : [ "execute-netconf", "response-data" ] + } } } } }, - "node_templates": { - "netconf-device": { - "type": "vnf-netconf-device", - "capabilities": { - "netconf": { - "properties": { - "login-key": { - "get_input": "netconf-password" + "node_templates" : { + "netconf-device" : { + "type" : "vnf-netconf-device", + "capabilities" : { + "netconf" : { + "properties" : { + "login-key" : { + "get_input" : "netconf-password" }, - "login-account": { - "get_input": "netconf-username" + "login-account" : { + "get_input" : "netconf-username" }, - "target-ip-address": { - "get_input": "pnf-ipv4-address" + "target-ip-address" : { + "get_input" : "pnf-ipv4-address" }, - "port-number": 830, - "connection-time-out": 60 + "port-number" : 830, + "connection-time-out" : 5 } } } }, - "config-assign": { - "type": "component-resource-resolution", - "interfaces": { - "ResourceResolutionComponent": { - "operations": { - "process": { - "inputs": { - "resolution-key": { - "get_input": "resolution-key" - }, - "store-result": true, - "artifact-prefix-names": [ - "pnf", - "netconfrpc" - ] - }, - "outputs": { - "resource-assignment-params": { - "get_attribute": [ - "SELF", - "assignment-params" - ] + "resolve-data" : { + "type" : "component-resource-resolution", + "interfaces" : { + "ResourceResolutionComponent" : { + "operations" : { + "process" : { + "inputs" : { + "resolution-key" : { + "get_input" : "resolution-key" }, - "status": "success" + "store-result" : true, + "artifact-prefix-names" : [ "netconfrpc" ] } } } } }, - "artifacts": { - "pnf-template": { - "type": "artifact-template-velocity", - "file": "Templates/pnf-template.vtl" - }, - "pnf-mapping": { - "type": "artifact-mapping-resource", - "file": "Templates/pnf-mapping.json" - }, - "netconfrpc-template": { - "type": "artifact-template-velocity", - "file": "Templates/netconfrpc-template.vtl" + "artifacts" : { + "netconfrpc-template" : { + "type" : "artifact-template-velocity", + "file" : "Templates/netconfrpc-template.vtl" }, - "netconfrpc-mapping": { - "type": "artifact-mapping-resource", - "file": "Templates/netconfrpc-mapping.json" + "netconfrpc-mapping" : { + "type" : "artifact-mapping-resource", + "file" : "Templates/netconfrpc-mapping.json" } } }, - "execute": { - "type": "component-script-executor", - "requirements": { - "netconf-connection": { - "capability": "netconf", - "node": "netconf-device", - "relationship": "tosca.relationships.ConnectsTo" + "execute-netconf" : { + "type" : "component-netconf-executor", + "requirements" : { + "netconf-connection" : { + "capability" : "netconf", + "node" : "netconf-device", + "relationship" : "tosca.relationships.ConnectsTo" } }, - "interfaces": { - "ComponentScriptExecutor": { - "operations": { - "process": { - "inputs": { - "script-type": "kotlin", - "script-class-reference": "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.ConfigDeploy", - "instance-dependencies": [], - "dynamic-properties": "*config-deploy-properties" + "interfaces" : { + "ComponentNetconfExecutor" : { + "operations" : { + "process" : { + "inputs" : { + "script-type" : "kotlin", + "script-class-reference" : "org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.ConfigDeploy", + "instance-dependencies" : [ ], + "dynamic-properties" : "*config-deploy-properties" } } } @@ -195,4 +166,4 @@ } } } -} +}
\ No newline at end of file diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/relationship_types.json b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/relationship_types.json index 4ddd7a57c..027bfc0fc 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/relationship_types.json +++ b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/relationship_types.json @@ -1,3 +1,9 @@ { - "relationship_types" : { } + "relationship_types" : { + "tosca.relationships.ConnectsTo" : { + "description" : "Relationship tosca.relationships.ConnectsTo", + "version" : "1.0.0", + "derived_from" : "tosca.relationships.Root" + } + } }
\ No newline at end of file diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/resources_definition_types.json index 5405dfccf..c7277c027 100644 --- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/resources_definition_types.json +++ b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/resources_definition_types.json @@ -1,102 +1,18 @@ { - "netconf-password" : { - "tags" : "netconf-password", - "name" : "netconf-password", + "input-source" : { + "tags" : "input-source", + "name" : "input-source", "property" : { - "description" : "netconf-password string attribute", + "description" : "name of the ", "type" : "string" }, "group" : "default", - "updated-by" : "Aarna service <vmuthukrishnan@aarnanetworks.com>", + "updated-by" : "brindasanth@onap.com", "sources" : { "input" : { "type" : "source-input", "properties" : { } } } - }, - "netconf-server-port" : { - "tags" : "netconf-server-port", - "name" : "netconf-server-port", - "property" : { - "description" : "netconf-server-port string attribute", - "type" : "string" - }, - "group" : "default", - "updated-by" : "Aarna service <vmuthukrishnan@aarnanetworks.com>", - "sources" : { - "input" : { - "type" : "source-input", - "properties" : { } - } - } - }, - "netconf-username" : { - "tags" : "netconf-username", - "name" : "netconf-username", - "property" : { - "description" : "netconf-username string attribute", - "type" : "string" - }, - "group" : "default", - "updated-by" : "Aarna service <vmuthukrishnan@aarnanetworks.com>", - "sources" : { - "input" : { - "type" : "source-input", - "properties" : { } - } - } - }, - "pnf-id" : { - "tags" : "pnf-id", - "name" : "pnf-id", - "property" : { - "description" : "pnf-id string attribute", - "type" : "string" - }, - "group" : "default", - "updated-by" : "Aarna service <vmuthukrishnan@aarnanetworks.com>", - "sources" : { - "input" : { - "type" : "source-input", - "properties" : { } - } - } - }, - "pnf-ipv4-address" : { - "tags" : "pnf-ipv4-address", - "name" : "pnf-ipv4-address", - "property" : { - "description" : "pnf-ipv4-address string attribute", - "type" : "string" - }, - "group" : "default", - "updated-by" : "Aarna service <vmuthukrishnan@aarnanetworks.com>", - "sources" : { - "input" : { - "type" : "source-input", - "properties" : { } - } - } - }, - "stream-count" : { - "tags" : "stream-count", - "name" : "stream-count", - "property" : { - "description" : "stream-count string attribute", - "type" : "integer" - }, - "group" : "default", - "updated-by" : "Aarna service <vmuthukrishnan@aarnanetworks.com>", - "sources" : { - "input" : { - "type" : "source-default", - "properties" : { } - }, - "default" : { - "type" : "source-default", - "properties" : { } - } - } } }
\ No newline at end of file |