Conversation
There was a problem hiding this comment.
Pull request overview
Adds first-class SNMP::Info support for Cambium devices by introducing a dedicated Layer3 subclass, wiring it into enterprise-ID based device classification, and providing an xt test to validate key identity attributes.
Changes:
- Add
SNMP::Info::Layer3::Cambiumsubclass with Cambium-specific globals and overrides (vendor/os/os_ver/model/mac/name/serial). - Register enterprise ID
17713to map to the new Cambium subclass inSNMP::Info->device_type. - Add xt coverage for the new subclass and include new files in
MANIFEST.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
lib/SNMP/Info/Layer3/Cambium.pm |
New Cambium Layer3 subclass, MIB bindings, and model/SKU mapping logic. |
xt/lib/Test/SNMP/Info/Layer3/Cambium.pm |
New unit tests validating Cambium overrides using cached SNMP data. |
lib/SNMP/Info.pm |
Adds enterprise ID 17713 to L2/L3 sysObjectID maps for auto-class selection. |
MANIFEST |
Includes the newly added module and test file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 176 => '(0xe002) ePMP Elevate NS-M2-V2', | ||
| 180 => '(0xe0a5) ePMP Elevate NSlocoM5-XM-V1', | ||
| 181 => '(0xe8a5) ePMP Elevate NSlocoM5-XM-V2', | ||
| 183 => '(0xe0a2) ePMP Elavate NSloco-M2', |
There was a problem hiding this comment.
The model mapping string has a typo (“Elavate”). This will surface in model() output for HWInfo value 183 and makes the returned model inconsistent with the rest of the table. Please correct the spelling (likely “Elevate”).
| 183 => '(0xe0a2) ePMP Elavate NSloco-M2', | |
| 183 => '(0xe0a2) ePMP Elevate NSloco-M2', |
| 241 => '(0xe105) ePMP Elevate RM5-V1-XM', | ||
| 242 => '(0xe1b5) ePMP Elevate RM5-V2-XM', | ||
| 243 => '(0xe1c5) ePMP Elevate RM5-V3-XM', | ||
| 244 => '(9xe8b5) ePMP Elevate RM5-V4-XM', |
There was a problem hiding this comment.
This SKU description includes an invalid-looking hex prefix “9xe8b5”. All similar entries use “0x…”, so this is likely a typo that would leak into model() output for HWInfo value 244.
| 244 => '(9xe8b5) ePMP Elevate RM5-V4-XM', | |
| 244 => '(0xe8b5) ePMP Elevate RM5-V4-XM', |
| can_ok($test->{info}, 'model'); | ||
| like( | ||
| $test->{info}->model(), | ||
| qr/^5 GHz Force 300-19R IP67 Radio \(ROW\/ETSI\)(?: \(ePMPxorn19rip67row\))?$/, | ||
| q(Model returns mapped cambiumHWInfo value and optional sysObjectID suffix) | ||
| ); |
There was a problem hiding this comment.
model() has logic to append a sysObjectID-derived suffix, but the current test only allows the suffix optionally and doesn’t verify the suffix-building branch. Consider adding a test that forces SNMP::translateObj($id) to return a symbolic token (e.g., by locally overriding/stubbing it) so regressions in the suffix behavior are caught.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: inphobia
No description provided.