[PR #4978] [MERGED] Closes #4922: Optimize schema migration for VM interface replication #12951

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/4978
Author: @jeremystretch
Created: 8/10/2020
Status: Merged
Merged: 8/13/2020
Merged by: @jeremystretch

Base: develop-2.9Head: 4922-optimize-interface-replication


📝 Commits (1)

  • d7e2acd Optimize schema migration for VM interface replication

📊 Changes

1 file changed (+38 additions, -19 deletions)

View changed files

📝 netbox/virtualization/migrations/0016_replicate_interfaces.py (+38 -19)

📄 Description

Fixes: #4922

  • Use bulk_create() when creating VMInterface instances (batch size 1000)
  • Predetermine interfaces with tags/IP addresses and call update() only where needed

🔄 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/4978 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 8/10/2020 **Status:** ✅ Merged **Merged:** 8/13/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop-2.9` ← **Head:** `4922-optimize-interface-replication` --- ### 📝 Commits (1) - [`d7e2acd`](https://github.com/netbox-community/netbox/commit/d7e2acd0ade631231f8386968255f0567cae27df) Optimize schema migration for VM interface replication ### 📊 Changes **1 file changed** (+38 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `netbox/virtualization/migrations/0016_replicate_interfaces.py` (+38 -19) </details> ### 📄 Description ### Fixes: #4922 - Use `bulk_create()` when creating VMInterface instances (batch size 1000) - Predetermine interfaces with tags/IP addresses and call `update()` only where needed --- <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:33 +01:00
adam closed this issue 2025-12-29 22:24:33 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12951