Resolve VFC code and swagger inconsistencies 95/26295/1
authorying.yunlong <ying.yunlong@zte.com.cn>
Thu, 14 Dec 2017 06:05:25 +0000 (14:05 +0800)
committerying.yunlong <ying.yunlong@zte.com.cn>
Thu, 14 Dec 2017 06:05:25 +0000 (14:05 +0800)
Change-Id: I60caa210fc89366bbe96d842f76be2eac85ec239
Issue-ID: VFC-620
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
lcm/ns/vnfs/notify_lcm.py
lcm/pub/msapi/extsys.py
lcm/swagger/vfc.vnfdriver.swagger.json

index f2007f3..9ebd89e 100644 (file)
@@ -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')
index d01a5b8..85a40d7 100644 (file)
@@ -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
 
 
index a2b37f3..38b3083 100644 (file)
            "$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"
          }
            "type": "string",
            "description": "Identifier of the VL instance"
          },
-         "vldid": {
+         "vldId": {
            "type": "string",
            "description": "Identifier of the VLD in the VNFD"
          },
            "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"
          },
            "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"
              },