X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=lcm%2Flcm%2Fnf%2Fbiz%2Fquery_vnf.py;h=c735e0b7424e92b872e6a614531709e978f7dbbd;hb=83e33d9dd6608024dbf92cfde8daf51a298b5f54;hp=380d455a0bde03d68da6fa92183891353b96ddb4;hpb=5efbf8748ca225b26e909cef06e2314746fb3e1b;p=vfc%2Fgvnfm%2Fvnflcm.git diff --git a/lcm/lcm/nf/biz/query_vnf.py b/lcm/lcm/nf/biz/query_vnf.py index 380d455a..c735e0b7 100644 --- a/lcm/lcm/nf/biz/query_vnf.py +++ b/lcm/lcm/nf/biz/query_vnf.py @@ -78,10 +78,10 @@ class QueryVnf: vm = VmInstModel.objects.filter(vmid=vnfc.vmid) if not vm: raise NFLCMException('VmInst(%s) does not exist.' % vnfc.vmid) - storage = StorageInstModel.objects.filter(vimid=vm[0].vmid) - # TODO: previously, ownerid=vm[0].vmid, but ownerid is not a field of StorageInstModel. - if not storage: - raise NFLCMException('StorageInst(%s) does not exist.' % vm[0].vmid) + if vm[0].volume_array: + storage = StorageInstModel.objects.filter(resourceid__in=vm[0].volume_array) + else: + storage = [] vnfc_dic = { "id": vnfc.vnfcinstanceid, "vduId": vnfc.vduid,