Commit Graph
4 Commits
Author SHA1 Message Date
christianmanivong f573fa53d2 feat(scheduled-jobs): ScheduledJobsMixin and its POSIX implementation (#86)
driver / standard (pull_request) Successful in 20s
driver / lint (pull_request) Successful in 23s
driver / types (pull_request) Successful in 1m16s
driver / test (3.13) (pull_request) Successful in 1m18s
driver / test (3.12) (pull_request) Successful in 1m27s
driver / lowest (pull_request) Successful in 46s
driver / build (pull_request) Successful in 43s
driver / security (pull_request) Successful in 1m27s
CI / driver (pull_request) Successful in 3m11s
driver / publish (pull_request) Skipped
What a host runs on its own schedule as one shape: cron lines, run-parts
scripts, anacron, systemd timers, periodic, a platform's own jobs, Windows
tasks. Every job says who owns its definition and what the driver can do
to it; every write names the digest the caller saw and is refused when the
host's definition changed since.

PosixScheduledJobsMixin reads everything in one framed report as root,
switches a cron line behind #napalm-disabled:, a timer by systemctl and a
run-parts script by its execute bit, runs a job now bounded by timeout, and
writes an application's job as a timer where systemd runs, else in
/etc/cron.d or the user's crontab. napalm_device_types.cron parses cron
expressions, gives their next runs and writes them as OnCalendar lines.

get_cron_jobs and CronJobDict go: nothing called them.

Version 4.26.0, so drivers can require it before the release is tagged.

Closes #86
2026-11-03 05:29:27 +01:00
christianmanivong f4354f498e refactor: the SNMP health profile shapes in snmp_health_profile.py
models.py is over the file size limit and may not grow; the unknown
key pushed it past its recorded length. SnmpHealthProfile,
SnmpValueSpec, SnmpMemorySpec and SnmpInterfacesSpec move to
napalm_device_types/snmp_health_profile.py. The package exports them
as before and models re-exports them, so existing imports keep working.
The baseline records the smaller models.py.
2026-11-01 23:05:13 +01:00
christianmanivong 449a6b13ca refactor(ssh_server): split three functions under the standard's line limit (#65)
driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 15s
driver / types (pull_request) Successful in 1m18s
driver / test (3.12) (pull_request) Successful in 1m28s
driver / test (3.13) (pull_request) Successful in 1m18s
driver / lowest (pull_request) Successful in 35s
driver / build (pull_request) Successful in 33s
driver / security (pull_request) Successful in 1m9s
CI / driver (pull_request) Successful in 3m9s
driver / publish (pull_request) Skipped
harden_ssh_server (70), _apply_or_restore (51) and exempt_from_ssh_penalties
(81) had grown past the 50-line limit with #63, and `driver / standard` was
red on main. The reading and planning, the putting back, the session's
address, the reasons to leave the exemption and its write move into methods
of their own. Same behaviour, same tests; harden_ssh_server leaves the
baseline.
2026-11-01 08:17:27 +01:00
christianmanivong 0475184684 chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 54s
driver / lint (pull_request) Successful in 50s
driver / types (pull_request) Failing after 1m17s
driver / test (3.10) (pull_request) Successful in 1m43s
driver / test (3.11) (pull_request) Failing after 9m18s
driver / test (3.12) (pull_request) Failing after 1m20s
driver / test (3.13) (pull_request) Successful in 1m4s
driver / lowest (pull_request) Failing after 1m38s
driver / security (pull_request) Failing after 4m33s
driver / build (pull_request) Failing after 1m29s
CI / driver (pull_request) Failing after 24m6s
driver / publish (pull_request) Skipped
- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow
  of NAPALM/driver-standard: conformance, ruff, strict mypy, tests on
  3.10-3.13 and at the lowest declared versions, bandit, pip-audit, build,
  and on a release tag the upload to PyPI.
- tests/quality_baseline.json records today's long and complex functions
  and the one file over 1000 lines; they may shrink, not grow.
- Coverage floor 95 % (measured 95.15 %).
- CHANGELOG.md starts here; project links point at git.netork.io; the
  license is the SPDX string PEP 639 wants.
2026-10-22 19:06:19 +02:00