netbox-acls icon indicating copy to clipboard operation
netbox-acls copied to clipboard

[Feature]: Rename ACLRule fields for clarity: `index` → `sequence`, `action` → `rule_type`

Open pheus opened this issue 2 months ago • 0 comments

NetBox version

v4.4.1

Feature type

Change to existing model

Proposed functionality

Summary
Improve naming clarity by renaming:

  • indexsequence
  • actionrule_type (choices: permit, deny, remark)

Provide backward‑compatible aliases for one release cycle so existing API clients and integrations are not broken.

Data model & API

  • Schema migration: rename database fields (indexsequence, actionrule_type).
  • Serializers:
    • Prefer sequence and rule_type in request/response payloads.
    • Accept index and action as input aliases (mapped to the new names) for a deprecation window.
    • (Optional) Echo legacy names in responses behind a feature flag, or include deprecation warnings.
  • Choices for rule_type: permit, deny, remark (no behavior change; matches current semantics).

UI/UX

  • Update field labels in forms, tables, and filters to Sequence and Rule type.

Migration plan

  1. Add the field renames with data migrations.
  2. Update serializers, and forms to use the new names.
  3. Document deprecation of index/action and plan removal after one release cycle.

Testing

  • Backward‑compatibility tests: payloads using index/action are accepted and stored correctly.
  • Display tests: new labels appear in UI; filters and ordering by sequence still work.

Use case

  • Reduces ambiguity for users and contributors (e.g., “sequence” is the common industry term; “action” conflates with the concept of a “remark,” which isn’t an action).
  • Makes future extensions (additional rule types) clearer.

External dependencies

  • None

pheus avatar Sep 27 '25 09:09 pheus