-
Notifications
You must be signed in to change notification settings - Fork 2
Try support other devices #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR unifies device support across Extreme Networks/Enterasys devices by consolidating duplicate implementations and extending support to additional models (including AP3915i). Key changes include the removal of the legacy AP3715i-specific script, refactoring of boot and TFTP functions in ws.py to support multiple models, and updating related helper and main entry point modules.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
extremeflash/ws_ap3715i.py | Removed the legacy AP3715i-specific implementation. |
extremeflash/ws.py | Refactored bootup and TFTP boot functions to support multiple device models and unified device handling. |
extremeflash/helpers.py | Cleaned up deprecated functions no longer needed in the unified approach. |
extremeflash/main.py | Updated CLI model choices and integration to use the unified implementation. |
f11d030
to
7e5cf93
Compare
7e5cf93
to
bf5ac44
Compare
Co-authored-by: Copilot <[email protected]>
Co-Authored-By: Grische <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR unifies and streamlines the flashing scripts for multiple Extreme Networks/Enterasys access point models by removing device‐specific modules and consolidating the logic into a single module (ws.py). Key changes include:
- Removal of model‑specific modules (ws_ap3935i.py, ws_ap3715i.py)
- Introduction of a unified device support flow with dynamic boot parameter handling based on model
- Consolidation of serial and SSH routines with updated event handling and dry run support
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
extremeflash/ws_ap3935i.py | Removed module for AP3935i flashing; functionality merged in ws.py |
extremeflash/ws_ap3715i.py | Removed module for AP3715i flashing; functionality merged in ws.py |
extremeflash/ws.py | Updated to support multiple device models with conditional logic |
extremeflash/helpers.py | Removed duplicate functions now maintained in ws.py |
extremeflash/main.py | Updated to call unified main with expanded device model choices |
@@ -101,24 +135,31 @@ def bootup_set_boot_openwrt(ser: serial.Serial): | |||
write_to_serial(ser, b'setenv bootcmd "run boot_openwrt"\n') | |||
time.sleep(0.5) | |||
|
|||
if ws_ap3710i.DRYRUN: | |||
if dryrun: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning an empty model string in dry run mode may cause boot_via_tftp to fall into the default branch unexpectedly; consider explicitly handling dry run mode to preserve model information or adjust subsequent logic accordingly.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's split the refactoring and the new features (new devices) into separate PRs.
I am unable to test the majority of new devices and would like those tested before merged (and released).
Oh, and the CI is not yet happy with the PR :)
elif model == "AP3805i": | ||
write_to_serial(ser, b"tftpboot 0x89000000 " + tftp_ip_str + b":" + tftp_file.encode("ascii") + b"\n") | ||
elif model == "AP3935i": | ||
write_to_serial(ser, b"tftpboot 0x42000000 " + tftp_ip_str + b":" + tftp_file.encode("ascii") + b"\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also doesn't look like the original command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is taken from f7c5083 which was incomplete as it seems? :)
superseded by #56 |
This is untested code.
This code unifies the differences between the scripts and adds support for the AP3915i.
Testing will be done by @seilpforte hopefully :)
I hope, I did not miss anything though.