This commit is contained in:
2026-04-03 16:26:42 +03:00
parent 9258a1574b
commit 30e464e4d2
22 changed files with 251 additions and 100 deletions

View File

@@ -74,6 +74,7 @@ type NetAttachRequest struct {
SecGroups []uint64 `url:"security_groups,omitempty" json:"security_groups,omitempty"`
// Flag indicating whether security groups are enabled for this interface
// Not applicable to netType VFNIC, TRUNK, or SDN
// Required: false
EnableSecGroups bool `url:"enable_secgroups,omitempty" json:"enable_secgroups,omitempty"`

View File

@@ -69,6 +69,7 @@ type Interface struct {
SecGroups []uint64 `url:"security_groups,omitempty" json:"security_groups,omitempty"`
// Flag indicating whether security groups are enabled for this interface
// Not applicable to netType VFNIC, TRUNK, or SDN
// Required: false
EnableSecGroups bool `url:"enable_secgroups,omitempty" json:"enable_secgroups,omitempty"`

View File

@@ -16,22 +16,22 @@ type HighlyAvailableRequest struct {
}
// HighlyAvailable makes load balancer highly available
func (l LB) HighlyAvailable(ctx context.Context, req HighlyAvailableRequest) (uint64, error) {
func (l LB) HighlyAvailable(ctx context.Context, req HighlyAvailableRequest) (bool, error) {
err := validators.ValidateRequest(req)
if err != nil {
return 0, validators.ValidationErrors(validators.GetErrors(err))
return false, validators.ValidationErrors(validators.GetErrors(err))
}
url := "/cloudapi/lb/makeHighlyAvailable"
res, err := l.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil {
return 0, err
return false, err
}
result, err := strconv.ParseUint(string(res), 10, 64)
result, err := strconv.ParseBool(string(res))
if err != nil {
return 0, err
return false, err
}
return result, nil

View File

@@ -57,6 +57,11 @@ type CreateInAccountRequest struct {
// Zone ID
// Required: false
ZoneID uint64 `url:"zoneId,omitempty" json:"zoneId,omitempty"`
// Enable security groups for VINS
// Required: false
// Default: false
EnableSecGroups interface{} `url:"enable_secgroups,omitempty" json:"enable_secgroups,omitempty" validate:"omitempty,isBool"`
}
type wrapperCreateRequestInAcc struct {

View File

@@ -51,6 +51,11 @@ type CreateInRGRequest struct {
// Zone ID
// Required: false
ZoneID uint64 `url:"zoneId,omitempty" json:"zoneId,omitempty"`
// Enable security groups for VINS
// Required: false
// Default: false
EnableSecGroups interface{} `url:"enable_secgroups,omitempty" json:"enable_secgroups,omitempty" validate:"omitempty,isBool"`
}
type wrapperCreateRequestInRG struct {