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>
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "napalm-device-types"
|
||||
version = "0.3.0"
|
||||
version = "0.5.0"
|
||||
description = "Abstract device-type base classes for NAPALM drivers"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.9"
|
||||
|
||||
Reference in New Issue
Block a user