Helper Scripts
These scripts, located in the scripts/
directory, assume all config snippets are created in a directory called gen/$hostname
and usually numbered in the order they should be executed. For example:
$ ls -la gen/chix0.ch2/
00-basesys.conf
01-chassis.conf
03-interfaces.conf
99-qfx.conf
diff.sh
#!/bin/bash
set -x
hostname=$1
shift
if test -z "$hostname"; then
echo "usage, $0 <hostname> [OPTIONS]"
exit 1
fi
ngage push --diff --no-commit $hostname gen/$hostname/* $@
ngage rollback $hostname
pushone.sh
#!/bin/bash
set -x
hostname=$1
shift
if test -z "$hostname"; then
echo 'usage, pushone <hostname> [OPTIONS]'
exit 1
fi
ngage push $hostname gen/$hostname/* $@