Rebase: p/opnfv-fuel: Allow Fuel commit override.
[armband.git] / patches / opnfv-fuel / 0024-deploy.sh-allow-specifying-several-bridges.patch
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
4
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.
9
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.
13
14 Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
15 ---
16  ci/deploy.sh | 11 +++++++----
17  1 file changed, 7 insertions(+), 4 deletions(-)
18
19 diff --git a/ci/deploy.sh b/ci/deploy.sh
20 index 34ecc57..c9b836b 100755
21 --- a/ci/deploy.sh
22 +++ b/ci/deploy.sh
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 @@ -130,9 +133,9 @@ do
36              fi
37              ;;
38          B)
39 -            if [[ ${OPTARG} ]]; then
40 -                PXE_BRIDGE="-b ${OPTARG}"
41 -            fi
42 +            for bridge in ${OPTARG//,/ }; do
43 +                PXE_BRIDGE+=" -b $bridge"
44 +            done
45              ;;
46          d)
47              DRY_RUN=1