Skip to content

feature: add built-in device types for ten more switch vendors - #208

Merged
TheWitness merged 1 commit into
developfrom
feature/more-device-types
Nov 16, 2026
Merged

TheWitness merged 1 commit into
developfrom
feature/more-device-types

Conversation

@TheWitness

Copy link
Copy Markdown
Member

Summary

Adds built-in device types for ten managed-switch vendors the plugin did not cover. They are seeded on install and upgrade through the existing AddDeviceType() guard, so existing or customized device types with the same name are never overwritten. No schema or code-path changes; this builds on the Capture Command added in #207.

Device type Method Command
Juniper Junos SSH capture show configuration
Arista EOS SSH capture show running-config
HPE Aruba CX SSH capture show running-config
Extreme EXOS SSH capture show configuration
Huawei VRP SSH capture display current-configuration
Fortinet FortiOS SSH capture show full-configuration
Ruckus ICX TFTP copy running-config tftp %SERVER% %FILE%
Ubiquiti EdgeSwitch TFTP copy nvram:startup-config tftp://%SERVER%/%FILE%
Netgear Managed TFTP copy nvram:startup-config tftp://%SERVER%/%FILE%
TP-Link JetStream TFTP copy startup-config tftp ip-address %SERVER% filename %FILE%

SSH capture types need no TFTP server and never fall back to Telnet. checkendinconfig is left off for all of them, so a config that does not end in end is not rejected.

Testing

  • Pest suite: 326 passed. Seed counts updated from 6 to 16, plus new tests for the capture and TFTP seeds.
  • Not verified on real hardware. Commands and prompts were written from vendor CLI conventions, not tested against devices. The README and CHANGELOG say so. Areas most likely to need tuning: login prompts, paging on EXOS and Huawei over an exec channel, and enable-mode requirements on the TFTP types.

Seed Juniper Junos, Arista EOS, HPE Aruba CX, Extreme EXOS, Huawei VRP and
Fortinet FortiOS as SSH capture device types, and Ruckus ICX, Ubiquiti
EdgeSwitch, Netgear Managed and TP-Link JetStream as TFTP device types.
Existing device types with the same name are never overwritten. Document the
new types in the README and CHANGELOG.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 16, 2026 19:07
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Real-device or vendor-backed validation is needed for SSH execution, complete unpaginated output, and TFTP privilege and confirmation flows because the seed tests only inspect inserted parameters.

No open issues 🎉

What changed in this PR

Adds ten built-in vendor device types to the Cacti routerconfigs plugin, using the existing SSH capture and TFTP backup paths. Install and upgrade seeding preserves existing definitions with matching names.

Changes:

  • Adds six SSH capture definitions and four TFTP definitions.
  • Updates seed-count assertions to 16 and adds command and connection-type checks.
  • Documents the new defaults and the need for device-specific validation; real hardware testing remains outstanding.
File Description
tests/​Unit/​RouterconfigsSetupTableTest.php Checks all 16 defaults and the new capture and TFTP seed parameters.
tests/​Unit/​RouterconfigsCheckUpgradeTest.php Updates the expected upgrade seed count to 16.
tests/​Integration/​RouterconfigsInstallHooksTest.php Updates the expected installation seed count to 16.
setup.php Adds ten vendor definitions through the existing guarded seeding helper.
README.md Lists built-in types, backup methods, and device-specific requirements.
CHANGELOG.md Records the expanded vendor defaults and firmware-validation caveat.

Review effort: Balanced

@TheWitness
TheWitness merged commit 9de0bb7 into develop Nov 16, 2026
8 checks passed
@TheWitness
TheWitness deleted the feature/more-device-types branch November 16, 2026 19:17
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