This commit is contained in:
2024-08-26 17:51:34 +03:00
parent 8eeef825c0
commit f1e0f7abb6
12 changed files with 23 additions and 23 deletions

View File

@@ -537,7 +537,7 @@ type ItemVINS struct {
ExtnetId uint64 `json:"extnetId"`
// Free IPs
FreeIPs uint64 `json:"freeIPs"`
FreeIPs int64 `json:"freeIPs"`
// ID
ID uint64 `json:"id"`

View File

@@ -156,7 +156,7 @@ type InfoDisk struct {
Shareable bool `json:"shareable"`
// Size max
SizeMax uint64 `json:"sizeMax"`
SizeMax int64 `json:"sizeMax"`
// Size used
SizeUsed float64 `json:"sizeUsed"`

View File

@@ -71,7 +71,7 @@ type ItemExtNet struct {
Description string `json:"desc"`
// Free IPs number
FreeIPs uint64 `json:"freeIps"`
FreeIPs int64 `json:"freeIps"`
// Grid ID
GID uint64 `json:"gid"`
@@ -152,7 +152,7 @@ type RecordExtNet struct {
Excluded ListReservations `json:"excluded"`
// Free IPs number
FreeIPs uint64 `json:"free_ips"`
FreeIPs int64 `json:"free_ips"`
// Gateway
Gateway string `json:"gateway"`
@@ -237,4 +237,4 @@ type ItemRoutes struct {
//Destination network mask in 255.255.255.255 format
Netmask string `json:"netmask"`
}
}

View File

@@ -401,7 +401,7 @@ type ItemVINS struct {
ExtnetId uint64 `json:"extnetId"`
// Free IPs
FreeIPs uint64 `json:"freeIPs"`
FreeIPs int64 `json:"freeIPs"`
// ID
ID uint64 `json:"id"`

View File

@@ -3,7 +3,6 @@ package sep
import (
"context"
"net/http"
"strconv"
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
)
@@ -25,23 +24,20 @@ type AddPoolRequest struct {
}
// AddPool adds pool to SEP
func (s SEP) AddPool(ctx context.Context, req AddPoolRequest) (bool, error) {
func (s SEP) AddPool(ctx context.Context, req AddPoolRequest) (string, error) {
err := validators.ValidateRequest(req)
if err != nil {
return false, validators.ValidationErrors(validators.GetErrors(err))
return "", validators.ValidationErrors(validators.GetErrors(err))
}
url := "/cloudbroker/sep/addPool"
res, err := s.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
}
result := string(res)
return result, nil
}

View File

@@ -684,7 +684,7 @@ type ItemVINS struct {
ExtnetId uint64 `json:"extnetId"`
// Free IPs
FreeIPs uint64 `json:"freeIPs"`
FreeIPs int64 `json:"freeIPs"`
// Grid ID
GID uint64 `json:"gid"`