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"`

View File

@@ -89,6 +89,9 @@ type ItemDisk struct {
// Present to
PresentTo map[string]uint64 `json:"presentTo"`
// Provision
Provision string `json:"provision"`
// Purge time
PurgeTime uint64 `json:"purgeTime"`
@@ -241,6 +244,9 @@ type ItemDiskUnattached struct {
// Present to
PresentTo map[string]uint64 `json:"presentTo"`
// Provision
Provision string `json:"provision"`
// Purge attempts
PurgeAttempts uint64 `json:"purgeAttempts"`
@@ -471,6 +477,9 @@ type RecordDisk struct {
// Present to
PresentTo map[string]uint64 `json:"presentTo"`
// Provision
Provision string `json:"provision"`
// Purge time
PurgeTime uint64 `json:"purgeTime"`

View File

@@ -30,8 +30,8 @@ type Interface struct {
// Required: false
IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"`
// Maximum transmission unit, must be 1-9216
// Used only to DPDK net type
// Used for EXTNET, TRUNK and DPDK
// Must be 1500-9216
// Required: false
MTU uint64 `url:"mtu,omitempty" json:"mtu,omitempty" validate:"omitempty,mtu"`

View File

@@ -47,7 +47,7 @@ type RecordZone struct {
K8SIDs []uint64 `json:"k8sIds"`
// List of associated LB IDs
LBIDs []uint64 `json:"lbIds"`
LBIDs []uint64 `json:"lbsIds"`
// Status
Status string `json:"status"`