disk

package
v0.0.0-...-9fc8b42 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: UPL-1.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusOK = "ok"

	FormatCow = "cow"

	BackupNone = "none"
)

Variables

This section is empty.

Functions

func DeleteDisk

func DeleteDisk(ovcli *ovclient.Client, diskID string) error

DeleteDisk deletes a disk resource.

Types

type CreateDiskRequest

type CreateDiskRequest struct {
	StorageDomainList StorageDomainList `json:"storage_domains"`
	Name              string            `json:"name"`
	ProvisionedSize   string            `json:"provisioned_size"`
	Format            string            `json:"format"`
	Backup            string            `json:"backup"`
	InitialSize       string            `json:"initial_size"`
}

type Disk

type Disk struct {
	ActualSize      string `json:"actual_size"`
	Alias           string `json:"alias"`
	Backup          string `json:"backup"`
	ContentType     string `json:"content_type"`
	Format          string `json:"format"`
	ImageId         string `json:"image_id"`
	PropagateErrors string `json:"propagate_errors"`
	ProvisionedSize string `json:"provisioned_size"`
	Shareable       string `json:"shareable"`
	Sparse          string `json:"sparse"`
	Status          string `json:"status"`
	StorageType     string `json:"storage_type"`
	TotalSize       string `json:"total_size"`
	WipeAfterDelete string `json:"wipe_after_delete"`
	DiskProfile     struct {
		Href string `json:"href"`
		Id   string `json:"id"`
	} `json:"disk_profile"`
	Quota struct {
		Href string `json:"href"`
		Id   string `json:"id"`
	} `json:"quota"`
	StorageDomains struct {
		StorageDomain []struct {
			Href string `json:"href"`
			Id   string `json:"id"`
		} `json:"storage_domain"`
	} `json:"storage_domains"`
	Actions struct {
		Link []struct {
			Href string `json:"href"`
			Rel  string `json:"rel"`
		} `json:"link"`
	} `json:"actions"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Link        []struct {
		Href string `json:"href"`
		Rel  string `json:"rel"`
	} `json:"link"`
	Href string `json:"href"`
	Id   string `json:"id"`
}

func CreateDisk

func CreateDisk(ovcli *ovclient.Client, req *CreateDiskRequest) (*Disk, error)

CreateDisk creates a disk in a storage domain. An ock image is subsequently uploaded to that image.

func GetDisk

func GetDisk(ovcli *ovclient.Client, transferID string) (*Disk, error)

GetDisk gets an disk resource.

type StorageDomain

type StorageDomain struct {
	Id string `json:"id"`
}

type StorageDomainList

type StorageDomainList struct {
	StorageDomains []StorageDomain `json:"storage_domain"`
}

Jump to

Keyboard shortcuts

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