[PR #18981] [CLOSED] 18245 Add Device Role Groups #15492

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/18981
Author: @arthanson
Created: 3/21/2025
Status: Closed

Base: featureHead: 18245-device-role-groups


📝 Commits (10+)

📊 Changes

29 files changed (+762 additions, -15 deletions)

View changed files

📝 docs/models/dcim/devicerole.md (+4 -0)
docs/models/dcim/devicerolegroup.md (+19 -0)
📝 mkdocs.yml (+1 -0)
📝 netbox/dcim/api/serializers_/nested.py (+13 -0)
📝 netbox/dcim/api/serializers_/roles.py (+21 -3)
📝 netbox/dcim/api/urls.py (+1 -0)
📝 netbox/dcim/api/views.py (+12 -0)
📝 netbox/dcim/filtersets.py (+44 -0)
📝 netbox/dcim/forms/bulk_edit.py (+25 -2)
📝 netbox/dcim/forms/bulk_import.py (+24 -1)
📝 netbox/dcim/forms/filtersets.py (+17 -0)
📝 netbox/dcim/forms/model_forms.py (+28 -2)
📝 netbox/dcim/graphql/filters.py (+15 -0)
📝 netbox/dcim/graphql/schema.py (+3 -0)
📝 netbox/dcim/graphql/types.py (+10 -0)
netbox/dcim/migrations/0203_devicerolegroup_devicerole_group.py (+65 -0)
📝 netbox/dcim/models/devices.py (+36 -1)
📝 netbox/dcim/search.py (+12 -0)
📝 netbox/dcim/tables/devices.py (+34 -3)
📝 netbox/dcim/tests/test_api.py (+60 -0)

...and 9 more files

📄 Description

Fixes: #18245

Adds Device Role Groups which are hierarchical. Device Roles can then be assigned to these groups. Modeled after Tenant Groups. Two parts of this:

Adding new Device Role Group and associated forms, api's, etc.
Adding group to existing Device Role model, forms, api's

Monosnap Add a new device role group | NetBox 2025-03-21 10-50-49
Monosnap Device Role Groups | NetBox 2025-03-21 10-50-21
Monosnap tsub-1 | NetBox 2025-03-21 10-50-34


🔄 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/18981 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 3/21/2025 **Status:** ❌ Closed **Base:** `feature` ← **Head:** `18245-device-role-groups` --- ### 📝 Commits (10+) - [`3724c6c`](https://github.com/netbox-community/netbox/commit/3724c6c5b21a77e6f88f6a1158069bfae2722511) 18245 add model - [`7c8862c`](https://github.com/netbox-community/netbox/commit/7c8862cb1e8d8457cdf83dcb533b18d6665b0554) 18245 add forms, views, fitlersets, api - [`f362522`](https://github.com/netbox-community/netbox/commit/f362522590ca4b8be0851cb34c146e858134e265) 18245 graphql - [`32987cb`](https://github.com/netbox-community/netbox/commit/32987cb2ac4d71f535cd73c280a766e4e148e29b) 18245 tests - [`20ab96c`](https://github.com/netbox-community/netbox/commit/20ab96ce877dea0e82c0ea3a45054c9c3985a3f0) 18245 docs - [`37d1363`](https://github.com/netbox-community/netbox/commit/37d136386be299c6433ff5040465e9a23e20c8a4) 18245 add group to device role - [`251840c`](https://github.com/netbox-community/netbox/commit/251840c05e50586f19cd32993dd536e93e5ea6e1) 18245 fix graphql - [`a5dc080`](https://github.com/netbox-community/netbox/commit/a5dc0807dbfddcb568f6e19df11fe1b87e0a8d44) 18245 fix tests - [`a028aad`](https://github.com/netbox-community/netbox/commit/a028aad84943a79134ae41fa1ccaea0d9f5dfe37) 18245 fix tests - [`0529fb3`](https://github.com/netbox-community/netbox/commit/0529fb37989f3dfc3b467d85710da2f58a37a859) 18245 fix tests ### 📊 Changes **29 files changed** (+762 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `docs/models/dcim/devicerole.md` (+4 -0) ➕ `docs/models/dcim/devicerolegroup.md` (+19 -0) 📝 `mkdocs.yml` (+1 -0) 📝 `netbox/dcim/api/serializers_/nested.py` (+13 -0) 📝 `netbox/dcim/api/serializers_/roles.py` (+21 -3) 📝 `netbox/dcim/api/urls.py` (+1 -0) 📝 `netbox/dcim/api/views.py` (+12 -0) 📝 `netbox/dcim/filtersets.py` (+44 -0) 📝 `netbox/dcim/forms/bulk_edit.py` (+25 -2) 📝 `netbox/dcim/forms/bulk_import.py` (+24 -1) 📝 `netbox/dcim/forms/filtersets.py` (+17 -0) 📝 `netbox/dcim/forms/model_forms.py` (+28 -2) 📝 `netbox/dcim/graphql/filters.py` (+15 -0) 📝 `netbox/dcim/graphql/schema.py` (+3 -0) 📝 `netbox/dcim/graphql/types.py` (+10 -0) ➕ `netbox/dcim/migrations/0203_devicerolegroup_devicerole_group.py` (+65 -0) 📝 `netbox/dcim/models/devices.py` (+36 -1) 📝 `netbox/dcim/search.py` (+12 -0) 📝 `netbox/dcim/tables/devices.py` (+34 -3) 📝 `netbox/dcim/tests/test_api.py` (+60 -0) _...and 9 more files_ </details> ### 📄 Description ### Fixes: #18245 Adds Device Role Groups which are hierarchical. Device Roles can then be assigned to these groups. Modeled after Tenant Groups. Two parts of this: Adding new Device Role Group and associated forms, api's, etc. Adding group to existing Device Role model, forms, api's ![Monosnap Add a new device role group | NetBox 2025-03-21 10-50-49](https://github.com/user-attachments/assets/2cdefcaa-bfa1-4aac-8c9e-1f1b4eb68e33) ![Monosnap Device Role Groups | NetBox 2025-03-21 10-50-21](https://github.com/user-attachments/assets/efaf0b0b-813a-4fe6-bb36-d5d2eef927fd) ![Monosnap tsub-1 | NetBox 2025-03-21 10-50-34](https://github.com/user-attachments/assets/87d6fde2-fc50-42d8-83d1-7a74784bf3d1) --- <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:22:15 +01:00
adam closed this issue 2025-12-30 00:22:16 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15492