Documentation
¶
Index ¶
- Constants
- func DeleteImageTransfer(ovcli *ovclient.Client, transferID string) error
- func DoImageTransferAction(ovcli *ovclient.Client, transferID string, action string) error
- func UploadFile(ovcli *ovclient.Client, inUrl string, reader io.Reader, totalLen int64) error
- type CreateImageTransferRequest
- type Disk
- type ImageTransfer
- type ImageTransferList
Constants ¶
View Source
const ActionCancel string = "cancel"
View Source
const ActionFinalize string = "finalize"
View Source
const DirectionUpload string = "upload"
View Source
const FormatCow = "cow"
View Source
const PhaseCancelled string = "cancelled"
View Source
const PhaseFinished string = "finished_success"
View Source
const PhaseTransferring string = "transferring"
See https://www.ovirt.org/documentation/doc-REST_API_Guide/#types-image_transfer_phase
View Source
const TimeoutPolicy string = "cancel"
see https://www.ovirt.org/documentation/doc-REST_API_Guide/#types-image_transfer_timeout_policy cancel the transfer and unlock the disk
Variables ¶
This section is empty.
Functions ¶
func DeleteImageTransfer ¶
DeleteImageTransfer deletes an imagetransfer resource.
func DoImageTransferAction ¶
DoImageTransferAction post an action to the image transfer resource
Types ¶
type CreateImageTransferRequest ¶
type CreateImageTransferRequest struct { Name string `json:"name"` Disk `json:"disk"` Direction string `json:"direction"` TimeoutPolicy string `json:"timeout_policy"` Format string `json:"format"` InactivityTimeout string `json:"inactivity_timeout"` }
CreateImageTransferRequest specifies the request to the image transfer service
type ImageTransfer ¶
type ImageTransfer struct { Active string `json:"active"` Direction string `json:"direction"` Format string `json:"format"` InactivityTimeout string `json:"inactivity_timeout"` Phase string `json:"phase"` ProxyUrl string `json:"proxy_url"` Shallow string `json:"shallow"` TimeoutPolicy string `json:"timeout_policy"` TransferUrl string `json:"transfer_url"` Transferred string `json:"transferred"` Host struct { Href string `json:"href"` Id string `json:"id"` } `json:"host"` Image struct { Id string `json:"id"` } `json:"image"` Actions struct { Link []struct { Href string `json:"href"` Rel string `json:"rel"` } `json:"link"` } `json:"actions"` Href string `json:"href"` Id string `json:"id"` }
func CreateImageTransfer ¶
func CreateImageTransfer(ovcli *ovclient.Client, req *CreateImageTransferRequest) (*ImageTransfer, error)
CreateImageTransferRequest creates an image transfer resource needed to upload an image to a disk
func GetImageTransfer ¶
func GetImageTransfer(ovcli *ovclient.Client, transferID string) (*ImageTransfer, error)
GetImageTransfer gets an imagetransfer resource.
type ImageTransferList ¶
type ImageTransferList struct { ImageTransfers []struct { ImageTransfer } `json:"image_transfer"` }
Click to show internal directories.
Click to hide internal directories.