[PR #54] [MERGED] Better handle the optionality of network-config and vendor-data #108

Closed
opened 2026-03-03 15:30:14 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/luthermonson/go-proxmox/pull/54
Author: @jqueuniet
Created: 1/26/2023
Status: Merged
Merged: 1/26/2023
Merged by: @luthermonson

Base: mainHead: optional_netconf


📝 Commits (1)

  • abc80fc Don't create empty network-config and vendor-data files

📊 Changes

1 file changed (+12 additions, -6 deletions)

View changed files

📝 virtual_machine.go (+12 -6)

📄 Description

I realized I didn't handle properly the case where vendor-data and network-config were empty. An empty vendor-data config file will not be doing much, but though unlikely as it is an invalid configuration and should just be discarded, an empty network-config has potential for inhibiting the default network cloud-init behavior and replacing it with nothing. As I would rather not leave this up to cloud-init implementation details, not creating the files at all seems a safer course.


🔄 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/luthermonson/go-proxmox/pull/54 **Author:** [@jqueuniet](https://github.com/jqueuniet) **Created:** 1/26/2023 **Status:** ✅ Merged **Merged:** 1/26/2023 **Merged by:** [@luthermonson](https://github.com/luthermonson) **Base:** `main` ← **Head:** `optional_netconf` --- ### 📝 Commits (1) - [`abc80fc`](https://github.com/luthermonson/go-proxmox/commit/abc80fc38b7a5e39cb7bc48456feb2474126eebc) Don't create empty network-config and vendor-data files ### 📊 Changes **1 file changed** (+12 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `virtual_machine.go` (+12 -6) </details> ### 📄 Description I realized I didn't handle properly the case where vendor-data and network-config were empty. An empty vendor-data config file will not be doing much, but though unlikely as it is an invalid configuration and should just be discarded, an empty network-config has potential for inhibiting the default network cloud-init behavior and replacing it with nothing. As I would rather not leave this up to cloud-init implementation details, not creating the files at all seems a safer course. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 15:30:14 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/go-proxmox#108
No description provided.