towerops/lib/towerops
Graham McIntire f0f5aca491
Allow empty SNMP community string for device inheritance
Implemented hierarchical SNMP community string inheritance following TDD:

Schema changes:
- Updated Device.changeset to remove required validation for snmp_community
- Community string is now optional when SNMP is enabled
- Allows inheritance from site or organization level

Inheritance hierarchy:
- Device-level community (highest priority)
- Site-level community
- Organization-level community
- nil (no community set at any level)

Form updates:
- extract_snmp_config now resolves inherited community for SNMP testing
- validate_test_snmp_input provides clearer error message about inheritance
- SNMP test uses effective community from hierarchy

Tests:
- Added tests for creating devices with nil/empty community string
- Added comprehensive SNMP configuration inheritance tests
- Tests verify hierarchy: device > site > org > default
- All 28 device tests passing

All 808 tests passing (2 pre-existing alert notifier failures unrelated to this change)
No Credo warnings
2026-01-17 15:54:06 -06:00
..
accounts moduledocs 2026-01-17 15:08:49 -06:00
admin Add superuser system with user impersonation for admin support 2026-01-06 12:50:10 -06:00
agents Add agent rename functionality 2026-01-17 15:48:47 -06:00
alerts moduledocs 2026-01-17 15:08:49 -06:00
devices Allow empty SNMP community string for device inheritance 2026-01-17 15:54:06 -06:00
mobile_sessions Fix datetime truncation for mobile session schemas 2026-01-15 16:17:05 -06:00
monitoring moduledocs 2026-01-17 15:08:49 -06:00
organizations moduledocs 2026-01-17 15:08:49 -06:00
proto rename equipment to device 2026-01-17 14:48:46 -06:00
sites moduledocs 2026-01-17 15:08:49 -06:00
snmp more renames 2026-01-17 15:13:56 -06:00
accounts.ex Streamline login flow and fix test failures 2026-01-13 13:08:24 -06:00
admin.ex rename equipment to device 2026-01-17 14:48:46 -06:00
agents.ex Add agent rename functionality 2026-01-17 15:48:47 -06:00
alerts.ex rename equipment to device 2026-01-17 14:48:46 -06:00
application.ex moduledocs 2026-01-17 15:08:49 -06:00
devices.ex credo cleanup 2026-01-17 15:00:52 -06:00
log_filter.ex Add comprehensive Dialyzer type specifications 2026-01-17 10:52:02 -06:00
mailer.ex moduledocs 2026-01-17 15:08:49 -06:00
mobile_sessions.ex credo cleanup 2026-01-17 15:00:52 -06:00
monitoring.ex rename equipment to device 2026-01-17 14:48:46 -06:00
organizations.ex rename equipment to device 2026-01-17 14:48:46 -06:00
release.ex fix dialyzer things 2026-01-03 12:56:40 -06:00
repo.ex moduledocs 2026-01-17 15:08:49 -06:00
sites.ex rename equipment to device 2026-01-17 14:48:46 -06:00
snmp.ex more renames 2026-01-17 15:13:56 -06:00