Source: PR #64 review comment 3176942567
The power-port (singular) alias was introduced in commit de5b4ce (2020) to handle YAML files that used the key in its singular form instead of power-ports (plural). The alias is still present in three places:
COMPONENT_ALIASES in core/change_detector.py (line 168)
ENDPOINT_CACHE_MAP in core/netbox_api.py (line 1558)
- Explicit
if "power-port" in device_type check in core/netbox_api.py (line 764–765)
Searching the current devicetype-library repo confirms zero YAML files currently use the singular key. Module-type creation (_create_new_module_type_components) never had the alias, creating an undocumented inconsistency.
Proposed resolution: Remove the alias from all three locations and the related tests, document that power-ports is the only supported key. If backward compatibility is considered important, add an explicit deprecation warning.
Source: PR #64 review comment 3176942567
The
power-port(singular) alias was introduced in commitde5b4ce(2020) to handle YAML files that used the key in its singular form instead ofpower-ports(plural). The alias is still present in three places:COMPONENT_ALIASESincore/change_detector.py(line 168)ENDPOINT_CACHE_MAPincore/netbox_api.py(line 1558)if "power-port" in device_typecheck incore/netbox_api.py(line 764–765)Searching the current devicetype-library repo confirms zero YAML files currently use the singular key. Module-type creation (
_create_new_module_type_components) never had the alias, creating an undocumented inconsistency.Proposed resolution: Remove the alias from all three locations and the related tests, document that
power-portsis the only supported key. If backward compatibility is considered important, add an explicit deprecation warning.