disks

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

API Actor for managing Disk. This actor is a final API for admin to manage Disk

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRequest

type CreateRequest struct {
	// ID of the account
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`

	// ID of the grid (platform)
	// Required: true
	GID uint64 `url:"gid" json:"gid" validate:"required"`

	// Name of disk
	// Required: true
	Name string `url:"name" json:"name" validate:"required"`

	// Description of disk
	// Required: false
	Description string `url:"description,omitempty" json:"description,omitempty"`

	// Size in GB, default is 0
	// Required: false
	Size uint64 `url:"size,omitempty" json:"size,omitempty"`

	// Type of disk
	//	- B=Boot
	//	- D=Data
	//	- T=Temp
	// Required: true
	Type string `url:"type" json:"type" validate:"diskType"`

	// Size in GB default is 0
	// Required: false
	SSDSize uint64 `url:"ssdSize,omitempty" json:"ssdSize,omitempty"`

	// Max IOPS disk can perform defaults to 2000
	// Required: false
	IOPS uint64 `url:"iops,omitempty" json:"iops,omitempty"`

	// Storage endpoint provider ID to create disk
	// Required: false
	SEPID uint64 `url:"sep_id,omitempty" json:"sep_id,omitempty"`

	// Pool name to create disk
	// Required: false
	Pool string `url:"pool,omitempty" json:"pool,omitempty"`
}

CreateRequest struct to create disk

type DeleteDisksRequest

type DeleteDisksRequest struct {
	// List of disk ids to delete
	// Required: true
	DisksIDs []uint64 `url:"diskIds" json:"diskIds" validate:"min=1"`

	// Reason for deleting the disks
	// Required: true
	Reason string `url:"reason" json:"reason" validate:"required"`

	// Whether to completely delete the disks, works only with non attached disks
	// Required: false
	Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
}

DeleteDisksRequest struct for multiple disks

type DeleteRequest

type DeleteRequest struct {
	// ID of disk to delete
	// Required: true
	DiskID uint64 `url:"diskId" json:"diskId" validate:"required"`

	// Detach disk from machine first
	// Required: false
	Detach bool `url:"detach,omitempty" json:"detach,omitempty"`

	// Whether to completely delete the disk, works only with non attached disks
	// Required: false
	Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`

	// Reason to delete
	// Required: false
	Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}

DeleteRequest struct to delete disk

type Disks

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

Structure for creating request to disks

func New

func New(client interfaces.Caller) *Disks

Builder for disks endpoints

func (Disks) Create

func (d Disks) Create(ctx context.Context, req CreateRequest) (uint64, error)

Create creates a disk

func (Disks) Delete

func (d Disks) Delete(ctx context.Context, req DeleteRequest) (bool, error)

Delete deletes disk by ID

func (Disks) DeleteDisks

func (d Disks) DeleteDisks(ctx context.Context, req DeleteDisksRequest) (bool, error)

DeleteDisks deletes multiple disks permanently

func (Disks) Get

func (d Disks) Get(ctx context.Context, req GetRequest) (*RecordDisk, error)

Get gets disk details as a RecordDisk struct. Notice: the devicename field is the name as it is passed to the kernel (kname in linux) for unattached disks this field has no relevant value

func (Disks) GetRaw added in v1.6.6

func (d Disks) GetRaw(ctx context.Context, req GetRequest) ([]byte, error)

GetRaw gets disk details as an array of bytes. Notice: the devicename field is the name as it is passed to the kernel (kname in linux) for unattached disks this field has no relevant value

func (Disks) LimitIO

func (d Disks) LimitIO(ctx context.Context, req LimitIORequest) (bool, error)

LimitIO limits IO for a certain disk total and read/write options are not allowed to be combined see http://libvirt.org/formatdomain.html#elementsDisks iotune section for more details

func (Disks) List

func (d Disks) List(ctx context.Context, req ListRequest) (*ListDisks, error)

List gets list of the created disks belonging to an account as a ListDisks struct

func (Disks) ListDeleted

func (d Disks) ListDeleted(ctx context.Context, req ListDeletedRequest) (*ListDisks, error)

ListDeleted gets list of the deleted disks based on filter

func (Disks) ListRaw added in v1.6.6

func (d Disks) ListRaw(ctx context.Context, req ListRequest) ([]byte, error)

ListRaw gets list of the created disks belonging to an account as an array of bytes

