cdrom

package
v0.62.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FillCreateBody

func FillCreateBody(ctx context.Context, planValue Value, body *vms.CreateRequestBody, diags *diag.Diagnostics)

FillCreateBody fills the CreateRequestBody with the CD-ROM settings from the Value.

In the 'create' context, v is the plan.

func FillUpdateBody

func FillUpdateBody(
	ctx context.Context,
	planValue, stateValue Value,
	updateBody *vms.UpdateRequestBody,
	_ bool,
	diags *diag.Diagnostics,
)

FillUpdateBody fills the UpdateRequestBody with the CD-ROM settings from the Value.

In the 'update' context, v is the plan and stateValue is the current state.

func ResourceSchema

func ResourceSchema() schema.Attribute

ResourceSchema defines the schema for the CD-ROM resource.

Types

type Model

type Model struct {
	FileID types.String `tfsdk:"file_id"`
}

Model represents the CD-ROM model.

type Value

type Value = types.Map

Value represents the type for CD-ROM settings.

func NewValue

func NewValue(ctx context.Context, config *vms.GetResponseData, diags *diag.Diagnostics) Value

NewValue returns a new Value with the given CD-ROM settings from the PVE API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL