Input parameters to the build script is:
-b Base URI to the configuration directory (needs to be provided in a URI
style, it can be a local resource: file:// or a remote resource http(s)://)
--B PXE Bridge for booting of Fuel master, default is pxebr
+-B PXE Bridge for booting of Fuel master. It can be specified several times,
+ or as a comma separated list of bridges, or both: -B br1 -B br2,br3
+ One NIC connected to each specified bridge will be created in the Fuel VM,
+ in the same order as provided in the command line. The default is pxebr.
-d Dry-run - Produces deploy config files (config/dea.yaml and
config/dha.yaml), but does not execute deploy
-f Deploy on existing Fuel master
fi
;;
B)
- if [[ ${OPTARG} ]]; then
- PXE_BRIDGE="-b ${OPTARG}"
- fi
+ for bridge in ${OPTARG//,/ }; do
+ PXE_BRIDGE+=" -b $bridge"
+ done
;;
d)
DRY_RUN=1
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',
args = parser.parse_args()
log(args)
+ if not args.pxe_bridge:
+ args.pxe_bridge = ['pxebr']
+
check_file_exists(args.dha_file)
check_dir_exists(os.path.dirname(args.deploy_log))
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,
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')