Documentation
¶
Overview ¶
API Actor for managing Compute. This actor is a final API for admin 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 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) (ListDetailedAudits, 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) Clone(ctx context.Context, req CloneRequest) (uint64, error)
- func (c Compute) ComputeCISet(ctx context.Context, req ComputeCISetRequest) (bool, error)
- func (c Compute) ComputeCIUnset(ctx context.Context, req ComputeCIUnsetRequest) (bool, 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) (ListAudits, 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) List(ctx context.Context, req ListRequest) (ListComputes, error)
- func (c Compute) ListDeleted(ctx context.Context, req ListDeletedRequest) (ListComputes, error)
- func (c Compute) ListGPU(ctx context.Context, req ListGPURequest) ([]interface{}, error)
- func (c Compute) ListPCIDevice(ctx context.Context, req ListPCIDeviceRequest) (ListPCIDevices, error)
- func (c Compute) MassDelete(ctx context.Context, req MassDeleteRequest) (bool, error)
- func (c Compute) MassReboot(ctx context.Context, req MassRebootRequest) (bool, error)
- func (c Compute) MassRepairBootFS(ctx context.Context, req MassRepairBootFSRequest) (bool, error)
- func (c Compute) MassStart(ctx context.Context, req MassStartRequest) (bool, error)
- func (c Compute) MassStop(ctx context.Context, req MassStopRequest) (bool, error)
- func (c Compute) Migrate(ctx context.Context, req MigrateRequest) (bool, error)
- func (c Compute) MigrateStorage(ctx context.Context, req MigrateStorageRequest) (string, error)
- func (c Compute) MigrateStorageAbort(ctx context.Context, req MigrateStorageAbortRequest) (string, error)
- func (c Compute) MigrateStorageCleanUp(ctx context.Context, req MigrateStorageCleanUpRequest) (string, error)
- func (c Compute) MigrateStorageInfo(ctx context.Context, req MigrateStorageInfoRequest) (string, 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) NetQOS(ctx context.Context, req NetQOSRequest) (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) (ListPFW, 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) RaiseDown(ctx context.Context) (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) Registration(ctx context.Context, req RegistrationRequest) (bool, error)
- func (c Compute) RepairBootFS(ctx context.Context, req RepairBootFSRequest) (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) (bool, 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) SnapshotEvictDisk(ctx context.Context, req SnapshotEvictDiskRequest) (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) (ListSnapshotUsage, 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)
- func (c Compute) Validate(ctx context.Context, req MoveToRGRequest) (bool, error)
- type ComputeCISetRequest
- type ComputeCIUnsetRequest
- 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 GetAuditsRequest
- type GetConsoleURLRequest
- type GetLogRequest
- type GetRequest
- type IOTune
- type InfoCompute
- type InfoDisk
- type ItemACL
- type ItemAudit
- type ItemCompute
- type ItemComputeACL
- type ItemDetailedAudit
- type ItemDisk
- type ItemInterface
- type ItemOSUser
- type ItemPCIDevice
- type ItemPFW
- type ItemRule
- type ItemSnapshot
- type ItemSnapshotDetailed
- type ItemSnapshotUsage
- type ListACL
- type ListAudits
- type ListComputes
- type ListDeletedRequest
- type ListDetailedAudits
- type ListDetailedSnapshots
- type ListDisks
- type ListGPURequest
- type ListInterfaces
- type ListOSUsers
- type ListPCIDeviceRequest
- type ListPCIDevices
- type ListPFW
- type ListRequest
- type ListRules
- type ListSnapshotUsage
- type ListSnapshots
- type MassDeleteRequest
- type MassRebootRequest
- type MassRepairBootFSRequest
- type MassStartRequest
- type MassStopRequest
- type MigrateRequest
- type MigrateStorageAbortRequest
- type MigrateStorageCleanUpRequest
- type MigrateStorageInfoRequest
- type MigrateStorageRequest
- type MoveToRGRequest
- type NetAttachRequest
- type NetDetachRequest
- type NetQOSRequest
- 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 RegistrationRequest
- type RepairBootFSRequest
- type ResetRequest
- type ResizeRequest
- type RestoreRequest
- type ResumeRequest
- type SnapshotCreateRequest
- type SnapshotDeleteRequest
- type SnapshotEvictDiskRequest
- 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"`
// Affinity group label
// Required: true
AffinityLabel string `url:"affinityLabel" json:"affinityLabel"`
}
Request struct for check all computes with current affinity label can start
type AffinityLabelRemoveRequest ¶
type AffinityLabelRemoveRequest struct {
// IDs of the compute instances
// Required: true
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
}
Request struct for clear affinity label for compute
type AffinityLabelSetRequest ¶
type AffinityLabelSetRequest struct {
// IDs of the compute instances
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Affinity group label
// Required: true
AffinityLabel string `url:"affinityLabel" json:"affinityLabel"`
}
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"`
// Affinity group label
// Required: false
AffinityLabel string `url:"affinityLabel,omitempty" json:"affinityLabel,omitempty"`
}
Request struct for get dict of computes
type AffinityRuleAddRequest ¶
type AffinityRuleAddRequest struct {
// IDs of the compute instances
// Required: true
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Should be one of:
// - node
// - compute
// Required: true
Topology string `url:"topology" json:"topology"`
// The degree of 'strictness' of this rule
// Should be one of:
// - RECOMMENDED
// - REQUIRED
// Required: true
Policy string `url:"policy" json:"policy"`
// 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"`
// Key that are taken into account when analyzing this rule will be identified
// Required: true
Key string `url:"key" json:"key"`
// Value that must match the key to be taken into account when analyzing this rule
// Required: true
Value string `url:"value" json:"value"`
}
Request struct for add affinity rule
type AffinityRuleRemoveRequest ¶
type AffinityRuleRemoveRequest struct {
// IDs of the compute instances
// Required: true
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Compute or node, for whom rule applies
// Required: true
Topology string `url:"topology" json:"topology"`
// The degree of 'strictness' of this rule
// Should be one of:
// - RECOMMENDED
// - REQUIRED
// Required: true
Policy string `url:"policy" json:"policy"`
// 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"`
// Key that are taken into account when analyzing this rule will be identified
// Required: true
Key string `url:"key" json:"key"`
// Value that must match the key to be taken into account when analyzing this rule
// Required: true
Value string `url:"value" json:"value"`
}
Request struct for remove affinity rule
type AffinityRulesClearRequest ¶
type AffinityRulesClearRequest struct {
// IDs of the compute instances
// Required: true
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
}
Request struct for clear affinity rules
type AntiAffinityRuleAddRequest ¶
type AntiAffinityRuleAddRequest struct {
// IDs of the compute instances
// Required: true
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Compute or node, for whom rule applies
// Required: true
Topology string `url:"topology" json:"topology"`
// The degree of 'strictness' of this rule
// Should be one of:
// - RECOMMENDED
// - REQUIRED
// Required: true
Policy string `url:"policy" json:"policy"`
// 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"`
// Key that are taken into account when analyzing this rule will be identified
// Required: true
Key string `url:"key" json:"key"`
// Value that must match the key to be taken into account when analyzing this rule
// Required: true
Value string `url:"value" json:"value"`
}
Request struct for add anti affinity rule
type AntiAffinityRuleRemoveRequest ¶
type AntiAffinityRuleRemoveRequest struct {
// IDs of the compute instances
// Required: true
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Compute or node, for whom rule applies
// Required: true
Topology string `url:"topology" json:"topology"`
// The degree of 'strictness' of this rule
// Should be one of:
// - RECOMMENDED
// - REQUIRED
// Required: true
Policy string `url:"policy" json:"policy"`
// 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"`
// Key that are taken into account when analyzing this rule will be identified
// Required: true
Key string `url:"key" json:"key"`
// Value that must match the key to be taken into account when analyzing this rule
// Required: true
Value string `url:"value" json:"value"`
}
Request struct for remove anti affinity rule
type AntiAffinityRulesClearRequest ¶
type AntiAffinityRulesClearRequest struct {
// IDs of the compute instances
// Required: true
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
}
Request struct for clear anti affinity rules
type AttachGPURequest ¶
type AttachGPURequest struct {
// Identifier compute
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Identifier vGPU
// Required: true
VGPUID uint64 `url:"vgpuId" json:"vgpuId"`
}
Request struct for attach GPU for compute
type AttachPCIDeviceRequest ¶
type AttachPCIDeviceRequest struct {
// Identifier compute
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// PCI device ID
// Required: true
DeviceID uint64 `url:"deviceId" json:"deviceId"`
}
Request struct for atttach PCI device
type AuditsRequest ¶
type AuditsRequest struct {
// ID of the compute
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
}
Request struct for get audit records
type BootOrderGetRequest ¶
type BootOrderGetRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
}
Request struct for get boot order
type BootOrderSetRequest ¶
type BootOrderSetRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// List of boot devices
// Should be one of:
// - cdrom
// - network
// - hd
// Required: true
Order []string `url:"order" json:"order"`
}
Request struct for set boot order
type CDEjectRequest ¶
type CDEjectRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Reason to eject
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for eject CD image
type CDInsertRequest ¶
type CDInsertRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// ID of CD-ROM image
// Required: true
CDROMID uint64 `url:"cdromId" json:"cdromId"`
// Reason to insert
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for insert new CD image
type CloneRequest ¶
type CloneRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Name of the clone
// Required: true
Name string `url:"name" json:"name"`
// Timestamp of the parent's snapshot to create clone from
// Required: false
SnapshotTimestamp uint64 `url:"snapshotTimestamp" json:"snapshotTimestamp"`
// Name of the parent's snapshot to create clone from
// Required: false
SnapshotName string `url:"snapshotName" json:"snapshotName"`
// Reason to clone
// Required: false
Reason string `url:"reason,omitempty" json:"reason,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) (ListDetailedAudits, error)
Audits gets audit records for the specified compute object
func (Compute) BootOrderGet ¶
BootOrderGet gets actual compute boot order information
func (Compute) BootOrderSet ¶
BootOrderSet sets compute boot order
func (Compute) ComputeCISet ¶
ComputeCISet sets compute CI ID for compute
func (Compute) ComputeCIUnset ¶
ComputeCIUnset unsets compute CI ID from 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 VGPU ID 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) (ListAudits, 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) ListGPU ¶ added in v1.1.0
func (c Compute) ListGPU(ctx context.Context, req ListGPURequest) ([]interface{}, error)
ListVGPU gets list GPU for compute
func (Compute) ListPCIDevice ¶
func (c Compute) ListPCIDevice(ctx context.Context, req ListPCIDeviceRequest) (ListPCIDevices, error)
ListPCIDevice gets list PCI device
func (Compute) MassDelete ¶
MassDelete starts jobs to delete several computes
func (Compute) MassReboot ¶
MassReboot starts jobs to reboot several computes
func (Compute) MassRepairBootFS ¶
MassRepairBootFS repair boot disk filesystem on several computes
func (Compute) MigrateStorage ¶
MigrateStorage gets complex compute migration Compute will be migrated to specified stack, and compute disks will be migrated to specified SEP to specified pool. This action can take up to 84 hours
func (Compute) MigrateStorageAbort ¶
func (c Compute) MigrateStorageAbort(ctx context.Context, req MigrateStorageAbortRequest) (string, error)
MigrateStorageAbort abort complex compute migration job
func (Compute) MigrateStorageCleanUp ¶
func (c Compute) MigrateStorageCleanUp(ctx context.Context, req MigrateStorageCleanUpRequest) (string, error)
MigrateStorageCleanUp cleanup resources after finished (success of failed) complex compute migration. If the migration was successful, then old disks will be removed, else new (target) disks will be removed. Do it wisely!
func (Compute) MigrateStorageInfo ¶
func (c Compute) MigrateStorageInfo(ctx context.Context, req MigrateStorageInfoRequest) (string, error)
MigrateStorageInfo gets info about last (include ongoing) storage migration
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) Registration ¶
Registration sets compute registered in RT
func (Compute) RepairBootFS ¶
RepairBootFS repair compute boot disk filesystem
func (Compute) SnapshotCreate ¶
SnapshotCreate create compute snapshot
func (Compute) SnapshotDelete ¶
SnapshotDelete delete specified compute snapshot
func (Compute) SnapshotEvictDisk ¶
SnapshotEvictDisk evict specified disk from all snapshots of a compute instance
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) (ListSnapshotUsage, 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 ComputeCISetRequest ¶
type ComputeCISetRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// ID of the Compute CI
// Required: true
ComputeCIID uint64 `url:"computeciId" json:"computeciId"`
}
Request struct for set compute CI
type ComputeCIUnsetRequest ¶
type ComputeCIUnsetRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
}
Request struct for unset compite CI
type CreateTemplateRequest ¶
type CreateTemplateRequest struct {
// ID of the compute to create template from
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Name to assign to the template being created
// Required: true
Name string `url:"name" json:"name"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
// contains filtered or unexported fields
}
Request struct for create template
type DeleteRequest ¶
type DeleteRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// 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"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for delete compute
type DetachGPURequest ¶
type DetachGPURequest struct {
// Identifier compute
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// 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"`
// PCI device ID
// Required: true
DeviceID uint64 `url:"deviceId" json:"deviceId"`
}
Request struct for detach PCI device
type DisableRequest ¶
type DisableRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for disable compute
type DiskAddRequest ¶
type DiskAddRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Name for disk
// Required: true
DiskName string `url:"diskName" json:"diskName"`
// Disk size in GB
// Required: true
Size uint64 `url:"size" json:"size"`
// Type of the disk
// Should be one of:
// - D
// - B
// Required: false
DiskType string `url:"diskType,omitempty" json:"diskType,omitempty"`
// 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"`
}
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"`
// ID of the disk to attach
// Required: true
DiskID uint64 `url:"diskId" json:"diskId"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for attach disk to compute
type DiskDelRequest ¶
type DiskDelRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// ID of disk instance
// Required: true
DiskID uint64 `url:"diskId" json:"diskId"`
// False if disk is to be deleted to recycle bin
// Required: true
Permanently bool `url:"permanently" json:"permanently"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
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"`
// ID of the disk to detach
// Required: true
DiskID uint64 `url:"diskId" json:"diskId"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for detach disk from compute
type DiskQOSRequest ¶
type DiskQOSRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// ID of the disk to apply limits
// Required: true
DiskID uint64 `url:"diskId" json:"diskId"`
// 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"`
}
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"`
// ID of the disk to resize
// Required: true
DiskID uint64 `url:"diskId" json:"diskId"`
// New disk size
// Required: true
Size uint64 `url:"size" json:"size"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for change disk size
type EnableRequest ¶
type EnableRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for enable compute
type GetAuditsRequest ¶
type GetAuditsRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Reason to action
// Required: true
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
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"`
}
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"`
// Path to log file
// Required: true
Path string `url:"path" json:"path"`
}
Request struct for get compute logs
type GetRequest ¶
type GetRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Reason to action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
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 InfoCompute ¶
type InfoCompute struct {
// Account ID
AccountID uint64 `json:"accountId"`
// Account name
AccountName string `json:"accountName"`
// Access Control List
ACL []interface{} `json:"acl"`
// Affinity label
AffinityLabel string `json:"affinityLabel"`
// Affinity rules
AffinityRules ListRules `json:"affinityRules"`
// Affinity weight
AffinityWeight uint64 `json:"affinityWeight"`
// Anti affinity rules
AntiAffinityRules ListRules `json:"antiAffinityRules"`
// Architecture
Arch 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 CPU
CPUs uint64 `json:"cpus"`
// Created by
CreatedBy string `json:"createdBy"`
// Created time
CreatedTime uint64 `json:"createdTime"`
// Custom fields
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"`
// 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"`
// List OS users
OSUsers ListOSUsers `json:"osUsers"`
// Pinned
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"`
// SnapSets
SnapSets ListSnapshots `json:"snapSets"`
// Stack ID
StackID uint64 `json:"stackId"`
// Stack name
StackName string `json:"stackName"`
// Stateless SEP ID
StatelessSEPID uint64 `json:"statelessSepId"`
// Stateless SEP Type
StatelessSEPType string `json:"statelessSepType"`
// Status
Status string `json:"status"`
// Tags
Tags map[string]interface{} `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
UserManaged bool `json:"userManaged"`
// Userdata
Userdata interface{} `json:"userdata"`
// List VGPU IDs
VGPUs []uint64 `json:"vgpus"`
// VINS connected
VINSConnected uint64 `json:"vinsConnected"`
// Virtual image ID
VirtualImageID uint64 `json:"virtualImageId"`
}
Information about compute
type ItemACL ¶
type ItemACL struct {
// Explicit
Explicit bool `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 {
// Epoch
Epoch float64 `json:"epoch"`
// Message
Message string `json:"message"`
}
Short information about audir
type ItemCompute ¶
type ItemCompute struct {
// List of disk IDs
Disks []InfoDisk `json:"disks"`
// Main information about compute
InfoCompute
// Total disk size
TotalDiskSize uint64 `json:"totalDiskSize"`
// VINS connected
VINSConnected uint64 `json:"vinsConnected"`
}
Main information about compute for list
type ItemComputeACL ¶
type ItemComputeACL struct {
// Explicit
Explicit string `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 compute information
type ItemDetailedAudit ¶
type ItemDetailedAudit 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 ItemDisk ¶
type ItemDisk struct {
// CKey
CKey string `json:"_ckey"`
// Meta
Meta []interface{} `json:"_meta"`
// Account ID
AccountID uint64 `json:"accountId"`
// Access Control List
ACL ItemACL `json:"acl"`
// Boot partition
BootPartition uint64 `json:"bootPartition"`
// Created time
CreatedTime uint64 `json:"createdTime"`
// Deleted time
DeletedTime uint64 `json:"deletedTime"`
// Description
Description string `json:"desc"`
// Destruction time
DestructionTime uint64 `json:"destructionTime"`
// Disk path
DiskPath string `json:"diskPath"`
// Grid ID
GID uint64 `json:"gid"`
// GUID
GUID uint64 `json:"guid"`
// ID
ID uint64 `json:"id"`
// Image ID
ImageID uint64 `json:"imageId"`
// List image IDs
Images []uint64 `json:"images"`
// IOTune
IOTune IOTune `json:"iotune"`
// IQN
IQN string `json:"iqn"`
// Login
Login string `json:"login"`
// Milestones
Milestones uint64 `json:"milestones"`
// Name
Name string `json:"name"`
// Order
Order uint64 `json:"order"`
// Params
Params string `json:"params"`
// Parent ID
ParentID uint64 `json:"parentId"`
// Password
Password string `json:"passwd"`
// PCI slot
PCISlot uint64 `json:"pciSlot"`
// Pool
Pool string `json:"pool"`
// Present to
PresentTo []uint64 `json:"presentTo"`
// Purge attempts
PurgeAttempts uint64 `json:"purgeAttempts"`
// Purge time
PurgeTime uint64 `json:"purgeTime"`
// Reality device number
RealityDeviceNumber uint64 `json:"realityDeviceNumber"`
// Reference ID
ReferenceID string `json:"referenceId"`
// Resource ID
ResID string `json:"resId"`
// Resource name
ResName string `json:"resName"`
// Role
Role string `json:"role"`
// SEP ID
SEPID uint64 `json:"sepId"`
Shareable bool `json:"shareable"`
// Size max
SizeMax uint64 `json:"sizeMax"`
// Size used
SizeUsed float64 `json:"sizeUsed"`
// List detailed snapshots
Snapshots ListDetailedSnapshots `json:"snapshots"`
// Status
Status string `json:"status"`
// Tech status
TechStatus string `json:"techStatus"`
// Type
Type string `json:"type"`
// Updated by
UpdatedBy uint64 `json:"updatedBy,omitempty"`
// Virtual machine ID
VMID uint64 `json:"vmid"`
}
Main information about disk
type ItemInterface ¶
type ItemInterface struct {
// Connection ID
ConnID uint64 `json:"connId"`
// Connection type
ConnType string `json:"connType"`
// Default GW
DefGW string `json:"defGw"`
// 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 uint64 `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 interface
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 ¶
type ItemPCIDevice struct {
// CKey
CKey string `json:"_ckey"`
// Meta
Meta []interface{} `json:"_meta"`
// 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 ItemSnapshot ¶
type ItemSnapshot struct {
// List of disk IDs
Disks []uint64 `json:"disks"`
// GUID
GUID string `json:"guid"`
// Label
Label string `json:"label"`
// Timestamp
Timestamp uint64 `json:"timestamp"`
}
Main information about snapshot
type ItemSnapshotDetailed ¶
type ItemSnapshotDetailed struct {
// GUID
GUID string `json:"guid"`
// Label
Label string `json:"label"`
// Resource ID
ResID string `json:"resId"`
// SnapSetGUID
SnapSetGUID string `json:"snapSetGuid"`
// SnapSetTime
SnapSetTime uint64 `json:"snapSetTime"`
// TimeStamp
TimeStamp uint64 `json:"timestamp"`
}
Detailed information about snapshot
type ItemSnapshotUsage ¶
type ItemSnapshotUsage 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 snapshot usage
type ListDeletedRequest ¶
type ListDeletedRequest struct {
// 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 ListDetailedSnapshots ¶
type ListDetailedSnapshots []ItemSnapshotDetailed
List detailed snapshots
type ListGPURequest ¶
type ListGPURequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Also list destroyed
// Required: false
ListDestroyed bool `url:"list_destroyed,omitempty" json:"list_destroyed,omitempty"`
}
Request struct for get list GPU for compute
type ListPCIDeviceRequest ¶
type ListPCIDeviceRequest struct {
// Identifier compute
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
}
Request struct for get list PCI devices
type ListRequest ¶
type ListRequest struct {
// 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 MassDeleteRequest ¶
type MassDeleteRequest struct {
// IDs of compute instances to delete
// Required: true
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Delete computes permanently
// Required: false
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for delete several computes
type MassRebootRequest ¶
type MassRebootRequest struct {
// IDs of compute instances to reboot
// Required: true
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for reboot several computes
type MassRepairBootFSRequest ¶
type MassRepairBootFSRequest struct {
// IDs of compute instances which boot file systems will be repaired
// Required: true
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for repair boot disk filesystem on several computes
type MassStartRequest ¶
type MassStartRequest struct {
// IDs of compute instances to start
// Required: true
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for start several computes
type MassStopRequest ¶
type MassStopRequest struct {
// IDs of compute instances to stop
// Required: true
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Force stop compute
// Required: false
Force bool `url:"force,omitempty" json:"force,omitempty"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for several stop computes
type MigrateRequest ¶
type MigrateRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Particular Stack ID to migrate this compute to
// Required: false
TargetStackID uint64 `url:"targetStackId,omitempty" json:"targetStackId,omitempty"`
// If live migration fails, destroy compute
// on source node and recreate on the target
// Required: false
Force bool `url:"force,omitempty" json:"force,omitempty"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for migrate compute
type MigrateStorageAbortRequest ¶
type MigrateStorageAbortRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
}
Request struct for abort migration
type MigrateStorageCleanUpRequest ¶
type MigrateStorageCleanUpRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
}
Request struct for cleanup resources after finished migration
type MigrateStorageInfoRequest ¶
type MigrateStorageInfoRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
}
Request struct for get info about migration
type MigrateStorageRequest ¶
type MigrateStorageRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// SEP ID to migrate disks
// Required: true
SEPID uint64 `url:"sepId" json:"sepId"`
// SEP pool name to migrate disks
// Required: true
PoolName string `url:"poolName" json:"poolName"`
// Target stack ID
// Required: true
StackID uint64 `url:"stackId" json:"stackId"`
// Async API call
// Required: true
Sync bool `url:"sync" json:"sync"`
}
Request struct for migration
type MoveToRGRequest ¶
type MoveToRGRequest struct {
// ID of the compute instance to move
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// ID of the target resource group
// Required: true
RGID uint64 `url:"rgId" json:"rgId"`
// 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"`
// Network type
// 'EXTNET' for connect to external network directly
// and 'VINS' for connect to ViNS
// Required: true
NetType string `url:"netType" json:"netType"`
// Network ID for connect to
// For EXTNET - external network ID
// For VINS - VINS ID
// Required: true
NetID uint64 `url:"netId" json:"netId"`
// Directly required IP address for new network interface
// Required: true
IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for attach network
type NetDetachRequest ¶
type NetDetachRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// 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"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for detach networ to compute
type NetQOSRequest ¶
type NetQOSRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Network ID
// Required: true
NetID uint64 `url:"netId" json:"netId"`
// Network type
// Should be one of:
// - VINS
// - EXTNET
// Required: true
NetType string `url:"netType" json:"netType"`
// Internal traffic, kbit
// Required: false
IngressRate uint64 `url:"ingress_rate,omitempty" json:"ingress_rate,omitempty"`
// Internal traffic burst, kbit
// Required: false
IngressBurst uint64 `url:"ingress_burst,omitempty" json:"ingress_burst,omitempty"`
// External traffic rate, kbit
// Required: false
EgressRate uint64 `url:"egress_rate,omitempty" json:"egress_rate,omitempty"`
}
Request struct for update QOS
type PFWAddRequest ¶
type PFWAddRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// External start port number for the rule
// Required: true
PublicPortStart uint64 `url:"publicPortStart" json:"publicPortStart"`
// End port number (inclusive) for the ranged rule
// Required: false
PublicPortEnd uint64 `url:"publicPortEnd,omitempty" json:"publicPortEnd,omitempty"`
// Internal base port number
// Required: true
LocalBasePort uint64 `url:"localBasePort" json:"localBasePort"`
// Network protocol
// Should be one of:
// - tcp
// - udp
// Required: true
Proto string `url:"proto" json:"proto"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for add port forward rule
type PFWDelRequest ¶
type PFWDelRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// ID of the rule to delete. If specified, all other arguments will be ignored
// Required: false
RuleID 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
// Should be one of:
// - tcp
// - udp
// Required: false
Proto string `url:"proto,omitempty" json:"proto,omitempty"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,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"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for get list port forwards
type PauseRequest ¶
type PauseRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for pause compute
type PinToStackRequest ¶
type PinToStackRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Stack ID to pin to
// Required: true
TargetStackID uint64 `url:"targetStackId" json:"targetStackId"`
// Try to migrate or not if compute in running states
// Required: false
Force bool `url:"force" json:"force"`
}
Request struct for pin comptute to stack
type PowerCycleRequest ¶
type PowerCycleRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
}
Request struct for force stop and start compute
type QOS ¶
type QOS struct {
// ERate
ERate uint64 `json:"eRate"`
// GUID
GUID string `json:"guid"`
// InBurst
InBurst uint64 `json:"inBurst"`
// InRate
InRate uint64 `json:"inRate"`
}
QOS
type RebootRequest ¶
type RebootRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for reboot compute
type RecordACL ¶
type RecordACL struct {
// Account ACL list
AccountACL ListACL `json:"accountACL"`
// Compute ACL list
ComputeACL []ItemComputeACL `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 {
// List disks
Disks ListDisks `json:"disks"`
// Main information about compute
InfoCompute
}
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"`
// 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 uint64 `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"`
// 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
// Should be one of:
// - 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"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for redeploy
type RegistrationRequest ¶
type RegistrationRequest struct {
// ID of the Compute
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Unique compute registration key
// Required: true
RegistrationKey string `url:"registrationKey" json:"registrationKey"`
}
Request struct for set compute registered in RT
type RepairBootFSRequest ¶
type RepairBootFSRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for repair filesystem
type ResetRequest ¶
type ResetRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for reset compute
type ResizeRequest ¶
type ResizeRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// New CPU count.
// Pass 0 if no change to CPU count is required
// Required: false
Force bool `url:"force,omitempty" json:"force,omitempty"`
// New RAM volume in MB.
// Pass 0 if no change to RAM volume is required
// Required: false
CPU uint64 `url:"cpu,omitempty" json:"cpu,omitempty"`
// Force compute resize
// Required: false
RAM uint64 `url:"ram,omitempty" json:"ram,omitempty"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for resize compute
type RestoreRequest ¶
type RestoreRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for restore compute
type ResumeRequest ¶
type ResumeRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
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"`
// Text label for snapshot.
// Must be unique among this compute snapshots
// Required: true
Label string `url:"label" json:"label"`
}
Request struct for create snapshot
type SnapshotDeleteRequest ¶
type SnapshotDeleteRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Text label of snapshot to delete
// Required: true
Label string `url:"label" json:"label"`
}
Request struct for delete snapshot
type SnapshotEvictDiskRequest ¶
type SnapshotEvictDiskRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// ID of the disk instance
// Required: true
DiskID uint64 `url:"diskId" json:"diskId"`
}
Request struct for evict specified disk
type SnapshotListRequest ¶
type SnapshotListRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
}
Request struct for get list snapshots
type SnapshotRollbackRequest ¶
type SnapshotRollbackRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Text label of snapshot to rollback
// Required: true
Label string `url:"label" json:"label"`
}
Request struct for rollback
type SnapshotUsageRequest ¶
type SnapshotUsageRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// 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"`
// ID of CD-ROM live image to boot
// Required: false
AltBootID uint64 `url:"altBootId,omitempty" json:"altBootId,omitempty"`
// ID of stack to start compute
// Required: false
StackID uint64 `url:"stackId,omitempty" json:"stackId,omitempty"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for start compute
type StopRequest ¶
type StopRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Force stop compute
// Required: false
Force bool `url:"force,omitempty" json:"force,omitempty"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for stop compute
type TagAddRequest ¶
type TagAddRequest struct {
// IDs of the compute instances
// Required: true
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Tag key
// Required: true
Key string `url:"key" json:"key"`
// Tag value
// Required: true
Value string `url:"value" json:"value"`
}
Request struct for add tag to compute
type TagRemoveRequest ¶
type TagRemoveRequest struct {
// IDs of the compute instances
// Required: true
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Tag key
// Required: true
Key string `url:"key" json:"key"`
}
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"`
}
Request struct for unpin from stack
type UpdateRequest ¶
type UpdateRequest struct {
// ID of the compute
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// New name
// Required: false
Name string `url:"name,omitempty" json:"name,omitempty"`
// New description
// Required: false
Description string `url:"desc,omitempty" json:"desc,omitempty"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
Request struct for update compute
type UserGrantRequest ¶
type UserGrantRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Name of the user to add
// Required: true
Username string `url:"userName" json:"userName"`
// Access type
// Should be one of:
// - 'R' for Read only
// - 'RCX' for Write
// - 'ARCXDU' for Admin
// Required: true
AccessType string `url:"accesstype" json:"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"`
}
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"`
// Name of the user to remove
// Required: true
Username string `url:"userName" json:"userName"`
}
Request struct for revoke user access
type UserUpdateRequest ¶
type UserUpdateRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId"`
// Name of the user to update
// Required: true
Username string `url:"userName" json:"userName"`
// Access type
// Should be one of:
// - 'R' for Read only
// - 'RCX' for Write
// - 'ARCXDU' for Admin
// Required: true
AccessType string `url:"accesstype" json:"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_clear.go
- anti_affinity_rule_remove.go
- attach_gpu.go
- attach_pci_device.go
- audits.go
- boot_order_get.go
- boot_order_set.go
- cd_eject.go
- cd_insert.go
- clone.go
- compute.go
- computeci_set.go
- computeci_unset.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
- get.go
- get_audits.go
- get_console_url.go
- get_log.go
- list.go
- list_deleted.go
- list_gpu.go
- list_pci_device.go
- mass_delete.go
- mass_reboot.go
- mass_repair_boot_fs.go
- mass_start.go
- mass_stop.go
- migrate.go
- migrate_storage.go
- migrate_storage_abort.go
- migrate_storage_clean_up.go
- migrate_storage_info.go
- models.go
- move_to_rg.go
- net_attach.go
- net_detach.go
- net_qos.go
- pause.go
- pfw_add.go
- pfw_del.go
- pfw_list.go
- pin_to_stack.go
- power_cycle.go
- raise_down.go
- reboot.go
- redeploy.go
- registration.go
- repair_boot_fs.go
- reset.go
- resize.go
- restore.go
- resume.go
- snapshot_create.go
- snapshot_delete.go
- snapshot_evict_disk.go
- snapshot_list.go
- snapshot_rollback.go
- snapshot_usage.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