[PR #5151] [MERGED] #1503: Extend secrets assignment to virtual machines #12971

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/5151
Author: @jeremystretch
Created: 9/18/2020
Status: Merged
Merged: 9/22/2020
Merged by: @jeremystretch

Base: develop-2.10Head: 1503-secret-assignment


📝 Commits (8)

📊 Changes

22 files changed (+306 additions, -112 deletions)

View changed files

📝 docs/release-notes/version-2.10.md (+2 -0)
📝 netbox/dcim/models/devices.py (+6 -0)
📝 netbox/secrets/api/serializers.py (+16 -5)
📝 netbox/secrets/api/views.py (+1 -3)
📝 netbox/secrets/constants.py (+8 -0)
📝 netbox/secrets/filters.py (+17 -4)
📝 netbox/secrets/forms.py (+35 -14)
netbox/secrets/migrations/0011_secret_generic_assignments.py (+67 -0)
📝 netbox/secrets/models.py (+19 -22)
📝 netbox/secrets/tables.py (+6 -3)
📝 netbox/secrets/tests/test_api.py (+9 -6)
📝 netbox/secrets/tests/test_filters.py (+25 -5)
📝 netbox/secrets/tests/test_views.py (+10 -8)
📝 netbox/secrets/views.py (+3 -3)
📝 netbox/templates/dcim/device.html (+3 -17)
netbox/templates/secrets/inc/assigned_secrets.html (+26 -0)
netbox/templates/secrets/inc/secret_tr.html (+0 -16)
📝 netbox/templates/secrets/secret.html (+4 -3)
📝 netbox/templates/secrets/secret_edit.html (+17 -2)
📝 netbox/templates/virtualization/virtualmachine.html (+17 -0)

...and 2 more files

📄 Description

Closes: #1503

  • Replaces the device field on the Secret model with a GenericForeignKey
  • Requires the assignment of a secret to a device or a virtual machine

🔄 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/5151 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 9/18/2020 **Status:** ✅ Merged **Merged:** 9/22/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop-2.10` ← **Head:** `1503-secret-assignment` --- ### 📝 Commits (8) - [`ec095e5`](https://github.com/netbox-community/netbox/commit/ec095e58b75e67811539c8013d6635285eb243b6) #1503: Initial work on generic secret assignments (WIP) - [`43f3e68`](https://github.com/netbox-community/netbox/commit/43f3e682c52202713ef6e3ed851a6c2bae5df9a7) Support assignment of secrets to virtual machines - [`64adbf8`](https://github.com/netbox-community/netbox/commit/64adbf87695cca33df2ff00816531b152a7c9106) Fix migrations to ensure secret assigned_object is required - [`b2a14d4`](https://github.com/netbox-community/netbox/commit/b2a14d4654d10c55d18c080470cadee17f1f9e11) Extend secret filters - [`0b33c53`](https://github.com/netbox-community/netbox/commit/0b33c53f47b9f1583db2b29ae8cf70a89592f25a) Update secrets API, views - [`c986321`](https://github.com/netbox-community/netbox/commit/c9863214022d50e0431867d2c323c10e5733082b) Fix "add secret" link for VMs - [`975e7e6`](https://github.com/netbox-community/netbox/commit/975e7e60ffbe1ea29f67ea5f4ac7c0bc1e59ec26) Changelog for #1503 - [`d44c2ba`](https://github.com/netbox-community/netbox/commit/d44c2ba8fe5b425390177bc44dbfd89e265abbe0) Merge branch 'develop-2.10' into 1503-secret-assignment ### 📊 Changes **22 files changed** (+306 additions, -112 deletions) <details> <summary>View changed files</summary> 📝 `docs/release-notes/version-2.10.md` (+2 -0) 📝 `netbox/dcim/models/devices.py` (+6 -0) 📝 `netbox/secrets/api/serializers.py` (+16 -5) 📝 `netbox/secrets/api/views.py` (+1 -3) 📝 `netbox/secrets/constants.py` (+8 -0) 📝 `netbox/secrets/filters.py` (+17 -4) 📝 `netbox/secrets/forms.py` (+35 -14) ➕ `netbox/secrets/migrations/0011_secret_generic_assignments.py` (+67 -0) 📝 `netbox/secrets/models.py` (+19 -22) 📝 `netbox/secrets/tables.py` (+6 -3) 📝 `netbox/secrets/tests/test_api.py` (+9 -6) 📝 `netbox/secrets/tests/test_filters.py` (+25 -5) 📝 `netbox/secrets/tests/test_views.py` (+10 -8) 📝 `netbox/secrets/views.py` (+3 -3) 📝 `netbox/templates/dcim/device.html` (+3 -17) ➕ `netbox/templates/secrets/inc/assigned_secrets.html` (+26 -0) ➖ `netbox/templates/secrets/inc/secret_tr.html` (+0 -16) 📝 `netbox/templates/secrets/secret.html` (+4 -3) 📝 `netbox/templates/secrets/secret_edit.html` (+17 -2) 📝 `netbox/templates/virtualization/virtualmachine.html` (+17 -0) _...and 2 more files_ </details> ### 📄 Description ### Closes: #1503 - Replaces the `device` field on the Secret model with a GenericForeignKey - Requires the assignment of a secret to a device _or_ a virtual machine --- <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:24:40 +01:00
adam closed this issue 2025-12-29 22:24:40 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12971