Skip to content

Audit and remove the power-port (singular) alias #67

@marcinpsk

Description

@marcinpsk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions