[PR #8105] [MERGED] Closes #7844: Add support for device modules #13316

Closed
opened 2025-12-29 22:26:44 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/8105
Author: @jeremystretch
Created: 12/17/2021
Status: Merged
Merged: 12/20/2021
Merged by: @jeremystretch

Base: featureHead: 7844-modules


📝 Commits (9)

  • e529d7f Add ModuleBay and ModuleBayTemplate models
  • 7c60e3c Add Module model
  • 5bd223a Fix YAML import for ModuleTypes
  • 7777922 Add Module model
  • e0d7511 Misc cleanup
  • 7dc4e00 Add module, module_bay columns to device component tables
  • ed6a160 Add modules to device component serializers
  • eaa1165 Add position field for module bays
  • e35aa4b Add documentation for modules

📊 Changes

51 files changed (+3699 additions, -279 deletions)

View changed files

📝 docs/core-functionality/device-types.md (+1 -0)
📝 docs/core-functionality/devices.md (+1 -0)
docs/core-functionality/modules.md (+4 -0)
📝 docs/models/dcim/devicebay.md (+1 -1)
📝 docs/models/dcim/devicebaytemplate.md (+1 -1)
docs/models/dcim/module.md (+5 -0)
docs/models/dcim/modulebay.md (+3 -0)
docs/models/dcim/modulebaytemplate.md (+3 -0)
docs/models/dcim/moduletype.md (+23 -0)
📝 mkdocs.yml (+1 -0)
📝 netbox/dcim/api/nested_serializers.py (+68 -1)
📝 netbox/dcim/api/serializers.py (+107 -21)
📝 netbox/dcim/api/urls.py (+6 -2)
📝 netbox/dcim/api/views.py (+52 -12)
📝 netbox/dcim/filtersets.py (+160 -7)
📝 netbox/dcim/forms/bulk_create.py (+6 -0)
📝 netbox/dcim/forms/bulk_edit.py (+82 -2)
📝 netbox/dcim/forms/bulk_import.py (+42 -0)
📝 netbox/dcim/forms/filtersets.py (+113 -1)
📝 netbox/dcim/forms/models.py (+111 -13)

...and 31 more files

📄 Description

Closes: #7844

  • Introduces the ModuleBayTemplate and ModuleBay models in parallel with existing device components and their corresponding templates
  • Introduces the ModuleType model to map associations of component templates for module instantiation (similar to DeviceType)
  • Introduces the Module model to represent hardware modules (e.g. line cards) installed within a Device
  • Extends existing component templates (except DeviceBayTemplate) to support ModuleType assignment
  • Extends existing device components (except DeviceBay and InventoryItem) to support Model assignment
  • Adds all the required views, API resources, tests, etc. required for the new models

🔄 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/8105 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 12/17/2021 **Status:** ✅ Merged **Merged:** 12/20/2021 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `7844-modules` --- ### 📝 Commits (9) - [`e529d7f`](https://github.com/netbox-community/netbox/commit/e529d7fd3b721c3cf5b2e5c2c61c4df45aa474d5) Add ModuleBay and ModuleBayTemplate models - [`7c60e3c`](https://github.com/netbox-community/netbox/commit/7c60e3c0ffeb81f3ccc7ff23b41732e1f22fbfac) Add Module model - [`5bd223a`](https://github.com/netbox-community/netbox/commit/5bd223a4683bb1ea72cffeb5e7c2ed7b13f65d70) Fix YAML import for ModuleTypes - [`7777922`](https://github.com/netbox-community/netbox/commit/7777922bef32663f0817f11fbf1e4ec3676b10c3) Add Module model - [`e0d7511`](https://github.com/netbox-community/netbox/commit/e0d7511eaa963eb0298ece41d1c431e092b20d65) Misc cleanup - [`7dc4e00`](https://github.com/netbox-community/netbox/commit/7dc4e00b4d0f27e089f4b24ef780b7501510ccf3) Add module, module_bay columns to device component tables - [`ed6a160`](https://github.com/netbox-community/netbox/commit/ed6a160372fbfd46602accd6b57278625656640d) Add modules to device component serializers - [`eaa1165`](https://github.com/netbox-community/netbox/commit/eaa1165611999bb5a44980622f9335c0da3cda93) Add position field for module bays - [`e35aa4b`](https://github.com/netbox-community/netbox/commit/e35aa4bd1e479690a3ca23ec40d7ee897eaeee8a) Add documentation for modules ### 📊 Changes **51 files changed** (+3699 additions, -279 deletions) <details> <summary>View changed files</summary> 📝 `docs/core-functionality/device-types.md` (+1 -0) 📝 `docs/core-functionality/devices.md` (+1 -0) ➕ `docs/core-functionality/modules.md` (+4 -0) 📝 `docs/models/dcim/devicebay.md` (+1 -1) 📝 `docs/models/dcim/devicebaytemplate.md` (+1 -1) ➕ `docs/models/dcim/module.md` (+5 -0) ➕ `docs/models/dcim/modulebay.md` (+3 -0) ➕ `docs/models/dcim/modulebaytemplate.md` (+3 -0) ➕ `docs/models/dcim/moduletype.md` (+23 -0) 📝 `mkdocs.yml` (+1 -0) 📝 `netbox/dcim/api/nested_serializers.py` (+68 -1) 📝 `netbox/dcim/api/serializers.py` (+107 -21) 📝 `netbox/dcim/api/urls.py` (+6 -2) 📝 `netbox/dcim/api/views.py` (+52 -12) 📝 `netbox/dcim/filtersets.py` (+160 -7) 📝 `netbox/dcim/forms/bulk_create.py` (+6 -0) 📝 `netbox/dcim/forms/bulk_edit.py` (+82 -2) 📝 `netbox/dcim/forms/bulk_import.py` (+42 -0) 📝 `netbox/dcim/forms/filtersets.py` (+113 -1) 📝 `netbox/dcim/forms/models.py` (+111 -13) _...and 31 more files_ </details> ### 📄 Description ### Closes: #7844 - Introduces the ModuleBayTemplate and ModuleBay models in parallel with existing device components and their corresponding templates - Introduces the ModuleType model to map associations of component templates for module instantiation (similar to DeviceType) - Introduces the Module model to represent hardware modules (e.g. line cards) installed within a Device - Extends existing component templates (except DeviceBayTemplate) to support ModuleType assignment - Extends existing device components (except DeviceBay and InventoryItem) to support Model assignment - Adds all the required views, API resources, tests, etc. required for the new models --- <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-29 22:26:44 +01:00
adam closed this issue 2025-12-29 22:26:44 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13316