Merge pull request 'docs(structure): format the code examples as current ruff does' (#80) from fix/ruff-markdown-format into main
driver / standard (push) Successful in 20s
driver / lint (push) Successful in 17s
driver / types (push) Successful in 1m15s
driver / test (3.12) (push) Successful in 1m20s
driver / test (3.13) (push) Successful in 1m7s
driver / lowest (push) Successful in 44s
driver / build (push) Successful in 36s
driver / security (push) Successful in 1m22s
CI / driver (push) Successful in 3m2s
driver / publish (push) Skipped

This commit was merged in pull request #80.
This commit is contained in:
christianmanivong committed 2026-11-02 09:23:57 +00:00
commit 4eeaaef236
1 file changed
+8 -5
+8 -5
View File
@@ -52,9 +52,13 @@ driver knows how each step is done on its device; the caller supplies every valu
```python
class SnmpAgentMixin:
def configure_snmp_agent(self, settings: SnmpAgentSettingsDict) -> FixResultDict:
steps = [self._install_snmp_agent, self._write_snmp_agent_config,
self._enable_snmp_agent, self._verify_snmp_agent]
... # runs them in order, stops at the first failure
steps = [
self._install_snmp_agent,
self._write_snmp_agent_config,
self._enable_snmp_agent,
self._verify_snmp_agent,
]
... # runs them in order, stops at the first failure
# declared only; napalm-unix implements them for net-snmp
def _install_snmp_agent(self) -> FixStepDict: ...
@@ -95,8 +99,7 @@ proprietary OIDs declares them as data, in a class attribute of a type defined h
class ProcurveDriver(SwitchDriver):
SNMP_HEALTH_PROFILE: ClassVar[SnmpHealthProfile] = {
"uptime": {"oids": ["1.3.6.1.4.1.11.2.14.11.1.2.4.1.5.1"], "format": "ticks"},
"cpu": {"oids": ["1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0",
"1.3.6.1.4.1.11.2.3.7.8.6.1.0"]},
"cpu": {"oids": ["1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0", "1.3.6.1.4.1.11.2.3.7.8.6.1.0"]},
"memory": {"total": "...", "free": "...", "unit": "bytes"},
}
```