get_facts reads serial, hostname and uptime from fields getBasicInformation does not send #24

Closed
opened 2026-11-12 15:14:48 +00:00 by christianmanivong · 0 comments
Owner

Priority: P3 (important, not urgent): wrong facts on every poll, nothing breaks.

get_facts takes SerialNumber, HostName, SystemUpTime and MacAddress from getBasicInformation. On a VMG4005-B50A (V5.17(ABQA.3.1)C0) that answer only carries ModelName, SoftwareVersion, CurrentLanguage, AvailableLanguages, RememberPassword and FWUpgradeProgressST. So the serial number is empty, the uptime is 0, and the hostname is the IP the driver connected to.

The DAL's cardpage_status (read since #23) has DeviceInfo.SerialNumber, DeviceInfo.UpTime and DeviceInfo.ModelName. The hostname needs another source.

The test fixture MOCK_BASIC_INFO in tests/test_zyxel.py invents these fields too, so it should be replaced by the real answer. get_wan_status reads the same invented fields and should be checked in the same pass.

Priority: P3 (important, not urgent): wrong facts on every poll, nothing breaks. `get_facts` takes `SerialNumber`, `HostName`, `SystemUpTime` and `MacAddress` from `getBasicInformation`. On a VMG4005-B50A (V5.17(ABQA.3.1)C0) that answer only carries `ModelName`, `SoftwareVersion`, `CurrentLanguage`, `AvailableLanguages`, `RememberPassword` and `FWUpgradeProgressST`. So the serial number is empty, the uptime is 0, and the hostname is the IP the driver connected to. The DAL's `cardpage_status` (read since #23) has `DeviceInfo.SerialNumber`, `DeviceInfo.UpTime` and `DeviceInfo.ModelName`. The hostname needs another source. The test fixture `MOCK_BASIC_INFO` in `tests/test_zyxel.py` invents these fields too, so it should be replaced by the real answer. `get_wan_status` reads the same invented fields and should be checked in the same pass.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-zyxel#24