Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ec34c6bfc |
135
CHANGELOG.md
135
CHANGELOG.md
@@ -1,131 +1,18 @@
|
||||
## Version 1.9.0
|
||||
## Version 1.9.1
|
||||
|
||||
### Feature
|
||||
|
||||
#### account
|
||||
- Delete field RecursiveDelete in DeleteUserRequest in cloudapi/account and cloudbroker/account
|
||||
- Add field UniqPools in UpdateRequest in cloudapi/account
|
||||
- Add field ClearUniqPools in UpdateRequest in cloudbroker/account
|
||||
- Add field SortBy in listFlipGroups in cloudapi/account
|
||||
- Change Ratio field from required to optional in SetCPUAllocationRatioRequest in cloudbroker/compute
|
||||
|
||||
#### audit
|
||||
- Add endpoint Get in cloudapi/audit
|
||||
- Add endpoint ExportAuditsToFile in cloudbroker/audit
|
||||
- Delete field Apitask in model RecordAudit in cloudbroker/audit
|
||||
|
||||
#### compute
|
||||
- Add support DPDK network net type in NetAttach endpoints in cloudapi/compute and cloudbroker/compute
|
||||
- Add field Force in CloneRequest in cloudapi/compute and cloudbroker/compute
|
||||
- Change TargetStackID field from required to optional (add default 0 value) in PinToStackRequest in cloudbroker/compute
|
||||
- Change return value type from bool to string in SnapshotDelete in cloudbroker/compute and cloudapi/compute
|
||||
- Add field StatusCheck in MigrateStorageAbortRequest in cloudbroker/compute
|
||||
- Add function SnapshotDeleteAsync in cloudapi/compute and cloudbroker/compute
|
||||
- Add field StackID in ListRequest in cloudbroker/compute
|
||||
- Add field NodeID in model RecordCompute in cloudbroker/compute
|
||||
- Add function SetNetConfig in cloudbroker/compute
|
||||
- Add field MTU in model RecordNetAttach in cloudapi/compute and cloudbroker/compute
|
||||
- Change Mode field from required to optional in DiskMigrateRequest in cloudapi/compute
|
||||
- Add field Chipset in model RecordCompute in cloudapi/compute and cloudbroker/compute
|
||||
- Add field BusNumber in model RecordCompute, ItemComputeDisk, ItemDisk, InfoDisk in cloudapi/compute and cloudbroker/compute
|
||||
- Add field ImageID in ListRequest in cloudbroker/compute
|
||||
- Change Mode field from required to optional in DiskMigrateRequest in cloudbroker/compute
|
||||
- Add field Chipset in ListRequest in cloudbroker/compute
|
||||
- Add endpoints ChangeIP in cloudapi/compute and cloudbroker/compute
|
||||
|
||||
#### disks
|
||||
- Change drivers field from optional to required in FromPlatformDiskRequest in cloudapi/disks, cloudbroker/disks
|
||||
|
||||
#### dpdknet
|
||||
- Add endpoints List, Get in cloudapi/dpdk
|
||||
- Add endpoints Create, Delete, Disable Enable, Get, List, Update in cloudbroker/dpdk
|
||||
|
||||
#### extnet
|
||||
- Change StackId field from required to optional in DeviceMigrateRequest in cloudbroker/extnet
|
||||
### Исправлено
|
||||
|
||||
#### flipgroup
|
||||
- Change ClientIDs field from []uint64 to []string in ListRequest, cloudapi/flipgroup
|
||||
|
||||
#### grid
|
||||
- Change PasswordLength field from required to optional (add default 9 value) in SetPasswordPolicyRequest in cloudbroker/grid
|
||||
- Set Default value (true) in fields Digits and Uppercase in SetPasswordPolicyRequest in cloudbroker/grid
|
||||
- Add fields ckey, meta in model RecordGrid in cloudbroker/grid
|
||||
- Change GID field from uint64 to string in ExecuteMaintenanceScriptRequest in cloudbroker/grid
|
||||
- Add endpoints GetSettings and GetSettingsRaw in cloudbroker/grid
|
||||
|
||||
#### group
|
||||
- Change StackId field from uint64 to string in ListRequest in cloudbroker/group
|
||||
|
||||
#### image:
|
||||
- Change Drivers field from required to optional in CreateCDROMImageRequest in cloudbroker/image
|
||||
- Add field Enabled in ListRequest in cloudapi/image and cloudbroker/image
|
||||
- Delete field GID in SyncCreateRequest in cloudbroker/image
|
||||
- Delete field Permanently in DeleteRequest in cloudapi/image and cloudbroker/image
|
||||
- Delete field Permanently in DeleteImagesRequest in cloudbroker/image
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BGOS-194 | Изменен тип поля `ClientIDs` c []string на []uint64 в структуре `ListRequest` в cloudapi/flipgroup |
|
||||
|
||||
#### k8s
|
||||
- Add fields HighlyAvailableLB, AddressVip, ExtnetOnly, WithLB in model RecordK8S in cloudbroker/k8s and cloudapi/k8s
|
||||
- Change MasterIds field from a slice of string to a slice of integers in DeleteMasterFromGroupRequest in cloudbroker/k8s and cloudapi/k8s
|
||||
- Add field Chipset in WorkerAddRequest, WorkersGroupAddRequest in cloudapi/k8s, cloudbroker/k8s
|
||||
- Add field Chipset in CreateRequest in cloudapi/k8s, cloudbroker/k8s
|
||||
|
||||
#### kvmx86
|
||||
- Add support DPDK network interface in Create endpoints in cloudapi/kvmx86 and cloudbroker/kvmx8
|
||||
- Add field Chipset in CreateRequest, CreateBlankRequest, MassCreateRequest, CreateBlankRequest in cloudapi/kvmx86 and cloudbroker/kvmx86
|
||||
- Add function MassCreateAsync in cloudbroker/kvmx86
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BGOS-193 | Изменен тип возвращаемых данных метода `WorkersGroupAdd` c uint64, error на string, error в cloudapi/k8s |
|
||||
|
||||
#### lb
|
||||
- Change ExtNetID field from uint64 to int64 in CreateRequest, ItemLBList, RecordLB in cloudapi/lb, cloudbroker/lb
|
||||
- Change ExtNetID, VINSID fields from required to optional in CreateRequest in cloudapi/lb
|
||||
|
||||
#### node
|
||||
- Add field Force in EnableRequest in cloudbroker/node
|
||||
- Add function EnableAsync in cloudbroker/node
|
||||
|
||||
#### rg
|
||||
- Add endpoints removeDefNet in cloudapi/rg and cloudbroker/rg
|
||||
- Add field ClearUniqPools in UpdateRequest in cloudbroker/rg and cloudapi/rg
|
||||
- Add field UniqPools in UpdateRequest in cloudapi/rg
|
||||
- Delete field IPCIDR in CreateRequest in cloudbroker/rg
|
||||
|
||||
#### sep
|
||||
- Add endpoints SharedLockStart and SharedLockStop in cloudbroker/sep
|
||||
|
||||
#### user
|
||||
- Add field GUID in models ItemAudit in cloudapi/user and cloudbroker/user
|
||||
- Add fields MaxStatusCode and MinStatusCode in GetAuditRequest in cloudapi/user
|
||||
|
||||
#### vins
|
||||
- Add field Computes in model ListVINS in cloudbroker/vins
|
||||
- Add fields VNFDevId in ListRequest in cloudapi/vins and in ListDeletedRequest in cloudbroker/vins
|
||||
- Add field MTU, LibvirtSettings in model ItemInterface in cloudapi/vins and cloudbroker/vins
|
||||
- Add field BusNumber in model ItemInterface in cloudapi/vins and cloudbroker/vins
|
||||
|
||||
### Removed
|
||||
|
||||
#### common
|
||||
- The reason field has been deleted everywhere
|
||||
|
||||
#### accounts
|
||||
- The GetConsumption function was removed in cloudapi/account
|
||||
|
||||
#### grid
|
||||
- The CheckVMs function was removed in cloudbroker/grid
|
||||
- The CreateSystemSpace function was removed in cloudbroker/grid
|
||||
|
||||
#### image
|
||||
- The Permanently field has been removed from DeleteCDROMImageRequest in cloudbroker/image
|
||||
|
||||
#### kvmppc
|
||||
- The group has been completely deleted
|
||||
|
||||
#### sizes
|
||||
- The group has been completely deleted
|
||||
|
||||
#### user
|
||||
- The StatusCode field has been deleted from GetAuditRequest in cloudapi/user
|
||||
|
||||
### Bugfix
|
||||
|
||||
#### backup
|
||||
- Fixed RestoreDisksFromBackupRequest in cloudbroker/backup
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BGOS-194 | Исправлена валидация полей `ExtNetID` и `VINSID` в структурах `CreateRequest` в cloudapi/lb и cloudbroker/lb |
|
||||
@@ -372,6 +372,13 @@ func urlValidartor(fl validator.FieldLevel) bool {
|
||||
return err == nil
|
||||
}
|
||||
|
||||
func chipsetValidator(fe validator.FieldLevel) bool {
|
||||
fieldValue := fe.Field().String()
|
||||
fieldValue = strings.ToLower(fieldValue)
|
||||
|
||||
return IsInSlice(fieldValue, chipsetValues)
|
||||
}
|
||||
|
||||
// ValidateRAM checks if request contains RAM value that is positive integer divisible by divisibility passed.
|
||||
// It is recommended to pass constants.RAM_DIVISIBILITY as divisility arguement
|
||||
func ValidateRAM(r interfaces.RequestWithRAM, divisibility uint64) error {
|
||||
|
||||
@@ -299,6 +299,12 @@ func errorMessage(fe validator.FieldError) string {
|
||||
prefix,
|
||||
fe.Field(),
|
||||
joinValues(kvmx86NetTypeValues))
|
||||
|
||||
case "chipset":
|
||||
return fmt.Sprintf("%s %s must be one of the following: %s",
|
||||
prefix,
|
||||
fe.Field(),
|
||||
joinValues(chipsetValues))
|
||||
}
|
||||
|
||||
return fe.Error()
|
||||
|
||||
@@ -256,5 +256,10 @@ func registerAllValidators(validate *validator.Validate) error {
|
||||
return err
|
||||
}
|
||||
|
||||
err = validate.RegisterValidation("chipset", chipsetValidator)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -62,6 +62,8 @@ var (
|
||||
ioEventFDValues = []string{"on", "off", "selected by hypervisor"}
|
||||
|
||||
eventIDxValues = []string{"on", "off", "selected by hypervisor"}
|
||||
|
||||
chipsetValues = []string{"i440fx", "Q35"}
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -37,7 +37,7 @@ type UpdateRequest struct {
|
||||
|
||||
// Type of the emulated system, Q35 or i440fx
|
||||
// Required: false
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty"`
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
|
||||
|
||||
// Use Huge Pages to allocate RAM of the virtual machine. The system must be pre-configured by allocating Huge Pages on the physical node
|
||||
// Required: false
|
||||
|
||||
@@ -44,7 +44,7 @@ type ListRequest struct {
|
||||
|
||||
// Find by list of clientIds
|
||||
// Required: false
|
||||
ClientIDs []string `url:"clientIds,omitempty" json:"clientIds,omitempty"`
|
||||
ClientIDs []uint64 `url:"clientIds,omitempty" json:"clientIds,omitempty"`
|
||||
|
||||
// Page number
|
||||
// Required: false
|
||||
|
||||
@@ -165,7 +165,7 @@ type CreateRequest struct {
|
||||
|
||||
// Type of the emulated system, Q35 or i440fx
|
||||
// Required: false
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty"`
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
|
||||
}
|
||||
|
||||
// GetRAM returns RAM field values
|
||||
|
||||
@@ -24,7 +24,7 @@ type WorkerAddRequest struct {
|
||||
|
||||
// Type of the emulated system, Q35 or i440fx
|
||||
// Required: false
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty"`
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
|
||||
}
|
||||
|
||||
// WorkerAdd adds worker nodes to a Kubernetes cluster
|
||||
|
||||
@@ -3,7 +3,6 @@ package k8s
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||
)
|
||||
@@ -63,7 +62,7 @@ type WorkersGroupAddRequest struct {
|
||||
|
||||
// Type of the emulated system, Q35 or i440fx
|
||||
// Required: false
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty"`
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
|
||||
}
|
||||
|
||||
// GetRAM returns RAM field values
|
||||
@@ -77,23 +76,18 @@ func (r WorkersGroupAddRequest) GetRAM() map[string]uint64 {
|
||||
}
|
||||
|
||||
// WorkersGroupAdd adds workers group to Kubernetes cluster
|
||||
func (k8s K8S) WorkersGroupAdd(ctx context.Context, req WorkersGroupAddRequest) (uint64, error) {
|
||||
func (k8s K8S) WorkersGroupAdd(ctx context.Context, req WorkersGroupAddRequest) (string, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
return 0, validators.ValidationErrors(validators.GetErrors(err))
|
||||
return "", validators.ValidationErrors(validators.GetErrors(err))
|
||||
}
|
||||
|
||||
url := "/cloudapi/k8s/workersGroupAdd"
|
||||
|
||||
res, err := k8s.client.DecortApiCall(ctx, http.MethodPost, url, req)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
return "", err
|
||||
}
|
||||
|
||||
result, err := strconv.ParseUint(string(res), 10, 64)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return result, nil
|
||||
return string(res), nil
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ type CreateRequest struct {
|
||||
|
||||
// Type of the emulated system, Q35 or i440fx
|
||||
// Required: false
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty"`
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
|
||||
|
||||
// Use Huge Pages to allocate RAM of the virtual machine. The system must be pre-configured by allocating Huge Pages on the physical node
|
||||
// Required: false
|
||||
|
||||
@@ -63,7 +63,7 @@ type CreateBlankRequest struct {
|
||||
|
||||
// Type of the emulated system, Q35 or i440fx
|
||||
// Required: false
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty"`
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
|
||||
|
||||
// Text description of this VM
|
||||
// Required: false
|
||||
|
||||
@@ -22,12 +22,12 @@ type CreateRequest struct {
|
||||
Name string `url:"name" json:"name" validate:"required"`
|
||||
|
||||
// External network to connect this load balancer to
|
||||
// Required: true
|
||||
ExtNetID uint64 `url:"extnetId" json:"extnetId" validate:"required"`
|
||||
// Required: true, can be 0
|
||||
ExtNetID uint64 `url:"extnetId" json:"extnetId"`
|
||||
|
||||
// Internal network (VINS) to connect this load balancer to
|
||||
// Required: true
|
||||
VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"`
|
||||
// Required: true, can be 0
|
||||
VINSID uint64 `url:"vinsId" json:"vinsId"`
|
||||
|
||||
// Custom sysctl values for Load Balancer instance. Applied on boot
|
||||
// Required: false
|
||||
|
||||
@@ -37,7 +37,7 @@ type UpdateRequest struct {
|
||||
|
||||
// Type of the emulated system, Q35 or i440fx
|
||||
// Required: false
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty"`
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
|
||||
|
||||
// Use Huge Pages to allocate RAM of the virtual machine. The system must be pre-configured by allocating Huge Pages on the physical node
|
||||
// Required: false
|
||||
|
||||
@@ -167,7 +167,7 @@ type CreateRequest struct {
|
||||
|
||||
// Type of the emulated system, Q35 or i440fx
|
||||
// Required: false
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty"`
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
|
||||
}
|
||||
|
||||
// GetRAM returns RAM values
|
||||
|
||||
@@ -24,7 +24,7 @@ type WorkerAddRequest struct {
|
||||
|
||||
// Type of the emulated system, Q35 or i440fx
|
||||
// Required: false
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty"`
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
|
||||
}
|
||||
|
||||
// WorkerAdd adds worker nodes to a kubernetes cluster
|
||||
|
||||
@@ -65,7 +65,7 @@ type WorkersGroupAddRequest struct {
|
||||
|
||||
// Type of the emulated system, Q35 or i440fx
|
||||
// Required: false
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty"`
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
|
||||
}
|
||||
|
||||
// GetRAM returns RAM field values
|
||||
|
||||
@@ -157,7 +157,7 @@ type CreateRequest struct {
|
||||
|
||||
// Type of the emulated system, Q35 or i440fx
|
||||
// Required: false
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty"`
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
|
||||
|
||||
// Use Huge Pages to allocate RAM of the virtual machine. The system must be pre-configured by allocating Huge Pages on the physical node
|
||||
// Required: false
|
||||
|
||||
@@ -67,7 +67,7 @@ type CreateBlankRequest struct {
|
||||
|
||||
// Type of the emulated system, Q35 or i440fx
|
||||
// Required: false
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty"`
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
|
||||
}
|
||||
|
||||
// GetRAM returns RAM field values
|
||||
|
||||
@@ -78,7 +78,7 @@ type MassCreateRequest struct {
|
||||
|
||||
// Type of the emulated system, Q35 or i440fx
|
||||
// Required: false
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty"`
|
||||
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
|
||||
}
|
||||
|
||||
type asyncWrapperMassCreateRequest struct {
|
||||
|
||||
@@ -22,12 +22,12 @@ type CreateRequest struct {
|
||||
Name string `url:"name" json:"name" validate:"required"`
|
||||
|
||||
// External network to connect this load balancer to
|
||||
// Required: true
|
||||
ExtNetID int64 `url:"extnetId" json:"extnetId" validate:"required"`
|
||||
// Required: true, can be 0
|
||||
ExtNetID int64 `url:"extnetId" json:"extnetId"`
|
||||
|
||||
// Internal network (VINS) to connect this load balancer to
|
||||
// Required: true
|
||||
VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"`
|
||||
// Required: true, can be 0
|
||||
VINSID uint64 `url:"vinsId" json:"vinsId"`
|
||||
|
||||
// Start now Load balancer
|
||||
// Required: true
|
||||
|
||||
Reference in New Issue
Block a user