From: hewei-cmss Date: Fri, 5 Jul 2019 09:23:09 +0000 (+0800) Subject: Delete useless code X-Git-Tag: 1.3.4~50 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=113caa0a0a005a713e6cb638919cbf6197c0eb3a;p=vfc%2Fnfvo%2Flcm.git Delete useless code The condition has been judged before. Issue-ID: VFC-1437 Signed-off-by: hewei-cmss Change-Id: Idf39f8d10485c58dceceb81046fb040866110128 --- 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())