From: ying.yunlong Date: Thu, 14 Dec 2017 06:05:25 +0000 (+0800) Subject: Resolve VFC code and swagger inconsistencies X-Git-Tag: v1.1.0~257 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F95%2F26295%2F1;p=vfc%2Fnfvo%2Flcm.git Resolve VFC code and swagger inconsistencies Change-Id: I60caa210fc89366bbe96d842f76be2eac85ec239 Issue-ID: VFC-620 Signed-off-by: ying.yunlong --- diff --git a/lcm/ns/vnfs/notify_lcm.py b/lcm/ns/vnfs/notify_lcm.py index f2007f31..9ebd89e5 100644 --- a/lcm/ns/vnfs/notify_lcm.py +++ b/lcm/ns/vnfs/notify_lcm.py @@ -77,9 +77,9 @@ class NotifyLcm(object): vnfcInstanceId = ignore_case_get(vnfc, 'vnfcInstanceId') vduId = ignore_case_get(vnfc, 'vduId') changeType = ignore_case_get(vnfc, 'changeType') - vimId = ignore_case_get(vnfc, 'vimid') - vmId = ignore_case_get(vnfc, 'vmid') - vmName = ignore_case_get(vnfc, 'vmname') + vimId = ignore_case_get(vnfc, 'vimId') + vmId = ignore_case_get(vnfc, 'vmId') + vmName = ignore_case_get(vnfc, 'vmName') if changeType == 'added': VNFCInstModel(vnfcinstanceid=vnfcInstanceId, vduid=vduId, @@ -101,7 +101,7 @@ class NotifyLcm(object): def update_Vl(self): for vl in self.affectedVl: vlInstanceId = ignore_case_get(vl, 'vlInstanceId') - vldid = ignore_case_get(vl, 'vldid') + vldid = ignore_case_get(vl, 'vldId') changeType = ignore_case_get(vl, 'changeType') networkResource = ignore_case_get(vl, 'networkResource') resourceType = ignore_case_get(networkResource, 'resourceType') @@ -126,18 +126,18 @@ class NotifyLcm(object): def update_Cp(self): for cp in self.affectedCp: virtualLinkInstanceId = ignore_case_get(cp, 'virtualLinkInstanceId') - ownertype = ignore_case_get(cp, 'ownertype') + ownertype = ignore_case_get(cp, 'ownerType') if not ownertype: ownertype = 0 - ownerid = self.vnf_instid if str(ownertype) == "0" else ignore_case_get(cp, 'ownerid') - cpInstanceId = ignore_case_get(cp, 'cpinstanceid') - cpdId = ignore_case_get(cp, 'cpdid') - changeType = ignore_case_get(cp, 'changetype') + ownerid = self.vnf_instid if str(ownertype) == "0" else ignore_case_get(cp, 'ownerId') + cpInstanceId = ignore_case_get(cp, 'cpInstanceId') + cpdId = ignore_case_get(cp, 'cpdId') + changeType = ignore_case_get(cp, 'changeType') relatedportId = '' portResource = ignore_case_get(cp, 'portResource') if portResource: - vimId = ignore_case_get(portResource, 'vimid') - resourceId = ignore_case_get(portResource, 'resourceid') + vimId = ignore_case_get(portResource, 'vimId') + resourceId = ignore_case_get(portResource, 'resourceId') resourceName = ignore_case_get(portResource, 'resourceName') tenant = ignore_case_get(portResource, 'tenant') ipAddress = ignore_case_get(portResource, 'ipAddress') diff --git a/lcm/pub/msapi/extsys.py b/lcm/pub/msapi/extsys.py index d01a5b8b..85a40d73 100644 --- a/lcm/pub/msapi/extsys.py +++ b/lcm/pub/msapi/extsys.py @@ -47,6 +47,7 @@ def get_vim_by_id(vim_id): # convert vim_info_aai to internal vim_info vim_info_aai = json.JSONDecoder().decode(ret[1]) vim_info = convert_vim_info(vim_info_aai) + logger.debug("vim_id=%s, vim_info=%s", vim_id, vim_info) return vim_info diff --git a/lcm/swagger/vfc.vnfdriver.swagger.json b/lcm/swagger/vfc.vnfdriver.swagger.json index a2b37f3d..38b30831 100644 --- a/lcm/swagger/vfc.vnfdriver.swagger.json +++ b/lcm/swagger/vfc.vnfdriver.swagger.json @@ -733,15 +733,15 @@ "$ref": "#/definitions/VnfNotificationType", "description": "The type of the change" }, - "vimid": { + "vimId": { "type": "string", "description": "Identifier of vim" }, - "vmid": { + "vmId": { "type": "string", "description": "Identifier of virtual machine" }, - "vmname": { + "vmName": { "type": "string", "description": "Name of virtual machine" } @@ -762,7 +762,7 @@ "type": "string", "description": "Identifier of the VL instance" }, - "vldid": { + "vldId": { "type": "string", "description": "Identifier of the VLD in the VNFD" }, @@ -802,11 +802,11 @@ "type": "string", "description": "Identifier of the VL instance" }, - "cpinstanceid": { + "cpInstanceId": { "type": "string", "description": "Identifier of the connection point" }, - "cpdid": { + "cpdId": { "type": "string", "description": "Identifier of the connection point in the VNFD" }, @@ -826,11 +826,11 @@ "type": "object", "description": "port Resource", "properties": { - "vimid": { + "vimId": { "type": "string", "description": "Identifier of the VIM" }, - "resourceid": { + "resourceId": { "type": "string", "description": "Identifier of the resource in the scope of the VIM" },