aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhewei-cmss <hewei@cmss.chinamobile.com>2019-07-05 17:23:09 +0800
committerhewei-cmss <hewei@cmss.chinamobile.com>2019-07-05 17:23:09 +0800
commit113caa0a0a005a713e6cb638919cbf6197c0eb3a (patch)
tree8cdafa301daabc25b9a458b945221963ce5ff782
parentf260819938455e32679cf10dfafd6ee881cd8d37 (diff)
Delete useless code
The condition has been judged before. Issue-ID: VFC-1437 Signed-off-by: hewei-cmss <hewei@cmss.chinamobile.com> Change-Id: Idf39f8d10485c58dceceb81046fb040866110128
-rw-r--r--lcm/ns/biz/ns_instant.py2
-rw-r--r--lcm/ns/tests/test_ns_delete.py2
2 files changed, 1 insertions, 3 deletions
diff --git a/lcm/ns/biz/ns_instant.py b/lcm/ns/biz/ns_instant.py
index 1588ae9b..39ddecf5 100644
--- a/lcm/ns/biz/ns_instant.py
+++ b/lcm/ns/biz/ns_instant.py
@@ -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
diff --git a/lcm/ns/tests/test_ns_delete.py b/lcm/ns/tests/test_ns_delete.py
index 516e4324..d8ebf9ae 100644
--- a/lcm/ns/tests/test_ns_delete.py
+++ b/lcm/ns/tests/test_ns_delete.py
@@ -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())