X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=mcp%2Fscripts%2Flib_template.sh;h=822d14116d9858f6e026aa1d62f523d85b5ba33b;hb=fccf558f0c55c0b26448961a97d8edae3dd7db4d;hp=b44702235df982bf0337cc2768d13ebcb3509a69;hpb=9e5b19768d6eb9b32564240065ecba6c791cac12;p=fuel.git diff --git a/mcp/scripts/lib_template.sh b/mcp/scripts/lib_template.sh index b44702235..822d14116 100644 --- a/mcp/scripts/lib_template.sh +++ b/mcp/scripts/lib_template.sh @@ -47,22 +47,22 @@ function do_templates_scenario { notify_e "[ERROR] IDF does not match yaml schema!" fi fi - if ! "${PHAROS_GEN_CFG}" -y "${LOCAL_PDF}" \ - -i "$(dirname "$(readlink -f "${PHAROS_IA}")")" \ - -j "${PHAROS_IA}" -v > "${image_dir}/pod_config.yml"; then - notify_e "[ERROR] Could not convert PDF+IDF to reclass model input!" - fi printenv | \ awk '/^(SALT|MCP|MAAS).*=/ { gsub(/=/,": "); print }' >> "${LOCAL_PDF}" j2args=$(find "${scenario_dir}" -name '*.j2' -exec echo -j {} \;) # shellcheck disable=SC2086 - if ! "${PHAROS_GEN_CFG}" -y "${LOCAL_PDF}" ${j2args} -b -v \ + if ! python3 "${PHAROS_GEN_CFG}" -y "${LOCAL_PDF}" ${j2args} -b -v \ -i "$(dirname "$(readlink -f "${PHAROS_IA}")")"; then notify_e '[ERROR] Could not convert j2 scenario definitions!' fi for _yaml in "${extra_yaml[@]}"; do awk '/^---$/{f=1;next;}f' "${_yaml}" >> "${LOCAL_PDF}" done + if ! python3 "${PHAROS_GEN_CFG}" -y "${LOCAL_PDF}" \ + -i "$(dirname "$(readlink -f "${PHAROS_IA}")")" \ + -j "${PHAROS_IA}" -v > "${image_dir}/pod_config.yml"; then + notify_e "[ERROR] Could not convert PDF+IDF to reclass model input!" + fi } # Expand reclass and virsh network templates based on PDF + IDF + others @@ -84,7 +84,7 @@ function do_templates_cluster { "$(readlink -f docker-compose)" $(readlink -f ./*j2) \ -name '*.j2' -exec echo -j {} \;) # shellcheck disable=SC2086 - if ! "${PHAROS_GEN_CFG}" -y "${LOCAL_PDF}" ${j2args} -b -v \ + if ! python3 "${PHAROS_GEN_CFG}" -y "${LOCAL_PDF}" ${j2args} -b -v \ -i "$(dirname "$(readlink -f "${PHAROS_IA}")")"; then notify_e '[ERROR] Could not convert PDF to network definitions!' fi