Add Restart IOM option to main menu (option 4)

New workflow_restart.py supports restarting IOM1 or IOM2 via:
- Network: prompts for password, IP, and IOM, sends GracefulRestart
- Serial: detects device, logs in, prompts for IOM, sends curl restart

Exit shifted from option 4 to option 5.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-16 14:13:43 -04:00
parent b617f48829
commit 425200030f
3 changed files with 158 additions and 3 deletions

View File

@@ -24,6 +24,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "mod
from ui import _c, C, banner, draw_box, ok, warn, prompt
from workflow_check import system_check_workflow
from workflow_firmware import firmware_update_workflow
from workflow_restart import restart_iom_workflow
from workflow_serial import configure_shelf
@@ -34,11 +35,12 @@ def main():
f" {_c(C.BOLD, '1')} Configure Network Settings",
f" {_c(C.BOLD, '2')} Update IOM / Fabric Card Firmware",
f" {_c(C.BOLD, '3')} Query Current Configuration",
f" {_c(C.BOLD, '4')} Exit",
f" {_c(C.BOLD, '4')} Restart IOM",
f" {_c(C.BOLD, '5')} Exit",
])
print()
choice = prompt("Select [1/2/3/4]")
choice = prompt("Select [1-5]")
if choice == "1":
another = True
while another:
@@ -48,9 +50,11 @@ def main():
elif choice == "3":
system_check_workflow()
elif choice == "4":
restart_iom_workflow()
elif choice == "5":
break
else:
warn("Please enter 1, 2, 3, or 4.")
warn("Please enter 1, 2, 3, 4, or 5.")
time.sleep(1)
print()