func (Disks) ListTypes

func (d Disks) ListTypes(ctx context.Context, req ListTypesRequest) (*ListTypes, error)

ListTypes gets list of defined disk types

func (Disks) ListUnattached

func (d Disks) ListUnattached(ctx context.Context, req ListUnattachedRequest) (*ListUnattachedDisks, error)

ListUnattached gets list of unattached disks

func (Disks) Rename

func (d Disks) Rename(ctx context.Context, req RenameRequest) (bool, error)

Rename renames disk

func (Disks) Resize

func (d Disks) Resize(ctx context.Context, req ResizeRequest) (bool, error)

Resize resizes disk Returns 200 if disk is resized online, else will return 202, in that case please stop and start your machine after changing the disk size, for your changes to be reflected. This method will not be used for disks, assigned to computes. Only unassigned disks and disks, assigned with "old" virtual machines.

func (Disks) Resize2

func (d Disks) Resize2(ctx context.Context, req ResizeRequest) (bool, error)

Resize2 resize disk Returns 200 if disk is resized online, else will return 202, in that case please stop and start your machine after changing the disk size, for your changes to be reflected. This method will not be used for disks, assigned to "old" virtual machines. Only unassigned disks and disks, assigned with computes.

func (Disks) Restore

func (d Disks) Restore(ctx context.Context, req RestoreRequest) (bool, error)

Restore restores a deleted unattached disk from recycle bin

func (Disks) Search

func (d Disks) Search(ctx context.Context, req SearchRequest) (SearchListDisks, error)

Search searches disks

func (Disks) Share

func (d Disks) Share(ctx context.Context, req ShareRequest) (bool, error)

Share shares data disk

func (Disks) SnapshotDelete

func (d Disks) SnapshotDelete(ctx context.Context, req SnapshotDeleteRequest) (bool, error)

SnapshotDelete deletes a snapshot

func (Disks) SnapshotRollback

func (d Disks) SnapshotRollback(ctx context.Context, req SnapshotRollbackRequest) (bool, error)

SnapshotRollback rollbacks an individual disk snapshot

func (Disks) Unshare

func (d Disks) Unshare(ctx context.Context, req UnshareRequest) (bool, error)

Unshare unshares data disk

type GetRequest

type GetRequest struct {
	// ID of the disk
	// Required: true
	DiskID uint64 `url:"diskId" json:"diskId" validate:"required"`
}

GetRequest struct to get information about disk

type IOTune

type IOTune struct {
	// ReadBytesSec
	ReadBytesSec uint64 `json:"read_bytes_sec"`

	// ReadBytesSecMax
	ReadBytesSecMax uint64 `json:"read_bytes_sec_max"`

	// ReadIOPSSec
	ReadIOPSSec uint64 `json:"read_iops_sec"`

	// ReadIOPSSecMax
	ReadIOPSSecMax uint64 `json:"read_iops_sec_max"`

	// SizeIOPSSec
	SizeIOPSSec uint64 `json:"size_iops_sec"`

	// TotalBytesSec
	TotalBytesSec uint64 `json:"total_bytes_sec"`

	// TotalBytesSecMax
	TotalBytesSecMax uint64 `json:"total_bytes_sec_max"`

	// TotalIOPSSec
	TotalIOPSSec uint64 `json:"total_iops_sec"`

	// TotalIOPSSecMax
	TotalIOPSSecMax uint64 `json:"total_iops_sec_max"`

	// WriteBytesSec
	WriteBytesSec uint64 `json:"write_bytes_sec"`

	// WriteBytesSecMax
	WriteBytesSecMax uint64 `json:"write_bytes_sec_max"`

	// WriteIOPSSec
	WriteIOPSSec uint64 `json:"write_iops_sec"`

	// WriteIOPSSecMax
	WriteIOPSSecMax uint64 `json:"write_iops_sec_max"`
}

Main information about IO tune

type InfoDisk

