From 361e581f1977b679028f0311bac85eff9e1dd783 Mon Sep 17 00:00:00 2001 From: maopengzhang Date: Sat, 10 Nov 2018 17:48:05 +0800 Subject: [PATCH] fix configruaration-value issue fix configruaration-value to configruarationValue, etc Change-Id: I3b3b5a65e1b93b03ec8a31f44333606fb46686de Issue-ID: VFC-1158 Signed-off-by: maopengzhang --- lcm/lcm/nf/const.py | 2 +- lcm/lcm/pub/vimapi/adaptor.py | 2 +- lcm/lcm/samples/tests.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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", -- 2.16.6