[PR #17745] [MERGED] Fixes: #7336 - VLAN Translation #15182

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/17745
Author: @bctiemann
Created: 10/11/2024
Status: Merged
Merged: 10/30/2024
Merged by: @jeremystretch

Base: featureHead: 7336-vlan-translation-feature


📝 Commits (10+)

  • f6591a9 VLANTranslationPolicy and VLANTranslationRule models and all associated UI classes
  • 1add28b Change VLANTranslationPolicy to a PrimaryModel and make name unique
  • 27856ec Add serializer classes to InterfaceSerializer
  • f4862e5 Remake migrations
  • 14e832b Add GraphQL typing
  • 8e113b4 Skip tagged models in test
  • ef3a611 Missing migration
  • 00e22e3 Remove get_absolute_url methods
  • d5cae6f Remove package-lock.json
  • 54ff4bb Rebuild migration and add constraints and field options

📊 Changes

44 files changed (+1210 additions, -22 deletions)

View changed files

📝 docs/models/dcim/interface.md (+4 -0)
docs/models/ipam/vlantranslationpolicy.md (+26 -0)
docs/models/ipam/vlantranslationrule.md (+19 -0)
📝 docs/models/virtualization/vminterface.md (+4 -0)
📝 netbox/dcim/api/serializers_/device_components.py (+3 -2)
📝 netbox/dcim/filtersets.py (+12 -1)
📝 netbox/dcim/forms/model_forms.py (+8 -3)
📝 netbox/dcim/graphql/types.py (+1 -0)
netbox/dcim/migrations/0195_interface_vlan_translation_policy.py (+20 -0)
📝 netbox/dcim/models/device_components.py (+7 -0)
📝 netbox/dcim/tests/test_filtersets.py (+23 -5)
📝 netbox/dcim/views.py (+10 -1)
📝 netbox/extras/tests/test_filtersets.py (+2 -0)
📝 netbox/ipam/api/serializers_/vlans.py (+19 -1)
📝 netbox/ipam/api/urls.py (+2 -0)
📝 netbox/ipam/api/views.py (+12 -0)
📝 netbox/ipam/filtersets.py (+49 -0)
📝 netbox/ipam/forms/bulk_edit.py (+32 -0)
📝 netbox/ipam/forms/bulk_import.py (+16 -0)
📝 netbox/ipam/forms/filtersets.py (+39 -0)

...and 24 more files

📄 Description

Fixes: #7336

Adds VLANTranslationPolicy and VLANTranslationRule models and all associated UI visualization classes. Provides the ability to associate a VLAN translation policy and all its associated translation rules with a given interface, e.g.

Interface 1:
  Policy 1:
  - 100 -> 200
  - 101 -> 201
  - 102 -> 202

This VLAN translation mapping is then reflected in the Interface's detail page, both in the Addressing section and in an inline table below "VLANs".

Screenshot 2024-10-08 at 2 06 45 PM

🔄 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/17745 **Author:** [@bctiemann](https://github.com/bctiemann) **Created:** 10/11/2024 **Status:** ✅ Merged **Merged:** 10/30/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `7336-vlan-translation-feature` --- ### 📝 Commits (10+) - [`f6591a9`](https://github.com/netbox-community/netbox/commit/f6591a9b9a2b119ba7df50374ae90e7f32a2e066) VLANTranslationPolicy and VLANTranslationRule models and all associated UI classes - [`1add28b`](https://github.com/netbox-community/netbox/commit/1add28bf08ca5ea52020d52e692de9cba6144eb3) Change VLANTranslationPolicy to a PrimaryModel and make name unique - [`27856ec`](https://github.com/netbox-community/netbox/commit/27856ecaea14f4b76c3c551eb0938ab9d7204102) Add serializer classes to InterfaceSerializer - [`f4862e5`](https://github.com/netbox-community/netbox/commit/f4862e5fc245288c1a6a35f2a86ed88188150231) Remake migrations - [`14e832b`](https://github.com/netbox-community/netbox/commit/14e832b872cecea63371d2a04211d9df02974e4d) Add GraphQL typing - [`8e113b4`](https://github.com/netbox-community/netbox/commit/8e113b4a84d1013d51bc93693f4ac9ff16858ee2) Skip tagged models in test - [`ef3a611`](https://github.com/netbox-community/netbox/commit/ef3a611f1f8873b7f3214257623b84c7f95b5ad8) Missing migration - [`00e22e3`](https://github.com/netbox-community/netbox/commit/00e22e3e9822e9e2e5cc70b58fdf769047a954ca) Remove get_absolute_url methods - [`d5cae6f`](https://github.com/netbox-community/netbox/commit/d5cae6fe9336d1ad1f9708b8a7c74626499262a5) Remove package-lock.json - [`54ff4bb`](https://github.com/netbox-community/netbox/commit/54ff4bb1cd6eb6469ec2e502d9c7d7e523f18deb) Rebuild migration and add constraints and field options ### 📊 Changes **44 files changed** (+1210 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `docs/models/dcim/interface.md` (+4 -0) ➕ `docs/models/ipam/vlantranslationpolicy.md` (+26 -0) ➕ `docs/models/ipam/vlantranslationrule.md` (+19 -0) 📝 `docs/models/virtualization/vminterface.md` (+4 -0) 📝 `netbox/dcim/api/serializers_/device_components.py` (+3 -2) 📝 `netbox/dcim/filtersets.py` (+12 -1) 📝 `netbox/dcim/forms/model_forms.py` (+8 -3) 📝 `netbox/dcim/graphql/types.py` (+1 -0) ➕ `netbox/dcim/migrations/0195_interface_vlan_translation_policy.py` (+20 -0) 📝 `netbox/dcim/models/device_components.py` (+7 -0) 📝 `netbox/dcim/tests/test_filtersets.py` (+23 -5) 📝 `netbox/dcim/views.py` (+10 -1) 📝 `netbox/extras/tests/test_filtersets.py` (+2 -0) 📝 `netbox/ipam/api/serializers_/vlans.py` (+19 -1) 📝 `netbox/ipam/api/urls.py` (+2 -0) 📝 `netbox/ipam/api/views.py` (+12 -0) 📝 `netbox/ipam/filtersets.py` (+49 -0) 📝 `netbox/ipam/forms/bulk_edit.py` (+32 -0) 📝 `netbox/ipam/forms/bulk_import.py` (+16 -0) 📝 `netbox/ipam/forms/filtersets.py` (+39 -0) _...and 24 more files_ </details> ### 📄 Description ### Fixes: #7336 Adds `VLANTranslationPolicy` and `VLANTranslationRule` models and all associated UI visualization classes. Provides the ability to associate a VLAN translation policy and all its associated translation rules with a given interface, e.g. ``` Interface 1: Policy 1: - 100 -> 200 - 101 -> 201 - 102 -> 202 ``` This VLAN translation mapping is then reflected in the Interface's detail page, both in the Addressing section and in an inline table below "VLANs". <img width="1069" alt="Screenshot 2024-10-08 at 2 06 45 PM" src="https://github.com/user-attachments/assets/2965ae8e-37fa-49f3-9fc1-370b60ed0842"> --- <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:20:28 +01:00
adam closed this issue 2025-12-30 00:20:28 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15182