summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2017-11-01 18:30:40 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2017-11-01 18:30:40 +0800
commite55115f06bce17bd0721432c4438533fcf5fbeec (patch)
treef56778a33d4a1bffd439f0e0bd76128cad772e6b
parent8ea2b99eb268f60c635e537975e5a0f156c46caf (diff)
Fix vnf package info get logic for vnf grant
Change-Id: I8968cac7e67cde322fbc733e61cf73033c2c0461 Issue-Id: VFC-577 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r--lcm/ns/vnfs/grant_vnfs.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/lcm/ns/vnfs/grant_vnfs.py b/lcm/ns/vnfs/grant_vnfs.py
index 46041928..a02496f9 100644
--- a/lcm/ns/vnfs/grant_vnfs.py
+++ b/lcm/ns/vnfs/grant_vnfs.py
@@ -65,11 +65,9 @@ class GrantVnfs(object):
vnf_pkg_id = vnfinsts[0].package_id
# vnf_pkgs = NfPackageModel.objects.filter(nfpackageid=vnf_pkg_id)
nfpackage_info = query_vnfpackage_by_id(vnf_pkg_id)
- vnf_pkgs = nfpackage_info["packageInfo"]
- if not vnf_pkgs:
- raise NSLCMException("vnfpkg(%s) is not found" % vnf_pkg_id)
+ vnf_pkg = nfpackage_info["packageInfo"]
- vnfd = json.JSONDecoder().decode(vnf_pkgs[0].vnfdmodel)
+ vnfd = json.JSONDecoder().decode(vnf_pkg["vnfdModel"])
req_param = {
"vnfInstanceId": m_vnf_inst_id,