Skip to content

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

Closed
wants to merge 11 commits into from

Conversation

maurerle
Copy link
Contributor

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.

@grische grische requested a review from Copilot May 13, 2025 12:17
Copy link
Contributor

@Copilot Copilot AI left a 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.

@grische grische force-pushed the try_support_other_devices branch from f11d030 to 7e5cf93 Compare May 25, 2025 10:10
@maurerle maurerle force-pushed the try_support_other_devices branch from 7e5cf93 to bf5ac44 Compare May 27, 2025 15:47
@grische grische requested a review from Copilot May 27, 2025 17:00
Copy link
Contributor

@Copilot Copilot AI left a 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:
Copy link
Preview

Copilot AI May 27, 2025

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.

Copy link
Owner

@grische grische left a 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")
Copy link
Owner

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.

Copy link
Contributor Author

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? :)

@maurerle
Copy link
Contributor Author

superseded by #56

@maurerle maurerle closed this May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants