summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2017-12-14 14:05:25 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2017-12-14 14:05:25 +0800
commit28f9c92ee263176394b9e8da4f258bb5c3284be8 (patch)
tree483e85f5c3a73654e77d84d30d284a0886620b89
parentc365977d1cac9e5646efb16cc410cb443d0a7292 (diff)
Resolve VFC code and swagger inconsistencies
Change-Id: I60caa210fc89366bbe96d842f76be2eac85ec239 Issue-ID: VFC-620 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r--lcm/ns/vnfs/notify_lcm.py22
-rw-r--r--lcm/pub/msapi/extsys.py1
-rw-r--r--lcm/swagger/vfc.vnfdriver.swagger.json16
3 files changed, 20 insertions, 19 deletions
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"
},