From: maopengzhang Date: Sat, 10 Nov 2018 09:48:05 +0000 (+0800) Subject: fix configruaration-value issue X-Git-Tag: 1.2.1~10 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=vfc%2Fgvnfm%2Fvnflcm.git;a=commitdiff_plain;h=361e581f1977b679028f0311bac85eff9e1dd783 fix configruaration-value issue fix configruaration-value to configruarationValue, etc Change-Id: I3b3b5a65e1b93b03ec8a31f44333606fb46686de Issue-ID: VFC-1158 Signed-off-by: maopengzhang --- diff --git a/lcm/lcm/nf/const.py b/lcm/lcm/nf/const.py index 9cedf4bc..4a71a4d1 100644 --- a/lcm/lcm/nf/const.py +++ b/lcm/lcm/nf/const.py @@ -732,7 +732,7 @@ vnfdModel = { "virtual_network_interface_requirements": [ { "network_interface_requirements": { - "interfaceType": '{"schema-version": "0", "schema-location":"", "platform-id": "generic", "mandatory": false, "configuration-value": "SR-IOV"}' + "interfaceType": '{"schemaVersion": "0", "schemaLocation":"", "platformId": "generic", "mandatory": false, "configurationValue": "SR-IOV"}' }, "support_mandatory": False, "name": "SRIOV_Port", diff --git a/lcm/lcm/pub/vimapi/adaptor.py b/lcm/lcm/pub/vimapi/adaptor.py index 8542e113..2680ff9b 100644 --- a/lcm/lcm/pub/vimapi/adaptor.py +++ b/lcm/lcm/pub/vimapi/adaptor.py @@ -261,7 +261,7 @@ def create_port(vim_cache, res_cache, data, port, do_notify, res_type): ip_address.extend(fixed_ip_address) for one_virtual_network_interface in port["properties"].get("virtual_network_interface_requirements", []): interfaceTypeString = one_virtual_network_interface["network_interface_requirements"]["interfaceType"] - interfaceType = json.loads(interfaceTypeString)["configuration-value"] + interfaceType = json.loads(interfaceTypeString)["configurationValue"] vnic_type = ignore_case_get(port["properties"], "vnic_type") if vnic_type == "": if interfaceType == "SR-IOV": diff --git a/lcm/lcm/samples/tests.py b/lcm/lcm/samples/tests.py index d77845b0..dba0878c 100644 --- a/lcm/lcm/samples/tests.py +++ b/lcm/lcm/samples/tests.py @@ -232,7 +232,7 @@ inst_res_data = { "virtual_network_interface_requirements": [ { "network_interface_requirements": { - "interfaceType": '{"schema-version": "0", "schema-location":"", "platform-id": "generic", "mandatory": false, "configuration-value": "SR-IOV"}' + "interfaceType": '{"schemaVersion": "0", "schemaLocation":"", "platformId": "generic", "mandatory": false, "configurationValue": "SR-IOV"}' }, "support_mandatory": False, "name": "sriov-support",