Remove directive from addtionalParams 19/71619/2
authorlaili <lai.li@zte.com.cn>
Thu, 1 Nov 2018 07:44:47 +0000 (15:44 +0800)
committerlaili <lai.li@zte.com.cn>
Fri, 2 Nov 2018 01:40:18 +0000 (09:40 +0800)
Change-Id: Ie69bd791cf044d90f2e9ae7633e16ba3f487eb49
Issue-ID: VFC-1176
Signed-off-by: laili <lai.li@zte.com.cn>
lcm/ns_vnfs/biz/grant_vnf.py

index d812d95..faeebec 100644 (file)
@@ -84,7 +84,17 @@ class GrantVnf(object):
                         break
                 req_param[grant_type].append(grant_res)
             self.data = req_param
-        vimConnections.append(resmgr.grant_vnf(self.data))
+        tmp = resmgr.grant_vnf(self.data)
+        vimConnections.append(
+            {
+                "id": tmp["vim"]["vimId"],
+                "vimId": tmp["vim"]["vimId"],
+                "vimType": None,
+                "interfaceInfo": None,
+                "accessInfo": tmp["vim"]["accessInfo"],
+                "extra": None
+            }
+        )
 
         grant_resp = {
             "id": str(uuid.uuid4()),
@@ -102,7 +112,7 @@ class GrantVnf(object):
                     'vnfdVirtualComputeDescId': None,  # TODO: required
                     'vimFlavourId': off.flavor_name
                 })
-                grant_resp['additionalparams'][off.vim_id] = off.directive
+                grant_resp['additionalparams'][off.vim_id] = off.directive
 
         logger.debug("grant_resp=%s", grant_resp)
         return grant_resp