Compare commits

..

1 Commits

Author SHA1 Message Date
f1e0f7abb6 v1.8.3 2024-08-26 17:51:34 +03:00
12 changed files with 23 additions and 23 deletions

View File

@@ -1,5 +1,9 @@
## Version 1.8.2
## Version 1.8.3
### Feature
### Bugfix
- Add universal client for connections
- Change validation conditions in field type in models IPReserveRequest (cloudapi/vins/ip_reserve and cloudbroker/vins/ip_reserve).
- Fixed the return value in cloudbroker/sep/AddPool
- Fixed the InfoDisk model in cloudbroker/disks/models
- Change variable types in fields freeIPs in models ItemVINS (cloudapi/account/listVins, cloudbroker/account/listVins, cloudapi/rg/listVins, cloudbroker/rg/listVins, cloudapi/vins/list, cloudapi/vins/listDeleted, cloudbroker/vins/list, cloudbroker/vins/listdeleted)
- Change variable types in fields freeIPs in models RecordExtNet (cloudapi/extnet/get, cloudbroker/extnet/get) and ItemExtNet(cloudbroker/extnet/list)

View File

@@ -32,7 +32,7 @@ var (
rgDefNetValues = []string{"PRIVATE", "PUBLIC", "NONE"}
rgNetTypeValues = []string{"PUBLIC", "PRIVATE"}
vinsTypeValues = []string{"DHCP", "VIP", "EXCLUDE"}
vinsTypeValues = []string{"DHCP", "VIP", "EXCLUDED"}
imageBootTypeValues = []string{"uefi", "bios"}
imageTypeValues = []string{"windows", "linux", "other"}

View File

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

View File

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

View File

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

View File

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

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