aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/scripts/lib_template.sh
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-08-31 02:16:08 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-09-06 15:34:44 +0200
commitf7d7eece07de9ba44a0d11c68f0685b60752e4b8 (patch)
treed14c8715c88af6e44d5ab22c4b1a0842106858b1 /mcp/scripts/lib_template.sh
parent0b8c15936be133c6c4aeec36d57329f862f43544 (diff)
[submodule] Bump Pharos for maas:machines sync
Drop duplicate maas:machines definitions which could cause conflicts in rare corner cases. Slightly refactor j2 template expansion to make `conf.virtual.nodes` available during first stage. Change-Id: I04d56e346b12c6eb97da5c0c0ab1e3446e5fc1b8 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/scripts/lib_template.sh')
-rw-r--r--mcp/scripts/lib_template.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/mcp/scripts/lib_template.sh b/mcp/scripts/lib_template.sh
index 0cfc02fdf..daa04441b 100644
--- a/mcp/scripts/lib_template.sh
+++ b/mcp/scripts/lib_template.sh
@@ -23,7 +23,8 @@ function do_templates_scenario {
local target_lab=$1; shift
local target_pod=$1; shift
local lab_config_uri=$1; shift
- local scenario_dir=$1
+ local scenario_dir=$1; shift
+ local extra_yaml=("$@")
BASE_CONFIG_PDF="${lab_config_uri}/labs/${target_lab}/${target_pod}.yaml"
BASE_CONFIG_IDF="${lab_config_uri}/labs/${target_lab}/idf-${target_pod}.yaml"
@@ -49,6 +50,9 @@ function do_templates_scenario {
notify_e "[ERROR] IDF does not match yaml schema!"
fi
fi
+ for _yaml in "${extra_yaml[@]}"; do
+ awk '/^---$/{f=1;next;}f' "${_yaml}" >> "${LOCAL_PDF}"
+ done
if ! "${PHAROS_GEN_CFG}" -y "${LOCAL_PDF}" \
-i "$(dirname "$(readlink -f "${PHAROS_IA}")")" \
-j "${PHAROS_IA}" -v > "${image_dir}/pod_config.yml"; then