From e16c665290a66dea82503e47f175e68c7e978c8b Mon Sep 17 00:00:00 2001 From: adelbecq Date: Mon, 10 Jun 2019 11:49:28 +0200 Subject: [PATCH] add flag to force bios upgrade --- nx-os/poap/poap.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nx-os/poap/poap.py b/nx-os/poap/poap.py index a68b0dcc..d70eeb99 100755 --- a/nx-os/poap/poap.py +++ b/nx-os/poap/poap.py @@ -277,6 +277,9 @@ def set_defaults_and_validate_options(): # MD5 Verification set_default("disable_md5", False) + # force bios upgrade + set_default("force_bios_upgrade", False) + # Midway system and kickstart source file name. # This should be a 6.x U6 or greater dual image. # Required only if moving from pre 6.x U6 image to 7.x/higher image. @@ -1499,9 +1502,12 @@ def install_bios(): def is_bios_upgrade_needed(): """ - Check if bios upgrade is required. It's required when the current + Check if bios upgrade is forced or required. It's required when the current bios is not 3.x and image upgrade is from 6.x to 7.x or higher """ + if options["force_bios_upgrade"]: + return True + global single_image last_upgrade_bios = 3 ver = get_version()