v1.8.3
This commit is contained in:
@@ -384,7 +384,7 @@ type ItemVINS struct {
|
||||
ExtnetId uint64 `json:"extnetId"`
|
||||
|
||||
// Free IPs
|
||||
FreeIPs uint64 `json:"freeIPs"`
|
||||
FreeIPs int64 `json:"freeIPs"`
|
||||
|
||||
// ID
|
||||
ID uint64 `json:"id"`
|
||||
|
||||
@@ -170,7 +170,7 @@ type RecordExtNet struct {
|
||||
Excluded []Excluded `json:"excluded"`
|
||||
|
||||
// Free IPs
|
||||
FreeIPs uint64 `json:"free_ips"`
|
||||
FreeIPs int64 `json:"free_ips"`
|
||||
|
||||
// Gateway
|
||||
Gateway string `json:"gateway"`
|
||||
|
||||
@@ -787,7 +787,7 @@ type ItemVINS struct {
|
||||
ExtnetId uint64 `json:"extnetId"`
|
||||
|
||||
// Free IPs
|
||||
FreeIPs uint64 `json:"freeIPs"`
|
||||
FreeIPs int64 `json:"freeIPs"`
|
||||
|
||||
// ID
|
||||
ID uint64 `json:"id"`
|
||||
|
||||
@@ -27,7 +27,7 @@ type ItemVINS struct {
|
||||
ExtnetId uint64 `json:"extnetId"`
|
||||
|
||||
// Free IPs
|
||||
FreeIPs uint64 `json:"freeIPs"`
|
||||
FreeIPs int64 `json:"freeIPs"`
|
||||
|
||||
// ID
|
||||
ID uint64 `json:"id"`
|
||||
|
||||
@@ -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"`
|
||||
|
||||
@@ -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"`
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"`
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user