Status should be null after terminated NS.
Issue-ID: VFC-1447
Signed-off-by: hewei-cmss <hewei@cmss.chinamobile.com>
Change-Id: Ifbaeb97f759c67dafc8747760d24c0bf2c3498cf
ns_insts = NSInstModel.objects.filter(id=ns_inst_id)
else:
ns_insts = NSInstModel.objects.all()
- return [self.get_single_ns_info(ns_inst, is_sol) for ns_inst in ns_insts]
+ result = []
+ for ns_inst in ns_insts:
+ if ns_insts and ns_insts[0].status != 'null':
+ result.append(self.get_single_ns_info(ns_inst, is_sol))
+ return result
def get_single_ns_info(self, ns_inst, is_sol=False):
if is_sol: