netbox-community/netbox-bgp

Add key to ChoiceSets to allow user override of choices

cruse1977 opened this issue · 2 comments

Is your feature request related to a problem? Please describe.
In certain plugins and certain netbox choicesets themselves, users are able to override the choiceset via the FIELD_CHOICES variable in configuration.py. This is achieved by adding a 'key' attribute under the choiceset itself.

eg (from netbox-inventory):

class AssetStatusChoices(ChoiceSet):
    key = 'Asset.status'
    

meaning its then possible to reference (as per the example above) nb_inventory.Asset.status to override or add to the pre-configured choices.

Describe the solution you'd like
As above a key on BGPSessionStatus to allow configuration.py overrides and additional choices. Note this should only apply where choices are descriptive

Describe alternatives you've considered
n/a

Additional context

Completed in PR