ovirt

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const BlankTemplateID = "00000000-0000-0000-0000-000000000000"

BlankTemplateID indicates the ID of default blank template in oVirt

View Source
const BufferSize = 50 * 1048576 // 50MiB

Variables

This section is empty.

Functions

func ConfigureProvider

func ConfigureProvider(d *schema.ResourceData) (interface{}, error)

ConfigureProvider initializes the API connection object by config items

func DiskAttachmentStateRefreshFunc

func DiskAttachmentStateRefreshFunc(conn *ovirtsdk4.Connection, vmID, diskID string) resource.StateRefreshFunc

DiskAttachmentStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch an oVirt DiskAttachment.

func DiskStateRefreshFunc

func DiskStateRefreshFunc(conn *ovirtsdk4.Connection, diskID string) resource.StateRefreshFunc

DiskStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch an oVirt Disk.

func HostStateRefreshFunc

func HostStateRefreshFunc(conn *ovirtsdk4.Connection, hostID string) resource.StateRefreshFunc

HostStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch an oVirt Host.

func IdName added in v0.99.0

func IdName() *schema.Resource

func ImageTransferStateRefreshFunc added in v0.99.0

func ImageTransferStateRefreshFunc(conn *ovirtsdk4.Connection, transferId string) resource.StateRefreshFunc

ImageTransferStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch an oVirt image transfer.

func ListOfIdName added in v0.99.0

func ListOfIdName() *schema.Schema

func PrepareForTransfer added in v0.99.0

func PrepareForTransfer(sourceUrl string) (uploadSize int64, qcowSize uint64, sourceFile *os.File, diskFormat ovirtsdk4.DiskFormat, err error)

PrepareForTransfer examine the source url, downloads the file locally if needed and return the intended upload size, and format of the image, errors otherwise

func Provider

func Provider() terraform.ResourceProvider

Provider returns oVirt provider configuration

func SnapshotStateRefreshFunc

func SnapshotStateRefreshFunc(conn *ovirtsdk4.Connection, vmID, snapshotID string) resource.StateRefreshFunc

SnapshotStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch an oVirt Snapshot.

func StorageDomainStateRefreshFunc

func StorageDomainStateRefreshFunc(conn *ovirtsdk4.Connection, sdID string) resource.StateRefreshFunc

StorageDomainStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch an oVirt Storage Domain.

func TemplateStateRefreshFunc added in v0.99.0

func TemplateStateRefreshFunc(conn *ovirtsdk4.Connection, id string) resource.StateRefreshFunc

TemplateStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch an oVirt Template.

func UploadToDisk added in v0.99.0

func UploadToDisk(conn *ovirtsdk4.Connection, sourceFile *os.File, diskID string, alias string, uploadSize int64, correlationID string) (*ovirtsdk4.ImageTransferService, error)

UploadToDisk reads a file and uploads its content to the ovirt disk. Return value is an image transfer object, representing the transfer progress

func VMStateRefreshFunc

func VMStateRefreshFunc(conn *ovirtsdk4.Connection, vmID string) resource.StateRefreshFunc

VMStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch an oVirt VM.

Types

This section is empty.

Jump to

Keyboard shortcuts

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