From c360b972649028d2613fc8561899c2c8b7f71832 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Tue, 17 Oct 2017 18:12:25 +0200 Subject: [baremetal] PDF-based network config This change extends current PDF/IDF support with: - dynamic interface / vlan definition; - dynamic interface and/or bridge allocation of installer networks on top of interfaces (physical or vlans); This allows us to drop hardcoded interface names and vlan / bridge configuration in favor of a runtime determined model based on PDF/IDF. For now, we duplicate common jinja variable definitions in each template, but this will later be moved to a common include file. JIRA: FUEL-275 Change-Id: Ia80a66dbdf898b0bd0a4fb99d069ce9ebe33fa65 Signed-off-by: Alexandru Avadanii --- ci/deploy.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ci/deploy.sh') diff --git a/ci/deploy.sh b/ci/deploy.sh index 908909d20..3699bf966 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -345,6 +345,20 @@ for tp in "${RECLASS_CLUSTER_DIR}/all-mcp-ocata-common/opnfv/"*.template \ EOF" 2> /dev/null > "${tp%.template}" done +# Convert Pharos-compatible PDF to reclass network definitions +if [ "${DEPLOY_TYPE}" = 'baremetal' ]; then + find "${RECLASS_CLUSTER_DIR}/${CLUSTER_DOMAIN%.local}" \ + "${RECLASS_CLUSTER_DIR}/${DEPLOY_TYPE}-mcp-ocata-common" \ + -name '*.j2' | while read -r tp + do + if ! "${PHAROS_GEN_CONFIG_SCRIPT}" -y "${LOCAL_PDF}" \ + -j "${tp}" > "${tp%.j2}"; then + notify "[ERROR] Could not convert PDF to reclass network defs!\n" + exit 1 + fi + done +fi + # Map PDF networks 'admin', 'mgmt', 'private' and 'public' to bridge names BR_NAMES=('admin' 'mgmt' 'private' 'public') BR_NETS=( \ -- cgit 1.2.3-korg