Commit Graph
6 Commits
Author SHA1 Message Date
Christian ManivongandClaude Sonnet 4.6 f3f70cbf74 fix: normalize MAC address format in get_mac_address_table()
Raw MAC addresses from the ArubaOS-Switch API use a non-standard
format; normalize via napalm.base.helpers.mac() for consistency.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 17:17:23 +02:00
Christian ManivongandClaude Sonnet 4.6 576752da23 feat: synthesize LAG/trunk interfaces and support trunk member editing
get_interfaces() now fills in ports missing from the /ports collection
(e.g. the 4th SFP uplink on a 2530-48G) using system/status/switch, and
synthesizes a logical interface for each configured LAG/trunk group with
lag_members/lag_mode. New set_lag_members() adds/removes trunk members via
the REST /cli passthrough (PUT ports/{id} silently ignores trunk_group).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 14:47:00 +02:00
Christian Manivong ef544be540 feat: add PoE config and power-cycle support for ProCurve REST API
Adds get_poe_status()/set_poe() to expose per-port PoE configuration
(enable state, priority, allocation method, allocated power) and allow
toggling it via the AOS-Switch REST API.
2026-06-12 13:23:46 +02:00
Christian ManivongandClaude Sonnet 4.6 76a1939af9 fix: AOS-Switch REST API session cookie auth and VLAN PUT body
connect() never sent back the sessionId returned in the login response
body, so all writes (POST/PUT/DELETE) were silently rejected with
"Access is unauthorized" while reads worked fine. Also fix
_api_set_vlan to PUT the full VLAN object (AOS-Switch v3 rejects
partial PUT bodies with HTTP 400).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 01:38:02 +02:00
Christian ManivongandClaude Sonnet 4.6 0cab237b1d fix: fix_snmp SSH fallback when driver is connected via REST API
The REST API has no writable config endpoint for SNMP communities.
When _action_fix_snmp() is called on a REST-connected driver, it now
opens a temporary Netmiko SSH session (standard KEX, then legacy KEX
fallback), runs the config-mode CLI commands, and restores the REST
transport state on exit. SSH errors are surfaced verbatim instead of
being silently swallowed.

Also:
- _save_config: guard against REST transport (was calling self._device
  directly → NoneType AttributeError when transport == "api")
- _action_fix_snmp: extracted CLI logic into _action_fix_snmp_cli()
  so it is reused for both the SSH-fallback and native SSH/Telnet paths
- api_client: add get_snmp_communities() + configure_snmp_community()
  for future use; improve GET error logging (warn vs debug on non-404)
- _try_api: probe timeout capped at 15 s; SSL retry loop for
  self-signed certificates; improved log levels
- _api_set_interface / _cli_set_interface: handle enabled/description
  fields that were previously ignored
- probe(): broaden accepted status codes (301/302/303/403)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09 23:12:32 +02:00
Christian Manivong 35032fd034 initial commit 2026-05-29 09:30:53 +02:00