6fccd7a8f07c9bc86bf54374aabaaf6dddc9f3a5
11
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
66828a9564 |
test(time-sync): follow napalm-device-types 4.36.0, which keeps DHCP's servers
driver / lint (pull_request) Successful in 13s
driver / standard (pull_request) Successful in 16s
driver / types (pull_request) Successful in 51s
driver / test (3.13) (pull_request) Successful in 53s
driver / test (3.12) (pull_request) Successful in 1m0s
driver / lowest (pull_request) Successful in 28s
driver / build (pull_request) Successful in 25s
driver / security (pull_request) Successful in 54s
CI / driver (pull_request) Successful in 2m3s
driver / publish (pull_request) Skipped
napalm-device-types 4.36.0 (released after main's last CI run) changed PosixTimeSyncMixin: get_time_sync() reports DHCP-provided servers apart (dhcp_ntp_servers), and configure_time_sync() no longer comments out the DHCP client's chrony sourcedir; it gives back one that 4.35.0 took out (NetOrk/netork#2380). CI installs the newest release, so five time-sync tests failed on every branch. The tests now expect that behaviour, read DHCP's servers apart, and check that a node 4.35.0 aligned gets its DHCP sourcedir back. The floor moves to 4.36.0, so the lowest-versions job tests the same behaviour; README, CHANGELOG and the module docstring say what a write leaves alone. |
||
|
|
410d34bdee |
feat(time-sync): servers and zone on Proxmox VE and Backup Server
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 56s
driver / test (3.12) (pull_request) Successful in 1m2s
driver / test (3.13) (pull_request) Successful in 59s
driver / lowest (pull_request) Successful in 32s
driver / build (pull_request) Successful in 31s
driver / security (pull_request) Successful in 1m11s
CI / driver (pull_request) Successful in 2m41s
driver / publish (pull_request) Skipped
netOrk keeps one list of NTP servers and a time zone per site and aligns a device that differs (NetOrk/netork#2360, #2365). Both drivers now implement napalm-device-types' TimeSyncMixin (4.35.0) and write both values. Neither API keeps time servers: /nodes/{node}/time knows only the zone, and both products run chrony on Debian. The servers are therefore PosixTimeSyncMixin's, over the driver's existing SSH session (run_command, root): read from chrony's configuration, written to /etc/chrony/sources.d/netork.sources with every other source commented out, then a reload or a restart of chrony. The zone is read with them from the host (timedatectl: the zone the clock really runs in), and from GET /nodes/{node}/time only where the host names none. It is written through PUT /nodes/{node}/time rather than timedatectl set-timezone: Proxmox's own call validates the name and keeps /etc/timezone, which its web UI and API show, in step with /etc/localtime. One device is one node: in a PVE cluster every node has its own clock, and only the node this connection resolved is read and written. get_ntp_servers() read GET /nodes/{node}/ntp, a path Proxmox VE does not have, so it always reported no servers. It now reports what get_time_sync() reads, on the backup server too. |
||
|
|
dce794644c |
feat(scheduled-jobs): scheduled jobs on Proxmox VE and Backup Server (#56)
driver / lint (pull_request) Successful in 15s
driver / standard (pull_request) Successful in 19s
driver / types (pull_request) Failing after 28s
driver / test (3.13) (pull_request) Failing after 15s
driver / test (3.12) (pull_request) Failing after 17s
driver / lowest (pull_request) Failing after 19s
driver / build (pull_request) Successful in 33s
driver / security (pull_request) Failing after 37s
CI / driver (pull_request) Failing after 1m12s
driver / publish (pull_request) Skipped
Both drivers mix in napalm-device-types' PosixScheduledJobsMixin over the node's root SSH session: get_scheduled_jobs reads cron, run-parts, anacron and every systemd timer in one round trip; manage_scheduled_job enables, disables or runs one now; put_ and delete_scheduled_job write and remove an application's own job. What Proxmox ships is platform, so it is only switched and run: pve-* units, pvesr.timer and /etc/cron.d/vzdump on Proxmox VE, proxmox-backup* units on a backup server. A vzdump cron line is only run, because the file is a link into /etc/pve and rewriting it would replace the link with a plain file. Backup jobs (/cluster/backup), replication and a backup server's verify, prune, sync and GC jobs run in Proxmox's own daemons and stay with the backup features. Requires napalm-device-types 4.26.0. Closes #56 |
||
|
|
2b2cd9b867 |
feat(pbs): Proxmox Backup Server as entry point proxmox_backup (#52)
driver / lint (pull_request) Successful in 14s
driver / standard (pull_request) Successful in 16s
driver / types (pull_request) Successful in 1m5s
driver / test (3.13) (pull_request) Successful in 1m4s
driver / test (3.12) (pull_request) Successful in 1m10s
driver / lowest (pull_request) Successful in 31s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m0s
CI / driver (pull_request) Successful in 2m20s
driver / publish (pull_request) Skipped
A second driver in this package, ProxmoxBackupDriver. Its API and web UI are on 8007, not on PVE's 8006, and its node is always localhost; open() proves the login with GET /version, so a bad token fails there. Roles: BackupServerDriver (napalm-device-types 4.25.0) first, then StorageDriver for the disks and ZFS pools the server manages. It reads datastores, the backup groups of every namespace with their newest snapshot, a group's snapshots, the GC, verify, prune, sync and tape jobs with how their last run ended, and the remotes without their secrets; it starts garbage collection and jobs, verifies, protects and deletes snapshots, and follows the tasks. As a host it reports facts, interfaces, CPU and memory, disks, pools, its pbs-subscription and the same packages, updates, host readers and sshd hardening as a PVE node. A privilege-separated token without an ACL entry gets an empty list from PBS, not a refusal, so every read checks /access/permissions and raises PermissionError. A removable datastore that is not mounted is reported as unmounted and left out of the group listing. The fixture is what a PBS 4.2 answered, sanitised; groups, snapshots and jobs it did not have yet follow the API schema. |
||
|
|
4ffe93fe4c |
Merge remote-tracking branch 'origin/main' into fix/lldp-keyvalue
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 15s
driver / test (3.12) (pull_request) Failing after 17s
driver / types (pull_request) Failing after 27s
driver / test (3.13) (pull_request) Failing after 15s
driver / lowest (pull_request) Failing after 18s
driver / security (pull_request) Failing after 37s
driver / build (pull_request) Successful in 33s
CI / driver (pull_request) Failing after 1m39s
driver / publish (pull_request) Skipped
# Conflicts: # README.md # tests/test_misc.py |
||
|
|
f93daa381e |
fix(lldp): read lldpd through the shared parser and raise on failure
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 16s
driver / types (pull_request) Failing after 29s
driver / test (3.12) (pull_request) Failing after 20s
driver / test (3.13) (pull_request) Failing after 17s
driver / lowest (pull_request) Failing after 18s
driver / security (pull_request) Failing after 45s
driver / build (pull_request) Successful in 35s
CI / driver (pull_request) Failing after 1m43s
driver / publish (pull_request) Skipped
lldpcli's text was read with 2>/dev/null || true, so lldpd not running, lldpctl missing or the command not running at all came back as a node without neighbours. Capabilities were lldpd's symbols lower-cased (tel, wlan, docsis) rather than NAPALM's names. The node now runs napalm-device-types' LLDPCTL_KEYVALUE_COMMAND, whose output carries lldpctl's exit status; parse_lldpctl_keyvalue raises on a failure, an empty answer raises too, and the lldp_neighbors projections give NAPALM's capability names and the chassis MAC. The module is under strict mypy now; the floor on napalm-device-types rises to 4.24.0. Closes #44 |
||
|
|
daf1b519eb |
fix(ssh): raise when a node command cannot run, drop the execute call
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 16s
driver / types (pull_request) Successful in 1m10s
driver / test (3.12) (pull_request) Successful in 1m9s
driver / test (3.13) (pull_request) Successful in 1m4s
driver / lowest (pull_request) Successful in 35s
driver / build (pull_request) Successful in 40s
driver / security (pull_request) Successful in 1m15s
CI / driver (pull_request) Successful in 2m53s
driver / publish (pull_request) Skipped
_exec_ssh_command returned "" on any failure (no SSH credential, a
refused login or host key, an unreachable node, a timeout), so a
getter that could not look read like one that found nothing; on
API-token-only nodes get_snmp_config answered None and the SSH-backed
getters empty lists on every poll. It now raises ConnectionException
with the cause (SshHostKeyMismatch as it is), and refuses before
connecting when there is neither a password nor a usable key.
It returned stderr when stdout was empty; output is stdout now. It
first posted every command to /nodes/{node}/execute, which runs a
batch of API calls rather than a shell; that dead round trip is gone.
The key types, the key before the password, the host-key check and the
single connect path were done in
|
||
|
|
739d12a3db |
chore: Python 3.12 is the floor (NAPALM/driver-standard#6)
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 59s
driver / test (3.12) (pull_request) Successful in 1m6s
driver / lowest (pull_request) Successful in 32s
driver / test (3.13) (pull_request) Successful in 1m5s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m25s
CI / driver (pull_request) Successful in 3m1s
driver / publish (pull_request) Skipped
netOrk runs every driver in its own containers on Python 3.12, so 3.10 and 3.11 are no longer supported or tested. requires-python, mypy and ruff move to 3.12, along with what ruff's pyupgrade rules then rewrite. |
||
|
|
457c1ca7ed |
chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Failing after 53s
driver / test (3.10) (pull_request) Failing after 44s
driver / test (3.11) (pull_request) Failing after 1m6s
driver / test (3.12) (pull_request) Failing after 47s
driver / test (3.13) (pull_request) Failing after 36s
driver / lowest (pull_request) Failing after 19s
driver / security (pull_request) Failing after 46s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Failing after 6m3s
driver / publish (pull_request) Skipped
- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow of NAPALM/driver-standard; .github/ is gone. napalm-device-types comes from git until 4.22.0 (AptProxyMixin) is on PyPI; the floor stays at 4.22.0. - requires-python >=3.10 (napalm-device-types needs it), py.typed, SPDX license string, a dev extra with floors (pytest-mock and responses are dropped: no test uses them), links to git.netork.io (README included). pytest no longer adds --cov by itself; CI passes it. - mypy strict for the package; exempt for now, with 204 errors between them: napalm_proxmox.config_mixin, .driver, .interfaces_mixin, .lldp_mixin, .routing_mixin, .sdn_mixin, .system_mixin, .utils, .vm_contract_mixin, .vm_mixin and .vm_provision_mixin. They are recorded in the quality baseline with the long and complex functions and the two unannotated public methods. - Coverage floor 68 % (measured 68.94 %). |
||
|
|
3b873d91fe |
style: ruff format and the lint rules of the driver standard
Mechanical: ruff format, and ruff check --fix with the rule set every NAPALM driver uses (E, F, I, UP, B at line length 100, Python 3.10). What ruff cannot fix comes in the next commit. |
||
|
|
f3ecf14c8d | initial commit |