From 3a3c17eab2bc490b9468c6ff0c0a248081ecab9f Mon Sep 17 00:00:00 2001 From: "ying.yunlong" Date: Fri, 3 Mar 2017 09:38:02 +0800 Subject: Modify code of vnf instantiation Change-Id: I09dea83b0958e20bdf036bbde511a848cde988db Issue-Id: GVNFM-43 Signed-off-by: ying.yunlong --- lcm/lcm/nf/vnfs/const.py | 11 ++++++++++- lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lcm/lcm/nf/vnfs/const.py b/lcm/lcm/nf/vnfs/const.py index f368271e..8f421ab5 100644 --- a/lcm/lcm/nf/vnfs/const.py +++ b/lcm/lcm/nf/vnfs/const.py @@ -71,7 +71,16 @@ inst_req_data = { } ], "localizationLanguage": "en_US", - "additionalParams": {} + "additionalParams": {"inputs": {"key1":"test1","key2":"test2"}, + "extVirtualLinks": [{ + "vlInstanceId": '55', + "resourceId": '55_network', + "resourceSubnetId": '55_subnet', + "cpdId": 'cpId1', + "vim": { + "vimid": '55_vimid' + } + }]} } vnfd_rawdata = { diff --git a/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py b/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py index aa72c4e7..3078dbda 100644 --- a/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py +++ b/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py @@ -76,7 +76,8 @@ class InstVnf(Thread): JobUtil.add_job_status(self.job_id, 10, 'Get rawdata from catalog by csar_id') input_parameters = [] - for key, val in self.data['additionalParams'].items(): + inputs = ignore_case_get(self.data['additionalParams'], "inputs") + for key, val in inputs.items(): input_parameters.append({"key": key, "value": val}) raw_data = query_rawdata_from_catalog(self.package_id, input_parameters) self.vnfd_info = toscautil.convert_vnfd_model(raw_data["rawData"]) # convert to inner json -- cgit 1.2.3-korg