[PR #61] [CLOSED] add get and set client methods to virtual machines #114

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

📋 Pull Request Information

Original PR: https://github.com/luthermonson/go-proxmox/pull/61
Author: @rosskirkpat
Created: 5/30/2023
Status: Closed

Base: mainHead: add-client-vm


📝 Commits (1)

  • d080ed4 add set and get client methods for vm

📊 Changes

1 file changed (+8 additions, -0 deletions)

View changed files

📝 virtual_machine.go (+8 -0)

📄 Description

when calling Clone on a virtual machine, I get a panic because the vm's client is nil. I opened this PR to add basic GetClient() and SetClient() methods to VMs to fix this issue.

        /Users/rosskirk/go/go1.19.3/src/runtime/panic.go:890 +0x267
github.com/luthermonson/go-proxmox.(*Client).Req(0x0, {0x32cd5f1, 0x4}, {0xc0006ea540, 0x14}, {0xc00018baa0, 0x5d, 0x60}, {0x2f15620, 0xc000597ee0})
        /Users/rosskirk/go/pkg/mod/github.com/luthermonson/go-proxmox@v0.0.0-alpha3/proxmox.go:83 +0xa5
github.com/luthermonson/go-proxmox.(*Client).Post(0x0, {0xc0006ea540, 0x14}, {0x2f156e0, 0xc000f1e240}, {0x2f15620, 0xc000597ee0})
        /Users/rosskirk/go/pkg/mod/github.com/luthermonson/go-proxmox@v0.0.0-alpha3/proxmox.go:152 +0x1b1
github.com/luthermonson/go-proxmox.(*VirtualMachine).Clone(0xc000bac098, 0xc000f1e240)
        /Users/rosskirk/go/pkg/mod/github.com/luthermonson/go-proxmox@v0.0.0-alpha3/virtual_machine.go:369 +0x432

🔄 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/61 **Author:** [@rosskirkpat](https://github.com/rosskirkpat) **Created:** 5/30/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `add-client-vm` --- ### 📝 Commits (1) - [`d080ed4`](https://github.com/luthermonson/go-proxmox/commit/d080ed4efb1093ac170262db9ed722ba7159f176) add set and get client methods for vm ### 📊 Changes **1 file changed** (+8 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `virtual_machine.go` (+8 -0) </details> ### 📄 Description when calling Clone on a virtual machine, I get a panic because the vm's client is nil. I opened this PR to add basic GetClient() and SetClient() methods to VMs to fix this issue. ```go /Users/rosskirk/go/go1.19.3/src/runtime/panic.go:890 +0x267 github.com/luthermonson/go-proxmox.(*Client).Req(0x0, {0x32cd5f1, 0x4}, {0xc0006ea540, 0x14}, {0xc00018baa0, 0x5d, 0x60}, {0x2f15620, 0xc000597ee0}) /Users/rosskirk/go/pkg/mod/github.com/luthermonson/go-proxmox@v0.0.0-alpha3/proxmox.go:83 +0xa5 github.com/luthermonson/go-proxmox.(*Client).Post(0x0, {0xc0006ea540, 0x14}, {0x2f156e0, 0xc000f1e240}, {0x2f15620, 0xc000597ee0}) /Users/rosskirk/go/pkg/mod/github.com/luthermonson/go-proxmox@v0.0.0-alpha3/proxmox.go:152 +0x1b1 github.com/luthermonson/go-proxmox.(*VirtualMachine).Clone(0xc000bac098, 0xc000f1e240) /Users/rosskirk/go/pkg/mod/github.com/luthermonson/go-proxmox@v0.0.0-alpha3/virtual_machine.go:369 +0x432 ``` --- <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:15 +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#114
No description provided.