v1.14.3
This commit is contained in:
@@ -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 := "/cloudbroker/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
|
||||
}
|
||||
|
||||
@@ -481,6 +481,9 @@ type ItemDisk struct {
|
||||
// Present to
|
||||
PresentTo map[string]uint64 `json:"presentTo"`
|
||||
|
||||
// Provision
|
||||
Provision string `json:"provision"`
|
||||
|
||||
// Purge attempts
|
||||
PurgeAttempts uint64 `json:"purgeAttempts"`
|
||||
|
||||
|
||||
@@ -131,6 +131,9 @@ type InfoDisk struct {
|
||||
// Present to
|
||||
PresentTo map[string]uint64 `json:"presentTo"`
|
||||
|
||||
// Provision
|
||||
Provision string `json:"provision"`
|
||||
|
||||
// Purge attempts
|
||||
PurgeAttempts uint64 `json:"purgeAttempts"`
|
||||
|
||||
|
||||
@@ -28,8 +28,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"`
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ type InterfaceMassCreate 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"`
|
||||
|
||||
|
||||
@@ -13,6 +13,10 @@ type GetLogicalCoresCountRequest struct {
|
||||
// Node ID
|
||||
// Required: true
|
||||
NodeId uint64 `url:"node_id" json:"node_id" validate:"required"`
|
||||
|
||||
// Target
|
||||
// Required: false
|
||||
Target string `url:"target,omitempty" json:"target,omitempty" validate:"omitempty,oneof=core node"`
|
||||
}
|
||||
|
||||
// GetLogicalCoresCount get logical cores count by node
|
||||
@@ -24,7 +28,7 @@ func (i Node) GetLogicalCoresCount(ctx context.Context, req GetLogicalCoresCount
|
||||
|
||||
url := "/cloudbroker/node/get_logical_cores_count"
|
||||
|
||||
res, err := i.client.DecortApiCall(ctx, http.MethodPost, url, req)
|
||||
res, err := i.client.DecortApiCall(ctx, http.MethodGet, url, req)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
@@ -51,6 +51,10 @@ type UpdateRequest struct {
|
||||
// Storage policies
|
||||
// Required: false
|
||||
StoragePolicies []StoragePolicy `url:"-" json:"storage_policies,omitempty"`
|
||||
|
||||
// CPU allocation parameter
|
||||
// Required: false
|
||||
CPUAllocationParameter string `url:"cpu_allocation_parameter,omitempty" json:"cpu_allocation_parameter,omitempty"`
|
||||
}
|
||||
|
||||
// Update updates resource group
|
||||
|
||||
Reference in New Issue
Block a user