diff options
author | ying.yunlong <ying.yunlong@zte.com.cn> | 2017-03-03 09:38:02 +0800 |
---|---|---|
committer | ying.yunlong <ying.yunlong@zte.com.cn> | 2017-03-03 09:38:02 +0800 |
commit | 3a3c17eab2bc490b9468c6ff0c0a248081ecab9f (patch) | |
tree | 5e0b56133eaa909a64924df7fc6b98062cb79c82 | |
parent | 6070e5379a56d3af1b43374722188c853b2cdb2a (diff) |
Modify code of vnf instantiation
Change-Id: I09dea83b0958e20bdf036bbde511a848cde988db
Issue-Id: GVNFM-43
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r-- | lcm/lcm/nf/vnfs/const.py | 11 | ||||
-rw-r--r-- | 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 |