[PR #18676] [MERGED] Generate Strawberry filter enums from ChoiceSets #15406

Closed
opened 2025-12-30 00:21:45 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/18676
Author: @jeremystretch
Created: 2/19/2025
Status: Merged
Merged: 2/19/2025
Merged by: @jeremystretch

Base: 7598-graphql-custom-fieldsHead: generate-enums


📝 Commits (10+)

📊 Changes

13 files changed (+214 additions, -1755 deletions)

View changed files

📝 netbox/circuits/graphql/enums.py (+10 -76)
📝 netbox/dcim/graphql/enums.py (+75 -846)
📝 netbox/extras/graphql/enums.py (+19 -181)
📝 netbox/extras/graphql/filters.py (+3 -1)
📝 netbox/ipam/graphql/enums.py (+21 -117)
📝 netbox/netbox/graphql/enums.py (+7 -106)
netbox/tenancy/graphql/enums.py (+9 -0)
📝 netbox/tenancy/graphql/filters.py (+4 -1)
📝 netbox/tenancy/graphql/types.py (+1 -1)
📝 netbox/utilities/choices.py (+19 -0)
📝 netbox/virtualization/graphql/enums.py (+7 -29)
📝 netbox/vpn/graphql/enums.py (+26 -154)
📝 netbox/wireless/graphql/enums.py (+13 -243)

📄 Description

Programmatically generate enums from existing ChoiceSet classes for Strawberry filters as needed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/18676 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 2/19/2025 **Status:** ✅ Merged **Merged:** 2/19/2025 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `7598-graphql-custom-fields` ← **Head:** `generate-enums` --- ### 📝 Commits (10+) - [`b697a25`](https://github.com/netbox-community/netbox/commit/b697a2543529321e298b6d6bf10b415d165d5e62) Add as_num() method to ChoiceSet - [`6dd8530`](https://github.com/netbox-community/netbox/commit/6dd8530ad8fe209eff74e0e2d6a7a553908ac235) Update circuits enums - [`90c3822`](https://github.com/netbox-community/netbox/commit/90c3822ea912e1c19da9c97d5b2d29a8e7661cff) Update DCIM enums - [`65d0014`](https://github.com/netbox-community/netbox/commit/65d00143697d10990129cf717f6ca734768c5bcd) Update extras enums - [`2916942`](https://github.com/netbox-community/netbox/commit/2916942dbfd66d062be86ee87b5e1a5b73d01572) Update IPAM enums - [`48cc6ef`](https://github.com/netbox-community/netbox/commit/48cc6efe14340ff89fb9fa38e18b23d16e60d160) Add tenancy enums - [`30c913c`](https://github.com/netbox-community/netbox/commit/30c913c97af2cabbf19343df6bb2506400ec2059) Update virtualization enums - [`b03fcf4`](https://github.com/netbox-community/netbox/commit/b03fcf46268dd80f5a3bd96bfff6494b7e828554) Update VPN enums - [`527ca0d`](https://github.com/netbox-community/netbox/commit/527ca0d55f44f86eb1485386155f1ed5fa92a26c) Update wireless enums - [`3abc8f4`](https://github.com/netbox-community/netbox/commit/3abc8f44b5c0a4a24cc6087883ec0b705333cade) Update netbox enums ### 📊 Changes **13 files changed** (+214 additions, -1755 deletions) <details> <summary>View changed files</summary> 📝 `netbox/circuits/graphql/enums.py` (+10 -76) 📝 `netbox/dcim/graphql/enums.py` (+75 -846) 📝 `netbox/extras/graphql/enums.py` (+19 -181) 📝 `netbox/extras/graphql/filters.py` (+3 -1) 📝 `netbox/ipam/graphql/enums.py` (+21 -117) 📝 `netbox/netbox/graphql/enums.py` (+7 -106) ➕ `netbox/tenancy/graphql/enums.py` (+9 -0) 📝 `netbox/tenancy/graphql/filters.py` (+4 -1) 📝 `netbox/tenancy/graphql/types.py` (+1 -1) 📝 `netbox/utilities/choices.py` (+19 -0) 📝 `netbox/virtualization/graphql/enums.py` (+7 -29) 📝 `netbox/vpn/graphql/enums.py` (+26 -154) 📝 `netbox/wireless/graphql/enums.py` (+13 -243) </details> ### 📄 Description Programmatically generate enums from existing ChoiceSet classes for Strawberry filters as needed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:21:45 +01:00
adam closed this issue 2025-12-30 00:21:45 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15406