diff options
author | Zhijiang Hu <hu.zhijiang@zte.com.cn> | 2018-01-05 06:28:53 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-01-05 06:28:53 +0000 |
commit | 49205e7200afd0ce286d2f685093948cb1f7bf3d (patch) | |
tree | 9d7cadd83073c7c872e0fa119f6b2460d50636c2 | |
parent | 9da43ddfc09e56b772e4304eef430e56aaf6013e (diff) | |
parent | 493ca4b1def4632625ffadacb40753283b2ee33a (diff) |
Merge "Get configurations from pharos instead securedlab"
-rwxr-xr-x | ci/deploy/deploy.sh | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/ci/deploy/deploy.sh b/ci/deploy/deploy.sh index 4ea87b6b..ff74061e 100755 --- a/ci/deploy/deploy.sh +++ b/ci/deploy/deploy.sh @@ -118,7 +118,7 @@ do esac done -SECURELABDIR=${SECURELABDIR:-${WORKSPACE}/securedlab} +SECURELABDIR=${SECURELABDIR:-${WORKSPACE}/pharos} if [[ ! "$SECURELABDIR" = /* ]] || [ -z $LAB_NAME ] || [ -z $POD_NAME ] ; then echo """Please check @@ -184,14 +184,20 @@ BMDEPLOY_DAISY_SERVER_VM=$WORKSPACE/templates/physical_environment/vms/daisy.xml function update_dha_by_pdf() { local pdf_yaml=labs/$LAB_NAME/${POD_NAME}.yaml - local jinja2_template=installers/daisy/pod_config.yaml.j2 - local generate_config=utils/generate_config.py - if [ ! -f ${generate_config} ] || [ ! -f ${pdf_yaml} ] || [ ! -f ${jinja2_template} ]; then + local pod_template=config/installers/daisy/pod_config.yaml.j2 + local generate_config=config/utils/generate_config.py + if [[ $DEPLOY_SCENARIO =~ (dpdk) ]]; then + local network_template=config/installers/daisy/network-dpdk.yaml.j2 + else + local network_template=config/installers/daisy/network.yaml.j2 + fi + if [ ! -f ${generate_config} ] || [ ! -f ${pdf_yaml} ] || [ ! -f ${pod_template} ] || [ ! -f ${network_template} ] ; then + echo "Template files donot exist in ${SECURELABDIR}." return fi local tmpfile=$(mktemp XXXXXXXX.yml) - python ${generate_config} -j ${jinja2_template} -y ${pdf_yaml} > ${tmpfile} + python ${generate_config} -j ${pod_template} -y ${pdf_yaml} > ${tmpfile} if [ $? -ne 0 ]; then echo "Cannot generate config from POD Descriptor File, use original deploy.yml !" return @@ -207,6 +213,14 @@ function update_dha_by_pdf() fi cp ${tmpfile} ${DHA_CONF} echo "====== Update deploy.yml from POD Descriptor File ======" + + python ${generate_config} -j ${network_template} -y ${pdf_yaml} > ${tmpfile} + if [ $? -ne 0 ]; then + echo "Cannot generate network configuration from PDF and IDF!" + return + fi + cp ${tmpfile} ${NETWORK_CONF} + echo "====== Update $(basename ${NETWORK_CONF}) from POD Descriptor File ======" rm -f $tmpfile } |