vdu_config = utils.find_in_list(configs, lambda config: config["id"] == vdu["id"])
except Exception:
vdu_config = None
-
+
+ try:
+ vdu_instantiation_level = utils.find_in_list(
+ vnfd.get("df")[0]["instantiation-level"][0]["vdu-level"],
+ lambda a_vdu_profile: a_vdu_profile["vdu-id"] == vdu["id"]
+ )
+ except Exception:
+ vdu_instantiation_level = None
+
if vdu_config:
external_connection_ee = utils.filter_in_list(
vdu_config.get("execution-environment-list", []),
if nsr_flavor_desc:
vdur["ns-flavor-id"] = nsr_flavor_desc["id"]
- count = int(vdu.get("count", 1))
+ if vdu_instantiation_level:
+ count = vdu_instantiation_level.get("number-of-instances")
+ else:
+ count = 1
+
for index in range(0, count):
vdur = deepcopy(vdur)
for iface in vdur["interfaces"]: