aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKanagaraj M <mkr1481@gmail.com>2019-08-08 10:33:00 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2019-08-08 11:02:19 +0530
commit8ca68d4709af3684882db0a54e38a8eda4eb6b6c (patch)
treef93d84ffc68b2045e8a363b85a7695cbc494575d
parent1aa15b526706ed7f45f197186a3e6ca0da3204c6 (diff)
Make lcm scripts simpler
Issue-ID: CLI-169 Change-Id: I73d202dc498e0f05bf8f679df29625907f0b2605 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
-rw-r--r--products/onap-dublin/features/integration/src/main/resources/script/ovp-tosca-vnf-provision.py93
1 files changed, 48 insertions, 45 deletions
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 11193fd9..f382e8cb 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
@@ -366,51 +366,54 @@ def provision_vnf():
result_json['ns_id'] = ''
result_json['ns_status'] = ''
- # 1.Setup cloud and service
- #setup cloud and region
- create_complex(parameters)
- register_all_clouds(parameters)
-
- # setup subscription and customer
- create_service_type(parameters)
- create_customer(parameters)
- add_customer_subscription(parameters)
-
- # setup vnfm
- register_vnfm(parameters)
-
- # Setup License
- vlm_output = create_vlm(parameters)
- print "vlm parameters={}".format(vlm_output)
-
- # 2. on-board VSP
- vsp_id = create_vsp(parameters, vlm_output)
- print "vsp id={}".format(vsp_id)
-
- # 3. model VF
- vf_model_dict = create_vf_model(parameters, vsp_id)
- print "vf model parameters={}".format(vf_model_dict)
- vf_id = vf_model_dict["vf_id"]
- vf_unique_id = vf_model_dict["vf_unique_id"]
-
- # 4. model NS and 5. Approve and distribute
- service_model_list = create_service_model(parameters, vf_unique_id)
- print "service model parameters={}".format(service_model_list)
-
- # 6. onboard VNF
- vnf_onboard_output = onboard_vnf(parameters)
- print vnf_onboard_output
-
- # 7. onboard NS
- ns_onboard_out = onboard_ns(parameters)
- print ns_onboard_out
-
- # 8. create NS
- ns_instance_id = create_ns(parameters, ns_package_output)
- print ns_instance_id
-
- instantiate_ns_output = instantiate_ns(parameters, ns_instance_id)
- print instantiate_ns_output
+ def _provision():
+ # 1.Setup cloud and service
+ #setup cloud and region
+ create_complex(parameters)
+ register_all_clouds(parameters)
+
+ # setup subscription and customer
+ create_service_type(parameters)
+ create_customer(parameters)
+ add_customer_subscription(parameters)
+
+ # setup vnfm
+ register_vnfm(parameters)
+
+ # Setup License
+ vlm_output = create_vlm(parameters)
+ print "vlm parameters={}".format(vlm_output)
+
+ # 2. on-board VSP
+ vsp_id = create_vsp(parameters, vlm_output)
+ print "vsp id={}".format(vsp_id)
+
+ # 3. model VF
+ vf_model_dict = create_vf_model(parameters, vsp_id)
+ print "vf model parameters={}".format(vf_model_dict)
+ vf_id = vf_model_dict["vf_id"]
+ vf_unique_id = vf_model_dict["vf_unique_id"]
+
+ # 4. model NS and 5. Approve and distribute
+ service_model_list = create_service_model(parameters, vf_unique_id)
+ print "service model parameters={}".format(service_model_list)
+
+ # 6. onboard VNF
+ vnf_onboard_output = onboard_vnf(parameters)
+ print vnf_onboard_output
+
+ # 7. onboard NS
+ ns_onboard_out = onboard_ns(parameters)
+ print ns_onboard_out
+
+ # 8. create NS
+ ns_instance_id = create_ns(parameters, ns_package_output)
+ print ns_instance_id
+
+ instantiate_ns_output = instantiate_ns(parameters, ns_instance_id)
+ print instantiate_ns_output
+
+ _provision()
return result_json