v16.12.0
This commit is contained in:
1 parent
ee7a8ebb55
commit
3b0a73c424
17 files changed
+218
-20
No files matched your search
@@ -40,6 +40,24 @@ type IOTune struct {
|
||||
|
||||
// WriteIOPSSecMax
|
||||
WriteIOPSSecMax uint64 `json:"write_iops_sec_max"`
|
||||
|
||||
// ReadBytesSecMaxLength
|
||||
ReadBytesSecMaxLength uint64 `json:"read_bytes_sec_max_length"`
|
||||
|
||||
// ReadIOPSSecMaxLength
|
||||
ReadIOPSSecMaxLength uint64 `json:"read_iops_sec_max_length"`
|
||||
|
||||
// TotalBytesSecMaxLength
|
||||
TotalBytesSecMaxLength uint64 `json:"total_bytes_sec_max_length"`
|
||||
|
||||
// TotalIOPSSecMaxLength
|
||||
TotalIOPSSecMaxLength uint64 `json:"total_iops_sec_max_length"`
|
||||
|
||||
// WriteBytesSecMaxLength
|
||||
WriteBytesSecMaxLength uint64 `json:"write_bytes_sec_max_length"`
|
||||
|
||||
// WriteIOPSSecMaxLength
|
||||
WriteIOPSSecMaxLength uint64 `json:"write_iops_sec_max_length"`
|
||||
}
|
||||
|
||||
// Main information about disks
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package disks
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants"
|
||||
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators"
|
||||
)
|
||||
|
||||
type ReplicationCancelSyncRequest struct {
|
||||
// Disk ID
|
||||
// Required: true
|
||||
DiskID uint64 `url:"disk_id" json:"disk_id" validate:"required"`
|
||||
}
|
||||
|
||||
// ReplicationCancelSync cancels ongoing disk replication synchronization
|
||||
func (d Disks) ReplicationCancelSync(ctx context.Context, req ReplicationCancelSyncRequest) (bool, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
return false, validators.ValidationErrors(validators.GetErrors(err))
|
||||
}
|
||||
|
||||
url := "/cloudbroker/disks/replication_cancel_sync"
|
||||
|
||||
res, err := d.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
result, err := strconv.ParseBool(strings.TrimSpace(string(res)))
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
@@ -17,7 +17,7 @@ type ReplicationReverseRequest struct {
|
||||
|
||||
// Use planned failover for asynchronous replication
|
||||
// Required: false
|
||||
// Default: true
|
||||
// Default: true
|
||||
Planned interface{} `url:"planned,omitempty" json:"planned,omitempty" validate:"omitempty,isBool"`
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user