1 From: Josep Puigdemont <josep.puigdemont@enea.com>
2 Date: Fri, 6 May 2016 04:39:44 +0200
3 Subject: [PATCH] deploy.sh: allow specifying several bridges
5 It might be desirable to add several bridges to the fuel VM, so we let
6 the user specify -B more than once, and honor that when calling
7 deploy.py. We also make it possible to specify a comma separated list of
8 bridges, as in: -B br1,br2, for convenience for the Jenkins jobs.
10 There is a change in behavior from the previous version, and that is
11 that it may call the deploy.py python script with more than one instance
12 of the "-b" parameter.
14 Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
16 ci/deploy.sh | 11 +++++++----
17 1 file changed, 7 insertions(+), 4 deletions(-)
19 diff --git a/ci/deploy.sh b/ci/deploy.sh
20 index dc13f1c..3a95327 100755
23 @@ -57,7 +57,10 @@ and provides a fairly simple mechanism to execute a deployment.
24 Input parameters to the build script is:
25 -b Base URI to the configuration directory (needs to be provided in a URI
26 style, it can be a local resource: file:// or a remote resource http(s)://)
27 --B PXE Bridge for booting of Fuel master, default is pxebr
28 +-B PXE Bridge for booting of Fuel master. It can be specified several times,
29 + or as a comma separated list of bridges, or both: -B br1 -B br2,br3
30 + One NIC connected to each specified bridge will be created in the Fuel VM,
31 + in the same order as provided in the command line. The default is pxebr.
32 -d Dry-run - Produces deploy config files (config/dea.yaml and
33 config/dha.yaml), but does not execute deploy
34 -f Deploy on existing Fuel master
35 @@ -133,9 +136,9 @@ do
39 - if [[ ${OPTARG} ]]; then
40 - PXE_BRIDGE="-b ${OPTARG}"
42 + for bridge in ${OPTARG//,/ }; do
43 + PXE_BRIDGE+=" -b $bridge"