Documentation ¶
Index ¶
- Constants
- func CreateClone(ctx context.Context, d *schema.ResourceData, ...) error
- func CreateCustomDisks(ctx context.Context, client proxmox.Client, nodeName string, vmID int, ...) diag.Diagnostics
- func DigitPrefix(s string) string
- func GetDiskDeviceObjects(d *schema.ResourceData, resource *schema.Resource, disks []interface{}) (map[string]vms.CustomStorageDevices, error)
- func GetInfo(resp *vms.GetResponseData, d *schema.ResourceData) vms.CustomStorageDevices
- func Read(ctx context.Context, d *schema.ResourceData, ...) diag.Diagnostics
- func Schema() map[string]*schema.Schema
- func Update(d *schema.ResourceData, planDisks map[string]vms.CustomStorageDevices, ...) (bool, error)
Constants ¶
View Source
const (
// MkDisk is the name of the disk resource.
MkDisk = "disk"
)
Variables ¶
This section is empty.
Functions ¶
func CreateClone ¶
func CreateClone( ctx context.Context, d *schema.ResourceData, planDisks map[string]vms.CustomStorageDevices, allDiskInfo vms.CustomStorageDevices, vmAPI *vms.Client, ) error
CreateClone creates disks for a cloned VM.
func CreateCustomDisks ¶
func CreateCustomDisks( ctx context.Context, client proxmox.Client, nodeName string, vmID int, storageDevices map[string]vms.CustomStorageDevices, ) diag.Diagnostics
CreateCustomDisks creates custom disks for a VM.
func DigitPrefix ¶
DigitPrefix returns the prefix of a string that is not a digit.
func GetDiskDeviceObjects ¶
func GetDiskDeviceObjects( d *schema.ResourceData, resource *schema.Resource, disks []interface{}, ) (map[string]vms.CustomStorageDevices, error)
GetDiskDeviceObjects returns a map of disk devices for a VM.
func GetInfo ¶
func GetInfo(resp *vms.GetResponseData, d *schema.ResourceData) vms.CustomStorageDevices
GetInfo returns the disk information for a VM.
func Read ¶
func Read( ctx context.Context, d *schema.ResourceData, diskObjects vms.CustomStorageDevices, vmID int, api proxmox.Client, nodeName string, isClone bool, ) diag.Diagnostics
Read reads the disk configuration of a VM.
func Update ¶
func Update( d *schema.ResourceData, planDisks map[string]vms.CustomStorageDevices, allDiskInfo vms.CustomStorageDevices, updateBody *vms.UpdateRequestBody, ) (bool, error)
Update updates the disk configuration of a VM.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.