Code Review
/
vfc
/
gvnfm
/
vnflcm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
fix storage query error
[vfc/gvnfm/vnflcm.git]
/
lcm
/
lcm
/
nf
/
biz
/
query_vnf.py
diff --git
a/lcm/lcm/nf/biz/query_vnf.py
b/lcm/lcm/nf/biz/query_vnf.py
index
380d455
..
c735e0b
100644
(file)
--- 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)
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 storag
e:
- 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)
+
els
e:
+ storage = []
vnfc_dic = {
"id": vnfc.vnfcinstanceid,
"vduId": vnfc.vduid,
vnfc_dic = {
"id": vnfc.vnfcinstanceid,
"vduId": vnfc.vduid,