Place nic-configs in the t-h-t path

See https://bugs.launchpad.net/heat-templates/+bug/1650625.
using the full path in the templates does not seem
workable as the temmplates path is configurable.
Moving the custom nic-configs to the t-h-t dir
so that the relative script path resolves.

Change-Id: I70867ee90313ea4a8a1c5da312ad0fed3144d58c
This commit is contained in:
Ronelle Landy 2016-12-14 13:26:22 -05:00
parent 301e4845cc
commit 270a9f6786
3 changed files with 9 additions and 5 deletions

View File

@ -1,3 +1,4 @@
overcloud_ipv6: false
containerized_overcloud: false
overcloud_templates_path: /usr/share/openstack-tripleo-heat-templates

View File

@ -0,0 +1,2 @@
dependencies:
- extras-common

View File

@ -12,15 +12,16 @@ set -eux
## * Copy the yaml file from the standard template files directory
## ::
mkdir -p {{ working_dir }}/nic-configs
ORIGIN_TEMPLATES_DIR=/usr/share/openstack-tripleo-heat-templates/network/config/bond-with-vlans
cp $ORIGIN_TEMPLATES_DIR/*.yaml {{ working_dir }}/nic-configs/
ORIGIN_TEMPLATES_DIR={{ overcloud_templates_path }}/network/config/bond-with-vlans
CUSTOM_TEMPLATES_DIR={{ overcloud_templates_path }}/network/config/custom-bond-with-vlans
sudo mkdir -p $CUSTOM_TEMPLATES_DIR
sudo cp $ORIGIN_TEMPLATES_DIR/*.yaml $CUSTOM_TEMPLATES_DIR/
## * Modify the yaml files to use Linux bonds
## ::
grep -rl 'type: ovs_bond' {{ working_dir }}/nic-configs/ | xargs sed -i 's/type: ovs_bond/type: linux_bond/g'
grep -rl 'ovs_options' {{ working_dir }}/nic-configs/ | xargs sed -i 's/ovs_options/bonding_options/g'
sudo grep -rl 'type: ovs_bond' $CUSTOM_TEMPLATES_DIR/ | xargs sudo sed -i 's/type: ovs_bond/type: linux_bond/g'
sudo grep -rl 'ovs_options' $CUSTOM_TEMPLATES_DIR/ | xargs sudo sed -i 's/ovs_options/bonding_options/g'
### --stop_docs