Skip to content

Commit

Permalink
Updates vpn.L2VPN docs
Browse files Browse the repository at this point in the history
Also rearranges L2VPNStatusChoices so that the default value (active) is
first.
  • Loading branch information
jnovinger committed Mar 3, 2025
1 parent d033ea5 commit a63b52d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions docs/models/vpn/l2vpn.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ The technology employed in forming and operating the L2VPN. Choices include:
!!! note
Designating the type as VPWS, EPL, EP-LAN, EP-TREE will limit the L2VPN instance to two terminations.

### Status

The operational status of the L2VPN. By default, the following statuses are available:

* Active (default)
* Planned
* Faulty

!!! tip "Custom L2VPN statuses"
Additional L2VPN statuses may be defined by setting `L2VPN.status` under the [`FIELD_CHOICES`](../../configuration/data-validation.md#field_choices) configuration parameter.

!!! info "This field was introduced in NetBox v4.3."

### Identifier

An optional numeric identifier. This can be used to track a pseudowire ID, for example.
Expand Down
4 changes: 2 additions & 2 deletions netbox/vpn/choices.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,12 @@ class L2VPNTypeChoices(ChoiceSet):
class L2VPNStatusChoices(ChoiceSet):
key = 'L2VPN.status'

STATUS_PLANNED = 'planned'
STATUS_ACTIVE = 'active'
STATUS_PLANNED = 'planned'
STATUS_DECOMMISSIONED = 'decommissioned'

CHOICES = [
(STATUS_PLANNED, _('Planned'), 'cyan'),
(STATUS_ACTIVE, _('Active'), 'green'),
(STATUS_PLANNED, _('Planned'), 'cyan'),
(STATUS_DECOMMISSIONED, _('Decommissioned'), 'red'),
]

0 comments on commit a63b52d

Please sign in to comment.