Commit Graph
8 Commits
Author SHA1 Message Date
christianmanivongandClaude Sonnet 4.6 0f6734e6da feat: DeviceTypeDriver base class mit FingerprintRule und PortSpec
Neue Zwischenschicht zwischen NetworkDriver und den typ-spezifischen
Basisklassen (FirewallDriver, SwitchDriver, …). Definiert das
Fingerprinting-Interface für den Discovery-Subsystem:

- FingerprintRule (NamedTuple): pattern, weight, mandatory, negative
- PortSpec (NamedTuple): scheme, port, paths, weight, mandatory
- DeviceTypeDriver: VENDOR, DRIVER_NAME, PORT_SPECS, SNMP_OBJECT_ID_PREFIX,
  SNMP_FINGERPRINT, SSH_FINGERPRINT, HTTP_FINGERPRINT

Alle *Driver-Klassen erben jetzt von DeviceTypeDriver statt NetworkDriver.
Transitiv ist NetworkDriver weiterhin in der MRO (keine Breaking Change).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 14:29:41 +02:00
christianmanivongandClaude Sonnet 4.6 95f8771824 feat: add TYPE_LABEL class attribute to all base driver classes
Each abstract base class now carries a TYPE_LABEL: str attribute that
describes the device category in human-readable form:

  AccessPointDriver  → "Access Point"
  FirewallDriver     → "Firewall"
  HypervisorDriver   → "Hypervisor"
  OSDriver           → "OS"
  ResidentialGatewayDriver → "Gateway"
  StorageDriver      → "Storage"
  SwitchDriver       → "Switch"

Concrete drivers can override TYPE_LABEL to express a more specific
category (e.g. LinuxDriver sets "Linux"). The backend reads this
attribute to expose a type_label in the DriverInfo API response,
replacing the hardcoded DRIVER_TYPE map in the frontend.

23 tests covering presence, value, inheritance, and override.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 11:36:41 +02:00
christianmanivongandClaude Sonnet 4.6 be566ebba3 feat: document set_lag_members on SwitchDriver
Adds the abstract set_lag_members() method (with docstring) implemented
by the ProCurve, NetGear and TP-Link Jetstream drivers for managing
LAG/trunk port membership.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 14:48:54 +02:00
christianmanivongandClaude Sonnet 4.6 879419d5ba feat: add get_health_metrics() interface and UCD-MIB shared implementation
Defines the driver-level health metrics interface across all base classes.
OSDriver/FirewallDriver/HypervisorDriver/AccessPointDriver get a default
UCD-MIB + IF-MIB implementation via shared _ucd_metrics.py; SwitchDriver
raises NotImplementedError (vendor-proprietary OIDs). Adds HealthMetricsDict
and HealthMetricsIfaceDict TypedDicts to models.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 00:43:26 +02:00
christianmanivongandClaude Sonnet 4.6 197e0b4ab7 feat: add OSDriver base class with Docker and device action APIs
- Introduce OSDriver abstract base class (os.py) for general-purpose OS
  drivers (Linux, BSD, macOS) — registers package management, service
  management, users, processes, cron job and the two new OS-specific
  extension points
- Add get_docker_info() contract: returns DockerInfoDict covering
  containers, images, volumes, networks and outdated image detection
- Add run_device_action() contract: generic extensibility point for
  driver-specific one-off administrative actions
- Fix duplicate TypedDicts in models.py: remove early shadow definitions
  of UserDict, ProcessDict, CronJobDict, ApplyUpdatesResultDict from the
  Common section; keep the more complete definitions in the OS section
- Add Docker TypedDicts: DockerContainerDict, DockerImageDict,
  DockerVolumeDict, DockerNetworkDict, DockerInfoDict
- Add DeviceActionResultDict
- Export OSDriver from package __init__; bump version to 0.3.0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 01:53:10 +02:00
christianmanivong b5f9c5301d feat: add service management and package update APIs to AccessPointDriver
- Add ServiceDict and UpdateDict TypedDicts to models
- Add get_services() / manage_service() abstract methods for init-system interaction
- Add get_available_updates() / apply_updates() for package upgrade workflows
- Add _filter_interfaces() helper to exclude lo and phy* interfaces from interface dicts
- Extend WirelessClientDict with optional ip, hostname, and lease_end fields
- Add optional description field to VPNTunnelDict
- Bump version 0.1.0 → 0.2.0
2026-05-29 08:38:05 +02:00
christianmanivong 03d014f57d Added abstract interface & vlan functions 2026-05-13 21:23:48 +02:00
christianmanivong b03e4355c9 Initial release (v0.1.0)
Add abstract device-type base classes for NAPALM drivers:
- AccessPointDriver  (wireless APs)
- SwitchDriver       (Ethernet switches)
- FirewallDriver     (firewalls / UTM)
- HypervisorDriver   (Proxmox VE, ESXi, KVM, Hyper-V)
- StorageDriver      (NAS/SAN appliances)

All return types modelled as TypedDicts in napalm_device_types.models.
2026-05-11 21:31:52 +02:00