-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Labels
enhancementNew feature or requestNew feature or request
Description
NetBox version
v4.4.1
Feature type
Change to existing model
Proposed functionality
Summary
Enable attached remarks on existing permit/deny ACLRules using the already‑present remark field. When a remark is set on a rule, render it adjacent to that rule and treat it as documentation for the same sequence/index (e.g., Cisco IOS‑XE style output). This can be delivered without schema changes.
Behavior & UI/UX
- Allow setting
remarkonpermit/denyACLRules (in forms, API, and bulk edits). - In tables and rendered views, display an ACLRule’s attached remark immediately above the rule and visually associate it with the rule’s
index(sequence).
Minimal implementation (no schema changes)
- Use the existing
remarktext field on the same ACLRule row. - Keep current uniqueness on
indexintact; since the remark is stored on the same row, no duplicateindexentries are introduced.
Optional enhancement (only if standalone remark rows must share an index with a rule)
Add a conditional uniqueness constraint so a standalone remark row may share the same index as a permit/deny rule while still preventing duplicate permit/deny indices. (Uses current field names.)
from django.db.models import Q
models.UniqueConstraint(
fields=["access_list", "index"],
condition=Q(action__in=["permit", "deny"]),
name="uniq_aclrule_index_for_real_rules",
)Testing
- Rendering tests: attached
remarkappears adjacent to the rule and uses the same displayed sequence/index.
Use case
- Mirrors common operational practice (e.g., IOS‑XE) where a comment is tied to the exact rule it documents- improving readability, reviews, and audits - without consuming an extra sequence number.
- Keeps the data model stable; primarily a UX/serializer improvement.
External dependencies
- None
hjakul
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request