type InfoDisk struct {
	// Account ID
	AccountID uint64 `json:"accountId"`

	// Account name
	AccountName string `json:"accountName"`

	// Access Control Control
	ACL map[string]interface{} `json:"acl"`

	// Boot partition
	BootPartition uint64 `json:"bootPartition"`

	// Computes
	Computes map[string]string `json:"computes"`

	// Created time
	CreatedTime uint64 `json:"createdTime"`

	// Deleted time
	DeletedTime uint64 `json:"deletedTime"`

	// Description
	Description string `json:"desc"`

	// Destruction time
	DestructionTime uint64 `json:"destructionTime"`

	// Disk path
	DiskPath string `json:"diskPath"`

	// Grid ID
	GID uint64 `json:"gid"`

	// GUID
	GUID uint64 `json:"guid"`

	// ID
	ID uint64 `json:"id"`

	// Image ID
	ImageID uint64 `json:"imageId"`

	// List of image IDs
	Images []uint64 `json:"images"`

	// IOTune
	IOTune IOTune `json:"iotune"`

	// IQN
	IQN string `json:"iqn"`

	// Login
	Login string `json:"login"`

	// Milestones
	Milestones uint64 `json:"milestones"`

	// Name
	Name string `json:"name"`

	// Order
	Order uint64 `json:"order"`

	// Params
	Params string `json:"params"`

	// Parent ID
	ParentID uint64 `json:"parentId"`

	// Password
	Password string `json:"passwd"`

	// PCI slot
	PCISlot int64 `json:"pciSlot"`

	// Pool
	Pool string `json:"pool"`

	// Present to
	PresentTo []uint64 `json:"presentTo"`

	// Purge attempts
	PurgeAttempts uint64 `json:"purgeAttempts"`

	// Purge time
	PurgeTime uint64 `json:"purgeTime"`

	// Reality device number
	RealityDeviceNumber uint64 `json:"realityDeviceNumber"`

	// Reference ID
	ReferenceID string `json:"referenceId"`

	// Resource ID
	ResID string `json:"resId"`

	// Resource name
	ResName string `json:"resName"`

	// Role
	Role string `json:"role"`

	// SEP ID
	SEPID uint64 `json:"sepId"`

	// Shareable
	Shareable bool `json:"shareable"`

	// Size max
	SizeMax uint64 `json:"sizeMax"`

	// Size used
	SizeUsed float64 `json:"sizeUsed"`

	// List snapshots
	Snapshots ListSnapshots `json:"snapshots"`

	// Status
	Status string `json:"status"`

	// Tech status
	TechStatus string `json:"techStatus"`

	// Type
	Type string `json:"type"`

	// Virtual machine ID
	VMID uint64 `json:"vmid"`
}

Main information about disks

type ItemDisk

type ItemDisk struct {
	// Machine ID
	MachineID uint64 `json:"machineId"`

	// Machine name
	MachineName string `json:"machineName"`

	// Detailed information about disk
	RecordDisk
}

Main information for list disks

func (ItemDisk) Serialize

func (idisk ItemDisk) Serialize(params ...string) (serialization.Serialized, error)

Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.

In order to serialize with indent make sure to follow these guidelines:

  • First argument -> prefix
  • Second argument -> indent

type ItemSnapshot

type ItemSnapshot struct {
	// GUID
	GUID string `json:"guid"`

	// Label
	Label string `json:"label"`

	// Reference ID
	ReferenceID string `json:"referenceId"`

	// Resource ID
	ResID string `json:"resId"`

	// SnapSet GUID
	SnapSetGUID string `json:"snapSetGuid"`

	// SnapSet time
	SnapSetTime uint64 `json:"snapSetTime"`

	// Timestamp
	Timestamp uint64 `json:"timestamp"`
}

Main information about snapshot

type ItemUnattachedDisk

type ItemUnattachedDisk struct {
	// CKey
	CKey string `json:"_ckey"`

	// Meta
	Meta []interface{} `json:"_meta"`

	// Main information about disk
	InfoDisk

	// Updated by
	UpdatedBy uint64 `json:"updatedBy"`

	// Updated time
	UpdatedTime uint64 `json:"updatedTime"`
}

Main information about unattached disk

type LimitIORequest

