From: Pedro Escaleira Date: Sun, 11 Sep 2022 23:14:41 +0000 (+0100) Subject: Bug 2160 fixed: verifying if VDUR exists within the method update_ns_vld_target X-Git-Tag: v12.0.7~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=8af0510b8b794968c168c4f64ba4d0f79b2df577;p=osm%2FLCM.git Bug 2160 fixed: verifying if VDUR exists within the method update_ns_vld_target Change-Id: I2f3ce8a8b32a2bc72e5e3022dd88c120300e2b29 Signed-off-by: Pedro Escaleira (cherry picked from commit aa366ed3f6c9133629ac10682d006cd908065784) --- diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index 614ff46..d3ec1df 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -916,6 +916,8 @@ class NsLcm(LcmBase): None, ) vdur = next((vdur for vdur in target_vnf.get("vdur", ())), None) + if not vdur: + continue for a_index, a_vld in enumerate(target["ns"]["vld"]): target_vld = find_in_list( get_iterable(vdur, "interfaces"),