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
Modify code and of terminate_vnf_grant_resource
[vfc/gvnfm/vnflcm.git]
/
lcm
/
lcm
/
nf
/
vnfs
/
vnf_query
/
query_vnf.py
diff --git
a/lcm/lcm/nf/vnfs/vnf_query/query_vnf.py
b/lcm/lcm/nf/vnfs/vnf_query/query_vnf.py
index
6526e73
..
3ef1a8d
100644
(file)
--- a/
lcm/lcm/nf/vnfs/vnf_query/query_vnf.py
+++ b/
lcm/lcm/nf/vnfs/vnf_query/query_vnf.py
@@
-21,7
+21,7
@@
logger = logging.getLogger(__name__)
class QueryVnf:
class QueryVnf:
- def __init__(self, data, instanceid):
+ def __init__(self, data, instanceid
=''
):
self.vnf_inst_id = instanceid
self.data = data
pass
self.vnf_inst_id = instanceid
self.data = data
pass
@@
-34,7
+34,13
@@
class QueryVnf:
return resp_data
def query_multi_vnf(self):
return resp_data
def query_multi_vnf(self):
- pass
+ vnf_insts = NfInstModel.objects.all()
+ if not vnf_insts:
+ raise NFLCMException('VnfInsts does not exist')
+ resp_data = []
+ for vnf_inst in vnf_insts:
+ resp_data.append(self.fill_resp_data(vnf_inst))
+ return resp_data
def fill_resp_data(self, vnf):
logger.info('Get the list of vloumes')
def fill_resp_data(self, vnf):
logger.info('Get the list of vloumes')
@@
-66,7
+72,7
@@
class QueryVnf:
}
vl_arr.append(v_dic)
logger.info('Get VNFCInstModel of list.')
}
vl_arr.append(v_dic)
logger.info('Get VNFCInstModel of list.')
- vnfc_insts = VNFCInstModel.objects.filter(
nf
instid=vnf.nfinstid)
+ vnfc_insts = VNFCInstModel.objects.filter(instid=vnf.nfinstid)
vnfc_arr = []
for vnfc in vnfc_insts:
vm = VmInstModel.objects.filter(vmid=vnfc.vmid)
vnfc_arr = []
for vnfc in vnfc_insts:
vm = VmInstModel.objects.filter(vmid=vnfc.vmid)