Commit Graph
6 Commits
Author SHA1 Message Date
Christian Manivong b5f3e31498 chore(release): 0.2.0
driver / standard (pull_request) Successful in 13s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 43s
driver / test (3.10) (pull_request) Successful in 44s
driver / test (3.11) (pull_request) Successful in 45s
driver / test (3.12) (pull_request) Successful in 43s
driver / test (3.13) (pull_request) Successful in 37s
driver / lowest (pull_request) Successful in 22s
driver / security (pull_request) Successful in 46s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 5m26s
driver / publish (pull_request) Skipped
2026-10-23 10:29:04 +02:00
Christian Manivong ed928c22b0 chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 45s
driver / test (3.10) (pull_request) Successful in 44s
driver / test (3.11) (pull_request) Successful in 44s
driver / test (3.12) (pull_request) Successful in 43s
driver / test (3.13) (pull_request) Successful in 37s
driver / lowest (pull_request) Successful in 22s
driver / security (pull_request) Successful in 46s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 5m30s
driver / publish (pull_request) Skipped
- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow
  of NAPALM/driver-standard; .github/ goes.
- requires-python >=3.10 (napalm-device-types needs it), CHANGELOG,
  py.typed, SPDX license string, Issues and Changelog links; a dev extra
  with floors.
- napalm-device-types >=4.21.1 is declared: officeconnect.py imports
  SwitchDriver and FingerprintRule from it, but the package did not list it.
- urllib3 gets a true floor (>=1.23): unbounded, the lowest job installed a
  version that does not import on Python 3.10.
- mypy strict for the package; napalm_hpe_officeconnect.officeconnect is
  exempt for now (4 errors: three ClassVar fingerprint attributes the base
  declares as instance variables, one bare dict), recorded in the quality
  baseline. Coverage floor 91 % (measured 91.83 %).
2026-10-23 08:44:17 +02:00
Christian Manivong 06a39b49b3 style: ruff format and the lint rules of the driver standard
The rule set every NAPALM driver uses (E, F, I, UP, B at line length 100,
Python 3.10). The code already meets it: ruff format and ruff check --fix
change nothing.
2026-10-23 08:41:56 +02:00
Christian Manivong 93a85805b6 ci: run the tests and build the package on every push and pull request
CI / test (3.10) (push) Successful in 24s
CI / test (3.11) (push) Successful in 23s
CI / test (3.12) (push) Successful in 26s
CI / test (3.10) (pull_request) Successful in 30s
CI / test (3.11) (pull_request) Successful in 26s
CI / test (3.12) (pull_request) Successful in 26s
The same job as napalm-fritzbox and napalm-opnsense: Python 3.10, 3.11 and
3.12, pytest, then wheel and sdist. napalm-device-types comes from
git.netork.io first, because PyPI has an unrelated package of that name.
2026-10-07 07:52:44 +02:00
Christian Manivong cc5f615dbc feat(lldp): report neighbours from the LLDP Remote Device Summary page
get_lldp_neighbors() was never implemented, so the switch reported no
neighbours and NetOrk's network map had nothing to draw for the site it
serves — on the reference installation two APs, a firewall and a Proxmox host
behind a 1820 8G PoE+ (J9982A) all stood unconnected.

The web UI does carry the data. /htdocs/pages/switching/lldp_remote.lsp is
served with the rows embedded in the page's aDataSet, so the existing _rows()
helper reads it with no new plumbing:

    ['7', '3', '00:...:44', '00:...:46', 'enp3s0', 'host.example.com',
     'bridge, WLAN access point, router, station only', 'bridge', '192.0.2.10']

Column 3 is the neighbour's port ID, which on many peers is a MAC, while
column 4 is its port description — a name a person can read. The description
wins, with the ID used only when it is missing. The chassis ID is passed
through as `mac` when it looks like one, since netOrk resolves a neighbour by
MAC before falling back to its name.

Fixture captured from the live switch and anonymised in the style of the
existing ones.

Closes #1
2026-08-18 15:19:13 +07:00
Christian Manivong c76a177ff2 feat: NAPALM driver for HPE OfficeConnect 1820/1920S
These switches have no CLI at all — no SSH, no Telnet and no ArubaOS-Switch
REST API — so the ProCurve driver cannot serve them despite the shared
vendor. The only management surface is the web UI, which ships its table
data as JavaScript array literals; those parse with ast.literal_eval, so
the driver needs no HTML parser and no dependency beyond napalm/requests.

Read-only by design: the platform exposes a single administrator account
with no privilege levels, and serves HTTPS only after a certificate has
been uploaded, so the polling credential is necessarily the admin
credential over a plain channel.

Implements get_facts, get_interfaces, get_vlans, get_vlans_detail and
get_mac_address_table, plus HTTP/SNMP fingerprints for discovery.

Tested against an HPE OfficeConnect 1820 8G PoE+ (65W), J9982A, PT.02.19.
2026-08-10 20:45:55 +07:00