From 1cf17e1f36c4ddc7942722a58baf4bd8e01fb4f5 Mon Sep 17 00:00:00 2001 From: Hans Rakers Date: Tue, 20 Aug 2024 14:11:40 +0200 Subject: [PATCH] fix: Set listall on listVirtualMachine calls so we search all VMs in the domain This is mainly useful when the API credentials used by the CSI driver are from a different domain user than the user that created the VMs. --- pkg/cloud/vms.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/cloud/vms.go b/pkg/cloud/vms.go index 80b8dd9..a1a310e 100644 --- a/pkg/cloud/vms.go +++ b/pkg/cloud/vms.go @@ -10,6 +10,7 @@ func (c *client) GetVMByID(ctx context.Context, vmID string) (*VM, error) { logger := klog.FromContext(ctx) p := c.VirtualMachine.NewListVirtualMachinesParams() p.SetId(vmID) + p.SetListall(true) if c.projectID != "" { p.SetProjectid(c.projectID) } @@ -38,6 +39,7 @@ func (c *client) getVMByName(ctx context.Context, name string) (*VM, error) { logger := klog.FromContext(ctx) p := c.VirtualMachine.NewListVirtualMachinesParams() p.SetName(name) + p.SetListall(true) if c.projectID != "" { p.SetProjectid(c.projectID) }