HealthMetricsMixin (health_metrics.py) and _ucd_metrics.py collect CPU, memory, load and interface counters over SNMP. The collector is a classmethod that the application calls with its own snmp_get/snmp_walk; the driver is not even connected while it runs. It is mixed into five role bases, and four drivers (procurve, netgear, tplink-jetstream, yealink) override it with proprietary OIDs.
Change
Add SnmpHealthProfile (TypedDict) to models: the OIDs a device publishes uptime, CPU, memory and interface counters under, plus the two switches the mixin carries today (_SNMP_SKIP_IF, _SNMP_TX_ERR_IS_DROP).
A driver whose device answers standard UCD-MIB/IF-MIB declares nothing. Others set SNMP_HEALTH_PROFILE as a class attribute.
Mark HealthMetricsMixin, collect_ucd_metrics and the OID constants deprecated; remove them in 5.0.
Rule test: no module imports asyncio.
Part of NetOrk/netork#1105. Plan: NAPALM/napalm-device-types docs/STRUCTURE.md (branch docs/structure-plan).
Prio P3: the first step after the docs; the application side waits on it.
`HealthMetricsMixin` (`health_metrics.py`) and `_ucd_metrics.py` collect CPU, memory, load and interface counters over SNMP. The collector is a classmethod that the application calls with its own `snmp_get`/`snmp_walk`; the driver is not even connected while it runs. It is mixed into five role bases, and four drivers (procurve, netgear, tplink-jetstream, yealink) override it with proprietary OIDs.
**Change**
- Add `SnmpHealthProfile` (TypedDict) to `models`: the OIDs a device publishes uptime, CPU, memory and interface counters under, plus the two switches the mixin carries today (`_SNMP_SKIP_IF`, `_SNMP_TX_ERR_IS_DROP`).
- A driver whose device answers standard UCD-MIB/IF-MIB declares nothing. Others set `SNMP_HEALTH_PROFILE` as a class attribute.
- Mark `HealthMetricsMixin`, `collect_ucd_metrics` and the OID constants deprecated; remove them in 5.0.
- Rule test: no module imports `asyncio`.
Part of NetOrk/netork#1105. Plan: NAPALM/napalm-device-types `docs/STRUCTURE.md` (branch `docs/structure-plan`).
Prio P3: the first step after the docs; the application side waits on it.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
HealthMetricsMixin(health_metrics.py) and_ucd_metrics.pycollect CPU, memory, load and interface counters over SNMP. The collector is a classmethod that the application calls with its ownsnmp_get/snmp_walk; the driver is not even connected while it runs. It is mixed into five role bases, and four drivers (procurve, netgear, tplink-jetstream, yealink) override it with proprietary OIDs.Change
SnmpHealthProfile(TypedDict) tomodels: the OIDs a device publishes uptime, CPU, memory and interface counters under, plus the two switches the mixin carries today (_SNMP_SKIP_IF,_SNMP_TX_ERR_IS_DROP).SNMP_HEALTH_PROFILEas a class attribute.HealthMetricsMixin,collect_ucd_metricsand the OID constants deprecated; remove them in 5.0.asyncio.Part of NetOrk/netork#1105. Plan: NAPALM/napalm-device-types
docs/STRUCTURE.md(branchdocs/structure-plan).Prio P3: the first step after the docs; the application side waits on it.