summaryrefslogtreecommitdiffstats
path: root/components/model-catalog/blueprint-model
diff options
context:
space:
mode:
Diffstat (limited to 'components/model-catalog/blueprint-model')
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/resources_definition_types.json24
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/data_types.json2
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/resources_definition_types.json29
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/python/ConfigDeploy.py8
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/baseconfig-template.vtl18
-rw-r--r--components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/incremental-config-template.vtl18
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCli.kt1
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/node_types.json8
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json8
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/python/SamplePython.py12
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/remote_scripts/TOSCA-Metadata/TOSCA.meta3
11 files changed, 63 insertions, 68 deletions
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/resources_definition_types.json
index 426b91d34..a35974c83 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/resources_definition_types.json
+++ b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/resources_definition_types.json
@@ -876,22 +876,6 @@
"default" : {
"type" : "source-default",
"properties" : { }
- },
- "sdnc" : {
- "type" : "source-rest",
- "properties" : {
- "type" : "JSON",
- "url-path" : "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf-id",
- "path" : "/param/0/value",
- "input-key-mapping" : {
- "service-instance-id" : "service-instance-id",
- "vnf-id" : "vnf-id"
- },
- "output-key-mapping" : {
- "vnf-id" : "value"
- },
- "key-dependencies" : [ "service-instance-id", "vnf-id" ]
- }
}
}
},
@@ -930,16 +914,16 @@
"type" : "source-rest",
"properties" : {
"type" : "JSON",
- "url-path" : "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-name/vnf-data/vnf-topology/vnf-parameters-data/param/vnf-name",
+ "url-path" : "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf-name",
"path" : "/param/0/value",
"input-key-mapping" : {
"service-instance-id" : "service-instance-id",
- "vnf-name" : "vnf-name"
+ "vnf-id" : "vnf-id"
},
"output-key-mapping" : {
"vnf-name" : "value"
},
- "key-dependencies" : [ "service-instance-id", "vnf-name" ]
+ "key-dependencies" : [ "service-instance-id", "vnf-id" ]
}
},
"aai-data" : {
@@ -1184,4 +1168,4 @@
}
}
}
-} \ No newline at end of file
+}
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/data_types.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/data_types.json
index b3d719faa..71e5fa63d 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/data_types.json
+++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/data_types.json
@@ -773,4 +773,4 @@
"derived_from" : "tosca.datatypes.Dynamic"
}
}
-} \ No newline at end of file
+}
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/resources_definition_types.json
index aa49e1ee9..7172e3a05 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/resources_definition_types.json
+++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Definitions/resources_definition_types.json
@@ -63,7 +63,7 @@
"properties" : {
"type" : "JSON",
"verb" : "PUT",
- "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$vnf-id/service-data/vnfs/vnf/$service-instance-id/vnf-data/vnf-topology/vnf-parameters-data/param/vdns_vf_module_id",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vdns_vf_module_id",
"path" : "",
"payload" : "{\n\"GENERIC-RESOURCE-API:param\": [\n{\n\"GENERIC-RESOURCE-API:name\": \"vdns_vf_module_id\",\n\"GENERIC-RESOURCE-API:value\": \"$vf-module-id\"\n}\n]\n}",
"input-key-mapping" : {
@@ -1263,7 +1263,7 @@
"properties" : {
"verb" : "GET",
"type" : "JSON",
- "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$vnf-id/service-data/vnfs/vnf/$service-instance-id/vnf-data/vnf-topology/vnf-parameters-data/param/vdns_vf_module_id",
+ "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vdns_vf_module_id",
"path" : "/param/0/value",
"input-key-mapping" : {
"service-instance-id" : "service-instance-id",
@@ -1439,11 +1439,11 @@
}
}
},
- "vf-module-name" : {
- "tags" : "vf-module-name",
- "name" : "vf-module-name",
+ "vf_module_name" : {
+ "tags" : "vf_module_name",
+ "name" : "vf_module_name",
"property" : {
- "description" : "vf-module-name",
+ "description" : "vf_module_name",
"type" : "string"
},
"updated-by" : "Singal, Kapil <ks220y@att.com>",
@@ -1760,23 +1760,6 @@
"default" : {
"type" : "source-default",
"properties" : { }
- },
- "sdnc" : {
- "type" : "source-rest",
- "properties" : {
- "verb" : "GET",
- "type" : "JSON",
- "url-path" : "/restconf/config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf-id",
- "path" : "/param/0/value",
- "input-key-mapping" : {
- "service-instance-id" : "service-instance-id",
- "vnf-id" : "vnf-id"
- },
- "output-key-mapping" : {
- "vnf-id" : "value"
- },
- "key-dependencies" : [ "service-instance-id", "vnf-id" ]
- }
}
}
},
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/python/ConfigDeploy.py b/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/python/ConfigDeploy.py
index 34fd1404d..388c63ffb 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/python/ConfigDeploy.py
+++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/python/ConfigDeploy.py
@@ -40,11 +40,11 @@ class ConfigDeploy(NetconfComponentFunction):
#if not response.isSuccess():
# og.error(response.errorMessage)
nc.discard_change()
- nc.edit_config(message_content=payloadInterface, edit_default_peration="none")
- nc.edit_config(message_content=payloadHostname, edit_default_peration="none")
- nc.validate()
+ nc.edit_config(message_content=payloadInterface, edit_default_peration="merge")
+ nc.edit_config(message_content=payloadHostname, edit_default_peration="merge")
+ #nc.validate()
nc.commit()
- #nc.commit(confirmed = True, confirm_timeout=15)
+ nc.get_config() #nc.commit(confirmed = True, confirm_timeout=15)
nc.unlock()
nc.disconnect()
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/baseconfig-template.vtl b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/baseconfig-template.vtl
index 9e73a318e..10e448466 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/baseconfig-template.vtl
+++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/baseconfig-template.vtl
@@ -1,9 +1,9 @@
- {
- "vdns-instance": [
- {
- "ip-addr": "$vdns_int_private_ip_0",
- "oam-ip-addr": "$vdns_onap_private_ip_0",
- "enabled": false
- }
- ]
-} \ No newline at end of file
+<vlb-business-vnf-onap-plugin xmlns="urn:opendaylight:params:xml:ns:yang:vlb-business-vnf-onap-plugin">
+<vdns-instances>
+<vdns-instance>
+<ip-addr>$vdns_int_private_ip_0</ip-addr>
+<oam-ip-addr>$vdns_onap_private_ip_0</oam-ip-addr>
+<enabled>false</enabled>
+</vdns-instance>
+</vdns-instances>
+</vlb-business-vnf-onap-plugin>
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/incremental-config-template.vtl b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/incremental-config-template.vtl
index 7ec446f30..d33625739 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/incremental-config-template.vtl
+++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Templates/incremental-config-template.vtl
@@ -1,9 +1,9 @@
-{
- "vdns-instance": [
- {
- "ip-addr": "$vdns_int_private_ip_0",
- "oam-ip-addr": "$vdns_onap_private_ip_0",
- "enabled": true
- }
- ]
-} \ No newline at end of file
+<vlb-business-vnf-onap-plugin xmlns="urn:opendaylight:params:xml:ns:yang:vlb-business-vnf-onap-plugin">
+<vdns-instances>
+<vdns-instance>
+<ip-addr>$vdns_int_private_ip_0</ip-addr>
+<oam-ip-addr>$vdns_onap_private_ip_0</oam-ip-addr>
+<enabled>true</enabled>
+</vdns-instance>
+</vdns-instances>
+</vlb-business-vnf-onap-plugin>
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCli.kt b/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCli.kt
index 9552b6136..7bda62810 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCli.kt
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCli.kt
@@ -19,6 +19,7 @@ package cba.capability.cli
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.sshClientService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/node_types.json b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/node_types.json
index 4945da889..a47c13c47 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/node_types.json
+++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/node_types.json
@@ -14,6 +14,14 @@
"entry_schema": {
"type": "string"
}
+ },
+ "status": {
+ "required": true,
+ "type": "string"
+ },
+ "response-data": {
+ "required": false,
+ "type": "json"
}
},
"capabilities" : {
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json
index 192106e95..fe0f59243 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json
+++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json
@@ -83,6 +83,14 @@
"execute-command-logs"
]
}
+ },
+ "execute-command-status": {
+ "type": "string",
+ "value": { "get_attribute": ["execute-remote-python", "status"]}
+ },
+ "execute-command-payload": {
+ "type": "json",
+ "value": { "get_attribute": ["execute-remote-python", "response-data"]}
}
}
},
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/python/SamplePython.py b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/python/SamplePython.py
index 5e20e2291..fae5855cf 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/python/SamplePython.py
+++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/python/SamplePython.py
@@ -2,4 +2,14 @@
import sys
-print(sys.argv[1]) \ No newline at end of file
+#Optional : import this utility class if returning payload
+from cds_utils.payload_coder import send_response_data_payload
+
+# Do your work... using try .. except to handle errors and return False if error
+print(sys.argv[1])
+
+# Optional : return a JSON payload to the be published under the response-data output attribute
+send_response_data_payload({"étudiant": ["Mélanie", "Joséphine"]})
+
+# Always return a boolean indicating success or not..
+sys.exit(True) \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/TOSCA-Metadata/TOSCA.meta b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/TOSCA-Metadata/TOSCA.meta
index 5ca8aa031..2c3a91f28 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/TOSCA-Metadata/TOSCA.meta
+++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/TOSCA-Metadata/TOSCA.meta
@@ -2,4 +2,5 @@ TOSCA-Meta-File-Version: 1.0.0
CSAR-Version: 1.0
Created-By: Brinda Santh <brindasanth@in.ibm.com>
Entry-Definitions: Definitions/remote_scripts.json
-Template-Tags: Brinda Santh, remote_scripts \ No newline at end of file
+Template-Tags: Brinda Santh, remote_scripts
+Content-Type: application/vnd.oasis.bpmn