descriptor_configuration = utils.find_in_list(
configs,
lambda config: config["id"] == indata["vdu_id"]
- ).get("config-primitive")
+ )
elif indata.get("kdu_name"):
self._check_valid_kdu(vnfd, indata["kdu_name"])
descriptor_configuration = utils.find_in_list(
configs,
lambda config: config["id"] == indata.get("kdu_name")
- ).get("config-primitive")
+ )
else:
descriptor_configuration = utils.find_in_list(
configs,
lambda config: config["id"] == vnfd["id"]
- ).get("config-primitive")
+ )
+ if descriptor_configuration is not None:
+ descriptor_configuration = descriptor_configuration.get("config-primitive")
else: # use a NSD
descriptor_configuration = nsd.get("ns-configuration", {}).get("config-primitive")