Documentation
¶
Overview ¶
API Actor for managing Compute. This actor is a final API for endusers to manage Compute
Index ¶
- type AffinityGroupCheckStartRequest
- type AffinityLabelRemoveRequest
- type AffinityLabelSetRequest
- type AffinityRelationsRequest
- type AffinityRuleAddRequest
- type AffinityRuleRemoveRequest
- type AffinityRulesClearRequest
- type AntiAffinityRuleAddRequest
- type AntiAffinityRuleRemoveRequest
- type AntiAffinityRulesClearRequest
- type AttachGPURequest
- type AttachPCIDeviceRequest
- type AuditsRequest
- type BootOrderGetRequest
- type BootOrderSetRequest
- type CDEjectRequest
- type CDInsertRequest
- type ChangeLinkStateRequest
- type CloneRequest
- type Compute
- func (c Compute) AffinityGroupCheckStart(ctx context.Context, req AffinityGroupCheckStartRequest) (string, error)
- func (c Compute) AffinityLabelRemove(ctx context.Context, req AffinityLabelRemoveRequest) (bool, error)
- func (c Compute) AffinityLabelSet(ctx context.Context, req AffinityLabelSetRequest) (bool, error)
- func (c Compute) AffinityRelations(ctx context.Context, req AffinityRelationsRequest) (*RecordAffinityRelations, error)
- func (c Compute) AffinityRuleAdd(ctx context.Context, req AffinityRuleAddRequest) (bool, error)
- func (c Compute) AffinityRuleRemove(ctx context.Context, req AffinityRuleRemoveRequest) (bool, error)
- func (c Compute) AffinityRulesClear(ctx context.Context, req AffinityRulesClearRequest) (bool, error)
- func (c Compute) AntiAffinityRuleAdd(ctx context.Context, req AntiAffinityRuleAddRequest) (bool, error)
- func (c Compute) AntiAffinityRuleRemove(ctx context.Context, req AntiAffinityRuleRemoveRequest) (bool, error)
- func (c Compute) AntiAffinityRulesClear(ctx context.Context, req AntiAffinityRulesClearRequest) (bool, error)
- func (c Compute) AttachGPU(ctx context.Context, req AttachGPURequest) (uint64, error)
- func (c Compute) AttachPCIDevice(ctx context.Context, req AttachPCIDeviceRequest) (bool, error)
- func (c Compute) Audits(ctx context.Context, req AuditsRequest) (ListAudits, error)
- func (c Compute) BootOrderGet(ctx context.Context, req BootOrderGetRequest) ([]string, error)
- func (c Compute) BootOrderSet(ctx context.Context, req BootOrderSetRequest) ([]string, error)
- func (c Compute) CDEject(ctx context.Context, req CDEjectRequest) (bool, error)
- func (c Compute) CDInsert(ctx context.Context, req CDInsertRequest) (bool, error)
- func (c Compute) ChangeLinkState(ctx context.Context, req ChangeLinkStateRequest) (bool, error)
- func (c Compute) Clone(ctx context.Context, req CloneRequest) (uint64, error)
- func (c Compute) CreateTemplate(ctx context.Context, req CreateTemplateRequest) (uint64, error)
- func (c Compute) CreateTemplateAsync(ctx context.Context, req CreateTemplateRequest) (string, error)
- func (c Compute) Delete(ctx context.Context, req DeleteRequest) (bool, error)
- func (c Compute) DetachGPU(ctx context.Context, req DetachGPURequest) (bool, error)
- func (c Compute) DetachPCIDevice(ctx context.Context, req DetachPCIDeviceRequest) (bool, error)
- func (c Compute) Disable(ctx context.Context, req DisableRequest) (bool, error)
- func (c Compute) DiskAdd(ctx context.Context, req DiskAddRequest) (uint64, error)
- func (c Compute) DiskAttach(ctx context.Context, req DiskAttachRequest) (bool, error)
- func (c Compute) DiskDel(ctx context.Context, req DiskDelRequest) (bool, error)
- func (c Compute) DiskDetach(ctx context.Context, req DiskDetachRequest) (bool, error)
- func (c Compute) DiskQOS(ctx context.Context, req DiskQOSRequest) (bool, error)
- func (c Compute) DiskResize(ctx context.Context, req DiskResizeRequest) (bool, error)
- func (c Compute) Enable(ctx context.Context, req EnableRequest) (bool, error)
- func (c Compute) Get(ctx context.Context, req GetRequest) (*RecordCompute, error)
- func (c Compute) GetAudits(ctx context.Context, req GetAuditsRequest) (ListShortAudits, error)
- func (c Compute) GetConsoleURL(ctx context.Context, req GetConsoleURLRequest) (string, error)
- func (c Compute) GetLog(ctx context.Context, req GetLogRequest) (string, error)
- func (c Compute) GetLogGet(ctx context.Context, req GetLogRequest) (string, error)
- func (c Compute) List(ctx context.Context, req ListRequest) (*ListComputes, error)
- func (c Compute) ListDeleted(ctx context.Context, req ListDeletedRequest) (*ListComputes, error)
- func (c Compute) ListPCIDevice(ctx context.Context, req ListPCIDeviceRequest) (*ListPCIDevices, error)
- func (c Compute) ListVGPU(ctx context.Context, req ListVGPURequest) (*ListVGPUs, error)
- func (c Compute) MoveToRG(ctx context.Context, req MoveToRGRequest) (bool, error)
- func (c Compute) NetAttach(ctx context.Context, req NetAttachRequest) (*RecordNetAttach, error)
- func (c Compute) NetDetach(ctx context.Context, req NetDetachRequest) (bool, error)
- func (c Compute) PFWAdd(ctx context.Context, req PFWAddRequest) (uint64, error)
- func (c Compute) PFWDel(ctx context.Context, req PFWDelRequest) (bool, error)
- func (c Compute) PFWList(ctx context.Context, req PFWListRequest) (ListPFWs, error)
- func (c Compute) Pause(ctx context.Context, req PauseRequest) (bool, error)
- func (c Compute) PinToStack(ctx context.Context, req PinToStackRequest) (uint64, error)
- func (c Compute) PowerCycle(ctx context.Context, req PowerCycleRequest) (bool, error)
- func (c Compute) Reboot(ctx context.Context, req RebootRequest) (bool, error)
- func (c Compute) Redeploy(ctx context.Context, req RedeployRequest) (bool, error)
- func (c Compute) Reset(ctx context.Context, req ResetRequest) (bool, error)
- func (c Compute) Resize(ctx context.Context, req ResizeRequest) (bool, error)
- func (c Compute) Restore(ctx context.Context, req RestoreRequest) (string, error)
- func (c Compute) Resume(ctx context.Context, req ResumeRequest) (bool, error)
- func (c Compute) SnapshotCreate(ctx context.Context, req SnapshotCreateRequest) (string, error)
- func (c Compute) SnapshotDelete(ctx context.Context, req SnapshotDeleteRequest) (bool, error)
- func (c Compute) SnapshotList(ctx context.Context, req SnapshotListRequest) (ListSnapShots, error)
- func (c Compute) SnapshotRollback(ctx context.Context, req SnapshotRollbackRequest) (bool, error)
- func (c Compute) SnapshotUsage(ctx context.Context, req SnapshotUsageRequest) (ListUsageSnapshots, error)
- func (c Compute) Start(ctx context.Context, req StartRequest) (bool, error)
- func (c Compute) Stop(ctx context.Context, req StopRequest) (bool, error)
- func (c Compute) TagAdd(ctx context.Context, req TagAddRequest) (bool, error)
- func (c Compute) TagRemove(ctx context.Context, req TagRemoveRequest) (bool, error)
- func (c Compute) UnpinFromStack(ctx context.Context, req UnpinFromStackRequest) (bool, error)
- func (c Compute) Update(ctx context.Context, req UpdateRequest) (bool, error)
- func (c Compute) UserGrant(ctx context.Context, req UserGrantRequest) (bool, error)
- func (c Compute) UserList(ctx context.Context, req UserListRequest) (*RecordACL, error)
- func (c Compute) UserRevoke(ctx context.Context, req UserRevokeRequest) (bool, error)
- func (c Compute) UserUpdate(ctx context.Context, req UserUpdateRequest) (bool, error)
- type CreateTemplateRequest
- type DeleteRequest
- type DetachGPURequest
- type DetachPCIDeviceRequest
- type DisableRequest
- type DiskAddRequest
- type DiskAttachRequest
- type DiskDelRequest
- type DiskDetachRequest
- type DiskQOSRequest
- type DiskResizeRequest
- type EnableRequest
- type Explicit
- type GetAuditsRequest
- type GetConsoleURLRequest
- type GetLogRequest
- type GetRequest
- type IOTune
- type InfoDisk
- type ItemACL
- type ItemAudit
- type ItemCompute
- type ItemComputeDisk
- type ItemOSUser
- type ItemPFW
- type ItemRule
- type ItemShortAudit
- type ItemSnapSet
- type ItemSnapshot
- type ItemUsageSnapshot
- type ItemVNFInterface
- type ListACL
- type ListAudits
- type ListComputeDisks
- type ListComputes
- func (lc ListComputes) FilterByDiskID(diskID uint64) ListComputes
- func (lc ListComputes) FilterByID(id uint64) ListComputes
- func (lc ListComputes) FilterByK8SID(ctx context.Context, k8sID uint64, decortClient interfaces.Caller) (*ListComputes, error)
- func (lc ListComputes) FilterByK8SMasters() ListComputes
- func (lc ListComputes) FilterByK8SWorkers() ListComputes
- func (lc ListComputes) FilterByLBID(ctx context.Context, lbID uint64, decortClient interfaces.Caller) (*ListComputes, error)
- func (lc ListComputes) FilterByName(name string) ListComputes
- func (lc ListComputes) FilterByStatus(status string) ListComputes
- func (lc ListComputes) FilterByTechStatus(techStatus string) ListComputes
- func (lc ListComputes) FilterFunc(predicate func(ItemCompute) bool) ListComputes
- func (lc ListComputes) FindOne() ItemCompute
- func (lc ListComputes) Serialize(params ...string) (serialization.Serialized, error)
- func (lc ListComputes) SortByCPU(inverse bool) ListComputes
- func (lc ListComputes) SortByCreatedTime(inverse bool) ListComputes
- func (lc ListComputes) SortByDeletedTime(inverse bool) ListComputes
- func (lc ListComputes) SortByRAM(inverse bool) ListComputes
- func (lc ListComputes) SortByUpdatedTime(inverse bool) ListComputes
- type ListDeletedRequest
- type ListInterfaces
- type ListOSUser
- type ListPCIDeviceRequest
- type ListPCIDevices
- type ListPFWs
- type ListRequest
- type ListRules
- type ListShortAudits
- type ListSnapSets
- type ListSnapShots
- type ListUsageSnapshots
- type ListVGPURequest
- type ListVGPUs
- type MoveToRGRequest
- type NetAttachRequest
- type NetDetachRequest
- type PFWAddRequest
- type PFWDelRequest
- type PFWListRequest
- type PauseRequest
- type PinToStackRequest
- type PowerCycleRequest
- type QOS
- type RebootRequest
- type RecordACL
- type RecordAffinityRelations
- type RecordCompute
- type RecordNetAttach
- type RedeployRequest
- type ResetRequest
- type ResizeRequest
- type RestoreRequest
- type ResumeRequest
- type SnapshotCreateRequest
- type SnapshotDeleteRequest
- type SnapshotExtend
- type SnapshotExtendList
- type SnapshotListRequest
- type SnapshotRollbackRequest
- type SnapshotUsageRequest
- type StartRequest
- type StopRequest
- type TagAddRequest
- type TagRemoveRequest
- type UnpinFromStackRequest
- type UpdateRequest
- type UserGrantRequest
- type UserListRequest
- type UserRevokeRequest
- type UserUpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AffinityGroupCheckStartRequest ¶
type AffinityGroupCheckStartRequest struct { // ID of the resource group // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // Affinity group label // Required: true AffinityLabel string `url:"affinityLabel" json:"affinityLabel" validate:"required"` }
Request struct for check all computes with current affinity label can start
type AffinityLabelRemoveRequest ¶
type AffinityLabelRemoveRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for clear affinity label for compute
type AffinityLabelSetRequest ¶
type AffinityLabelSetRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Affinity group label // Required: true AffinityLabel string `url:"affinityLabel" json:"affinityLabel" validate:"required"` }
Request struct for set affinity label for compute
type AffinityRelationsRequest ¶
type AffinityRelationsRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for get dict of computes
type AffinityRuleAddRequest ¶
type AffinityRuleAddRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Compute or node, for whom rule applies // Required: true Topology string `url:"topology" json:"topology" validate:"computeTopology"` // The degree of 'strictness' of this rule // Should be one of: // - RECOMMENDED // - REQUIRED // Required: true Policy string `url:"policy" json:"policy" validate:"computePolicy"` // The comparison mode is 'value', recorded by the specified 'key' // Should be one of: // - EQ // - EN // - ANY // Required: true Mode string `url:"mode" json:"mode" validate:"computeMode"` // Key that are taken into account when analyzing this rule will be identified // Required: true Key string `url:"key" json:"key" validate:"required"` // Value that must match the key to be taken into account when analyzing this rule // Required: true Value string `url:"value" json:"value" validate:"required"` }
Request struct for add affinity rule
type AffinityRuleRemoveRequest ¶
type AffinityRuleRemoveRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Compute or node, for whom rule applies // Required: true Topology string `url:"topology" json:"topology" validate:"computeTopology"` // The degree of 'strictness' of this rule // Should be one of: // - RECOMMENDED // - REQUIRED // Required: true Policy string `url:"policy" json:"policy" validate:"computePolicy"` // The comparison mode is 'value', recorded by the specified 'key' // Should be one of: // - EQ // - EN // - ANY // Required: true Mode string `url:"mode" json:"mode" validate:"computeMode"` // Key that are taken into account when analyzing this rule will be identified // Required: true Key string `url:"key" json:"key" validate:"required"` // Value that must match the key to be taken into account when analyzing this rule // Required: true Value string `url:"value" json:"value" validate:"required"` }
Request struct for remove affinity rule
type AffinityRulesClearRequest ¶
type AffinityRulesClearRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for clear affinity rules
type AntiAffinityRuleAddRequest ¶
type AntiAffinityRuleAddRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Compute or node, for whom rule applies // Required: true Topology string `url:"topology" json:"topology" validate:"computeTopology"` // The degree of 'strictness' of this rule // Should be one of: // - RECOMMENDED // - REQUIRED // Required: true Policy string `url:"policy" json:"policy" validate:"computePolicy"` // The comparison mode is 'value', recorded by the specified 'key' // Should be one of: // - EQ // - EN // - ANY // Required: true Mode string `url:"mode" json:"mode" validate:"computeMode"` // Key that are taken into account when analyzing this rule will be identified // Required: true Key string `url:"key" json:"key" validate:"required"` // Value that must match the key to be taken into account when analyzing this rule // Required: true Value string `url:"value" json:"value" validate:"required"` }
Request struct for add anti affinity rule
type AntiAffinityRuleRemoveRequest ¶
type AntiAffinityRuleRemoveRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Compute or node, for whom rule applies // Required: true Topology string `url:"topology" json:"topology" validate:"computeTopology"` // The degree of 'strictness' of this rule // Should be one of: // - RECOMMENDED // - REQUIRED // Required: true Policy string `url:"policy" json:"policy" validate:"computePolicy"` // The comparison mode is 'value', recorded by the specified 'key' // Should be one of: // - EQ // - EN // - ANY // Required: true Mode string `url:"mode" json:"mode" validate:"computeMode"` // Key that are taken into account when analyzing this rule will be identified // Required: true Key string `url:"key" json:"key" validate:"required"` // Value that must match the key to be taken into account when analyzing this rule // Required: true Value string `url:"value" json:"value" validate:"required"` }
Request struct for remove anti affinity rule
type AntiAffinityRulesClearRequest ¶
type AntiAffinityRulesClearRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for clear anti affinity rules
type AttachGPURequest ¶
type AttachGPURequest struct { // Identifier compute // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Identifier vGPU // Required: true VGPUID uint64 `url:"vgpuId" json:"vgpuId" validate:"required"` }
Request struct for attach GPU for compute
type AttachPCIDeviceRequest ¶
type AttachPCIDeviceRequest struct { // Identifier compute // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // PCI device ID // Required: true DeviceID uint64 `url:"deviceId" json:"deviceId" validate:"required"` }
Request struct for atttach PCI device
type AuditsRequest ¶
type AuditsRequest struct { // ID of the compute // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for get audit records
type BootOrderGetRequest ¶ added in v1.4.0
type BootOrderGetRequest struct { // Compute ID // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for getting boot order
type BootOrderSetRequest ¶ added in v1.4.0
type BootOrderSetRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // List of boot devices // Should be one of: // - cdrom // - network // - hd // Required: true Order []string `url:"order" json:"order" validate:"min=1,computeOrder"` }
Request struct for setting boot order
type CDEjectRequest ¶
type CDEjectRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for eject CD image
type CDInsertRequest ¶
type CDInsertRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // ID of CD-ROM image // Required: true CDROMID uint64 `url:"cdromId" json:"cdromId" validate:"required"` }
Request struct for insert new CD image
type ChangeLinkStateRequest ¶ added in v1.4.0
type ChangeLinkStateRequest struct { // Compute ID // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Interface name or MAC address // Required: true Interface string `url:"interface" json:"interface" validate:"required"` // Interface state // Must be either "on" or "off" // Required: true State string `url:"state" json:"state" validate:"required,interfaceState"` }
Request struct for changing link state
type CloneRequest ¶
type CloneRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Name of the clone // Required: true Name string `url:"name" json:"name" validate:"required"` // Timestamp of the parent's snapshot to create clone from // Required: false SnapshotTimestamp uint64 `url:"snapshotTimestamp,omitempty" json:"snapshotTimestamp,omitempty"` // Name of the parent's snapshot to create clone from // Required: false SnapshotName string `url:"snapshotName,omitempty" json:"snapshotName,omitempty"` }
Request struct for clone compute instance
type Compute ¶
type Compute struct {
// contains filtered or unexported fields
}
Structure for creating request to compute
func (Compute) AffinityGroupCheckStart ¶
func (c Compute) AffinityGroupCheckStart(ctx context.Context, req AffinityGroupCheckStartRequest) (string, error)
AffinityGroupCheckStart check all computes with current affinity label can start
func (Compute) AffinityLabelRemove ¶
func (c Compute) AffinityLabelRemove(ctx context.Context, req AffinityLabelRemoveRequest) (bool, error)
AffinityLabelRemove clear affinity label for compute
func (Compute) AffinityLabelSet ¶
AffinityLabelSet set affinity label for compute
func (Compute) AffinityRelations ¶
func (c Compute) AffinityRelations(ctx context.Context, req AffinityRelationsRequest) (*RecordAffinityRelations, error)
AffinityRelations gets dict of computes divided by affinity and anti affinity rules
func (Compute) AffinityRuleAdd ¶
AffinityRuleAdd add affinity rule
func (Compute) AffinityRuleRemove ¶
func (c Compute) AffinityRuleRemove(ctx context.Context, req AffinityRuleRemoveRequest) (bool, error)
AffinityRuleRemove remove affinity rule
func (Compute) AffinityRulesClear ¶
func (c Compute) AffinityRulesClear(ctx context.Context, req AffinityRulesClearRequest) (bool, error)
AffinityRulesClear clear affinity rules
func (Compute) AntiAffinityRuleAdd ¶
func (c Compute) AntiAffinityRuleAdd(ctx context.Context, req AntiAffinityRuleAddRequest) (bool, error)
AntiAffinityRuleAdd add anti affinity rule
func (Compute) AntiAffinityRuleRemove ¶
func (c Compute) AntiAffinityRuleRemove(ctx context.Context, req AntiAffinityRuleRemoveRequest) (bool, error)
AntiAffinityRuleRemove remove anti affinity rule
func (Compute) AntiAffinityRulesClear ¶
func (c Compute) AntiAffinityRulesClear(ctx context.Context, req AntiAffinityRulesClearRequest) (bool, error)
AntiAffinityRulesClear clear anti affinity rules
func (Compute) AttachPCIDevice ¶
AttachPCIDevice attach PCI device
func (Compute) Audits ¶
func (c Compute) Audits(ctx context.Context, req AuditsRequest) (ListAudits, error)
Audits gets audit records for the specified compute object
func (Compute) BootOrderGet ¶ added in v1.4.0
BootOrderGet gets actual compute boot order information
func (Compute) BootOrderSet ¶ added in v1.4.0
BootOrderSet sets compute boot order
func (Compute) ChangeLinkState ¶ added in v1.4.0
ChangeLinkState changes the status link virtual of compute
func (Compute) CreateTemplate ¶
CreateTemplate create template from compute instance
func (Compute) CreateTemplateAsync ¶
func (c Compute) CreateTemplateAsync(ctx context.Context, req CreateTemplateRequest) (string, error)
CreateTemplateAsync create template from compute instance
func (Compute) DetachGPU ¶
DetachGPU detach vgpu for compute. If param vgpuid is equivalent -1, then detach all vgpu for compute
func (Compute) DetachPCIDevice ¶
DetachPCIDevice detach PCI device
func (Compute) DiskAttach ¶
DiskAttach attach disk to compute
func (Compute) DiskDetach ¶
DiskDetach detach disk from compute
func (Compute) DiskResize ¶
DiskResize change disk size
func (Compute) Get ¶
func (c Compute) Get(ctx context.Context, req GetRequest) (*RecordCompute, error)
Get Gets information about compute
func (Compute) GetAudits ¶
func (c Compute) GetAudits(ctx context.Context, req GetAuditsRequest) (ListShortAudits, error)
GetAudits gets compute audits
func (Compute) GetConsoleURL ¶
GetConsoleURL gets computes console URL
func (Compute) List ¶
func (c Compute) List(ctx context.Context, req ListRequest) (*ListComputes, error)
List gets list of the available computes. Filtering based on status is possible
func (Compute) ListDeleted ¶
func (c Compute) ListDeleted(ctx context.Context, req ListDeletedRequest) (*ListComputes, error)
ListDeleted gets list all deleted computes
func (Compute) ListPCIDevice ¶
func (c Compute) ListPCIDevice(ctx context.Context, req ListPCIDeviceRequest) (*ListPCIDevices, error)
ListPCIDevice gets list PCI device
func (Compute) NetAttach ¶
func (c Compute) NetAttach(ctx context.Context, req NetAttachRequest) (*RecordNetAttach, error)
NetAttach attach network to compute and gets info about network
func (Compute) PinToStack ¶
PinToStack pin compute to current stack
func (Compute) PowerCycle ¶
PowerCycle makes force stop and start compute
func (Compute) SnapshotCreate ¶
SnapshotCreate create compute snapshot
func (Compute) SnapshotDelete ¶
SnapshotDelete delete specified compute snapshot
func (Compute) SnapshotList ¶
func (c Compute) SnapshotList(ctx context.Context, req SnapshotListRequest) (ListSnapShots, error)
SnapshotList gets list compute snapshots
func (Compute) SnapshotRollback ¶
SnapshotRollback rollback specified compute snapshot
func (Compute) SnapshotUsage ¶
func (c Compute) SnapshotUsage(ctx context.Context, req SnapshotUsageRequest) (ListUsageSnapshots, error)
SnapshotUsage Get compute snapshot real size on storage. Always returns list of json objects, and first json object contains summary about all related snapshots.
func (Compute) UnpinFromStack ¶
UnpinFromStack unpin compute from current stack
func (Compute) UserRevoke ¶
UserRevoke revokes user access to the compute
func (Compute) UserUpdate ¶
UserUpdate updates user access to the compute
type CreateTemplateRequest ¶
type CreateTemplateRequest struct { // ID of the compute to create template from // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Name to assign to the template being created // Required: true Name string `url:"name" json:"name" validate:"required"` }
Request struct for create template
type DeleteRequest ¶
type DeleteRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Delete permanently // Required: false Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` // Set True if you want to detach data disks (if any) from the compute before its deletion // Required: false DetachDisks bool `url:"detachDisks,omitempty" json:"detachDisks,omitempty"` }
Request struct for delete compute
type DetachGPURequest ¶
type DetachGPURequest struct { // Identifier compute // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Identifier virtual GPU // Required: false VGPUID int64 `url:"vgpuId,omitempty" json:"vgpuId,omitempty"` }
Request struct for detach vgpu for compute
type DetachPCIDeviceRequest ¶
type DetachPCIDeviceRequest struct { // Identifier compute // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Pci device ID // Required: true DeviceID uint64 `url:"deviceId" json:"deviceId" validate:"required"` }
Request struct for detach PCI device
type DisableRequest ¶
type DisableRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for disable compute
type DiskAddRequest ¶
type DiskAddRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Name for disk // Required: true DiskName string `url:"diskName" json:"diskName" validate:"required"` // Disk size in GB // Required: true Size uint64 `url:"size" json:"size" validate:"required"` // Storage endpoint provider ID // By default the same with boot disk // Required: false SepID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"` // Type of the disk // Should be one of: // - D // - B // Required: false DiskType string `url:"diskType,omitempty" json:"diskType,omitempty" validate:"omitempty,computeDiskType"` // Pool name // By default will be chosen automatically // Required: false Pool string `url:"pool,omitempty" json:"pool,omitempty"` // Optional description // Required: false Description string `url:"desc,omitempty" json:"desc,omitempty"` // Specify image id for create disk from template // Required: false ImageID uint64 `url:"imageId,omitempty" json:"imageId,omitempty"` }
Request struct for create and attach disk to compute
type DiskAttachRequest ¶
type DiskAttachRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // ID of the disk to attach // Required: true DiskID uint64 `url:"diskId" json:"diskId" validate:"required"` // Type of the disk B;D // Required: false DiskType string `url:"diskType,omitempty" json:"diskType,omitempty" validate:"omitempty,computeDiskType"` }
Request struct for attach disk to compute
type DiskDelRequest ¶
type DiskDelRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // ID of disk instance // Required: true DiskID uint64 `url:"diskId" json:"diskId" validate:"required"` // False if disk is to be deleted to recycle bin // Required: true Permanently bool `url:"permanently" json:"permanently" validate:"required"` }
Request struct for detach and delete disk from compute
type DiskDetachRequest ¶
type DiskDetachRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // ID of the disk to detach // Required: true DiskID uint64 `url:"diskId" json:"diskId" validate:"required"` }
Request struct for detach disk from compute
type DiskQOSRequest ¶
type DiskQOSRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // ID of the disk to apply limits // Required: true DiskID uint64 `url:"diskId" json:"diskId" validate:"required"` // Limit IO for a certain disk total and read/write options are not allowed to be combined // Required: true Limits string `url:"limits" json:"limits" validate:"required"` }
Request struct for change QoS of the disk
type DiskResizeRequest ¶
type DiskResizeRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // ID of the disk to resize // Required: true DiskID uint64 `url:"diskId" json:"diskId" validate:"required"` // New disk size // Required: true Size uint64 `url:"size" json:"size" validate:"required"` }
Request struct for change disk size
type EnableRequest ¶
type EnableRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for enable compute
type GetAuditsRequest ¶
type GetAuditsRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for get compute audits
type GetConsoleURLRequest ¶
type GetConsoleURLRequest struct { // ID of compute instance to get console for // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for get console URL
type GetLogRequest ¶
type GetLogRequest struct { // ID of compute instance to get log for // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Path to log file // Required: true Path string `url:"path" json:"path" validate:"required"` }
Request struct for get compute logs
type GetRequest ¶
type GetRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request for get information about compute
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 ItemACL ¶
type ItemACL struct { // Explicit Explicit Explicit `json:"explicit"` // GUID GUID string `json:"guid"` // Right Right string `json:"right"` // Status Status string `json:"status"` // Type Type string `json:"type"` // User group ID UserGroupID string `json:"userGroupId"` }
ACL information
type ItemAudit ¶
type ItemAudit struct { // Call Call string `json:"call"` // Response time ResponseTime float64 `json:"responsetime"` // Status code StatusCode uint64 `json:"statuscode"` // Timestamp Timestamp float64 `json:"timestamp"` // User User string `json:"user"` }
Detailed information about audit
type ItemCompute ¶
type ItemCompute struct { // Access Control List ACL ListACL `json:"acl"` // Account ID AccountID uint64 `json:"accountId"` // Account name AccountName string `json:"accountName"` // Affinity label AffinityLabel string `json:"affinityLabel"` // List affinity rules AffinityRules ListRules `json:"affinityRules"` // Affinity weight AffinityWeight uint64 `json:"affinityWeight"` // List anti affinity rules AntiAffinityRules ListRules `json:"antiAffinityRules"` // Architecture Architecture string `json:"arch"` // Boot order BootOrder []string `json:"bootOrder"` // Boot disk size BootDiskSize uint64 `json:"bootdiskSize"` // Clone reference CloneReference uint64 `json:"cloneReference"` // List clone IDs Clones []uint64 `json:"clones"` // Compute CI ID ComputeCIID uint64 `json:"computeciId"` // Number of cores CPU uint64 `json:"cpus"` // Created by CreatedBy string `json:"createdBy"` // Created time CreatedTime uint64 `json:"createdTime"` // Custom fields list CustomFields map[string]interface{} `json:"customFields"` // Deleted by DeletedBy string `json:"deletedBy"` // Deleted time DeletedTime uint64 `json:"deletedTime"` // Description Description string `json:"desc"` // Devices Devices interface{} `json:"devices"` // List disk items Disks []InfoDisk `json:"disks"` // Driver Driver string `json:"driver"` // Grid ID GID uint64 `json:"gid"` // GUID GUID uint64 `json:"guid"` // ID ID uint64 `json:"id"` // Image ID ImageID uint64 `json:"imageId"` // List interfaces Interfaces ListInterfaces `json:"interfaces"` // Lock status LockStatus string `json:"lockStatus"` // Manager ID ManagerID uint64 `json:"managerId"` // Manager type ManagerType string `json:"managerType"` // Migration job MigrationJob uint64 `json:"migrationjob"` // Milestones Milestones uint64 `json:"milestones"` // Name Name string `json:"name"` // Pinned or not Pinned bool `json:"pinned"` // Number of RAM RAM uint64 `json:"ram"` // Reference ID ReferenceID string `json:"referenceId"` // Registered Registered bool `json:"registered"` // Resource name ResName string `json:"resName"` // Resource group ID RGID uint64 `json:"rgId"` // Resource group name RGName string `json:"rgName"` // List snapsets SnapSets ListSnapSets `json:"snapSets"` // Stateless SepID StatelessSepID uint64 `json:"statelessSepId"` // Stateless SepType StatelessSepType string `json:"statelessSepType"` // Status Status string `json:"status"` // Tags Tags map[string]string `json:"tags"` // Tech status TechStatus string `json:"techStatus"` // Total disk size TotalDiskSize uint64 `json:"totalDisksSize"` // Updated by UpdatedBy string `json:"updatedBy"` // Updated time UpdatedTime uint64 `json:"updatedTime"` // User Managed or not UserManaged bool `json:"userManaged"` // List vGPU IDs VGPUs []uint64 `json:"vgpus"` // VINS connected VINSConnected uint64 `json:"vinsConnected"` // Virtual image ID VirtualImageID uint64 `json:"virtualImageId"` }
Main information about compute
func (ItemCompute) Serialize ¶
func (ic ItemCompute) 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 ItemComputeDisk ¶
type ItemComputeDisk struct { // CKey CKey string `json:"_ckey"` // Access Control List ACL map[string]interface{} `json:"acl"` // Account ID AccountID uint64 `json:"accountId"` // 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"` // List image IDs Images []uint64 `json:"images"` // IO tune 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 Passwd string `json:"passwd"` // PCI slot PCISlot int64 `json:"pciSlot"` // Pool Pool string `json:"pool"` // Present to PresentTo []uint64 `json:"presentTo"` // Purge time PurgeTime uint64 `json:"purgeTime"` // Reality device number RealityDeviceNumber uint64 `json:"realityDeviceNumber"` // Resource ID ResID string `json:"resId"` // Role Role string `json:"role"` // SepID SepID uint64 `json:"sepId"` Shareable bool `json:"shareable"` // Size max SizeMax uint64 `json:"sizeMax"` //Size used SizeUsed float64 `json:"sizeUsed"` // List extend snapshots Snapshots SnapshotExtendList `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 compute disk
type ItemOSUser ¶
type ItemOSUser struct { // GUID GUID string `json:"guid"` // Login Login string `json:"login"` // Password Password string `json:"password"` // Public key PubKey string `json:"pubkey"` }
Main information about OS user
type ItemPFW ¶
type ItemPFW struct { // ID ID uint64 `json:"id"` // Local IP LocalIP string `json:"localIp"` // Local port LocalPort uint64 `json:"localPort"` // Protocol Protocol string `json:"protocol"` // Public port end PublicPortEnd uint64 `json:"publicPortEnd"` // Public port start PublicPortStart uint64 `json:"publicPortStart"` // Virtuel machine ID VMID uint64 `json:"vmId"` }
Main information about port forward
type ItemRule ¶
type ItemRule struct { // GUID GUID string `json:"guid"` // Key Key string `json:"key"` // Mode Mode string `json:"mode"` // Policy Policy string `json:"policy"` // Topology Topology string `json:"topology"` // Value Value string `json:"value"` }
Main information about rule
type ItemShortAudit ¶
type ItemShortAudit struct { // Epoch Epoch float64 `json:"epoch"` // Message Message string `json:"message"` }
Short information about audit
type ItemSnapSet ¶
type ItemSnapSet struct { // List disk IDs Disks []uint64 `json:"disks"` // GUID GUID string `json:"guid"` // Label Label string `json:"label"` // Timestamp Timestamp uint64 `json:"timestamp"` }
Main information about snapsets
type ItemSnapshot ¶
type ItemSnapshot struct { // List disk ID Disks []uint64 `json:"disks"` // GUID GUID string `json:"guid"` // Label Label string `json:"label"` // Timestamp Timestamp uint64 `json:"timestamp"` }
Main information about snapshot
type ItemUsageSnapshot ¶
type ItemUsageSnapshot struct { // Count Count uint64 `json:"count,omitempty"` // Stored Stored float64 `json:"stored"` // Label Label string `json:"label,omitempty"` // Timestamp Timestamp uint64 `json:"timestamp,omitempty"` }
Main information about usage snapshot
type ItemVNFInterface ¶
type ItemVNFInterface struct { // Connection ID ConnID uint64 `json:"connId"` // Connection type ConnType string `json:"connType"` // Default GW DefGW string `json:"defGw"` // Enabled Enabled bool `json:"enabled"` // FLIPGroup ID FLIPGroupID uint64 `json:"flipgroupId"` // GUID GUID string `json:"guid"` // IP address IPAddress string `json:"ipAddress"` // Listen SSH or not ListenSSH bool `json:"listenSsh"` // MAC MAC string `json:"mac"` // Name Name string `json:"name"` // Network ID NetID uint64 `json:"netId"` // Network mask NetMask uint64 `json:"netMask"` // Network type NetType string `json:"netType"` // PCI slot PCISlot int64 `json:"pciSlot"` // QOS QOS QOS `json:"qos"` // Target Target string `json:"target"` // Type Type string `json:"type"` // List VNF IDs VNFs []uint64 `json:"vnfs"` }
Main information about VNF
type ListComputes ¶
type ListComputes struct { // Data Data []ItemCompute `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List information about computes
func (ListComputes) FilterByDiskID ¶
func (lc ListComputes) FilterByDiskID(diskID uint64) ListComputes
FilterByDiskID returns ListComputes with specified DiskID.
func (ListComputes) FilterByID ¶
func (lc ListComputes) FilterByID(id uint64) ListComputes
FilterByID returns ListComputes with specified ID.
func (ListComputes) FilterByK8SID ¶ added in v1.3.0
func (lc ListComputes) FilterByK8SID(ctx context.Context, k8sID uint64, decortClient interfaces.Caller) (*ListComputes, error)
FilterByK8SID returns master and worker nodes (ListComputes) inside specified K8S cluster.
func (ListComputes) FilterByK8SMasters ¶ added in v1.3.0
func (lc ListComputes) FilterByK8SMasters() ListComputes
K8SMasters is used to filter master nodes. Best used after FilterByK8SID function.
func (ListComputes) FilterByK8SWorkers ¶ added in v1.3.0
func (lc ListComputes) FilterByK8SWorkers() ListComputes
K8SMasters is used to filter worker nodes. Best used after FilterByK8SID function.
func (ListComputes) FilterByLBID ¶ added in v1.3.0
func (lc ListComputes) FilterByLBID(ctx context.Context, lbID uint64, decortClient interfaces.Caller) (*ListComputes, error)
FilterByLBID returns ListComputes used by specified Load Balancer.
func (ListComputes) FilterByName ¶
func (lc ListComputes) FilterByName(name string) ListComputes
FilterByName returns ListComputes with specified Name.
func (ListComputes) FilterByStatus ¶
func (lc ListComputes) FilterByStatus(status string) ListComputes
FilterByStatus returns ListComputes with specified Status.
func (ListComputes) FilterByTechStatus ¶
func (lc ListComputes) FilterByTechStatus(techStatus string) ListComputes
FilterByTechStatus returns ListComputes with specified TechStatus.
func (ListComputes) FilterFunc ¶
func (lc ListComputes) FilterFunc(predicate func(ItemCompute) bool) ListComputes
FilterFunc allows filtering ListComputes based on a user-specified predicate.
func (ListComputes) FindOne ¶
func (lc ListComputes) FindOne() ItemCompute
FindOne returns first found ItemCompute If none was found, returns an empty struct.
func (ListComputes) Serialize ¶
func (lc ListComputes) 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 (ListComputes) SortByCPU ¶
func (lc ListComputes) SortByCPU(inverse bool) ListComputes
SortByCPU sorts ListComputes by the CPU core amount in ascending order.
If inverse param is set to true, the order is reversed.
func (ListComputes) SortByCreatedTime ¶
func (lc ListComputes) SortByCreatedTime(inverse bool) ListComputes
SortByCreatedTime sorts ListComputes by the CreatedTime field in ascending order.
If inverse param is set to true, the order is reversed.
func (ListComputes) SortByDeletedTime ¶
func (lc ListComputes) SortByDeletedTime(inverse bool) ListComputes
SortByDeletedTime sorts ListComputes by the DeletedTime field in ascending order.
If inverse param is set to true, the order is reversed.
func (ListComputes) SortByRAM ¶
func (lc ListComputes) SortByRAM(inverse bool) ListComputes
SortByRAM sorts ListComputes by the RAM amount in ascending order.
If inverse param is set to true, the order is reversed.
func (ListComputes) SortByUpdatedTime ¶
func (lc ListComputes) SortByUpdatedTime(inverse bool) ListComputes
SortByUpdatedTime sorts ListComputes by the UpdatedTime field in ascending order.
If inverse param is set to true, the order is reversed.
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 ID // Required: false AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Find by resource group name // Required: false RGName string `url:"rgName,omitempty" json:"rgName,omitempty"` // Find by resource group ID // Required: false RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"` // Find by tech status // Required: false TechStatus string `url:"techStatus,omitempty" json:"techStatus,omitempty"` // Find by IP address // Required: false IPAddress string `url:"ipAddress,omitempty" json:"ipAddress,omitempty"` // Find by external network name // Required: false ExtNetName string `url:"extNetName,omitempty" json:"extNetName,omitempty"` // Find by external network ID // Required: false ExtNetID uint64 `url:"extNetId,omitempty" json:"extNetId,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 deleted computes list
type ListPCIDeviceRequest ¶
type ListPCIDeviceRequest struct { // Identifier compute // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Find by resource group ID // Required: false RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"` // Find by device id // Required: false DevID uint64 `url:"devId,omitempty" json:"devId,omitempty"` // Find by type // Required: false Type string `url:"type,omitempty" json:"type,omitempty"` // Find by status // Required: false Status string `url:"status,omitempty" json:"status,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 PCI devices
type ListPCIDevices ¶ added in v1.5.0
type ListPCIDevices struct { // Data Data []interface{} `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List PCI devices
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 ID // Required: false AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Find by resource group name // Required: false RGName string `url:"rgName,omitempty" json:"rgName,omitempty"` // Find by resource group ID // Required: false RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"` // Find by tech status // Required: false TechStatus string `url:"techStatus,omitempty" json:"techStatus,omitempty"` // Find by status // Required: false Status string `url:"status,omitempty" json:"status,omitempty"` // Find by IP address // Required: false IPAddress string `url:"ipAddress,omitempty" json:"ipAddress,omitempty"` // Find by external network name // Required: false ExtNetName string `url:"extNetName,omitempty" json:"extNetName,omitempty"` // Find by external network ID // Required: false ExtNetID uint64 `url:"extNetId,omitempty" json:"extNetId,omitempty"` // Include deleted computes // Required: false IncludeDeleted bool `url:"includedeleted,omitempty" json:"includedeleted,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 available computes
type ListVGPURequest ¶
type ListVGPURequest struct { // Identifier compute // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Find by GPU id // Required: false GPUID uint64 `url:"gpuId,omitempty" json:"gpuId,omitempty"` // Find by type // Required: false Type string `url:"type,omitempty" json:"type,omitempty"` // Find by status // Required: false Status string `url:"status,omitempty" json:"status,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"` // Include deleted computes. If using field 'status', then includedeleted will be ignored // Required: false IncludeDeleted bool `url:"includedeleted,omitempty" json:"includedeleted,omitempty"` }
Request struct for get list vGPU
type ListVGPUs ¶ added in v1.5.0
type ListVGPUs struct { // Data Data []interface{} `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List VGPUs
type MoveToRGRequest ¶
type MoveToRGRequest struct { // ID of the compute instance to move // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // ID of the target resource group // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // New name for the compute upon successful move, // if name change required. // Pass empty string if no name change necessary // Required: false Name string `url:"name,omitempty" json:"name,omitempty"` // Should the compute be restarted upon successful move // Required: false Autostart bool `url:"autostart,omitempty" json:"autostart,omitempty"` // By default moving compute in a running state is not allowed. // Set this flag to True to force stop running compute instance prior to move. // Required: false ForceStop bool `url:"forceStop,omitempty" json:"forceStop,omitempty"` }
Request struct for move compute new resource group
type NetAttachRequest ¶
type NetAttachRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Network type // 'EXTNET' for connect to external network directly // and 'VINS' for connect to ViNS // Required: true NetType string `url:"netType" json:"netType" validate:"computeNetType"` // Network ID for connect to // For EXTNET - external network ID // For VINS - VINS ID // Required: true NetID uint64 `url:"netId" json:"netId" validate:"required"` // Directly required IP address for new network interface // Required: false IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` }
Request struct for attach network
type NetDetachRequest ¶
type NetDetachRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // IP of the network interface // Required: false IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // MAC of the network interface // Required: false MAC string `url:"mac,omitempty" json:"mac,omitempty"` }
Request struct for detach networ to compute
type PFWAddRequest ¶
type PFWAddRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // External start port number for the rule // Required: true PublicPortStart uint64 `url:"publicPortStart" json:"publicPortStart" validate:"required"` // End port number (inclusive) for the ranged rule // Default value: -1 // Required: false PublicPortEnd int64 `url:"publicPortEnd,omitempty" json:"publicPortEnd,omitempty"` // Internal base port number // Required: true LocalBasePort uint64 `url:"localBasePort" json:"localBasePort" validate:"required"` // Network protocol // either "tcp" or "udp" // Required: true Proto string `url:"proto" json:"proto" validate:"proto"` }
Request struct for add port forward rule
type PFWDelRequest ¶
type PFWDelRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // ID of the rule to delete. If specified, all other arguments will be ignored // Required: false PFWID uint64 `url:"ruleId,omitempty" json:"ruleId,omitempty"` // External start port number for the rule // Required: false PublicPortStart uint64 `url:"publicPortStart,omitempty" json:"publicPortStart,omitempty"` // End port number (inclusive) for the ranged rule // Required: false PublicPortEnd uint64 `url:"publicPortEnd,omitempty" json:"publicPortEnd,omitempty"` // Internal base port number // Required: false LocalBasePort uint64 `url:"localBasePort,omitempty" json:"localBasePort,omitempty"` // Network protocol // either "tcp" or "udp" // Required: false Proto string `url:"proto,omitempty" json:"proto,omitempty"` }
Request struct for delete port forward rule
type PFWListRequest ¶
type PFWListRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for get list port forwards
type PauseRequest ¶
type PauseRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for pause compute
type PinToStackRequest ¶
type PinToStackRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for pin comptute to stack
type PowerCycleRequest ¶
type PowerCycleRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for force stop and start compute
type RebootRequest ¶
type RebootRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for reboot compute
type RecordACL ¶
type RecordACL struct { // Account ACL list AccountACL ListACL `json:"accountAcl"` // Compute ACL list ComputeACL ListACL `json:"computeAcl"` // Resource group ACL list RGACL ListACL `json:"rgAcl"` }
Access Control List
type RecordAffinityRelations ¶
type RecordAffinityRelations struct { // Other node OtherNode []interface{} `json:"otherNode"` // Other node indirect OtherNodeIndirect []interface{} `json:"otherNodeIndirect"` // Other node indirect soft OtherNodeIndirectSoft []interface{} `json:"otherNodeIndirectSoft"` // Other node soft OtherNodeSoft []interface{} `json:"otherNodeSoft"` // Same node SameNode []interface{} `json:"sameNode"` // Same node soft SameNodeSoft []interface{} `json:"sameNodeSoft"` }
Main information about affinity relations
type RecordCompute ¶
type RecordCompute struct { // Access Control List ACL RecordACL `json:"ACL"` // Account ID AccountID uint64 `json:"accountId"` // Account name AccountName string `json:"accountName"` // Affinity label AffinityLabel string `json:"affinityLabel"` // List affinity rules AffinityRules ListRules `json:"affinityRules"` // Affinity weight AffinityWeight uint64 `json:"affinityWeight"` // List anti affinity rules AntiAffinityRules ListRules `json:"antiAffinityRules"` // Architecture Architecture string `json:"arch"` // Boot order BootOrder []string `json:"bootOrder"` // Boot disk size BootDiskSize uint64 `json:"bootdiskSize"` // Clone reference CloneReference uint64 `json:"cloneReference"` // List clone IDs Clones []uint64 `json:"clones"` // Compute CI ID ComputeCIID uint64 `json:"computeciId"` // Number of cores CPU uint64 `json:"cpus"` // Created by CreatedBy string `json:"createdBy"` // Created time CreatedTime uint64 `json:"createdTime"` // Custom fields items CustomFields map[string]interface{} `json:"customFields"` // Deleted by DeletedBy string `json:"deletedBy"` // Deleted time DeletedTime uint64 `json:"deletedTime"` // Description Description string `json:"desc"` // Devices Devices interface{} `json:"devices"` // List disks in compute Disks ListComputeDisks `json:"disks"` // Driver Driver string `json:"driver"` // Grid ID GID uint64 `json:"gid"` // GUID GUID uint64 `json:"guid"` // ID ID uint64 `json:"id"` // Image ID ImageID uint64 `json:"imageId"` // Image name ImageName string `json:"imageName"` // List interfaces Interfaces ListInterfaces `json:"interfaces"` // Lock status LockStatus string `json:"lockStatus"` // Manager ID ManagerID uint64 `json:"managerId"` // Manager type ManagerType string `json:"managerType"` // Migration job MigrationJob uint64 `json:"migrationjob"` // Milestones Milestones uint64 `json:"milestones"` // Name Name string `json:"name"` // Natable VINS ID NatableVINSID uint64 `json:"natableVinsId"` // Natable VINS IP NatableVINSIP string `json:"natableVinsIp"` // Natable VINS Name NatableVINSName string `json:"natableVinsName"` // Natable VINS network NatableVINSNetwork string `json:"natableVinsNetwork"` // Natable VINS network name NatableVINSNetworkName string `json:"natableVinsNetworkName"` // List OS Users OSUsers ListOSUser `json:"osUsers"` // Pinned or not Pinned bool `json:"pinned"` // Number of RAM RAM uint64 `json:"ram"` // Reference ID ReferenceID string `json:"referenceId"` // Registered or not Registered bool `json:"registered"` // Resource name ResName string `json:"resName"` // Resource group ID RGID uint64 `json:"rgId"` // Resource group name RGName string `json:"rgName"` // List snapsets SnapSets ListSnapSets `json:"snapSets"` // Stateless SepID StatelessSepID uint64 `json:"statelessSepId"` // Stateless SepType StatelessSepType string `json:"statelessSepType"` // Status Status string `json:"status"` // Tags Tags map[string]string `json:"tags"` // Tech status TechStatus string `json:"techStatus"` // Updated by UpdatedBy string `json:"updatedBy"` // Updated time UpdatedTime uint64 `json:"updatedTime"` // User Managed or not UserManaged bool `json:"userManaged"` // Userdata Userdata interface{} `json:"userdata"` // vGPU IDs VGPUs []uint64 `json:"vgpus"` // Virtual image ID VirtualImageID uint64 `json:"virtualImageId"` // Virtual image name VirtualImageName string `json:"virtualImageName"` }
Detailed information about compute
type RecordNetAttach ¶
type RecordNetAttach struct { // Connection ID ConnID uint64 `json:"connId"` // Connection type ConnType string `json:"connType"` // Default GW DefGW string `json:"defGw"` // Enabled Enabled bool `json:"enabled"` // FLIPGroup ID FLIPGroupID uint64 `json:"flipgroupId"` // GUID GUID string `json:"guid"` // IP address IPAddress string `json:"ipAddress"` // Listen SSH ListenSSH bool `json:"listenSsh"` // MAC MAC string `json:"mac"` // Name Name string `json:"name"` // Network ID NetID uint64 `json:"netId"` // Network mask NetMask uint64 `json:"netMask"` // Network type NetType string `json:"netType"` // PCI slot PCISlot int64 `json:"pciSlot"` // QOS QOS QOS `json:"qos"` // Target Target string `json:"target"` // Type Type string `json:"type"` // List VNF IDs VNFs []uint64 `json:"vnfs"` }
Main information about attached network
type RedeployRequest ¶
type RedeployRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // ID of the new OS image, if image change is required // Required: false ImageID uint64 `url:"imageId,omitempty" json:"imageId,omitempty"` // new size for the boot disk in GB, if boot disk size change is required // Required: false DiskSize uint64 `url:"diskSize,omitempty" json:"diskSize,omitempty"` // How to handle data disks connected to this compute instance, // KEEP, DETACH, DESTROY // Required: false DataDisks string `url:"dataDisks,omitempty" json:"dataDisks,omitempty"` // Should the compute be restarted upon successful redeploy // Required: false AutoStart bool `url:"autoStart,omitempty" json:"autoStart,omitempty"` // Set this flag to True to force stop running compute instance and redeploy next // Required: false ForceStop bool `url:"forceStop,omitempty" json:"forceStop,omitempty"` }
Request struct for redeploy
type ResetRequest ¶
type ResetRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for reset compute
type ResizeRequest ¶
type ResizeRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // New CPU count. // Pass 0 if no change to CPU count is required // Required: false CPU uint64 `url:"cpu,omitempty" json:"cpu,omitempty"` // New RAM volume in MB. // Pass 0 if no change to RAM volume is required // Required: false RAM uint64 `url:"ram,omitempty" json:"ram,omitempty"` // Force compute resize // Required: false Force bool `url:"force,omitempty" json:"force,omitempty"` }
Request struct for resize compute
type RestoreRequest ¶
type RestoreRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for restore compute
type ResumeRequest ¶
type ResumeRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for resume compute
type SnapshotCreateRequest ¶
type SnapshotCreateRequest struct { // ID of the compute instance to create snapshot for // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Text label for snapshot. // Must be unique among this compute snapshots // Required: true Label string `url:"label" json:"label" validate:"required"` }
Request struct for create snapshot
type SnapshotDeleteRequest ¶
type SnapshotDeleteRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Text label of snapshot to delete // Required: true Label string `url:"label" json:"label" validate:"required"` }
Request struct for delete snapshot
type SnapshotExtend ¶
type SnapshotExtend struct { // GUID GUID string `json:"guid"` // Label Label string `json:"label"` // Reference ID ReferenceID string `json:"referenceId"` // 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 extend
type SnapshotListRequest ¶
type SnapshotListRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for get list snapshots
type SnapshotRollbackRequest ¶
type SnapshotRollbackRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Text label of snapshot to rollback // Required: true Label string `url:"label" json:"label" validate:"required"` }
Request struct for rollback
type SnapshotUsageRequest ¶
type SnapshotUsageRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Specify to show usage exact for this snapshot. // Leave empty for get usage for all compute snapshots // Required: false Label string `url:"label,omitempty" json:"label,omitempty"` }
Request struct for get compute snapshot real size on storage
type StartRequest ¶
type StartRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // ID of CD-ROM live image to boot // Required: false AltBootID uint64 `url:"altBootId,omitempty" json:"altBootId,omitempty"` }
Request struct for start compute
type StopRequest ¶
type StopRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Force stop compute // Required: false Force bool `url:"force,omitempty" json:"force,omitempty"` }
Request struct for stop compute
type TagAddRequest ¶
type TagAddRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Tag key // Required: true Key string `url:"key" json:"key" validate:"required"` // Tag value // Required: true Value string `url:"value" json:"value" validate:"required"` }
Request struct for add tag to compute
type TagRemoveRequest ¶
type TagRemoveRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Tag key // Required: true Key string `url:"key" json:"key" validate:"required"` }
Request struct for remove tag from compute
type UnpinFromStackRequest ¶
type UnpinFromStackRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for unpin from stack
type UpdateRequest ¶
type UpdateRequest struct { // ID of the compute // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // New name // Required: false Name string `url:"name,omitempty" json:"name,omitempty"` // New description // Required: false Description string `url:"desc,omitempty" json:"desc,omitempty"` }
Request struct for update compute
type UserGrantRequest ¶
type UserGrantRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Name of the user to add // Required: true Username string `url:"userName" json:"userName" validate:"required"` // Access type // Should be one of: // - 'R' for Read only // - 'RCX' for Write // - 'ARCXDU' for Admin // Required: true AccessType string `url:"accesstype" json:"accesstype" validate:"accessType"` }
Request struct for grant access to compute
type UserListRequest ¶
type UserListRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
Request struct for get list users for compute
type UserRevokeRequest ¶
type UserRevokeRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Name of the user to remove // Required: true Username string `url:"userName" json:"userName" validate:"required"` }
Request struct for revoke user access
type UserUpdateRequest ¶
type UserUpdateRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Name of the user to update // Required: true Username string `url:"userName" json:"userName" validate:"required"` // Access type // Should be one of: // - 'R' for Read only // - 'RCX' for Write // - 'ARCXDU' for Admin // Required: true AccessType string `url:"accesstype" json:"accesstype" validate:"accessType"` }
Request struct for update user access
Source Files
¶
- affinity_group_check_start.go
- affinity_label_remove.go
- affinity_label_set.go
- affinity_relations.go
- affinity_rule_add.go
- affinity_rule_remove.go
- affinity_rules_clear.go
- anti_affinity_rule_add.go
- anti_affinity_rule_remove.go
- anti_affinity_rules_clear.go
- attach_gpu.go
- attach_pci_device.go
- audits.go
- boot_order_get.go
- boot_order_set.go
- cd_eject.go
- cd_insert.go
- change_link_state.go
- clone.go
- compute.go
- create_template.go
- delete.go
- detach_gpu.go
- detach_pci_device.go
- disable.go
- disk_add.go
- disk_attach.go
- disk_del.go
- disk_detach.go
- disk_qos.go
- disk_resize.go
- enable.go
- filter.go
- get.go
- get_audits.go
- get_console_url.go
- get_log.go
- list.go
- list_deleted.go
- list_pci_device.go
- list_vgpu.go
- models.go
- move_to_rg.go
- net_attach.go
- net_detach.go
- pause.go
- pfw_add.go
- pfw_del.go
- pfw_list.go
- pin_to_stack.go
- power_cycle.go
- reboot.go
- redeploy.go
- reset.go
- resize.go
- restore.go
- resume.go
- serialize.go
- snapshot_create.go
- snapshot_delete.go
- snapshot_list.go
- snapshot_rollback.go
- snapshot_usage.go
- sorting.go
- start.go
- stop.go
- tag_add.go
- tag_remove.go
- unpin_from_stack.go
- update.go
- user_grant.go
- user_list.go
- user_revoke.go
- user_update.go