Skip to content

Commit

Permalink
feat: Add qemu pending method
Browse files Browse the repository at this point in the history
  • Loading branch information
alperencelik committed Nov 25, 2024
1 parent 49b6116 commit 816554f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1611,3 +1611,10 @@ type VzdumpConfig struct {
IPConfig8 string `json:"ipconfig8,omitempty"`
IPConfig9 string `json:"ipconfig9,omitempty"`
}

type PendingConfiguration struct {
Key string `json:"key,omitempty"`
Delete int `json:"delete,omitempty"`
Pending string `json:"pending,omitempty"`
Value string `json:"value,omitempty"`
}
5 changes: 5 additions & 0 deletions virtual_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -675,3 +675,8 @@ func (v *VirtualMachine) UnmountCloudInitISO(ctx context.Context, device string)
}
return nil
}

func (v *VirtualMachine) Pending(ctx context.Context) (pending *PendingConfiguration, err error) {
err = v.client.Get(ctx, fmt.Sprintf("/nodes/%s/qemu/%d/pending", v.Node, v.VMID), &pending)
return
}

0 comments on commit 816554f

Please sign in to comment.