Delete useless code 31/90931/1
authorhewei-cmss <hewei@cmss.chinamobile.com>
Fri, 5 Jul 2019 09:23:09 +0000 (17:23 +0800)
committerhewei-cmss <hewei@cmss.chinamobile.com>
Fri, 5 Jul 2019 09:23:09 +0000 (17:23 +0800)
The condition has been judged before.

Issue-ID: VFC-1437

Signed-off-by: hewei-cmss <hewei@cmss.chinamobile.com>
Change-Id: Idf39f8d10485c58dceceb81046fb040866110128

lcm/ns/biz/ns_instant.py
lcm/ns/tests/test_ns_delete.py

index 1588ae9..39ddecf 100644 (file)
@@ -270,8 +270,6 @@ class InstantNSService(object):
             vimid = ignore_case_get(vnf_vim, vnfdid)
             if not vimid:
                 vimid = vim_id
-            if not vimid:
-                raise NSLCMException("No Vim info for vl(%s) of vnf(%s)." % (vl["vl_id"], vnfdid))
             if "location_info" not in vl["properties"]:
                 vl["properties"]["location_info"] = {}
             vl["properties"]["location_info"]["vimid"] = vimid
index 516e432..d8ebf9a 100644 (file)
@@ -22,7 +22,7 @@ from rest_framework import status
 from lcm.ns.tests import NS_INFO_AAI_DICT
 
 
-class TestNsDelelete(TestCase):
+class TestNsDelete(TestCase):
     def setUp(self):
         self.client = Client()
         self.ns_inst_id = str(uuid.uuid1())