type LimitIORequest struct {
	// ID of the disk to limit
	// Required: true
	DiskID uint64 `url:"diskId" json:"diskId" validate:"required"`

	// Alias for total_iops_sec for backwards compatibility
	// Required: false
	IOPS uint64 `url:"iops,omitempty" json:"iops,omitempty"`

	// TotalBytesSec
	// Required: false
	TotalBytesSec uint64 `url:"total_bytes_sec,omitempty" json:"total_bytes_sec,omitempty"`

	// ReadBytesSec
	// Required: false
	ReadBytesSec uint64 `url:"read_bytes_sec,omitempty" json:"read_bytes_sec,omitempty"`

	// WriteBytesSec
	// Required: false
	WriteBytesSec uint64 `url:"write_bytes_sec,omitempty" json:"write_bytes_sec,omitempty"`

	// TotalIOPSSec
	// Required: false
	TotalIOPSSec uint64 `url:"total_iops_sec,omitempty" json:"total_iops_sec,omitempty"`

	// ReadIOPSSec
	// Required: false
	ReadIOPSSec uint64 `url:"read_iops_sec,omitempty" json:"read_iops_sec,omitempty"`

	// WriteIOPSSec
	// Required: false
	WriteIOPSSec uint64 `url:"write_iops_sec,omitempty" json:"write_iops_sec,omitempty"`

	// TotalBytesSecMax
	// Required: false
	TotalBytesSecMax uint64 `url:"total_bytes_sec_max,omitempty" json:"total_bytes_sec_max,omitempty"`

	// ReadBytesSecMax
	// Required: false
	ReadBytesSecMax uint64 `url:"read_bytes_sec_max,omitempty" json:"read_bytes_sec_max,omitempty"`

	// WriteBytesSecMax
	// Required: false
	WriteBytesSecMax uint64 `url:"write_bytes_sec_max,omitempty" json:"write_bytes_sec_max,omitempty"`

	// TotalIOPSSecMax
	// Required: false
	TotalIOPSSecMax uint64 `url:"total_iops_sec_max,omitempty" json:"total_iops_sec_max,omitempty"`

	// ReadIOPSSecMax
	// Required: false
	ReadIOPSSecMax uint64 `url:"read_iops_sec_max,omitempty" json:"read_iops_sec_max,omitempty"`

	// WriteIOPSSecMax
	// Required: false
	WriteIOPSSecMax uint64 `url:"write_iops_sec_max,omitempty" json:"write_iops_sec_max,omitempty"`

	// SizeIOPSSec
	// Required: false
	SizeIOPSSec uint64 `url:"size_iops_sec,omitempty" json:"size_iops_sec,omitempty"`
}

LimitIORequest struct for limit IO

type ListDeletedRequest

type ListDeletedRequest struct {
	// Find by id
	// Required: false
	ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`

	// Find by name
	// Required: false
	Name string `url:"name,omitempty" json:"name,omitempty"`

	// Find by account name
	// Required: false
	AccountName string `url:"accountName,omitempty" json:"accountName,omitempty"`

	// Find by max size disk
	// Required: false
	DiskMaxSize int64 `url:"diskMaxSize,omitempty" json:"diskMaxSize,omitempty"`

	// Find by shared, true or false
	// Required: false
	Shared bool `url:"shared,omitempty" json:"shared,omitempty"`

	// ID of the account the disks belong to
	// Required: false
	AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`

	// Type of the disks
	// Required: false
	Type string `url:"type,omitempty" json:"type,omitempty"`

	// Page number
	// Required: false
	Page uint64 `url:"page,omitempty" json:"page,omitempty"`

	// Page size
	// Required: false
	Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}

ListDeletedRequest struct to get list of deleted disks

type ListDisks

type ListDisks struct {
	// Data
	Data []ItemDisk `json:"data"`

	// Entry count
	EntryCount uint64 `json:"entryCount"`
}

List disks

func (ListDisks) FilterByComputeID added in v1.3.0

func (ld ListDisks) FilterByComputeID(computeID uint64) ListDisks

FilterByComputeID is used to filter ListDisks attached to specified compute.

func (ListDisks) FilterByID

func (ld ListDisks) FilterByID(id uint64) ListDisks

FilterByID returns ListDisks with specified ID.

func (ListDisks) FilterByImageID

func (ld ListDisks) FilterByImageID(imageID uint64) ListDisks

FilterByImageID returns ListDisks with specified ImageID.

func (ListDisks) FilterByK8SID added in v1.3.0

func (ld ListDisks) FilterByK8SID(ctx context.Context, k8sID uint64, decortClient interfaces.Caller) (*ListDisks, error)

FilterByK8SID is used to filter ListDisks by specified K8S cluster.

func (ListDisks) FilterByLBID added in v1.3.0

func (ld ListDisks) FilterByLBID(ctx context.Context, lbID uint64, decortClient interfaces.Caller) (*ListDisks, error)

FilterByLBID is used to filter ListDisks used by computes inside specified Load Balancer.

