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 BootDiskSetRequest
- 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) BootDiskSet(ctx context.Context, req BootDiskSetRequest) (bool, 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) CreateTemplateFromBlank(ctx context.Context, req CreateTemplateFromBlankRequest) (uint64, error)
- func (c Compute) CreateTemplateFromBlankAsync(ctx context.Context, req CreateTemplateFromBlankRequest) (string, error)
- func (c Compute) Delete(ctx context.Context, req DeleteRequest) (bool, error)
- func (c Compute) DeleteCustomFields(ctx context.Context, req DeleteCustomFieldsRequest) (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) DiskMigrate(ctx context.Context, req DiskMigrateRequest) (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) DiskSwitchToReplication(ctx context.Context, req DiskSwitchToReplicationRequest) (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) GetCustomFields(ctx context.Context, req GetCustomFieldsRequest) (interface{}, 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) GetRaw(ctx context.Context, req GetRequest) ([]byte, 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) ListRaw(ctx context.Context, req ListRequest) ([]byte, 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) SetCustomFields(ctx context.Context, req SetCustomFieldsRequest) (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) (*ListUsers, error)
- func (c Compute) UserRevoke(ctx context.Context, req UserRevokeRequest) (bool, error)
- func (c Compute) UserUpdate(ctx context.Context, req UserUpdateRequest) (bool, error)
- type CreateTemplateFromBlankRequest
- type CreateTemplateRequest
- type DeleteCustomFieldsRequest
- type DeleteRequest
- type DetachGPURequest
- type DetachPCIDeviceRequest
- type DisableRequest
- type DiskAddRequest
- type DiskAttachRequest
- type DiskDelRequest
- type DiskDetachRequest
- type DiskMigrateRequest
- type DiskQOSRequest
- type DiskResizeRequest
- type DiskSwitchToReplicationRequest
- type EnableRequest
- type Explicit
- type GetAuditsRequest
- type GetConsoleURLRequest
- type GetCustomFieldsRequest
- type GetLogRequest
- type GetRequest
- type IOTune
- type InfoDisk
- type ItemACL
- type ItemAudit
- type ItemCompute
- type ItemComputeDisk
- type ItemOSUser
- type ItemPCIDevice
- type ItemPFW
- type ItemRule
- type ItemShortAudit
- type ItemSnapSet
- type ItemSnapshot
- type ItemUsageSnapshot
- type ItemVGPU
- 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) IDs() []uint64
- 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 ListInfoDisks
- type ListInterfaces
- type ListOSUser
- type ListPCIDeviceRequest
- type ListPCIDevices
- type ListPFWs
- type ListRequest
- type ListRules
- type ListShortAudits
- type ListSnapSets
- type ListSnapShots
- type ListUsageSnapshots
- type ListUsers
- 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 SetCustomFieldsRequest
- 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"` }
AffinityGroupCheckStartRequest struct to 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"` }
AffinityLabelRemoveRequest struct to 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"` }
AffinityLabelSetRequest struct to 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"` }
AffinityRelationsRequest struct to 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: false // Not required on purpose: despite required tag on platform, empty string is allowed Value string `url:"value" json:"value"` }
AffinityRuleAddRequest struct to 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: false // Not required on purpose: despite required tag on platform, empty string is allowed Value string `url:"value" json:"value"` }
AffinityRuleRemoveRequest struct to remove affinity rule
type AffinityRulesClearRequest ¶
type AffinityRulesClearRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
AffinityRulesClearRequest struct to 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: false // Not required on purpose: despite required tag on platform, empty string is allowed Value string `url:"value" json:"value"` }
AntiAffinityRuleAddRequest struct to 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: false // Not required on purpose: despite required tag on platform, empty string is allowed Value string `url:"value" json:"value"` }
AntiAffinityRuleRemoveRequest struct to remove anti affinity rule
type AntiAffinityRulesClearRequest ¶
type AntiAffinityRulesClearRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
AntiAffinityRulesClearRequest struct to 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"` }
AttachGPURequest struct to 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"` }
AttachPCIDeviceRequest struct to attach PCI device
type AuditsRequest ¶
type AuditsRequest struct { // ID of the compute // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
AuditsRequest struct to get audit records
type BootDiskSetRequest ¶ added in v1.8.0
type BootDiskSetRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // ID of the disk to set as boot // Required: true DiskID uint64 `url:"diskId" json:"diskId" validate:"required"` }
BootDiskSetRequest struct to set boot disk for compute
type BootOrderGetRequest ¶ added in v1.4.0
type BootOrderGetRequest struct { // Compute ID // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
BootOrderGetRequest struct to get 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"` }
BootOrderSetRequest struct to set boot order
type CDEjectRequest ¶
type CDEjectRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
CDEjectRequest struct to 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"` }
CDInsertRequest struct to 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"` }
ChangeLinkStateRequest struct to change 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"` }
CloneRequest struct to 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) BootDiskSet ¶ added in v1.8.0
BootDiskSet sets boot disk for compute
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) CreateTemplateFromBlank ¶ added in v1.8.0
func (c Compute) CreateTemplateFromBlank(ctx context.Context, req CreateTemplateFromBlankRequest) (uint64, error)
CreateTemplateFromBlank creates template from boot disk of current compute in sync mode. It returns id of created compute and error.
func (Compute) CreateTemplateFromBlankAsync ¶ added in v1.8.0
func (c Compute) CreateTemplateFromBlankAsync(ctx context.Context, req CreateTemplateFromBlankRequest) (string, error)
CreateTemplateFromBlankAsync creates template from boot disk of current compute in async mode. It returns guid of task and error.
func (Compute) DeleteCustomFields ¶ added in v1.5.0
func (c Compute) DeleteCustomFields(ctx context.Context, req DeleteCustomFieldsRequest) (bool, error)
DeleteCustomFields deletes computes custom fields
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) DiskMigrate ¶ added in v1.8.0
DiskMigrate - migrate compute's disk to target disk. Source disk will be detached, target disk will be attached to the same PCI slot. (WARNING) Current realisation is limited. No actual data migration will be performed. Use this API if target disk already connected to compute and you only need to save changes for next reboot (mode: 1).
func (Compute) DiskResize ¶
DiskResize change disk size
func (Compute) DiskSwitchToReplication ¶ added in v1.8.0
func (c Compute) DiskSwitchToReplication(ctx context.Context, req DiskSwitchToReplicationRequest) (bool, error)
DiskSwitchToReplication switches disk to it's replication
func (Compute) Get ¶
func (c Compute) Get(ctx context.Context, req GetRequest) (*RecordCompute, error)
Get gets information about compute as a RecordCompute struct
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) GetCustomFields ¶ added in v1.5.0
func (c Compute) GetCustomFields(ctx context.Context, req GetCustomFieldsRequest) (interface{}, error)
GetCustomFields gets Compute's customFields
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 attaches 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) SetCustomFields ¶ added in v1.5.0
SetCustomFields sets customFields values for the Compute
func (Compute) SnapshotCreate ¶
SnapshotCreate create compute snapshot
func (Compute) SnapshotDelete ¶
SnapshotDelete deletes specified compute snapshot
func (Compute) SnapshotList ¶
func (c Compute) SnapshotList(ctx context.Context, req SnapshotListRequest) (*ListSnapShots, error)
SnapshotList gets list of compute snapshots
func (Compute) SnapshotRollback ¶
SnapshotRollback rollbacks specified compute snapshot
func (Compute) SnapshotUsage ¶
func (c Compute) SnapshotUsage(ctx context.Context, req SnapshotUsageRequest) (ListUsageSnapshots, error)
SnapshotUsage gets 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 unpins 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 CreateTemplateFromBlankRequest ¶ added in v1.8.0
type CreateTemplateFromBlankRequest struct { // ID of the compute to create template from // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Name of the rescue disk // Required: true Name string `url:"name" json:"name" validate:"required"` // Boot type of image BIOS or UEFI // Required: true BootType string `url:"boottype" json:"boottype" validate:"imageBootType"` // Image type linux, windows or other // Required: true ImageType string `url:"imagetype" json:"imagetype" validate:"imageType"` // Username for the image // Required: false Username string `url:"username,omitempty" json:"username,omitempty"` // Password for the image // Required: false Password string `url:"password,omitempty" json:"password,omitempty"` // Account ID to make the image exclusive // Required: false AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // SEP ID // Required: false SepID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"` // Pool for image create // Required: false PoolName string `url:"poolName,omitempty" json:"poolName,omitempty"` // Does this machine supports hot resize // Default: false // Required: false HotResize bool `url:"hotresize" json:"hotresize"` }
CreateTemplateFromBlankRequest struct to create template from boot disk of current 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"` }
CreateTemplateRequest struct to create template
type DeleteCustomFieldsRequest ¶ added in v1.5.0
type DeleteCustomFieldsRequest struct { // ID of the compute // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
DeleteCustomFieldsRequest struct to delete compute's custom fields
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"` }
DeleteRequest struct to 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"` }
DetachGPURequest struct to 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"` }
DetachPCIDeviceRequest struct to detach PCI device
type DisableRequest ¶
type DisableRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
DisableRequest struct to 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"` // Type of the disk // Should be one of: // - D // - B // Required: false DiskType string `url:"diskType,omitempty" json:"diskType,omitempty" validate:"omitempty,computeDiskType"` // Storage endpoint provider ID // By default the same with boot disk // Required: false SepID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"` // 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"` }
DiskAddRequest struct to 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"` }
DiskAttachRequest struct to 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"` }
DiskDelRequest struct to 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"` }
DiskDetachRequest struct to detach disk from compute
type DiskMigrateRequest ¶ added in v1.8.0
type DiskMigrateRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // ID source disk // Required: true DiskID uint64 `url:"diskId" json:"diskId" validate:"required"` // ID target disk // Required: true TargetDiskID uint64 `url:"targetDiskId" json:"targetDiskId" validate:"required"` // Migration mode. 1 - Data migration and domain update were already completed by third-party software. // Use this if target disk already connected to compute and you only need to save changes for next reboot. // Required: true Mode int64 `url:"mode" json:"mode" validate:"required"` }
DiskMigrateRequest struct to migrate compute's disk to target disk
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"` }
DiskQOSRequest struct to 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"` }
DiskResizeRequest struct to change disk size
type DiskSwitchToReplicationRequest ¶ added in v1.8.0
type DiskSwitchToReplicationRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // ID of the disk to switch // Required: true DiskID uint64 `url:"diskId" json:"diskId" validate:"required"` // Delete replication relationship // Required: false StopReplication bool `url:"stopReplication" json:"stopReplication"` }
DiskSwitchToReplicationRequest struct to switch disk to it's replication
type EnableRequest ¶
type EnableRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
EnableRequest struct to enable compute
type GetAuditsRequest ¶
type GetAuditsRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
GetAuditsRequest struct to 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"` }
GetConsoleURLRequest struct to get console URL
type GetCustomFieldsRequest ¶ added in v1.5.0
type GetCustomFieldsRequest struct { // Compute ID // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
GetCustomFieldsRequest struct to get Compute's customFields
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"` }
GetLogRequest struct to get compute logs
type GetRequest ¶
type GetRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
GetRequest struct to 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"` // cd Image Id CdImageId uint64 `json:"cdImageId"` // Clone reference CloneReference uint64 `json:"cloneReference"` // List clone IDs Clones []uint64 `json:"clones"` // Compute CI ID ComputeCIID uint64 `json:"computeciId"` // CPU Pin CPUPin bool `json:"cpupin"` // 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 ListInfoDisks `json:"disks"` // Driver Driver string `json:"driver"` // Grid ID GID uint64 `json:"gid"` // GUID GUID uint64 `json:"guid"` // HPBacked HPBacked bool `json:"hpBacked"` // 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"` // NeedReboot NeedReboot bool `json:"needReboot"` // Numa Affinity NumaAffinity string `json:"numaAffinity"` //NumaNodeId NumaNodeId int64 `json:"numaNodeId"` // 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 int64 `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"` // Replication Replication interface{} `json:"replication"` // 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 ItemPCIDevice ¶ added in v1.8.0
type ItemPCIDevice struct { // Compute ID ComputeID uint64 `json:"computeId"` // Description Description string `json:"description"` // GUID GUID uint64 `json:"guid"` // HwPath HwPath string `json:"hwPath"` // ID ID uint64 `json:"id"` // Name Name string `json:"name"` // Resource group ID RGID uint64 `json:"rgId"` // Stack ID StackID uint64 `json:"stackId"` // Status Status string `json:"status"` // System name SystemName string `json:"systemName"` }
Main information about PCI device
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 ItemVGPU ¶ added in v1.8.0
type ItemVGPU struct { // Account ID AccountID uint64 `json:"accountId"` // Created Time CreatedTime uint64 `json:"createdTime"` // Deleted Time DeletedTime uint64 `json:"deletedTime"` // GID GID uint64 `json:"gid"` // GUID GUID uint64 `json:"guid"` // ID ID uint64 `json:"id"` // Last Claimed By LastClaimedBy uint64 `json:"lastClaimedBy"` // Last Update Time LastUpdateTime uint64 `json:"lastUpdateTime"` // Mode Mode string `json:"mode"` // PCI Slot PCISlot uint64 `json:"pciSlot"` // PGPUID PGPUID uint64 `json:"pgpuid"` // Profile ID ProfileID uint64 `json:"profileId"` // RAM RAM uint64 `json:"ram"` // Reference ID ReferenceID string `json:"referenceId"` // RG ID RGID uint64 `json:"rgId"` // Status Status string `json:"status"` // Type Type string `json:"type"` // VM ID VMID uint64 `json:"vmid"` }
Main information about vgpu device
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"` // NodeID NodeID int64 `json:"nodeId"` // 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 ListComputeDisks ¶
type ListComputeDisks []ItemComputeDisk
List compute disks
func (ListComputeDisks) IDs ¶ added in v1.6.8
func (lcd ListComputeDisks) IDs() []uint64
IDs gets array of DiskIDs from ListComputeDisks struct
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) IDs ¶ added in v1.6.8
func (lc ListComputes) IDs() []uint64
IDs gets array of ComputeIDs from ListComputes 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"` // Sort by one of supported fields, format +|-(field) // Required: false SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"` // Page number // Required: false Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false Size uint64 `url:"size,omitempty" json:"size,omitempty"` }
ListDeletedRequest struct to get deleted computes list
type ListInfoDisks ¶ added in v1.6.8
type ListInfoDisks []InfoDisk
ListInfoDisks
func (ListInfoDisks) IDs ¶ added in v1.6.8
func (li ListInfoDisks) IDs() []uint64
IDs gets array of DiskIDs from ListInfoDisks struct
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 name // Required: false Name string `url:"name,omitempty" json:"name,omitempty"` // Find by status // Required: false Status string `url:"status,omitempty" json:"status,omitempty"` // Sort by one of supported fields, format +|-(field) // Required: false SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"` // Page number // Required: false Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false Size uint64 `url:"size,omitempty" json:"size,omitempty"` }
ListPCIDeviceRequest struct to get list of PCI devices
type ListPCIDevices ¶ added in v1.5.0
type ListPCIDevices struct { // Data Data []ItemPCIDevice `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List PCI devices
type ListPFWs ¶
type ListPFWs struct { // Data Data []ItemPFW `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List port forwards
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"` // Sort by one of supported fields, format +|-(field) // Required: false SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"` // Page number // Required: false Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false Size uint64 `url:"size,omitempty" json:"size,omitempty"` }
ListRequest struct to get list of available computes
type ListSnapShots ¶
type ListSnapShots struct { // Data Data []ItemSnapshot `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List of snapshots
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"` // Sort by one of supported fields, format +|-(field) // Required: false SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"` // 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"` }
ListVGPURequest struct to get vGPU list
type ListVGPUs ¶ added in v1.5.0
type ListVGPUs struct { // Data Data []ItemVGPU `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"` }
MoveToRGRequest struct to move compute to 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"` }
NetAttachRequest struct to 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"` }
NetDetachRequest struct to detach network from 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: false LocalBasePort uint64 `url:"localBasePort,omitempty" json:"localBasePort,omitempty"` // Network protocol // either "tcp" or "udp" // Required: true Proto string `url:"proto" json:"proto" validate:"proto"` }
PFWAddRequest struct to 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"` }
PFWDelRequest struct to delete port forward rule
type PFWListRequest ¶
type PFWListRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
PFWListRequest struct to get list of port forwards
type PauseRequest ¶
type PauseRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
PauseRequest struct to pause compute
type PinToStackRequest ¶
type PinToStackRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
PinToStackRequest struct to pin compute to stack
type PowerCycleRequest ¶
type PowerCycleRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
PowerCycleRequest struct to force stop and start compute
type RebootRequest ¶
type RebootRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
RebootRequest struct to 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"` // cd Image Id CdImageId uint64 `json:"cdImageId"` // Clone reference CloneReference uint64 `json:"cloneReference"` // List clone IDs Clones []uint64 `json:"clones"` // Compute CI ID ComputeCIID uint64 `json:"computeciId"` // CPU Pin CPUPin bool `json:"cpupin"` // 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"` // HPBacked HPBacked bool `json:"hpBacked"` // 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"` // NeedReboot NeedReboot bool `json:"needReboot"` // Numa Affinity NumaAffinity string `json:"numaAffinity"` //NumaNodeId NumaNodeId int64 `json:"numaNodeId"` // 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 int64 `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 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"` }
RedeployRequest struct to redeploy
type ResetRequest ¶
type ResetRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
ResetRequest struct to 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"` }
ResizeRequest struct to resize compute
func (ResizeRequest) GetRAM ¶ added in v1.8.0
func (r ResizeRequest) GetRAM() map[string]uint64
GetRAM returns RAM field values
type RestoreRequest ¶
type RestoreRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
RestoreRequest struct to restore compute
type ResumeRequest ¶
type ResumeRequest struct { // ID of compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
ResumeRequest struct to resume compute
type SetCustomFieldsRequest ¶ added in v1.5.0
type SetCustomFieldsRequest struct { // ID of the compute // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` // Custom fields for Compute. Must be dict. // Required: true CustomFields string `url:"customFields" json:"customFields" validate:"required"` }
SetCustomFieldsRequest struct to set customFields values for the 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"` }
SnapshotCreateRequest struct to 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"` }
SnapshotDeleteRequest struct to 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"` }
SnapshotListRequest struct to 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"` }
SnapshotRollbackRequest 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"` }
SnapshotUsageRequest struct to 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"` }
StartRequest struct to 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"` }
StopRequest struct to 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"` }
TagAddRequest struct to 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"` }
TagRemoveRequest struct to remove tag from compute
type UnpinFromStackRequest ¶
type UnpinFromStackRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
UnpinFromStackRequest 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"` }
UpdateRequest struct to 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"` }
UserGrantRequest struct to grant access to compute
type UserListRequest ¶
type UserListRequest struct { // ID of the compute instance // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` }
UserListRequest struct to get list of 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"` }
UserRevokeRequest struct to 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"` }
UserUpdateRequest struct to 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_disk_set.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
- create_template_from_blank.go
- delete.go
- delete_custom_fields.go
- detach_gpu.go
- detach_pci_device.go
- disable.go
- disk_add.go
- disk_attach.go
- disk_del.go
- disk_detach.go
- disk_migrate.go
- disk_qos.go
- disk_resize.go
- disk_switch_to_replication.go
- enable.go
- filter.go
- get.go
- get_audits.go
- get_console_url.go
- get_custom_fields.go
- get_log.go
- ids.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
- set_custom_fields.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