diff options
author | Tim Rozet <trozet@redhat.com> | 2016-05-25 21:06:36 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-05-25 21:06:36 +0000 |
commit | 6b5a9c96809acfbb516918db7ab3ba36eb7fda92 (patch) | |
tree | ac410182ddbabaee2db7dcaef0d66417a8787b92 /ci/deploy.sh | |
parent | 217a97a33db42da90e7f62231b74efa3ef120131 (diff) | |
parent | 2370aea5cb854569722897dcb37341841842e873 (diff) |
Merge "Fixes nic template missing in spec and error catching"
Diffstat (limited to 'ci/deploy.sh')
-rwxr-xr-x | ci/deploy.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh index 59cfc6d1..677d4484 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -618,7 +618,7 @@ function configure_network_environment { ##Copy over the glance images and instackenv json file ##params: none function configure_undercloud { - + local controller_nic_template compute_nic_template echo echo "Copying configuration files to Undercloud" if [[ "$net_isolation_enabled" == "TRUE" ]]; then @@ -626,13 +626,22 @@ function configure_undercloud { echo -e "${blue}Network Environment set for Deployment: ${reset}" cat $CONFIG/network-environment.yaml scp ${SSH_OPTIONS[@]} $CONFIG/network-environment.yaml "stack@$UNDERCLOUD": + if ! controller_nic_template=$(python3.4 -B $CONFIG/lib/python/apex-python-utils.py nic_template -d $CONFIG -f nics-controller.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family); then + echo -e "${red}ERROR: Failed to generate controller NIC heat template ${reset}" + exit 1 + fi + + if ! compute_nic_template=$(python3.4 -B $CONFIG/lib/python/apex-python-utils.py nic_template -d $CONFIG -f nics-compute.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family); then + echo -e "${red}ERROR: Failed to generate compute NIC heat template ${reset}" + exit 1 + fi ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" << EOI mkdir nics/ cat > nics/controller.yaml << EOF -$(python3.4 -B $CONFIG/lib/python/apex-python-utils.py nic_template -d $CONFIG -f nics-controller.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family) +$controller_nic_template EOF cat > nics/compute.yaml << EOF -$(python3.4 -B $CONFIG/lib/python/apex-python-utils.py nic_template -d $CONFIG -f nics-compute.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family) +$compute_nic_template EOF EOI fi |