func (ListDisks) FilterByName

func (ld ListDisks) FilterByName(name string) ListDisks

FilterByName returns ListDisks with specified Name.

func (ListDisks) FilterByStatus

func (ld ListDisks) FilterByStatus(status string) ListDisks

FilterByStatus returns ListDisks with specified Status.

func (ListDisks) FilterByTechStatus

func (ld ListDisks) FilterByTechStatus(techStatus string) ListDisks

FilterByTechStatus returns ListDisks with specified TechStatus.

func (ListDisks) FilterFunc

func (ld ListDisks) FilterFunc(predicate func(ItemDisk) bool) ListDisks

FilterFunc allows filtering ListDisks based on a user-specified predicate.

func (ListDisks) FindOne

func (ld ListDisks) FindOne() ItemDisk

FindOne returns first found ItemDisk If none was found, returns an empty struct.

func (ListDisks) IDs added in v1.6.8

func (ld ListDisks) IDs() []uint64

IDs gets array of DiskIDs from ListDisks struct

func (ListDisks) Serialize

func (ld ListDisks) Serialize(params ...string) (serialization.Serialized, error)

Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.

In order to serialize with indent make sure to follow these guidelines:

  • First argument -> prefix
  • Second argument -> indent

func (ListDisks) SortByCreatedTime

func (ld ListDisks) SortByCreatedTime(inverse bool) ListDisks

SortByCreatedTime sorts ListDisks by the CreatedTime field in ascending order.

If inverse param is set to true, the order is reversed.

func (ListDisks) SortByDeletedTime

func (ld ListDisks) SortByDeletedTime(inverse bool) ListDisks

SortByDeletedTime sorts ListDisks by the DeletedTime field in ascending order.

If inverse param is set to true, the order is reversed.

func (ListDisks) SortByDestructionTime

func (ld ListDisks) SortByDestructionTime(inverse bool) ListDisks

SortByDestructionTime sorts ListDisks by the DestructionTime field in ascending order.

If inverse param is set to true, the order is reversed.

type ListRequest

type ListRequest struct {
	// Find by id
	// Required: false
	ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`

	// Find by name
	// Required: false
	Name string `url:"name,omitempty" json:"name,omitempty"`

	// Find by account name
	// Required: false
	AccountName string `url:"accountName,omitempty" json:"accountName,omitempty"`

	// Find by max size disk
	// Required: false
	DiskMaxSize int64 `url:"diskMaxSize,omitempty" json:"diskMaxSize,omitempty"`

	// Find by status
	// Required: false
	Status string `url:"status,omitempty" json:"status,omitempty"`

	// Find by shared, true or false
	// Required: false
	Shared bool `url:"shared,omitempty" json:"shared,omitempty"`

	// ID of the account the disks belong to
	// Required: false
	AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`

	// Type of the disks
	// Required: false
	Type string `url:"type,omitempty" json:"type,omitempty"`

	// Find by sep ID
	// Required: false
	SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"`

	// Find by pool name
	// Required: false
	Pool string `url:"pool,omitempty" json:"pool,omitempty"`

	// Page number
	// Required: false
	Page uint64 `url:"page,omitempty" json:"page,omitempty"`

	// Page size
	// Required: false
	Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}

ListRequest struct to get list/list_deleted of disks

type ListSnapshots

type ListSnapshots []ItemSnapshot

List snapshots

type ListTypes added in v1.5.0

type ListTypes struct {
	// Data
	Data []interface{} `json:"data"`

	// Entry count
	EntryCount uint64 `json:"entryCount"`
}

type ListTypesRequest

type ListTypesRequest struct {
	// Show detailed disk types by seps
	// Required: false
	Detailed bool `url:"detailed" json:"detailed"`

	// Page number
	// Required: false
	Page uint64 `url:"page,omitempty" json:"page,omitempty"`

	// Page size
	// Required: false
	Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}

ListTypesRequest struct to get list of types of disks

type ListUnattachedDisks

type ListUnattachedDisks struct {
	// Data
	Data []ItemUnattachedDisk `json:"data"`

	// Entry count
	EntryCount uint64 `json:"entryCount"`
}

List unattached disks

func (ListUnattachedDisks) IDs added in v1.6.8

func (ldu ListUnattachedDisks) IDs() []uint64

IDs gets array of DiskIDs from ListUnattachedDisks struct

