aboutsummaryrefslogtreecommitdiffstats
path: root/components/model-catalog
diff options
context:
space:
mode:
authorJakobKrieg <jakob.krieg@bcmsolutions.de>2020-10-23 13:28:42 +0200
committerJozsef Csongvai <jozsef.csongvai@bell.ca>2020-10-28 21:33:48 +0000
commit7b6da0e35be54ac5ce92458454a6e8d0b83031fd (patch)
tree5b04ceae67d11e86262cd22145f7ff80b01a181b /components/model-catalog
parentcf1e08373c11c19ef6acf6f1390225c6e9ccf4eb (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')
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/data_types.json165
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/node_types.json161
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/pnf_netconf.json273
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/relationship_types.json8
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Definitions/resources_definition_types.json94
-rwxr-xr-xcomponents/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/bootstrap-cds.sh35
-rwxr-xr-xcomponents/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/connect-cds-mariadb.sh35
-rwxr-xr-xcomponents/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/create-config-assing-data.sh57
-rwxr-xr-xcomponents/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/dd-microk8s.sh46
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/dd.json155
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/dictionary1
-rwxr-xr-xcomponents/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/enrich-and-download-cds-blueprint.sh51
-rwxr-xr-xcomponents/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/enrich-and-publish-cds-blueprint.sh40
-rwxr-xr-xcomponents/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/get-cds-blueprint-models.sh29
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/kotlin/ConfigDeploy.kt4
-rwxr-xr-xcomponents/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/process-config-deploy.sh60
-rwxr-xr-xcomponents/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/publish-enriched-cds-blueprint.sh41
-rwxr-xr-xcomponents/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/save-enriched-blueprint.sh39
-rwxr-xr-xcomponents/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/tail-cds-bp-log.sh29
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/templates/day-n-pnf-config.template29
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/templates/pnf-config-deploy.template27
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Templates/netconfrpc-mapping.json86
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Templates/pnf-mapping.json109
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Templates/pnf-template.vtl8
24 files changed, 248 insertions, 1334 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
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/bootstrap-cds.sh b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/bootstrap-cds.sh
deleted file mode 100755
index 2966d19ff..000000000
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/bootstrap-cds.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-# Copyright © 2020 Aarna Networks, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-CDS_BP_POD_NAME=$(kubectl get pods -n onap | grep 'cds-blueprints-processor' | head -n 1 | awk '{print $1}')
-CDS_BP_SVC_IP=$(kubectl get svc -n onap | grep 'cds-blueprints-processor-http' | awk '{print $3}')
-
-if [ -z "${CDS_BP_SVC_IP}" ]
- then
- echo "CDS BP Service IP is not found and cannot proceed further"
- exit 1;
-fi
-
-# Make the REST API to load the models
-curl -v --location --request POST http://${CDS_BP_SVC_IP}:8080/api/v1/blueprint-model/bootstrap \
---header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \
---header 'Content-Type: application/json' \
---data-raw ' {
-"loadModelType" : true,
-"loadResourceDictionary" : true,
-"loadCBA" : true
-}'
-
-exit 0
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/connect-cds-mariadb.sh b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/connect-cds-mariadb.sh
deleted file mode 100755
index ce8c01791..000000000
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/connect-cds-mariadb.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-# Copyright © 2020 Aarna Networks, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-MARIADB_POD_NAME=$(kubectl get pods -n onap | grep 'dev-cds-db-0' | head -n 1 | awk '{print $1}')
-CDS_BP_POD_NAME=$(kubectl get pods -n onap | grep 'cds-blueprints-processor' | head -n 1 | awk '{print $1}')
-CDS_BP_SVC_IP=$(kubectl get svc -n onap | grep 'cds-blueprints-processor-http' | awk '{print $3}')
-
-if [ -z "${MARIADB_POD_NAME}" ]
- then
- echo "CDS MariDB POD is not found so cannot proceed further"
- exit 1;
-fi
-
-# CDS Mariadb password
-MYSQL_PASSWORD=Lase6+CopuBavb
-MYSQL_USER=sdnctl
-MYSQL_ROOT_PASSWORD=Zumu5%NoyuJagx
-
-echo "Going to connect to CDS MariaDB database sdnctl"
-kubectl exec -n onap ${MARIADB_POD_NAME} -it -- mysql -u root -pZumu5%NoyuJagx sdnctl
-
-
-exit 0
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/create-config-assing-data.sh b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/create-config-assing-data.sh
deleted file mode 100755
index a169047cb..000000000
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/create-config-assing-data.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/bash
-# Copyright © 2020 Aarna Networks, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-resolution_key=${1}
-pnf_ip_address=${2}
-stream_count=${3}
-
-
-CDS_BP_POD_NAME=$(kubectl get pods -n onap | grep 'cds-blueprints-processor' | head -n 1 | awk '{print $1}')
-CDS_BP_SVC_IP=$(kubectl get svc -n onap | grep 'cds-blueprints-processor-http' | awk '{print $3}')
-
-if [ -z "${CDS_BP_SVC_IP}" ]
- then
- echo "CDS BP Service IP is not found and cannot proceed further"
- exit 1;
-fi
-
-if [ -z "${resolution_key}" ] || [ -z "${pnf_ip_address}" ] || [ -z "${stream_count}" ]
- then
- echo -e "Invalid config assing resolution-key ${resolution_key} \
- OR pnf-ip-address ${pnf_ip_address} OR stream_count ${stream_count}"
- echo "Usage: $0 <resolution-key> <pnf_ip_address> <stream_count>"
- exit 0
-fi
-
-template_file="./templates/day-n-pnf-config.template"
-temp_file="/tmp/day-n-pnf-config.json"
-cp -f $template_file $temp_file
-
-# Now replace the tokens
-sed -i "s|STREAM_COUNT|${stream_count}|g" $temp_file
-sed -i "s|PNF_IP_ADDRESS|${pnf_ip_address}|g" $temp_file
-sed -i "s|CONFIG_NAME|${resolution_key}|g" $temp_file
-
-# Make the REST API to load the models
-curl -v --location --request POST http://${CDS_BP_SVC_IP}:8080/api/v1/execution-service/process \
---header 'Content-Type: application/json;charset=UTF-8' \
---header 'Accept: application/json;charset=UTF-8,application/json' \
---header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \
---header 'Host: cds-blueprints-processor-http:8080' \
---header 'Content-Type: text/json' \
---data "@$temp_file" | python3 -m json.tool
-
-
-exit 0
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/dd-microk8s.sh b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/dd-microk8s.sh
deleted file mode 100755
index b7891d82c..000000000
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/dd-microk8s.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-# Copyright © 2020 Aarna Networks, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-JSON_FILE=$1
-
-CDS_BP_POD_NAME=$(kubectl get pods -n onap | grep 'cds-blueprints-processor' | head -n 1 | awk '{print $1}')
-CDS_BP_SVC_IP=$(kubectl get svc -n onap | grep 'cds-blueprints-processor-http' | awk '{print $3}')
-
-if [ -z "${CDS_BP_SVC_IP}" ] || [ -z "${JSON_FILE}" ]
- then
- echo "CDS BP Service IP is not found OR dd.json file is not given"
- echo "Usage : $0 <Data Dictionary JSON file path>"
- exit 1;
-fi
-
-l=`jq '.|length' ${JSON_FILE}`
-echo "Found $l Dictionary Definition Entries"
-i=0
-while [ $i -lt $l ]
-do
- echo "i = $i"
- d=`jq ".[$i]" ${JSON_FILE}`
- echo $d
- curl -k -v -O "http://${CDS_BP_SVC_IP}:8080/api/v1/dictionary" \
- --header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \
- --header 'Content-Type: application/json' \
- -d"$d"
-
- sleep 1
-
- echo -e "\n*****************************************\n"
- i=$(( $i + 1 ))
-
-done
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/dd.json b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/dd.json
deleted file mode 100644
index c7361c9e4..000000000
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/dd.json
+++ /dev/null
@@ -1,155 +0,0 @@
-[
- {
- "name": "netconf-password",
- "tags": "netconf-password",
- "data_type": "string",
- "description": "netconf-password",
- "entry_schema": "string",
- "updated-by": "Aarna service <vmuthukrishnan@aarnanetworks.com>",
- "updatedBy": "Aarna service <vmuthukrishnan@aarnanetworks.com>",
- "definition": {
- "tags": "netconf-password",
- "name": "netconf-password",
- "property": {
- "description": "netconf-password string attribute",
- "type": "string"
- },
- "updated-by": "Aarna service <vmuthukrishnan@aarnanetworks.com>",
- "sources": {
- "input": {
- "type": "source-input",
- "properties": {}
- }
- }
- }
- },
- {
- "name": "netconf-username",
- "tags": "netconf-username",
- "data_type": "string",
- "description": "netconf-username",
- "entry_schema": "string",
- "updated-by": "Aarna service <vmuthukrishnan@aarnanetworks.com>",
- "updatedBy": "Aarna service <vmuthukrishnan@aarnanetworks.com>",
- "definition": {
- "tags": "netconf-username",
- "name": "netconf-username",
- "property": {
- "description": "netconf-username string attribute",
- "type": "string"
- },
- "updated-by": "Aarna service <vmuthukrishnan@aarnanetworks.com>",
- "sources": {
- "input": {
- "type": "source-input",
- "properties": {}
- }
- }
- }
- },
- {
- "name": "netconf-server-port",
- "tags": "netconf-server-port",
- "data_type": "string",
- "description": "netconf-server-port",
- "entry_schema": "string",
- "updated-by": "Aarna service <vmuthukrishnan@aarnanetworks.com>",
- "updatedBy": "Aarna service <vmuthukrishnan@aarnanetworks.com>",
- "definition": {
- "tags": "netconf-server-port",
- "name": "netconf-server-port",
- "property": {
- "description": "netconf-server-port string attribute",
- "type": "string"
- },
- "updated-by": "Aarna service <vmuthukrishnan@aarnanetworks.com>",
- "sources": {
- "input": {
- "type": "source-input",
- "properties": {}
- }
- }
- }
- },
- {
- "name": "pnf-id",
- "tags": "pnf-id",
- "data_type": "string",
- "description": "pnf-id",
- "entry_schema": "string",
- "updated-by": "Aarna service <vmuthukrishnan@aarnanetworks.com>",
- "updatedBy": "Aarna service <vmuthukrishnan@aarnanetworks.com>",
- "definition": {
- "tags": "pnf-id",
- "name": "pnf-id",
- "property": {
- "description": "pnf-id string attribute",
- "type": "string"
- },
- "updated-by": "Aarna service <vmuthukrishnan@aarnanetworks.com>",
- "sources": {
- "input": {
- "type": "source-input",
- "properties": {}
- }
- }
- }
- },
- {
-
- "name": "pnf-ipv4-address",
- "tags": "pnf-ipv4-address",
- "data_type": "string",
- "description": "pnf-ipv4-address",
- "entry_schema": "string",
- "updated-by": "Aarna service <vmuthukrishnan@aarnanetworks.com>",
- "updatedBy": "Aarna service <vmuthukrishnan@aarnanetworks.com>",
- "definition": {
- "tags": "pnf-ipv4-address",
- "name": "pnf-ipv4-address",
- "property": {
- "description": "pnf-ipv4-address string attribute",
- "type": "string"
- },
- "updated-by": "Aarna service <vmuthukrishnan@aarnanetworks.com>",
- "sources": {
- "input": {
- "type": "source-input",
- "properties": {}
- }
- }
- }
-
- },
- {
- "name": "stream-count",
- "tags": "stream-count",
- "data_type": "string",
- "description": "stream-count",
- "entry_schema": "string",
- "updated-by": "Aarna service <vmuthukrishnan@aarnanetworks.com>",
- "updatedBy": "Aarna service <vmuthukrishnan@aarnanetworks.com>",
- "definition": {
- "tags": "stream-count",
- "name": "stream-count",
- "property": {
- "description": "stream-count string attribute",
- "type": "integer"
- },
- "updated-by": "Aarna service <vmuthukrishnan@aarnanetworks.com>",
- "sources": {
- "input": {
- "type": "source-default",
- "properties": {}
- },
- "default": {
-
- "type": "source-default",
-
- "properties": {}
-
- }
- }
- }
- }
-]
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/dictionary b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/dictionary
deleted file mode 100644
index 2b4985931..000000000
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/dictionary
+++ /dev/null
@@ -1 +0,0 @@
-{"name":"stream-count","dataType":"integer","entrySchema":null,"resourceDictionaryGroup":"default","definition":{"tags":"stream-count","name":"stream-count","property":{"description":"stream-count string attribute","required":null,"type":"integer","status":null,"constraints":null,"metadata":null,"value":null,"default":null,"entry_schema":null,"external-schema":null},"group":"default","updated-by":"Aarna service <vmuthukrishnan@aarnanetworks.com>","sources":{"input":{"description":null,"type":"source-default","metadata":null,"directives":null,"properties":{},"attributes":null,"capabilities":null,"requirements":null,"interfaces":null,"artifacts":null,"copy":null,"node_filter":null},"default":{"description":null,"type":"source-default","metadata":null,"directives":null,"properties":{},"attributes":null,"capabilities":null,"requirements":null,"interfaces":null,"artifacts":null,"copy":null,"node_filter":null}}},"description":"stream-count string attribute","tags":"stream-count","creationDate":"2020-09-08T12:47:55.545Z","updatedBy":"Aarna service <vmuthukrishnan@aarnanetworks.com>"} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/enrich-and-download-cds-blueprint.sh b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/enrich-and-download-cds-blueprint.sh
deleted file mode 100755
index 4741321ef..000000000
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/enrich-and-download-cds-blueprint.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-# Copyright © 2020 Aarna Networks, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-zip_file=$1
-
-CDS_BP_POD_NAME=$(kubectl get pods -n onap | grep 'cds-blueprints-processor' | head -n 1 | awk '{print $1}')
-CDS_BP_SVC_IP=$(kubectl get svc -n onap | grep 'cds-blueprints-processor-http' | awk '{print $3}')
-
-if [ -z "${CDS_BP_SVC_IP}" ]
- then
- echo "CDS BP Service IP is not found and cannot proceed further"
- exit 1;
-fi
-
-if [ ! -f "$zip_file" ]
- then
- echo "Invalid CDS blueprint zip file argument $zip_file"
- echo "Usage: $0 <CDS Blueprint ZIP file path>"
- exit 0
-fi
-
-
-# Remove the temporary CBA
-rm -rf /tmp/CBA
-mkdir -p /tmp/CBA
-
-# Enriched CBA file
-ENRICHED_CBA_FILE="/tmp/CBA/ENRICHED-CBA.zip"
-
-
-# Make the REST API to load the models
-curl -v --location --request POST http://${CDS_BP_SVC_IP}:8080/api/v1/blueprint-model/enrich \
---header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \
---form "file=@${zip_file}" \
--o ${ENRICHED_CBA_FILE}
-
-echo "You can take a look at the enriched CBA archive file ${ENRICHED_CBA_FILE}"
-
-exit 0
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/enrich-and-publish-cds-blueprint.sh b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/enrich-and-publish-cds-blueprint.sh
deleted file mode 100755
index 39c3f32e6..000000000
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/enrich-and-publish-cds-blueprint.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-# Copyright © 2020 Aarna Networks, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-zip_file=$1
-
-CDS_BP_POD_NAME=$(kubectl get pods -n onap | grep 'cds-blueprints-processor' | head -n 1 | awk '{print $1}')
-CDS_BP_SVC_IP=$(kubectl get svc -n onap | grep 'cds-blueprints-processor-http' | awk '{print $3}')
-
-if [ -z "${CDS_BP_SVC_IP}" ]
- then
- echo "CDS BP Service IP is not found and cannot proceed further"
- exit 1;
-fi
-
-if [ ! -f "$zip_file" ]
- then
- echo "Invalid Enriched CDS blueprint zip file argument $zip_file"
- echo "Usage: $0 <Enriched CDS Blueprint ZIP file path>"
- exit 0
-fi
-
-# Make the REST API to load the models
-curl -v --location --request POST http://${CDS_BP_SVC_IP}:8080/api/v1/blueprint-model/enrichandpublish \
---header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \
---form "file=@${zip_file}"
-
-
-exit 0
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/get-cds-blueprint-models.sh b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/get-cds-blueprint-models.sh
deleted file mode 100755
index dc35fde68..000000000
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/get-cds-blueprint-models.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-# Copyright © 2020 Aarna Networks, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-CDS_BP_POD_NAME=$(kubectl get pods -n onap | grep 'cds-blueprints-processor' | head -n 1 | awk '{print $1}')
-CDS_BP_SVC_IP=$(kubectl get svc -n onap | grep 'cds-blueprints-processor-http' | awk '{print $3}')
-
-if [ -z "${CDS_BP_SVC_IP}" ]
- then
- echo "CDS BP Service IP is not found and cannot proceed further"
- exit 1;
-fi
-
-# Make the REST API to get the models
-curl -v --location --request GET http://${CDS_BP_SVC_IP}:8080/api/v1/blueprint-model \
---header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' | python3 -m json.tool
-
-exit 0
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/kotlin/ConfigDeploy.kt b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/kotlin/ConfigDeploy.kt
index 96ef69937..5dc5c1551 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/kotlin/ConfigDeploy.kt
+++ b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/kotlin/ConfigDeploy.kt
@@ -1,5 +1,5 @@
/*
- * Copyright © 2020 Aarna Networks, Inc.
+ * Copyright © 2019 IBM, Bell Canada, AT&T, Orange
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@ import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BasicAuthRestClientSe
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.slf4j.LoggerFactory
import org.springframework.http.HttpMethod
import org.springframework.web.client.RestTemplate
@@ -66,6 +67,7 @@ open class ConfigDeploy : AbstractScriptComponentFunction() {
*/
val dev_response = netconf_rpc_client.invokeRpc(payload)
log.info("NETCONF device response message : dev_response\n")
+ setAttribute("response-data", dev_response.asJsonType())
/**
netconf_rpc_client.lock("candidate")
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/process-config-deploy.sh b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/process-config-deploy.sh
deleted file mode 100755
index 27daefea9..000000000
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/process-config-deploy.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/bash
-# Copyright © 2020 Aarna Networks, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-resolution_key=${1}
-pnf_ip_address=${2}
-pnf_username="netconf"
-pnf_password="netconf"
-
-
-
-CDS_BP_POD_NAME=$(kubectl get pods -n onap | grep 'cds-blueprints-processor' | head -n 1 | awk '{print $1}')
-CDS_BP_SVC_IP=$(kubectl get svc -n onap | grep 'cds-blueprints-processor-http' | awk '{print $3}')
-
-if [ -z "${CDS_BP_SVC_IP}" ]
- then
- echo "CDS BP Service IP is not found and cannot proceed further"
- exit 1;
-fi
-
-if [ -z "${resolution_key}" ] || [ -z "${pnf_ip_address}" ]
- then
- echo -e "Invalid config assing resolution-key ${resolution_key} \
- OR pnf-ip-address ${pnf_ip_address}"
- echo "Usage: $0 <resolution-key> <pnf_ip_address>"
- exit 0
-fi
-
-template_file="./templates/pnf-config-deploy.template"
-temp_file="/tmp/pnf-config-deploy.json"
-cp -f $template_file $temp_file
-
-# Now replace the tokens
-sed -i "s|PNF_IP_ADDRESS|${pnf_ip_address}|g" $temp_file
-sed -i "s|CONFIG_NAME|${resolution_key}|g" $temp_file
-sed -i "s|NETCONF_USERNAME|${pnf_username}|g" $temp_file
-sed -i "s|NETCONF_PASSWORD|${pnf_password}|g" $temp_file
-
-# Make the REST API to load the models
-curl -v --location --request POST http://${CDS_BP_SVC_IP}:8080/api/v1/execution-service/process \
---header 'Content-Type: application/json;charset=UTF-8' \
---header 'Accept: application/json;charset=UTF-8,application/json' \
---header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \
---header 'Host: cds-blueprints-processor-http:8080' \
---header 'Content-Type: text/json' \
---data "@$temp_file" | python3 -m json.tool
-
-
-exit 0
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/publish-enriched-cds-blueprint.sh b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/publish-enriched-cds-blueprint.sh
deleted file mode 100755
index 88b1d9654..000000000
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/publish-enriched-cds-blueprint.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-# Copyright © 2020 Aarna Networks, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-zip_file=$1
-
-CDS_BP_POD_NAME=$(kubectl get pods -n onap | grep 'cds-blueprints-processor' | head -n 1 | awk '{print $1}')
-CDS_BP_SVC_IP=$(kubectl get svc -n onap | grep 'cds-blueprints-processor-http' | awk '{print $3}')
-
-if [ -z "${CDS_BP_SVC_IP}" ]
- then
- echo "CDS BP Service IP is not found and cannot proceed further"
- exit 1;
-fi
-
-if [ ! -f "$zip_file" ]
- then
- echo "Invalid Enriched CDS blueprint zip file argument $zip_file"
- echo "Usage: $0 <CDS Blueprint ZIP file path>"
- exit 0
-fi
-
-# Make the REST API to load the models
-curl -v --location --request POST http://${CDS_BP_SVC_IP}:8080/api/v1/blueprint-model/publish \
---header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \
---form "file=@${zip_file}" \
--o $PWD/DOWLOADED-PUBLISHED-CBA.zip
-
-
-exit 0
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/save-enriched-blueprint.sh b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/save-enriched-blueprint.sh
deleted file mode 100755
index e0ea48565..000000000
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/save-enriched-blueprint.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-# Copyright © 2020 Aarna Networks, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-zip_file=$1
-
-CDS_BP_POD_NAME=$(kubectl get pods -n onap | grep 'cds-blueprints-processor' | head -n 1 | awk '{print $1}')
-CDS_BP_SVC_IP=$(kubectl get svc -n onap | grep 'cds-blueprints-processor-http' | awk '{print $3}')
-
-if [ -z "${CDS_BP_SVC_IP}" ]
- then
- echo "CDS BP Service IP is not found and cannot proceed further"
- exit 1;
-fi
-
-if [ ! -f "$zip_file" ]
- then
- echo "Invalid Enriched CDS blueprint zip file argument $zip_file"
- echo "Usage: $0 <CDS Blueprint ZIP file path>"
- exit 0
-fi
-
-# Make the REST API to load the models
-curl -v --location --request POST http://${CDS_BP_SVC_IP}:8080/api/v1/blueprint-model \
---header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \
---form "file=@${zip_file}" | python3 -m json.tool
-
-exit 0
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/tail-cds-bp-log.sh b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/tail-cds-bp-log.sh
deleted file mode 100755
index f3b4aa75b..000000000
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/tail-cds-bp-log.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-# Copyright © 2020 Aarna Networks, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-MARIADB_POD_NAME=$(kubectl get pods -n onap | grep 'dev-mariadb-galera-0' | head -n 1 | awk '{print $1}')
-CDS_BP_POD_NAME=$(kubectl get pods -n onap | grep 'cds-blueprints-processor' | head -n 1 | awk '{print $1}')
-CDS_BP_SVC_IP=$(kubectl get svc -n onap | grep 'cds-blueprints-processor-http' | awk '{print $3}')
-
-if [ -z "${CDS_BP_POD_NAME}" ]
- then
- echo "CDS BP POD is not found so cannot proceed further"
- exit 1;
-fi
-
-# Make the REST API to load the models
-kubectl logs -f -n onap ${CDS_BP_POD_NAME}
-
-exit 0
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/templates/day-n-pnf-config.template b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/templates/day-n-pnf-config.template
deleted file mode 100644
index 474af68c8..000000000
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/templates/day-n-pnf-config.template
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "actionIdentifiers": {
- "mode": "sync",
- "blueprintName": "pnf_netconf",
- "blueprintVersion": "1.0.0",
- "actionName": "config-assign"
- },
- "payload": {
- "config-assign-request": {
- "template-prefix": [
- "pnf", "netconfrpc"
- ],
- "resolution-key": "CONFIG_NAME",
- "config-assign-properties": {
- "pnf-id": "abcd",
- "pnf-ipv4-address": "PNF_IP_ADDRESS",
- "netconf-password": "netconf",
- "netconf-username": "netconf",
- "netconf-server-port": "830",
- "stream-count": "STREAM_COUNT"
- }
- }
- },
- "commonHeader": {
- "subRequestId": "143748f9-3cd5-4910-81c9-a4601ff2ea58",
- "requestId": "e5eb1f1e-3386-435d-b290-d49d8af8db4c",
- "originatorId": "SDNC_DG"
- }
-}
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/templates/pnf-config-deploy.template b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/templates/pnf-config-deploy.template
deleted file mode 100644
index 9103d2d03..000000000
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Scripts/templates/pnf-config-deploy.template
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "actionIdentifiers": {
- "mode": "sync",
- "blueprintName": "pnf_netconf",
- "blueprintVersion": "1.0.0",
- "actionName": "config-deploy"
- },
- "payload": {
- "config-deploy-request": {
- "resolution-key": "CONFIG_NAME",
- "config-deploy-properties": {
- "pnf-id": "abcd",
- "pnf-ipv4-address": "PNF_IP_ADDRESS",
- "netconf-password": "NETCONF_PASSWORD",
- "netconf-username": "NETCONF_USERNAME"
- }
- }
- }
-
- ,
- "commonHeader": {
- "subRequestId": "143748f9-3cd5-4910-81c9-a4601ff2ea58",
- "requestId": "e5eb1f1e-3386-435d-b290-d49d8af8db4c",
- "originatorId": "SDNC_DG"
- }
-}
-
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Templates/netconfrpc-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Templates/netconfrpc-mapping.json
index 2ef877fb6..7c50f048f 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Templates/netconfrpc-mapping.json
+++ b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Templates/netconfrpc-mapping.json
@@ -1,92 +1,14 @@
[
{
- "name": "pnf-id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [{}],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": true,
- "dictionary-name": "pnf-id",
- "dictionary-source": "input",
- "dependencies": [],
- "version": 0
- },
- {
- "name": "pnf-ipv4-address",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [{}],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": true,
- "dictionary-name": "pnf-ipv4-address",
- "dictionary-source": "input",
- "dependencies": [],
- "version": 0
- },
- {
- "name": "stream-count",
- "property": {
- "description": "",
- "required": true,
- "type": "integer",
- "status": "",
- "constraints": [{}],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": true,
- "dictionary-name": "stream-count",
- "dictionary-source": "input",
- "dependencies": [],
- "version": 0
- },
- {
- "name": "netconf-password",
+ "name": "stream-count",
"property": {
- "description": "",
"required": true,
- "type": "string",
- "status": "",
- "constraints": [{}],
- "entry_schema": {
- "type": ""
- }
+ "type": "integer"
},
"input-param": true,
- "dictionary-name": "netconf-password",
- "dictionary-source": "input",
- "dependencies": [],
- "version": 0
- },
- {
- "name": "netconf-username",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [{}],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": true,
- "dictionary-name": "netconf-username",
+ "dictionary-name": "input-source",
"dictionary-source": "input",
"dependencies": [],
"version": 0
}
- ] \ No newline at end of file
+] \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Templates/pnf-mapping.json b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Templates/pnf-mapping.json
deleted file mode 100644
index 2121987b8..000000000
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Templates/pnf-mapping.json
+++ /dev/null
@@ -1,109 +0,0 @@
-[{
- "name": "pnf-id",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [{}],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": true,
- "dictionary-name": "pnf-id",
- "dictionary-source": "input",
- "dependencies": [],
- "version": 0
- },
- {
- "name": "pnf-ipv4-address",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [{}],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": true,
- "dictionary-name": "pnf-ipv4-address",
- "dictionary-source": "input",
- "dependencies": [],
- "version": 0
- },
- {
- "name": "netconf-password",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [{}],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": true,
- "dictionary-name": "netconf-password",
- "dictionary-source": "input",
- "dependencies": [],
- "version": 0
- },
- {
- "name": "netconf-username",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [{}],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": true,
- "dictionary-name": "netconf-username",
- "dictionary-source": "input",
- "dependencies": [],
- "version": 0
- },
- {
- "name": "netconf-server-port",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [{}],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": true,
- "dictionary-name": "netconf-server-port",
- "dictionary-source": "input",
- "dependencies": [],
- "version": 0
- },
- {
- "name": "stream-count",
- "property": {
- "description": "",
- "required": true,
- "type": "string",
- "status": "",
- "constraints": [{}],
- "entry_schema": {
- "type": ""
- }
- },
- "input-param": true,
- "dictionary-name": "stream-count",
- "dictionary-source": "input",
- "dependencies": [],
- "version": 0
- }
-]
diff --git a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Templates/pnf-template.vtl b/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Templates/pnf-template.vtl
deleted file mode 100644
index 254929e83..000000000
--- a/components/model-catalog/blueprint-model/service-blueprint/PNF_DEMO/Templates/pnf-template.vtl
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "pnf-id" : "${pnf-id}",
- "pnf-ipv4-address" : "${pnf-ipv4-address}",
- "netconf-password" : "${netconf-password}",
- "netconf-username" : "${netconf-username}",
- "netconf-server-port" : "${netconf-server-port}",
- "stream-count" : "${stream-count}"
-}