X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_lcm%2Fdata_utils%2Fwim.py;h=ce2c26c33246601d2ef79391edc729e9274c5b8b;hb=HEAD;hp=c8ce0bf4a10dba0a932b3b586f5eeaa965a4bf5e;hpb=17cd492d2220d51830ba0c139c33fda5208e3313;p=osm%2FLCM.git diff --git a/osm_lcm/data_utils/wim.py b/osm_lcm/data_utils/wim.py index c8ce0bf..ce2c26c 100644 --- a/osm_lcm/data_utils/wim.py +++ b/osm_lcm/data_utils/wim.py @@ -80,6 +80,11 @@ def select_feasible_wim_account(db_nsr, db_vnfrs, target_vld, vld_params, logger candidate_wims = get_candidate_wims(vims_to_connect) logger.info("Candidate WIMs: {:s}".format(str(candidate_wims))) + # check if there are no WIM candidates + if len(candidate_wims) == 0: + logger.info("No WIM accounts found") + return None, None + # check if a desired wim_account_id is specified in vld_params wim_account_id = vld_params.get("wimAccountId") if wim_account_id: