mirror of
https://github.com/Telmate/proxmox-api-go.git
synced 2026-04-25 23:45:55 +03:00
[PR #127] [MERGED] retrieve all VMs by name (not only first) #249
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#249
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/127
Author: @mizhka
Created: 7/13/2021
Status: ✅ Merged
Merged: 7/13/2021
Merged by: @ggongaware
Base:
master← Head:master📝 Commits (1)
49b5ffcretrieve all VMs by name (not only first)📊 Changes
2 files changed (+47 additions, -12 deletions)
View changed files
📝
main.go(+31 -9)📝
proxmox/client.go(+16 -3)📄 Description
This commit brings API to fetch all VMs matching specified name. It adds additional
method Client.GetVmRefsByName in addition to GetVmRefByName.
The background is that it's possible to create several templates in ProxMox
on different nodes with same name. Packer provider uses GetVmRefByName to
retrieve VM ID for cloning, but it may return unexpected VM ID. As result, cloning
will fail with error, for example:
"500 can't clone VM to node '...' (VM uses local storage)"
Let's add way to fetch all VMs matching specified name for further filtering.
Also it brings extra command 'listQemuSnapshot2'
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.