Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add key to ChoiceSets to allow user override of choices #189

Closed
cruse1977 opened this issue May 9, 2024 · 2 comments
Closed

Add key to ChoiceSets to allow user override of choices #189

cruse1977 opened this issue May 9, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@cruse1977
Copy link
Member

cruse1977 commented May 9, 2024

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

@cruse1977 cruse1977 added the enhancement New feature or request label May 9, 2024
@k01ek k01ek self-assigned this May 13, 2024
@natm
Copy link
Member

natm commented May 15, 2024

@natm natm self-assigned this May 16, 2024
@cruse1977
Copy link
Member Author

Completed in PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants