v16.8.0
This commit is contained in:
1 parent
70edc100d5
commit
5825bdfa9e
65 files changed
+1061
-302
No files matched your search
@@ -26,6 +26,8 @@ type wrapperCreateTemplateRequest struct {
|
||||
}
|
||||
|
||||
// CreateTemplate create template from compute instance
|
||||
//
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) CreateTemplate(ctx context.Context, req CreateTemplateRequest) (string, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
@@ -50,6 +52,8 @@ func (c Compute) CreateTemplate(ctx context.Context, req CreateTemplateRequest)
|
||||
}
|
||||
|
||||
// CreateTemplateAsync create template from compute instance with AsyncMode
|
||||
//
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) CreateTemplateAsync(ctx context.Context, req CreateTemplateRequest) (string, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
|
||||
@@ -60,6 +60,8 @@ type wrapperCreateTemplateFromBlankRequest struct {
|
||||
|
||||
// CreateTemplateFromBlank creates template from boot disk of current compute in sync mode.
|
||||
// It returns id of created compute and error.
|
||||
//
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) CreateTemplateFromBlank(ctx context.Context, req CreateTemplateFromBlankRequest) (uint64, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
@@ -88,6 +90,8 @@ func (c Compute) CreateTemplateFromBlank(ctx context.Context, req CreateTemplate
|
||||
|
||||
// CreateTemplateFromBlankAsync creates template from boot disk of current compute in async mode.
|
||||
// It returns guid of task and error.
|
||||
//
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) CreateTemplateFromBlankAsync(ctx context.Context, req CreateTemplateFromBlankRequest) (string, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
|
||||
@@ -31,7 +31,7 @@ type wrapperDiskQOSRequest struct {
|
||||
|
||||
// DiskQOS changes QOS of the disk
|
||||
//
|
||||
// Deprecated: will be removed in SDK v1.17
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) DiskQOS(ctx context.Context, req DiskQOSRequest) (bool, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
@@ -60,7 +60,7 @@ func (c Compute) DiskQOS(ctx context.Context, req DiskQOSRequest) (bool, error)
|
||||
|
||||
// DiskQOSAsync changes QOS of the disk with AsyncMode
|
||||
//
|
||||
// Deprecated: will be removed in SDK v1.17
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) DiskQOSAsync(ctx context.Context, req DiskQOSRequest) (string, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
|
||||
@@ -27,7 +27,7 @@ type AsyncWrapperMigrateRequest struct {
|
||||
|
||||
// Migrate migrates compute to another node
|
||||
//
|
||||
// Deprecated: will be removed in SDK v1.17
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) Migrate(ctx context.Context, req MigrateRequest) (bool, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
@@ -53,7 +53,7 @@ func (c Compute) Migrate(ctx context.Context, req MigrateRequest) (bool, error)
|
||||
|
||||
// AsyncMigrate migrates compute to another node in async mode
|
||||
//
|
||||
// Deprecated: will be removed in SDK v1.17
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) AsyncMigrate(ctx context.Context, req MigrateRequest) (string, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
|
||||
@@ -23,7 +23,7 @@ type wrapperMigrateAbortRequest struct {
|
||||
|
||||
// MigrateAbort aborts compute migration
|
||||
//
|
||||
// Deprecated: will be removed in SDK v1.17
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) MigrateAbort(ctx context.Context, req MigrateAbortRequest) (string, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
@@ -49,7 +49,7 @@ func (c Compute) MigrateAbort(ctx context.Context, req MigrateAbortRequest) (str
|
||||
|
||||
// MigrateAbortAsync aborts compute migration with AsyncMode
|
||||
//
|
||||
// Deprecated: will be removed in SDK v1.17
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) MigrateAbortAsync(ctx context.Context, req MigrateAbortRequest) (string, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
|
||||
@@ -28,7 +28,7 @@ type wrapperMigrateStorageAbortRequest struct {
|
||||
|
||||
// MigrateStorageAbort aborts complex compute migration job
|
||||
//
|
||||
// Deprecated: will be removed in SDK v1.17
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) MigrateStorageAbort(ctx context.Context, req MigrateStorageAbortRequest) (bool, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
@@ -57,7 +57,7 @@ func (c Compute) MigrateStorageAbort(ctx context.Context, req MigrateStorageAbor
|
||||
|
||||
// MigrateStorageAbortAsync aborts complex compute migration job with AsyncMode
|
||||
//
|
||||
// Deprecated: will be removed in SDK v1.17
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) MigrateStorageAbortAsync(ctx context.Context, req MigrateStorageAbortRequest) (string, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
|
||||
@@ -25,7 +25,7 @@ type wrapperMigrateStorageCleanUpRequest struct {
|
||||
// If the migration was successful, then old disks will be removed, else new (target) disks will be removed.
|
||||
// Do it wisely!
|
||||
//
|
||||
// Deprecated: will be removed in SDK v1.17
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) MigrateStorageCleanUp(ctx context.Context, req MigrateStorageCleanUpRequest) (bool, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
@@ -54,7 +54,7 @@ func (c Compute) MigrateStorageCleanUp(ctx context.Context, req MigrateStorageCl
|
||||
|
||||
// MigrateStorageCleanUpAsync cleanup resources after finished migration with AsyncMode
|
||||
//
|
||||
// Deprecated: will be removed in SDK v1.17
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) MigrateStorageCleanUpAsync(ctx context.Context, req MigrateStorageCleanUpRequest) (string, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
|
||||
@@ -17,7 +17,7 @@ type MigrateStorageInfoRequest struct {
|
||||
|
||||
// MigrateStorageInfo gets info about last (include ongoing) storage migration
|
||||
//
|
||||
// Deprecated: will be removed in SDK v1.17
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) MigrateStorageInfo(ctx context.Context, req MigrateStorageInfoRequest) (*RecordMigrateStorageInfo, error) {
|
||||
res, err := c.MigrateStorageInfoRaw(ctx, req)
|
||||
if err != nil {
|
||||
@@ -36,7 +36,7 @@ func (c Compute) MigrateStorageInfo(ctx context.Context, req MigrateStorageInfoR
|
||||
|
||||
// MigrateStorageInfoRaw gets info about last (include ongoing) storage migration as an array of bytes
|
||||
//
|
||||
// Deprecated: will be removed in SDK v1.17
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) MigrateStorageInfoRaw(ctx context.Context, req MigrateStorageInfoRequest) ([]byte, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
|
||||
@@ -33,7 +33,7 @@ type MigrateStorageListRequest struct {
|
||||
|
||||
// MigrateStorageList gets list of the jobs.
|
||||
//
|
||||
// Deprecated: will be removed in SDK v1.17
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) MigrateStorageList(ctx context.Context, req MigrateStorageListRequest) (*ListMigrateStorage, error) {
|
||||
if err := validators.ValidateRequest(req); err != nil {
|
||||
return nil, validators.ValidationErrors(validators.GetErrors(err))
|
||||
|
||||
@@ -23,7 +23,8 @@ type Target struct {
|
||||
// Required: false
|
||||
StoragePolicyID uint64 `url:"storage_policy_id,omitempty" json:"storage_policy_id,omitempty"`
|
||||
|
||||
// Disk IDs
|
||||
// Disk IDs. May be omitted if Targets contains one element (all persistent disks are migrated).
|
||||
// Required if Targets contains two or more elements; disk IDs must not overlap between targets.
|
||||
// Required: false
|
||||
DiskIDs []uint64 `url:"disk_ids,omitempty" json:"disk_ids,omitempty"`
|
||||
}
|
||||
@@ -31,8 +32,8 @@ type Target struct {
|
||||
// Storage describes a destination for a disk
|
||||
type Storage struct {
|
||||
// Target for migration
|
||||
// Required: false
|
||||
Targets []Target `url:"targets,omitempty" json:"targets,omitempty"`
|
||||
// Required: true
|
||||
Targets []Target `url:"targets" json:"targets" validate:"required,min=1,dive"`
|
||||
|
||||
// Whether a separate source-disk cleanup job should be started after full success
|
||||
// Required: false
|
||||
@@ -55,7 +56,7 @@ type MigrateV2Request struct {
|
||||
|
||||
// Destination for a disk
|
||||
// Required: false
|
||||
Storage Storage `url:"storage,omitempty" json:"storage,omitempty"`
|
||||
Storage *Storage `url:"storage,omitempty" json:"storage,omitempty"`
|
||||
}
|
||||
|
||||
// MigrateV2 starts a migration of a compute or a disk
|
||||
|
||||
@@ -18,6 +18,10 @@ type MigrateV2ResolveRequest struct {
|
||||
// Take over cleanup
|
||||
// Required: false
|
||||
TakeOverCleanup interface{} `url:"take_over_cleanup,omitempty" json:"take_over_cleanup,omitempty" validate:"omitempty,isBool"`
|
||||
|
||||
// Take over resources
|
||||
// Required: false
|
||||
TakeOverResources interface{} `url:"take_over_resources,omitempty" json:"take_over_resources,omitempty" validate:"omitempty,isBool"`
|
||||
}
|
||||
|
||||
// MigrateV2Resolve resolves a migration of a compute
|
||||
|
||||
@@ -2315,7 +2315,7 @@ type Origin struct {
|
||||
|
||||
type Observation struct {
|
||||
// Updated at
|
||||
UpdatedAt uint64 `json:"updated_at"`
|
||||
UpdatedAt float64 `json:"updated_at"`
|
||||
|
||||
// Agent job ID
|
||||
AgentJobID string `json:"agent_job_id"`
|
||||
@@ -2329,13 +2329,13 @@ type Observation struct {
|
||||
|
||||
type Memory struct {
|
||||
// Sampled at
|
||||
SampledAt uint64 `json:"sampled_at"`
|
||||
SampledAt float64 `json:"sampled_at"`
|
||||
|
||||
// Percent
|
||||
Percent uint64 `json:"percent"`
|
||||
Percent float64 `json:"percent"`
|
||||
|
||||
// Bytes per second
|
||||
BytesPerSecond uint64 `json:"bytes_per_second"`
|
||||
BytesPerSecond float64 `json:"bytes_per_second"`
|
||||
|
||||
// Processed bytes
|
||||
ProcessedBytes uint64 `json:"processed_bytes"`
|
||||
@@ -2352,19 +2352,59 @@ type ProgressDisks struct {
|
||||
TargetDevs []string `json:"target_devs"`
|
||||
|
||||
// Sampled at
|
||||
SampledAt uint64 `json:"sampled_at"`
|
||||
SampledAt float64 `json:"sampled_at"`
|
||||
|
||||
// Percent
|
||||
Percent uint64 `json:"percent"`
|
||||
Percent float64 `json:"percent"`
|
||||
|
||||
// Bytes per second
|
||||
BytesPerSecond uint64 `json:"bytes_per_second"`
|
||||
BytesPerSecond float64 `json:"bytes_per_second"`
|
||||
|
||||
// Processed bytes
|
||||
ProcessedBytes uint64 `json:"processed_bytes"`
|
||||
|
||||
// Remaining bytes
|
||||
RemainingBytes uint64 `json:"remaining_bytes"`
|
||||
|
||||
// Disks completed
|
||||
DisksCompleted uint64 `json:"disks_completed"`
|
||||
|
||||
// Completed disks
|
||||
CompletedDisks []CompletedDisk `json:"completed_disks"`
|
||||
|
||||
// Disks total
|
||||
DisksTotal uint64 `json:"disks_total"`
|
||||
|
||||
// Current disk
|
||||
CurrentDisk CurrentDisk `json:"current_disk"`
|
||||
}
|
||||
|
||||
type CompletedDisk struct {
|
||||
// Source disk ID
|
||||
SourceDiskID uint64 `json:"source_disk_id"`
|
||||
|
||||
// Target disk ID
|
||||
TargetDiskID uint64 `json:"target_disk_id"`
|
||||
|
||||
// Target dev
|
||||
TargetDev string `json:"target_dev"`
|
||||
}
|
||||
|
||||
type CurrentDisk struct {
|
||||
// Source disk ID
|
||||
SourceDiskID uint64 `json:"source_disk_id"`
|
||||
|
||||
// Target disk ID
|
||||
TargetDiskID uint64 `json:"target_disk_id"`
|
||||
|
||||
// Target dev
|
||||
TargetDev string `json:"target_dev"`
|
||||
|
||||
// Percent
|
||||
Percent float64 `json:"percent"`
|
||||
|
||||
// Sampled at
|
||||
SampledAt float64 `json:"sampled_at"`
|
||||
}
|
||||
|
||||
type SystemDisk struct {
|
||||
@@ -2372,13 +2412,13 @@ type SystemDisk struct {
|
||||
TargetDev string `json:"target_dev"`
|
||||
|
||||
// Sampled at
|
||||
SampledAt uint64 `json:"sampled_at"`
|
||||
SampledAt float64 `json:"sampled_at"`
|
||||
|
||||
// Percent
|
||||
Percent uint64 `json:"percent"`
|
||||
Percent float64 `json:"percent"`
|
||||
|
||||
// Bytes per second
|
||||
BytesPerSecond uint64 `json:"bytes_per_second"`
|
||||
BytesPerSecond float64 `json:"bytes_per_second"`
|
||||
|
||||
// Processed bytes
|
||||
ProcessedBytes uint64 `json:"processed_bytes"`
|
||||
@@ -2448,12 +2488,18 @@ type Resolution struct {
|
||||
// Take over cleanup
|
||||
TakeOverCleanup bool `json:"take_over_cleanup"`
|
||||
|
||||
// Take over resources
|
||||
TakeOverResources bool `json:"take_over_resources"`
|
||||
|
||||
// Previous status
|
||||
PreviousStatus string `json:"previous_status"`
|
||||
|
||||
// Previous cleanup required
|
||||
PreviousCleanupRequired bool `json:"previous_cleanup_required"`
|
||||
|
||||
// Previous reserves compute resources
|
||||
PreviousReservesComputeResources bool `json:"previous_reserves_compute_resources"`
|
||||
|
||||
// Previous error
|
||||
PreviousError string `json:"previous_error"`
|
||||
}
|
||||
@@ -2607,6 +2653,9 @@ type MigrateV2ResolveRecord struct {
|
||||
// Cleanup required
|
||||
CleanupRequired bool `json:"cleanup_required"`
|
||||
|
||||
// Message
|
||||
Message string `json:"message"`
|
||||
|
||||
// Resolution
|
||||
Resolution Resolution `json:"resolution"`
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ type UserGrantRequest struct {
|
||||
|
||||
// UserGrant grants user access to the compute
|
||||
//
|
||||
// Deprecated: will be removed in SDK v1.17
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) UserGrant(ctx context.Context, req UserGrantRequest) (bool, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
|
||||
@@ -17,7 +17,7 @@ type UserListRequest struct {
|
||||
|
||||
// UserList gets users list for compute
|
||||
//
|
||||
// Deprecated: will be removed in SDK v1.17
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) UserList(ctx context.Context, req UserListRequest) (*ListUsers, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
|
||||
@@ -21,7 +21,7 @@ type UserRevokeRequest struct {
|
||||
|
||||
// UserRevoke revokes user access to the compute
|
||||
//
|
||||
// Deprecated: will be removed in SDK v1.17
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) UserRevoke(ctx context.Context, req UserRevokeRequest) (bool, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
|
||||
@@ -29,7 +29,7 @@ type UserUpdateRequest struct {
|
||||
|
||||
// UserUpdate updates user access to the compute
|
||||
//
|
||||
// Deprecated: will be removed in SDK v1.17
|
||||
// Deprecated: will be removed in SDK v17.0
|
||||
func (c Compute) UserUpdate(ctx context.Context, req UserUpdateRequest) (bool, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user