summaryrefslogtreecommitdiffstats
path: root/products/onap-dublin
diff options
context:
space:
mode:
Diffstat (limited to 'products/onap-dublin')
-rw-r--r--products/onap-dublin/features/integration/src/main/resources/open-cli-schema/ovp-tosca-vnf-provision.yaml1
-rw-r--r--products/onap-dublin/features/integration/src/main/resources/script/ovp-tosca-vnf-provision.py14
2 files changed, 10 insertions, 5 deletions
diff --git a/products/onap-dublin/features/integration/src/main/resources/open-cli-schema/ovp-tosca-vnf-provision.yaml b/products/onap-dublin/features/integration/src/main/resources/open-cli-schema/ovp-tosca-vnf-provision.yaml
index 6a7c1e81..20c71ec6 100644
--- a/products/onap-dublin/features/integration/src/main/resources/open-cli-schema/ovp-tosca-vnf-provision.yaml
+++ b/products/onap-dublin/features/integration/src/main/resources/open-cli-schema/ovp-tosca-vnf-provision.yaml
@@ -17,6 +17,7 @@ name: tosca-vnf-provision
description: |
Provision TOSCA based VNF using ONAP.
More details: https://wiki.lfnetworking.org/display/LN/TOSCA+VNF+Validation+Planning
+ NOTE: Before using this command, configure the $OPEN_CLI_HOME/conf/ovp-tosca-vnf-provision.json
info:
product: onap-dublin
diff --git a/products/onap-dublin/features/integration/src/main/resources/script/ovp-tosca-vnf-provision.py b/products/onap-dublin/features/integration/src/main/resources/script/ovp-tosca-vnf-provision.py
index dddb0a08..11193fd9 100644
--- a/products/onap-dublin/features/integration/src/main/resources/script/ovp-tosca-vnf-provision.py
+++ b/products/onap-dublin/features/integration/src/main/resources/script/ovp-tosca-vnf-provision.py
@@ -302,16 +302,20 @@ def create_ns(parameters, csar_id):
ns = parameters["ns"]
ns_create_string = 'oclip vfc-nslcm-create -m {} -c {} -n {} -q {} -S {}'.format(parameters["vfc-url"], \
csar_id, ns.get("name"), parameters["customer_name"], parameters["service_name"])
- print ns_create_string
+ print (ns_create_string)
+
ns_create_out = (os.popen(ns_create_string)).read()
- print ns_create_out
+
+ print (ns_create_out)
+
ns_instance_id = (get_out_helper_2(ns_create_out))[3]
+
return ns_instance_id
def instantiate_ns(parameters, ns_instance_id):
ns_instantiate_string = 'oclip vfc-nslcm-instantiate -m {} -i {} -c {} -n {}'.format(parameters["vfc-url"], \
ns_instance_id, parameters["location"], parameters["sdc-controller-id"])
- print ns_instantiate_string
+ print (ns_instantiate_string)
ns_instantiate_out = (os.popen(ns_instantiate_string)).read()
return ns_instantiate_out
@@ -340,8 +344,8 @@ def create_vnf_package(parameters):
def upload_ns_package(parameters, ns_package_output):
ns = parameters["ns"]
ns_upload_string = '{}/api/nsd/v1/ns_descriptors/{}/nsd_content'.format(parameters["vfc-url"], ns_package_output)
- print ns_upload_string
- print ns.get("path")
+ print (ns_upload_string)
+ print (ns.get("path"))
resp = requests.put(ns_upload_string, files={'file': open(ns.get("path"), 'rb')})
return resp