type ListUnattachedRequest

type ListUnattachedRequest struct {
	// Find by id
	// Required: false
	ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`

	// Find by account name
	// Required: false
	AccountName string `url:"accountName,omitempty" json:"accountName,omitempty"`

	// Find by max size disk
	// Required: false
	DiskMaxSize int64 `url:"diskMaxSize,omitempty" json:"diskMaxSize,omitempty"`

	// Find by status
	// Required: false
	Status string `url:"status,omitempty" json:"status,omitempty"`

	// Type of the disks
	// Required: false
	Type string `url:"type,omitempty" json:"type,omitempty"`

	// ID of the account
	// Required: false
	AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`

	// Find by sep ID
	// Required: false
	SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"`

	// Find by pool name
	// Required: false
	Pool string `url:"pool,omitempty" json:"pool,omitempty"`

	// Page number
	// Required: false
	Page uint64 `url:"page,omitempty" json:"page,omitempty"`

	// Page size
	// Required: false
	Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}

ListUnattachedRequest struct to get list of unattached disk

type RecordDisk

type RecordDisk struct {
	// Device name
	DeviceName string `json:"devicename"`

	// SEP type
	SEPType string `json:"sepType"`

	// Main information about disk
	InfoDisk
}

Detailed indormation about disk

type RenameRequest

type RenameRequest struct {
	// ID of the disk to rename
	// Required: true
	DiskID uint64 `url:"diskId" json:"diskId" validate:"required"`

	// New name of disk
	// Required: true
	Name string `url:"name" json:"name" validate:"required"`
}

RenameRequest struct to rename disk

type ResizeRequest

type ResizeRequest struct {
	// ID of the disk to resize
	// Required: true
	DiskID uint64 `url:"diskId" json:"diskId" validate:"required"`

	// New size of the disk in GB
	// Required: true
	Size uint64 `url:"size" json:"size" validate:"required"`
}

ResizeRequest struct to resize disk

type RestoreRequest

type RestoreRequest struct {
	// ID of the disk to restore
	// Required: true
	DiskID uint64 `url:"diskId" json:"diskId" validate:"required"`

	// Reason for restoring the disk
	// Required: true
	Reason string `url:"reason" json:"reason" validate:"required"`
}

RestoreRequest struct to restore a deleted unattached disk

type SearchListDisks added in v1.5.0

type SearchListDisks []ItemDisk

ListSearchDisks

type SearchRequest

type SearchRequest struct {
	//  ID of the account to search for the Disk
	// Required: false
	AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
	// Name of the Disk to search for
	// Required: false
	Name string `url:"name,omitempty" json:"name,omitempty"`

	// If false, then disks having one of the statuses are not listed
	// Required: false
	ShowAll bool `url:"show_all,omitempty" json:"show_all,omitempty"`

	// Page number
	// Required: false
	Page uint64 `url:"page,omitempty" json:"page,omitempty"`

	// Page size
	// Required: false
	Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}

SearchRequest struct for search

type ShareRequest

type ShareRequest struct {
	// ID of the disk to share
	// Required: true
	DiskID uint64 `url:"diskId" json:"diskId" validate:"required"`
}

ShareRequest struct to share data disk

type SnapshotDeleteRequest

type SnapshotDeleteRequest struct {
	// ID of disk to delete
	// Required: true
	DiskID uint64 `url:"diskId" json:"diskId" validate:"required"`

	// Label of the snapshot to delete
	// Required: true
	Label string `url:"label" json:"label" validate:"required"`
}

SnapshotDeleteRequest struct to delete snapshot

type SnapshotRollbackRequest

type SnapshotRollbackRequest struct {
	// ID of the disk
	// Required: true
	DiskID uint64 `url:"diskId" json:"diskId" validate:"required"`

	// Label of the snapshot to rollback
	// Required: false
	Label string `url:"label,omitempty" json:"label,omitempty"`

	// Timestamp of the snapshot to rollback
	// Required: false
	TimeStamp uint64 `url:"timestamp,omitempty" json:"timestamp,omitempty"`
}

SnapshotRollbackRequest struct to rollback snapshot

type UnshareRequest

type UnshareRequest struct {
	// ID of the disk to unshare
	// Required: true
	DiskID uint64 `url:"diskId" json:"diskId" validate:"required"`
}

UnshareRequest struct to unshare data disk

Jump to

Keyboard shortcuts

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