diff --git a/docs/models/circuits/circuitgroupassignment.md b/docs/models/circuits/circuitgroupassignment.md index f176a1241..2aaa375af 100644 --- a/docs/models/circuits/circuitgroupassignment.md +++ b/docs/models/circuits/circuitgroupassignment.md @@ -1,19 +1,25 @@ # Circuit Group Assignments -Circuits can be assigned to [Circuit groups](./circuitgroup.md) to indicate Fallback Circuits. For instance, three circuits, each belonging to a different provider, may each be assigned to the same Circuit group. Each of these assignments would typically receive a different priority. - -Circuits are assigned to Circuit groups under the Circuit Group detail view. +Circuits can be assigned to [circuit groups](./circuitgroup.md) for correlation purposes. For instance, three circuits, each belonging to a different provider, may each be assigned to the same circuit group. Each assignment may optionally include a priority designation. ## Fields ### Group -The [Circuit group](./circuitgroup.md) being assigned. +The [circuit group](./circuitgroup.md) being assigned. ### Circuit -The [Circuit](./circuit.md) that is being assigned to the group. +The [circuit](./circuit.md) that is being assigned to the group. ### Priority -A selection (Primary, Secondary, Tertiary) indicating the circuit's priority for being elected as the master/primary node in the group. +The circuit's operation priority relative to its peers within the group. The assignment of a priority is optional. Choices include: + +* Primary +* Secondary +* Tertiary +* Inactive + +!!! tip + Additional priority choices may be defined by setting `CircuitGroupAssignment.priority` under the [`FIELD_CHOICES`](../../configuration/data-validation.md#field_choices) configuration parameter. diff --git a/netbox/circuits/choices.py b/netbox/circuits/choices.py index 7aba50dba..8c25c7459 100644 --- a/netbox/circuits/choices.py +++ b/netbox/circuits/choices.py @@ -79,14 +79,16 @@ class CircuitTerminationPortSpeedChoices(ChoiceSet): class CircuitPriorityChoices(ChoiceSet): + key = 'CircuitGroupAssignment.priority' + PRIORITY_PRIMARY = 'primary' PRIORITY_SECONDARY = 'secondary' PRIORITY_TERTIARY = 'tertiary' PRIORITY_INACTIVE = 'inactive' - CHOICES = ( + CHOICES = [ (PRIORITY_PRIMARY, _('Primary')), (PRIORITY_SECONDARY, _('Secondary')), (PRIORITY_TERTIARY, _('Tertiary')), (PRIORITY_INACTIVE, _('Inactive')), - ) + ]