aboutsummaryrefslogtreecommitdiffstats
path: root/products/onap-dublin/features/integration
diff options
context:
space:
mode:
authorKanagaraj M <mkr1481@gmail.com>2019-08-06 13:48:53 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2019-08-06 13:48:53 +0530
commitfe0d58756ea86d152fbc5b8139c54aa1b52030db (patch)
tree31d8410770f3b12fb0f1266b3cb626a0e4291e2d /products/onap-dublin/features/integration
parentc9e89752f38a44a4ac4b88d7a003efe78cc09616 (diff)
Fix minor issues in vnf provision cmd
Issue-ID: CLI-169 Change-Id: Id54ef6d15beb8bf0e1f78976ad8b58289f33e53f Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'products/onap-dublin/features/integration')
-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