This commit is contained in:
2026-03-13 17:03:28 +03:00
parent c701001bb6
commit 17017b6d5d
21 changed files with 435 additions and 64 deletions

View File

@@ -3,7 +3,6 @@ package compute
import (
"context"
"net/http"
"strconv"
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
)
@@ -20,23 +19,18 @@ type AbortSharedSnapshotMergeRequest struct {
}
// AbortSharedSnapshotMerge shared snapshots merge abort
func (c Compute) AbortSharedSnapshotMerge(ctx context.Context, req AbortSharedSnapshotMergeRequest) (bool, error) {
func (c Compute) AbortSharedSnapshotMerge(ctx context.Context, req AbortSharedSnapshotMergeRequest) (string, error) {
err := validators.ValidateRequest(req)
if err != nil {
return false, validators.ValidationErrors(validators.GetErrors(err))
return "", validators.ValidationErrors(validators.GetErrors(err))
}
url := "/cloudapi/compute/abort_shared_snapshot_merge"
res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil {
return false, err
return "", err
}
result, err := strconv.ParseBool(string(res))
if err != nil {
return false, err
}
return result, nil
return string(res), nil
}

View File

@@ -882,6 +882,9 @@ type ItemComputeDisk struct {
// Present to
PresentTo map[string]uint64 `json:"presentTo"`
// Provision
Provision string `json:"provision"`
// Purge time
PurgeTime uint64 `json:"purgeTime"`