+ if "additionalParamsForNs" in ns_config:
+ ns["additionalParamsForNs"] = ns_config.pop("additionalParamsForNs")
+ if not isinstance(ns["additionalParamsForNs"], dict):
+ raise ValueError("Error at --config 'additionalParamsForNs' must be a dictionary")
+ if "additionalParamsForVnf" in ns_config:
+ ns["additionalParamsForVnf"] = ns_config.pop("additionalParamsForVnf")
+ if not isinstance(ns["additionalParamsForVnf"], list):
+ raise ValueError("Error at --config 'additionalParamsForVnf' must be a list")
+ for additional_param_vnf in ns["additionalParamsForVnf"]:
+ if not isinstance(additional_param_vnf, dict):
+ raise ValueError("Error at --config 'additionalParamsForVnf' items must be dictionaries")
+ if not additional_param_vnf.get("member-vnf-index"):
+ raise ValueError("Error at --config 'additionalParamsForVnf' items must contain "
+ "'member-vnf-index'")
+ if "wim_account" in ns_config:
+ wim_account = ns_config.pop("wim_account")
+ if wim_account is not None:
+ ns['wimAccountId'] = get_wim_account_id(wim_account)
+ if "timeout_ns_deploy" in ns_config:
+ ns["timeout_ns_deploy"] = ns_config.pop("timeout_ns_deploy")
+
+ # print(yaml.safe_dump(ns))