Add minimum and maximum mask length enforcement to IPNetworkVar #2882

Closed
opened 2025-12-29 18:23:04 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Sep 17, 2019).

Environment

  • Python version: 3.6.8
  • NetBox version: 2.6.3

Proposed Functionality

Add two new attributes to the IPNetworkVar custom script variable:

  • min_prefix_length: The minimum acceptable prefix length
  • max_prefix_length: The maximum acceptable prefix length

These are similar in nature to the min_length and max_length attributes on StringVar.

Use Case

Introducing these attributes allows for additional validation logic.

Database Changes

None

External Dependencies

None

Originally created by @jeremystretch on GitHub (Sep 17, 2019). ### Environment * Python version: 3.6.8 * NetBox version: 2.6.3 ### Proposed Functionality Add two new attributes to the `IPNetworkVar` custom script variable: * `min_prefix_length`: The minimum acceptable prefix length * `max_prefix_length`: The maximum acceptable prefix length These are similar in nature to the `min_length` and `max_length` attributes on `StringVar`. ### Use Case Introducing these attributes allows for additional validation logic. ### Database Changes None ### External Dependencies None
adam added the status: acceptedtype: feature labels 2025-12-29 18:23:04 +01:00
adam closed this issue 2025-12-29 18:23:04 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2882