Documentation
¶
Overview ¶
API Actor api, this actor is the final api a enduser uses to manage his resources
Index ¶
- type CreateRequest
- type DeleteRequest
- type Disks
- func (d Disks) Create(ctx context.Context, req CreateRequest) (uint64, error)
- func (d Disks) Delete(ctx context.Context, req DeleteRequest) (bool, error)
- func (d Disks) DeleteDisks(ctx context.Context, req DisksDeleteRequest) (bool, error)
- func (d Disks) Get(ctx context.Context, req GetRequest) (*RecordDisk, error)
- func (d Disks) LimitIO(ctx context.Context, req LimitIORequest) (bool, error)
- func (d Disks) List(ctx context.Context, req ListRequest) (ListDisks, error)
- func (d Disks) ListDeleted(ctx context.Context, req ListRequest) (ListDisks, error)
- func (d Disks) ListTypes(ctx context.Context, req ListTypesRequest) ([]interface{}, error)
- func (d Disks) ListUnattached(ctx context.Context, req ListUnattachedRequest) (ListDisksUnattached, error)
- func (d Disks) Rename(ctx context.Context, req RenameRequest) (bool, error)
- func (d Disks) Resize(ctx context.Context, req ResizeRequest) (bool, error)
- func (d Disks) Resize2(ctx context.Context, req ResizeRequest) (bool, error)
- func (d Disks) Restore(ctx context.Context, req RestoreRequest) (bool, error)
- func (d Disks) Search(ctx context.Context, req SearchRequest) (ListDisks, error)
- func (d Disks) Share(ctx context.Context, req ShareRequest) (bool, error)
- func (d Disks) SnapshotDelete(ctx context.Context, req SnapshotDeleteRequest) (bool, error)
- func (d Disks) SnapshotRollback(ctx context.Context, req SnapshotRollbackRequest) (bool, error)
- func (d Disks) Unshare(ctx context.Context, req UnshareRequest) (bool, error)
- type DisksDeleteRequest
- type GetRequest
- type IOTune
- type ItemDisk
- type ItemDiskUnattached
- type ItemSnapshot
- type LimitIORequest
- type ListDisks
- func (ld ListDisks) FilterByComputeID(computeID uint64) ListDisks
- func (ld ListDisks) FilterByID(id uint64) ListDisks
- func (ld ListDisks) FilterByK8SID(ctx context.Context, k8sID uint64, decortClient interfaces.Caller) (ListDisks, error)
- func (ld ListDisks) FilterByLBID(ctx context.Context, lbID uint64, decortClient interfaces.Caller) (ListDisks, error)
- func (ld ListDisks) FilterByName(name string) ListDisks
- func (ld ListDisks) FilterByStatus(status string) ListDisks
- func (ld ListDisks) FilterByTechStatus(techStatus string) ListDisks
- func (ld ListDisks) FilterFunc(predicate func(ItemDisk) bool) ListDisks
- func (ld ListDisks) FindOne() ItemDisk
- func (ld ListDisks) Serialize(params ...string) (serialization.Serialized, error)
- func (ld ListDisks) SortByCreatedTime(inverse bool) ListDisks
- func (ld ListDisks) SortByDeletedTime(inverse bool) ListDisks
- func (ld ListDisks) SortByDestructionTime(inverse bool) ListDisks
- type ListDisksUnattached
- func (lu ListDisksUnattached) FilterByID(id uint64) ListDisksUnattached
- func (lu ListDisksUnattached) FilterByName(name string) ListDisksUnattached
- func (lu ListDisksUnattached) FilterByStatus(status string) ListDisksUnattached
- func (lu ListDisksUnattached) FilterByTechStatus(techStatus string) ListDisksUnattached
- func (lu ListDisksUnattached) FilterFunc(predicate func(ItemDiskUnattached) bool) ListDisksUnattached
- func (lu ListDisksUnattached) FindOne() ItemDiskUnattached
- func (lu ListDisksUnattached) Serialize(params ...string) (serialization.Serialized, error)
- func (lu ListDisksUnattached) SortByCreatedTime(inverse bool) ListDisksUnattached
- func (lu ListDisksUnattached) SortByDeletedTime(inverse bool) ListDisksUnattached
- func (lu ListDisksUnattached) SortByDestructionTime(inverse bool) ListDisksUnattached
- type ListRequest
- type ListSnapshots
- type ListTypesRequest
- type ListUnattachedRequest
- type RecordDisk
- type RenameRequest
- type ResizeRequest
- type RestoreRequest
- type SearchRequest
- type ShareRequest
- type SnapshotDeleteRequest
- type SnapshotRollbackRequest
- type UnshareRequest
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"` }
Request struct for create disk
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"` }
Request for delete disk
type Disks ¶
type Disks struct {
// contains filtered or unexported fields
}
Structure for creating request to disks
func (Disks) DeleteDisks ¶
DeleteDisks deletes multiple disks permanently
func (Disks) Get ¶
func (d Disks) Get(ctx context.Context, req GetRequest) (*RecordDisk, error)
Get gets disk details 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 ¶
LimitIO limit 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) ListDeleted ¶
ListDeleted gets list the deleted disks belonging to an account
func (Disks) ListTypes ¶
func (d Disks) ListTypes(ctx context.Context, req ListTypesRequest) ([]interface{}, error)
ListTypes gets list defined disk types
func (Disks) ListUnattached ¶
func (d Disks) ListUnattached(ctx context.Context, req ListUnattachedRequest) (ListDisksUnattached, error)
ListUnattached gets list of unattached disks
func (Disks) Resize ¶
Resize 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 computes. Only unassigned disks and disks, assigned with "old" virtual machines.
func (Disks) Resize2 ¶
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) SnapshotDelete ¶
SnapshotDelete deletes a snapshot
func (Disks) SnapshotRollback ¶
SnapshotRollback rollback an individual disk snapshot
type DisksDeleteRequest ¶
type DisksDeleteRequest struct { // List of disk ids to delete // Required: true DisksIDs []uint64 `url:"diskIds" json:"diskIds" validate:"required"` // 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"` }
Request struct for multiple disks
type GetRequest ¶
type GetRequest struct { // ID of the disk // Required: true DiskID uint64 `url:"diskId" json:"diskId" validate:"required"` }
Request struct for 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 ItemDisk ¶
type ItemDisk struct { // Access Control List ACL map[string]interface{} `json:"acl"` // Account ID AccountID uint64 `json:"accountId"` // Account name AccountName string `json:"accountName"` // Computes Computes map[string]string `json:"computes"` // Created time CreatedTime uint64 `json:"createdTime"` // Deleted time DeletedTime uint64 `json:"deletedTime"` // Device name DeviceName string `json:"devicename"` // Description Description string `json:"desc"` // Destruction time DestructionTime uint64 `json:"destructionTime"` // Grid ID GID uint64 `json:"gid"` // ID ID uint64 `json:"id"` // Image ID ImageID uint64 `json:"imageId"` // List of image IDs Images []uint64 `json:"images"` // IOTune IOTune IOTune `json:"iotune"` // Machine ID MachineID uint64 `json:"machineId"` // Machine name MachineName string `json:"machineName"` // Name Name string `json:"name"` // Order Order uint64 `json:"order"` // Params Params string `json:"params"` // Parent ID ParentID uint64 `json:"parentId"` // PCI slot PCISlot int64 `json:"pciSlot"` // Pool Pool string `json:"pool"` // Present to PresentTo []uint64 `json:"presentTo"` // Purge time PurgeTime uint64 `json:"purgeTime"` // Resource ID ResID string `json:"resId"` // Resource name ResName string `json:"resName"` // Role Role string `json:"role"` // SepType SepType string `json:"sepType"` Shareable bool `json:"shareable"` // SepID SepID uint64 `json:"sepId"` // Size max SizeMax uint64 `json:"sizeMax"` // Size used SizeUsed float64 `json:"sizeUsed"` // List of 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 disk
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 ItemDiskUnattached ¶ added in v1.3.1
type ItemDiskUnattached struct { // CKey CKey string `json:"_ckey"` // Meta Meta []interface{} `json:"_meta"` // Account ID AccountID uint64 `json:"accountId"` // Account name AccountName string `json:"accountName"` // Access Control List ACL map[string]interface{} `json:"acl"` // Boot Partition BootPartition uint64 `json:"bootPartition"` // 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"` // Images 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"` //PCISlot 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"` // ID SEP SEPID uint64 `json:"sepId"` Shareable bool `json:"shareable"` // Size max SizeMax uint64 `json:"sizeMax"` // Size used SizeUsed float64 `json:"sizeUsed"` // List of 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"` }
func (ItemDiskUnattached) Serialize ¶ added in v1.3.1
func (idisk ItemDiskUnattached) 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"` // Resource ID ResID string `json:"resId"` // SnapSetGUID SnapSetGUID string `json:"snapSetGuid"` // SnapSetTime SnapSetTime uint64 `json:"snapSetTime"` // TimeStamp TimeStamp uint64 `json:"timestamp"` }
Main information about snapshot
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"` }
Request struct for limit IO
type ListDisks ¶
type ListDisks []ItemDisk
List of disks
func (ListDisks) FilterByComputeID ¶ added in v1.3.0
FilterByComputeID is used to filter ListDisks attached to specified compute.
func (ListDisks) FilterByID ¶
FilterByID returns ListDisks with specified ID.
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 ¶
FilterByName returns ListDisks with specified Name.
func (ListDisks) FilterByStatus ¶
FilterByStatus returns ListDisks with specified Status.
func (ListDisks) FilterByTechStatus ¶
FilterByTechStatus returns ListDisks with specified TechStatus.
func (ListDisks) FilterFunc ¶
FilterFunc allows filtering ListDisks based on a user-specified predicate.
func (ListDisks) FindOne ¶
FindOne returns first found ItemDisk If none was found, returns an empty 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 ¶
SortByCreatedTime sorts ListDisks by the CreatedTime field in ascending order.
If inverse param is set to true, the order is reversed.
func (ListDisks) SortByDeletedTime ¶
SortByDeletedTime sorts ListDisks by the DeletedTime field in ascending order.
If inverse param is set to true, the order is reversed.
func (ListDisks) SortByDestructionTime ¶
SortByDestructionTime sorts ListDisks by the DestructionTime field in ascending order.
If inverse param is set to true, the order is reversed.
type ListDisksUnattached ¶ added in v1.3.1
type ListDisksUnattached []ItemDiskUnattached
List of unattached disks
func (ListDisksUnattached) FilterByID ¶ added in v1.3.1
func (lu ListDisksUnattached) FilterByID(id uint64) ListDisksUnattached
FilterByID returns ListDisksUnattached with specified ID.
func (ListDisksUnattached) FilterByName ¶ added in v1.3.1
func (lu ListDisksUnattached) FilterByName(name string) ListDisksUnattached
FilterByName returns ListDisksUnattached with specified Name.
func (ListDisksUnattached) FilterByStatus ¶ added in v1.3.1
func (lu ListDisksUnattached) FilterByStatus(status string) ListDisksUnattached
FilterByStatus returns ListDisksUnattached with specified Status.
func (ListDisksUnattached) FilterByTechStatus ¶ added in v1.3.1
func (lu ListDisksUnattached) FilterByTechStatus(techStatus string) ListDisksUnattached
FilterByTechStatus returns ListDisksUnattached with specified TechStatus.
func (ListDisksUnattached) FilterFunc ¶ added in v1.3.1
func (lu ListDisksUnattached) FilterFunc(predicate func(ItemDiskUnattached) bool) ListDisksUnattached
FilterFunc allows filtering ListDisksUnattached based on a user-specified predicate.
func (ListDisksUnattached) FindOne ¶ added in v1.3.1
func (lu ListDisksUnattached) FindOne() ItemDiskUnattached
FindOne returns first found ItemDiskUnattached If none was found, returns an empty struct.
func (ListDisksUnattached) Serialize ¶ added in v1.3.1
func (lu ListDisksUnattached) 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 (ListDisksUnattached) SortByCreatedTime ¶ added in v1.3.1
func (lu ListDisksUnattached) SortByCreatedTime(inverse bool) ListDisksUnattached
SortByCreatedTime sorts ListDisksUnattached by the CreatedTime field in ascending order.
If inverse param is set to true, the order is reversed.
func (ListDisksUnattached) SortByDeletedTime ¶ added in v1.3.1
func (lu ListDisksUnattached) SortByDeletedTime(inverse bool) ListDisksUnattached
SortByDeletedTime sorts ListDisksUnattached by the DeletedTime field in ascending order.
If inverse param is set to true, the order is reversed.
func (ListDisksUnattached) SortByDestructionTime ¶ added in v1.3.1
func (lu ListDisksUnattached) SortByDestructionTime(inverse bool) ListDisksUnattached
SortByDestructionTime sorts ListDisksUnattached by the DestructionTime field in ascending order.
If inverse param is set to true, the order is reversed.
type ListRequest ¶
type ListRequest struct { // 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"` }
Request struct for get list/list_deleted of disks
type ListTypesRequest ¶
type ListTypesRequest struct { // Show detailed disk types by seps // Required: true Detailed bool `url:"detailed" json:"detailed" validate:"required"` }
Request struct for get list types of disks
type ListUnattachedRequest ¶
type ListUnattachedRequest struct { // ID of the account // Required: false AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` }
Request struct for get list unattached disk
type RecordDisk ¶
type RecordDisk struct { // Access Control List ACL map[string]interface{} `json:"acl"` // Account ID AccountID uint64 `json:"accountId"` // Account name AccountName string `json:"accountName"` // Computes Computes map[string]string `json:"computes"` // Created time CreatedTime uint64 `json:"createdTime"` // Deleted time DeletedTime uint64 `json:"deletedTime"` // Device name DeviceName string `json:"devicename"` // Description Description string `json:"desc"` // Destruction time DestructionTime uint64 `json:"destructionTime"` // Grid ID GID uint64 `json:"gid"` // ID ID uint64 `json:"id"` // Image ID ImageID uint64 `json:"imageId"` // List of image IDs Images []uint64 `json:"images"` // IOTune IOTune IOTune `json:"iotune"` // Name Name string `json:"name"` // Order Order uint64 `json:"order"` // Params Params string `json:"params"` // Parent ID ParentID uint64 `json:"parentId"` // PCI slot PCISlot int64 `json:"pciSlot"` // Pool Pool string `json:"pool"` // Present to PresentTo []uint64 `json:"presentTo"` // Purge time PurgeTime uint64 `json:"purgeTime"` // Resource ID ResID string `json:"resId"` // Resource name ResName string `json:"resName"` // Role Role string `json:"role"` // SepType SepType string `json:"sepType"` // SepID SepID uint64 `json:"sepId"` Shareable bool `json:"shareable"` // Size max SizeMax uint64 `json:"sizeMax"` // Size used SizeUsed float64 `json:"sizeUsed"` // List of 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"` }
Detailed information 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"` }
Request struct for 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"` }
Request struct for 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"` }
Request struct for restore a deleted unattached disk
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"` }
Request struct for search
type ShareRequest ¶
type ShareRequest struct { // Required: true DiskID uint64 `url:"diskId" json:"diskId" validate:"required"` }
Request struct for 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"` }
Request struct for 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"` }
Request struct for rollback snapshot
type UnshareRequest ¶
type UnshareRequest struct { // Required: true DiskID uint64 `url:"diskId" json:"diskId" validate:"required"` }
Request struct for unshare data disk