Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions nx-os/poap/poap.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/env python3
#md5sum="eb08329071ac99ccc2739640439152a3"
#md5sum="92c1d1ebb754217d7adc6812457d7377"
"""
If any changes are made to this script, please run the below command
in bash shell to update the above md5sum. This is used for integrity check.
Expand Down Expand Up @@ -313,10 +313,16 @@ def set_defaults_and_validate_options():
# Transfer protocol (http, ftp, tftp, scp, etc.)
set_default("transfer_protocol", "scp")
# Directory where the config resides
set_default("config_path", "/var/lib/tftpboot/")
if os.environ.get("POAP_PHASE", None) == "USB":
set_default("config_path", "")
else:
set_default("config_path", "/var/lib/tftpboot/")
# Target image and its path (single image is default)
set_default("target_system_image", "")
set_default("target_image_path", "/var/lib/tftpboot/")
if os.environ.get("POAP_PHASE", None) == "USB":
set_default("target_image_path", "")
else:
set_default("target_image_path", "/var/lib/tftpboot/")
set_default("target_kickstart_image", "")
# Destination image and its path
set_default("destination_path", "/bootflash/")
Expand All @@ -331,8 +337,10 @@ def set_defaults_and_validate_options():
set_default("https_ignore_certificate", False)

# User app path
set_default("user_app_path", "/var/lib/tftpboot/")

if os.environ.get("POAP_PHASE", None) == "USB":
set_default("user_app_path", "")
else:
set_default("user_app_path", "/var/lib/tftpboot/")
# MD5 Verification
set_default("disable_md5", False)

Expand Down Expand Up @@ -2664,4 +2672,3 @@ def main():
.format(fname, exc_tb.tb_lineno))
exc_tb = exc_tb.tb_next
abort()