v1.9.3 v1.8.3
parent 8eeef825c0
commit f1e0f7abb6

@ -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)

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

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

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

Loading…
Cancel
Save