mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-26 07:55:50 +03:00
[PR #231] [MERGED] set backup=0 on disk if backup==false #328
Labels
No labels
good first issue
issue/confirmed
issue/critical
proposal/accepted
pull-request
type/bug
type/enhancement
type/feature
type/question
type/refactoring
type/testing
type/testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmox-api-go#328
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Telmate/proxmox-api-go/pull/231
Author: @tnyeanderson
Created: 1/24/2023
Status: ✅ Merged
Merged: 2/2/2023
Merged by: @mleone87
Base:
master← Head:fix-backup-disable📝 Commits (2)
32ffad4set backup=0 on disk if backup==false05f1c47make the linter happy📊 Changes
1 file changed (+10 additions, -1 deletions)
View changed files
📝
proxmox/config_qemu.go(+10 -1)📄 Description
At the moment, backup cannot be disabled with this API.
If proxmox backups have been configured, then the default behavior when
backupis not set on a VM disk is to back it up:Thus, setting
backup=1is basically redundant, andbackup=0is the actual useful option.The way that
createDeviceParamlogic is currently applied, it only explicitly sets a parameter for a truthy boolean value. This means that there is no way to exclude a disk from backup, since setting the backup option tofalsewon't cause the actualbackup=0parameter to be set.This PR adds the proper logic to allow disks to be excluded from backup. It only sets
backup=0ifdisk["backup"] == false; it will never setbackup=1on a VM.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.