mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-08 08:38:16 -06:00
Make CircuitPriorityChoices extensible
This commit is contained in:
parent
41aafa762b
commit
16e32c87f6
@ -1,19 +1,25 @@
|
|||||||
# Circuit Group Assignments
|
# 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 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.
|
||||||
|
|
||||||
Circuits are assigned to Circuit groups under the Circuit Group detail view.
|
|
||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
### Group
|
### Group
|
||||||
|
|
||||||
The [Circuit group](./circuitgroup.md) being assigned.
|
The [circuit group](./circuitgroup.md) being assigned.
|
||||||
|
|
||||||
### Circuit
|
### Circuit
|
||||||
|
|
||||||
The [Circuit](./circuit.md) that is being assigned to the group.
|
The [circuit](./circuit.md) that is being assigned to the group.
|
||||||
|
|
||||||
### Priority
|
### 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.
|
||||||
|
@ -79,14 +79,16 @@ class CircuitTerminationPortSpeedChoices(ChoiceSet):
|
|||||||
|
|
||||||
|
|
||||||
class CircuitPriorityChoices(ChoiceSet):
|
class CircuitPriorityChoices(ChoiceSet):
|
||||||
|
key = 'CircuitGroupAssignment.priority'
|
||||||
|
|
||||||
PRIORITY_PRIMARY = 'primary'
|
PRIORITY_PRIMARY = 'primary'
|
||||||
PRIORITY_SECONDARY = 'secondary'
|
PRIORITY_SECONDARY = 'secondary'
|
||||||
PRIORITY_TERTIARY = 'tertiary'
|
PRIORITY_TERTIARY = 'tertiary'
|
||||||
PRIORITY_INACTIVE = 'inactive'
|
PRIORITY_INACTIVE = 'inactive'
|
||||||
|
|
||||||
CHOICES = (
|
CHOICES = [
|
||||||
(PRIORITY_PRIMARY, _('Primary')),
|
(PRIORITY_PRIMARY, _('Primary')),
|
||||||
(PRIORITY_SECONDARY, _('Secondary')),
|
(PRIORITY_SECONDARY, _('Secondary')),
|
||||||
(PRIORITY_TERTIARY, _('Tertiary')),
|
(PRIORITY_TERTIARY, _('Tertiary')),
|
||||||
(PRIORITY_INACTIVE, _('Inactive')),
|
(PRIORITY_INACTIVE, _('Inactive')),
|
||||||
)
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user