[PR #20058] [MERGED] Closes #19377: Introduce config context profiles #15811

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/20058
Author: @jeremystretch
Created: 8/8/2025
Status: Merged
Merged: 8/13/2025
Merged by: @arthanson

Base: featureHead: 19377-configcontext-schema


📝 Commits (4)

  • 7789147 Closes #19377: Introduce config context profiles
  • 96306dc Misc cleanup
  • 9ecfd65 Consolodate data file attributes into a reusable template
  • 79e86f5 Fix synced data support

📊 Changes

34 files changed (+812 additions, -109 deletions)

View changed files

📝 docs/models/extras/configcontext.md (+4 -0)
docs/models/extras/configcontextprofile.md (+33 -0)
📝 mkdocs.yml (+1 -0)
📝 netbox/core/graphql/mixins.py (+8 -0)
📝 netbox/dcim/migrations/0205_moduletypeprofile.py (+2 -1)
📝 netbox/dcim/models/modules.py (+2 -13)
📝 netbox/extras/api/serializers_/configcontexts.py (+36 -4)
📝 netbox/extras/api/urls.py (+1 -0)
📝 netbox/extras/api/views.py (+6 -0)
📝 netbox/extras/filtersets.py (+41 -0)
📝 netbox/extras/forms/bulk_edit.py (+28 -1)
📝 netbox/extras/forms/bulk_import.py (+10 -0)
📝 netbox/extras/forms/filtersets.py (+28 -0)
📝 netbox/extras/forms/model_forms.py (+34 -4)
📝 netbox/extras/graphql/filters.py (+9 -1)
📝 netbox/extras/graphql/schema.py (+3 -0)
📝 netbox/extras/graphql/types.py (+18 -12)
netbox/extras/migrations/0132_configcontextprofile.py (+75 -0)
📝 netbox/extras/models/configs.py (+61 -4)
📝 netbox/extras/search.py (+11 -0)

...and 14 more files

📄 Description

Closes: #19377

  • Introduce the ConfigContextProfile model to hold JSON schema definitions for config contexts
  • Add a profile ForeignKey on ConfigContext
  • Tweak validate_schema() to not raise an error on empty values
  • Tweak ModuleTypeProfile to use validate_schema() as a validator on its schema field
  • Introduce SyncedDataMixin for GraphQL types for models which support data syncing

🔄 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/20058 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 8/8/2025 **Status:** ✅ Merged **Merged:** 8/13/2025 **Merged by:** [@arthanson](https://github.com/arthanson) **Base:** `feature` ← **Head:** `19377-configcontext-schema` --- ### 📝 Commits (4) - [`7789147`](https://github.com/netbox-community/netbox/commit/7789147f049bc3013b21657dc2c352a0a851f1f9) Closes #19377: Introduce config context profiles - [`96306dc`](https://github.com/netbox-community/netbox/commit/96306dcc6fb058be051a237b63915d81d4f6e2d4) Misc cleanup - [`9ecfd65`](https://github.com/netbox-community/netbox/commit/9ecfd65fe247dae65cd5aee6bbcac55256f3fd96) Consolodate data file attributes into a reusable template - [`79e86f5`](https://github.com/netbox-community/netbox/commit/79e86f5f0ff5db447c427856661a6691d34cff00) Fix synced data support ### 📊 Changes **34 files changed** (+812 additions, -109 deletions) <details> <summary>View changed files</summary> 📝 `docs/models/extras/configcontext.md` (+4 -0) ➕ `docs/models/extras/configcontextprofile.md` (+33 -0) 📝 `mkdocs.yml` (+1 -0) 📝 `netbox/core/graphql/mixins.py` (+8 -0) 📝 `netbox/dcim/migrations/0205_moduletypeprofile.py` (+2 -1) 📝 `netbox/dcim/models/modules.py` (+2 -13) 📝 `netbox/extras/api/serializers_/configcontexts.py` (+36 -4) 📝 `netbox/extras/api/urls.py` (+1 -0) 📝 `netbox/extras/api/views.py` (+6 -0) 📝 `netbox/extras/filtersets.py` (+41 -0) 📝 `netbox/extras/forms/bulk_edit.py` (+28 -1) 📝 `netbox/extras/forms/bulk_import.py` (+10 -0) 📝 `netbox/extras/forms/filtersets.py` (+28 -0) 📝 `netbox/extras/forms/model_forms.py` (+34 -4) 📝 `netbox/extras/graphql/filters.py` (+9 -1) 📝 `netbox/extras/graphql/schema.py` (+3 -0) 📝 `netbox/extras/graphql/types.py` (+18 -12) ➕ `netbox/extras/migrations/0132_configcontextprofile.py` (+75 -0) 📝 `netbox/extras/models/configs.py` (+61 -4) 📝 `netbox/extras/search.py` (+11 -0) _...and 14 more files_ </details> ### 📄 Description ### Closes: #19377 - Introduce the ConfigContextProfile model to hold JSON schema definitions for config contexts - Add a `profile` ForeignKey on ConfigContext - Tweak `validate_schema()` to not raise an error on empty values - Tweak ModuleTypeProfile to use `validate_schema()` as a validator on its `schema` field - Introduce SyncedDataMixin for GraphQL types for models which support data syncing --- <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:24:12 +01:00
adam closed this issue 2025-12-30 00:24:12 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15811