From e7e2d84bec0d404057bce203f9c90231360e88ee Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Tue, 31 May 2016 22:34:54 +0200 Subject: Rebase: deploy related patch series. After change "common.py: catch stderr in exec_cmd" [1] and other unrelated changes were merged upstream, we need to rebase the complete deploy related series. While we're at it, re-export Fuel@OPNFV patches in Armband. [1] https://gerrit.opnfv.org/gerrit/#/c/14561/ Change-Id: Icbc8261c2e24e4b29e8f5f2bc83db6829219129a --- ...09-deploy.py-add-multiple-bridges-support.patch | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 patches/opnfv-fuel/0009-deploy.py-add-multiple-bridges-support.patch (limited to 'patches/opnfv-fuel/0009-deploy.py-add-multiple-bridges-support.patch') diff --git a/patches/opnfv-fuel/0009-deploy.py-add-multiple-bridges-support.patch b/patches/opnfv-fuel/0009-deploy.py-add-multiple-bridges-support.patch new file mode 100644 index 00000000..6743f25c --- /dev/null +++ b/patches/opnfv-fuel/0009-deploy.py-add-multiple-bridges-support.patch @@ -0,0 +1,69 @@ +From: Josep Puigdemont +Date: Fri, 6 May 2016 04:32:06 +0200 +Subject: [PATCH] deploy.py: add multiple bridges support + +Some Fuel VMs may need more than one network interface. To be able to do +that, we now allow the user to specify the "-b" paramter (bridge) +multiple times, creating a new NIC for each one of them. + +The NICs are created in the same order as they are given in the command +line. + +There is no change in behavior from earlier versions, pxebr will still +be the default bridge if none is specified. + +Signed-off-by: Josep Puigdemont +--- + deploy/deploy.py | 10 +++++++--- + deploy/environments/virtual_fuel.py | 3 ++- + 2 files changed, 9 insertions(+), 4 deletions(-) + +diff --git a/deploy/deploy.py b/deploy/deploy.py +index 179ee7b..9db1754 100755 +--- a/deploy/deploy.py ++++ b/deploy/deploy.py +@@ -316,8 +316,8 @@ def parse_arguments(): + parser.add_argument('-s', dest='storage_dir', action='store', + default='%s/images' % CWD, + help='Storage Directory [default: images]') +- parser.add_argument('-b', dest='pxe_bridge', action='store', +- default='pxebr', ++ parser.add_argument('-b', dest='pxe_bridge', action='append', ++ default=[], + help='Linux Bridge for booting up the Fuel Master VM ' + '[default: pxebr]') + parser.add_argument('-p', dest='fuel_plugins_dir', action='store', +@@ -333,6 +333,9 @@ def parse_arguments(): + action='store_true', default=False, + help=('Do not launch environment deployment')) + ++ if not args.pxe_bridge: ++ args.pxe_bridge = ['pxebr'] ++ + args = parser.parse_args() + log(args) + +@@ -348,7 +351,8 @@ def parse_arguments(): + check_file_exists(iso_abs_path) + log('Using image directory: %s' % args.storage_dir) + create_dir_if_not_exists(args.storage_dir) +- check_bridge(args.pxe_bridge, args.dha_file) ++ for bridge in args.pxe_bridge: ++ check_bridge(bridge, args.dha_file) + + kwargs = {'no_fuel': args.no_fuel, 'fuel_only': args.fuel_only, + 'no_health_check': args.no_health_check, +diff --git a/deploy/environments/virtual_fuel.py b/deploy/environments/virtual_fuel.py +index 5a86c97..b1a76e4 100644 +--- a/deploy/environments/virtual_fuel.py ++++ b/deploy/environments/virtual_fuel.py +@@ -125,7 +125,8 @@ class VirtualFuel(ExecutionEnvironment): + disk_path = self.create_image(disk_path, disk_size) + + self.del_vm_nics() +- self.add_vm_nic(self.pxe_bridge) ++ for bridge in self.pxe_bridge: ++ self.add_vm_nic(bridge) + self.update_vm_template_file() + + vm_definition_overwrite = self.dha.get_vm_definition('fuel') -- cgit 1.2.3-korg