If target_vnf does not have additionalParams
KeyError is raised and additionalParams become optional within this change.
Change-Id: I69cb579882b305befd2a64a60bede450e8e6c10d
Signed-off-by: Gulsum Atici <gulsum.atici@canonical.com>
for target_vdu in target_vdu_list:
deploy_params_vdu = target_vdu
# Set run-day1 vnf level value if not vdu level value exists
- if not deploy_params_vdu.get("run-day1") and target_vnf[
- "additionalParams"
- ].get("run-day1"):
+ if not deploy_params_vdu.get("run-day1") and target_vnf.get(
+ "additionalParams", {}
+ ).get("run-day1"):
deploy_params_vdu["run-day1"] = target_vnf[
"additionalParams"
].get("run-day1")