tripleo-heat-templates/tools/check-up-to-date.sh
Harald Jensås d5ecc1f651 Make krb-service-principal metadata per-Role
Not all roles are connected to all networks, there is no
need to create metadata for networks not associated with
the role.

In edge/spine-and-leaf deployments the total number of
composable networks used can be high. Passing all the
networks we quickly go beyond the nova metadata fields
size limit (each field cannot exceed 256 bytes).

Also update tools/check-up-to-date.sh script to use the
simple yaml-diff.py instead of diff. The env generator
code will sort data, while jinja rendered environments
are not sorted, thus need to diff the data in yaml not
the text.

Closes-Bug: #1821377
Change-Id: I5ae3bc845b0a6ad6986d44b14ff4b0737a9b033b
2019-04-05 14:22:20 +00:00

29 lines
604 B
Bash
Executable File

#!/bin/bash
set -e
# Report an error if the generated sample environments are not in sync with
# the current configuration and templates.
echo 'Verifying that generated environments are in sync'
tmpdir=$(mktemp -d)
trap "rm -rf $tmpdir" EXIT
./tripleo_heat_templates/environment_generator.py sample-env-generator/ $tmpdir/environments
base=$PWD
retval=0
cd $tmpdir
file_list=$(find environments -type f)
for f in $file_list; do
if ! $base/tools/yaml-diff.py $f $base/$f; then
echo "ERROR: $base/$f is not up to date"
diff $f $base/$f
retval=1
fi
done
exit $retval