fix: use profile OS name instead of sys_descr for firmware version
The Operating System field was showing 'Cambium Verona Networks' because firmware_version was set to the raw sys_descr SNMP value. Now uses the profile's OS name (e.g., 'epmp') so it displays as 'Cambium epmp' which is cleaner and more accurate. Future improvement: Poll actual firmware version from SNMP using the profile_os_definitions.version OID.
This commit is contained in:
parent
b6ef989809
commit
5baad658a3
1 changed files with 4 additions and 2 deletions
|
|
@ -19,12 +19,14 @@ defmodule Towerops.Snmp.Profiles.Dynamic do
|
|||
Returns manufacturer, model, and firmware info.
|
||||
"""
|
||||
@spec identify_device(DeviceProfile.t(), Discovery.system_info()) :: Discovery.device_info()
|
||||
def identify_device(profile, system_info) do
|
||||
def identify_device(profile, _system_info) do
|
||||
# Use profile metadata to build device info
|
||||
%{
|
||||
manufacturer: extract_manufacturer(profile),
|
||||
model: profile.text || profile.os,
|
||||
firmware_version: Map.get(system_info, :sys_descr),
|
||||
# Use profile OS name as firmware_version for now
|
||||
# TODO: Poll SNMP OIDs from profile_os_definitions to get actual version
|
||||
firmware_version: profile.os,
|
||||
serial_number: nil
|
||||
}
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue