vm

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: 32 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDataSource added in v0.57.1

func NewDataSource() datasource.DataSource

NewDataSource creates a new VM datasource.

func NewResource added in v0.57.1

func NewResource() resource.Resource

NewResource creates a new resource for managing VMs.

Types

type Datasource added in v0.57.1

type Datasource struct {
	// contains filtered or unexported fields
}

Datasource is the implementation of VM datasource.

func (*Datasource) Configure added in v0.57.1

Configure sets the client for the resource.

func (*Datasource) Metadata added in v0.57.1

Metadata defines the name of the resource.

func (*Datasource) Read added in v0.57.1

func (*Datasource) Schema added in v0.57.1

Schema defines the schema for the resource.

type Model added in v0.57.1

type Model struct {
	Description types.String `tfsdk:"description"`
	CDROM       cdrom.Value  `tfsdk:"cdrom"`
	CPU         cpu.Value    `tfsdk:"cpu"`
	Clone       *struct {
		ID      types.Int64 `tfsdk:"id"`
		Retries types.Int64 `tfsdk:"retries"`
	} `tfsdk:"clone"`
	ID            types.Int64     `tfsdk:"id"`
	Name          types.String    `tfsdk:"name"`
	NodeName      types.String    `tfsdk:"node_name"`
	StopOnDestroy types.Bool      `tfsdk:"stop_on_destroy"`
	Tags          stringset.Value `tfsdk:"tags"`
	Template      types.Bool      `tfsdk:"template"`
	Timeouts      timeouts.Value  `tfsdk:"timeouts"`
	VGA           vga.Value       `tfsdk:"vga"`
}

Model represents the VM model.

Note: for computed fields / blocks we have to use an Object type (or an alias), or a custom type in order to hold an unknown value.

type Resource added in v0.57.1

type Resource struct {
	// contains filtered or unexported fields
}

Resource implements the resource.Resource interface for managing VMs.

func (*Resource) Configure added in v0.57.1

Configure sets the client for the resource.

func (*Resource) Create added in v0.57.1

Create creates a new VM.

func (*Resource) Delete added in v0.57.1

Delete deletes the VM.

func (*Resource) ImportState added in v0.57.1

func (r *Resource) ImportState(
	ctx context.Context,
	req resource.ImportStateRequest,
	resp *resource.ImportStateResponse,
)

ImportState imports the state of the VM from the API.

func (*Resource) Metadata added in v0.57.1

Metadata defines the name of the resource.

func (*Resource) Read added in v0.57.1

func (*Resource) Schema added in v0.57.1

Schema defines the schema for the resource.

func (*Resource) Update added in v0.57.1

Update updates the VM with the new configuration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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