main v1.10.1
parent e04dc42d2b
commit cbce7f434f

@ -1,64 +1,40 @@
## Version 1.10.0
## Version 1.10.1
### Добавлено
#### compute
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BGOS-204 | Вычисляемое поле `VNCPassword` в моделях `RecordCompute` в cloudapi/compute и cloudbroker/compute |
| BGOS-204 | Опциональное поле `CDImageID` в структуре `ListRequest` в cloudbroker/compute |
| BGOS-211 | Вычисляемое поле `AutoStart` в моделях `RecordCompute, ItemCompute, InfoCompute` в cloudapi/compute и cloudbroker/compute |
| BGOS-211 | Опциональное поле `AutoStart` в структурах `PinToStackRequest, UpdateRequest` в cloudapi/compute и cloudbroker/compute |
| BGOS-268 | Вычисляемое поле `PreferredCPU` в моделях `RecordCompute, ItemCompute, InfoCompute` в cloudapi/compute и cloudbroker/compute |
| BGOS-268 | Опциональное поле `PreferredCPU` в структурах `ResizeRequest, UpdateRequest` в cloudapi/compute и cloudbroker/compute |
#### extnet
#### kvmx86
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BGOS-204 | Вычисляемое поле `AccountID` в модели `ItemReservation` в cloudapi/extnet и cloudbroker/extnet |
| BGOS-205 | Методы API `cloudbroker/extnet/addReservedIp, cloudbroker/extnet/getReservedIp, cloudapi/extnet/getReservedIp, cloudbroker/extnet/delReservedIp` в cloudapi/extnet и cloudbroker/extnet |
#### image
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BGOS-214 | Вычисляемое поле `SnapshotID` в модели `RecordImage, ItemImage` в cloudbroker/image |
| BGOS-268 | Опциональное поле `PreferredCPU` в структурах `CreateRequest, CreateBlankRequest` в cloudapi/kvmx86 и cloudbroker/kvmx86 |
#### node
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BGOS-204 | Обязательное поле `Spoofchk` в структуре `SetVFsNumberRequest` в cloudbroker/node |
| BGOS-213 | Вычисляемое поле `NetAddr` в модели `RecordNode` в cloudbroker/node |
| BGOS-270 | Вычисляемые поля `DPDK, UEFIFirmwareFile` в модели `ItemNode` в cloudbroker/node |
| BGOS-271 | Вычисляемые поля `DPDK, NetworkMode, ToActive, ToInstalling, ToMaintenance, ToRestricted` в моделях `RecordNode` в cloudbroker/node |
#### vgpu
#### sep
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BGOS-204 | Опциональное поле `NID` в структуре `ListRequest` в cloudbroker/vgpu |
| BGOS-273 | Вычисляемое поле `MultipathNum` в модели `RecordSEP` cloudbroker/sep |
#### vins
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BGOS-204 | Вычисляемое поле `VNCPassword` в модели `RecordVNFDev` в cloudapi/vins и cloudbroker/vins |
| BGOS-204 | Вычисляемое поле `AccoundID` в модели `ItemReservation` в cloudapi/vins |
| BGOS-265 | Вычисляемое поле `AccoundID` в модели `ItemReservation` в cloudbroker/vins |
### Удалено
#### disks
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BGOS-206 | Метод `Resize` в cloudapi/disks и cloudbroker/disks |
#### sep
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BGOS-206 | Метод `UpdateCapacityLimit` cloudbroker/sep |
| BGOS-272 | Вычисляемые поля `_ckey,_meta` в модели `RecordSEP` в cloudbroker/sep |
#### vins
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BGOS-204 | Вычисляемые поля `ClientType,Description,DomainName,Hostname` в модели `ItemReservation` в cloudapi/vins и cloudbroker/vins |
| BGOS-204 | Вычисляемое поле `СomputeIds` в структуре `StaticRouteAddRequest` в cloudapi/vins и cloudbroker/vins |
### Исправлено
#### compute
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BATF-215 | Изменены возвращаемые параметры метода `PinToStack` на `bool,error` в cloudapi/compute |

@ -378,6 +378,21 @@ func chipsetValidator(fe validator.FieldLevel) bool {
return IsInSlice(fieldValue, chipsetValues)
}
func preferredCPUValidator(fe validator.FieldLevel) bool {
fieldSlice, ok := fe.Field().Interface().([]int64)
if !ok {
return false
}
for _, value := range fieldSlice {
if value < -1 {
return false
}
}
return true
}
// 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 {

@ -94,6 +94,9 @@ func errorMessage(fe validator.FieldError) string {
case "mtu":
return fmt.Sprint(prefix, fe.Field(), "must be ", mtuMin, "-", mtuMax)
case "preferredCPU":
return fmt.Sprint(prefix, fe.Field(), "must be equal to or greater than", -1)
case "computex86NetType":
return fmt.Sprintf("%s %s must be one of the following: %s",
prefix,

@ -261,5 +261,10 @@ func registerAllValidators(validate *validator.Validate) error {
return err
}
err = validate.RegisterValidation("preferredCPU", preferredCPUValidator)
if err != nil {
return err
}
return nil
}

@ -428,6 +428,9 @@ type RecordCompute struct {
// Pinned or not
Pinned bool `json:"pinned"`
// PreferredCPU
PreferredCPU []int64 `json:"preferredCpu"`
// Number of RAM
RAM uint64 `json:"ram"`
@ -980,6 +983,9 @@ type ItemCompute struct {
// Pinned or not
Pinned bool `json:"pinned"`
// PreferredCPU
PreferredCPU []int64 `json:"preferredCpu"`
// Number of RAM
RAM uint64 `json:"ram"`

@ -27,6 +27,10 @@ type ResizeRequest struct {
// Force compute resize
// Required: false
Force bool `url:"force,omitempty" json:"force,omitempty"`
// Recommended isolated CPUs. Field is ignored if compute.cpupin=False or compute.pinned=False
// Required: false
PreferredCPU []int64 `url:"preferredCpu,omitempty" json:"preferredCpu,omitempty" validate:"omitempty,preferredCPU"`
}
// GetRAM returns RAM field values

@ -48,6 +48,10 @@ type UpdateRequest struct {
// Required: false
// Default: false
AutoStart bool `url:"autoStart" json:"autoStart"`
// Recommended isolated CPUs. Field is ignored if compute.cpupin=False or compute.pinned=False
// Required: false
PreferredCPU []int64 `url:"preferredCpu,omitempty" json:"preferredCpu,omitempty" validate:"omitempty,preferredCPU"`
}
// Update updates some properties of the compute

@ -164,6 +164,10 @@ type CreateRequest struct {
// Required: false
// Default: false
HPBacked bool `url:"hpBacked" json:"hpBacked"`
// Recommended isolated CPUs. Field is ignored if compute.cpupin=False or compute.pinned=False
// Required: false
PreferredCPU []int64 `url:"preferredCpu,omitempty" json:"preferredCpu,omitempty" validate:"omitempty,preferredCPU"`
}
// GetRAM returns RAM field values

@ -68,6 +68,10 @@ type CreateBlankRequest struct {
// Text description of this VM
// Required: false
Description string `url:"desc,omitempty" json:"desc,omitempty"`
// Recommended isolated CPUs. Field is ignored if compute.cpupin=False or compute.pinned=False
// Required: false
PreferredCPU []int64 `url:"preferredCpu,omitempty" json:"preferredCpu,omitempty" validate:"omitempty,preferredCPU"`
}
// GetRAM returns RAM field values

@ -9,7 +9,7 @@ import (
func (a Audit) ExportAuditsToFile(ctx context.Context) ([]byte, error) {
url := "/cloudbroker/audit/exportAuditsToFile"
res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, nil)
res, err := a.client.DecortApiCall(ctx, http.MethodGet, url, nil)
if err != nil {
return nil, err
}

@ -732,6 +732,9 @@ type InfoCompute struct {
// Pinned
Pinned bool `json:"pinned"`
// PreferredCPU
PreferredCPU []int64 `json:"preferredCpu"`
// Number of RAM
RAM uint64 `json:"ram"`
@ -981,6 +984,9 @@ type RecordCompute struct {
// Pinned
Pinned bool `json:"pinned"`
// PreferredCPU
PreferredCPU []int64 `json:"preferredCpu"`
// Number of RAM
RAM uint64 `json:"ram"`

@ -27,6 +27,10 @@ type ResizeRequest struct {
// Force compute resize
// Required: false
Force bool `url:"force,omitempty" json:"force,omitempty"`
// Recommended isolated CPUs. Field is ignored if compute.cpupin=False or compute.pinned=False
// Required: false
PreferredCPU []int64 `url:"preferredCpu,omitempty" json:"preferredCpu,omitempty" validate:"omitempty,preferredCPU"`
}
// GetRAM returns RAM field values

@ -48,6 +48,10 @@ type UpdateRequest struct {
// Required: false
// Default: false
AutoStart bool `url:"autoStart" json:"autoStart"`
// Recommended isolated CPUs. Field is ignored if compute.cpupin=False or compute.pinned=False
// Required: false
PreferredCPU []int64 `url:"preferredCpu,omitempty" json:"preferredCpu,omitempty" validate:"omitempty,preferredCPU"`
}
// Update updates some properties of the compute

@ -168,6 +168,10 @@ type CreateRequest struct {
// Required: false
// Default: false
HPBacked bool `url:"hpBacked" json:"hpBacked"`
// Recommended isolated CPUs. Field is ignored if compute.cpupin=False or compute.pinned=False
// Required: false
PreferredCPU []int64 `url:"preferredCpu,omitempty" json:"preferredCpu,omitempty" validate:"omitempty,preferredCPU"`
}
// GetRAM returns RAM field values

@ -68,6 +68,10 @@ type CreateBlankRequest struct {
// Type of the emulated system, Q35 or i440fx
// Required: false
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
// Recommended isolated CPUs. Field is ignored if compute.cpupin=False or compute.pinned=False
// Required: false
PreferredCPU []int64 `url:"preferredCpu,omitempty" json:"preferredCpu,omitempty" validate:"omitempty,preferredCPU"`
}
// GetRAM returns RAM field values

@ -11,6 +11,9 @@ type RecordNode struct {
// CPU Allocation Ratio
CPUAllocationRatio float64 `json:"cpu_allocation_ratio"`
// DPDK info
DPDK DPDK `json:"dpdk"`
// GID
GID uint64 `json:"gid"`
@ -32,6 +35,9 @@ type RecordNode struct {
// Netaddr
NetAddr NetAddr `json:"netaddr"`
// Network mode
NetworkMode string `json:"networkmode"`
// Nic Info
NicInfo ListNicInfo `json:"nicInfo"`
@ -53,6 +59,18 @@ type RecordNode struct {
// Status
Status string `json:"status"`
// To active
ToActive Role `json:"to_active"`
// To installing
ToInstalling Role `json:"to_installing"`
// To maintenance
ToMaintenance Role `json:"to_maintenance"`
// To restricted
ToRestricted Role `json:"to_restricted"`
// Version
Version string `json:"version"`
}
@ -125,6 +143,9 @@ type ItemNode struct {
// Description
Description string `json:"description"`
// DPDK
DPDK DPDK `json:"dpdk"`
// GID
GID uint64 `json:"gid"`
@ -227,6 +248,9 @@ type ItemNode struct {
// Type
Type string `json:"type"`
//UEFI Firmware File
UEFIFirmwareFile string `json:"uefiFirmwareFile"`
// Version
Version string `json:"version"`
}
@ -326,3 +350,33 @@ type NetAddr struct {
// IP list backplane1 node
IP []string `json:"ip"`
}
// DPDK info
type DPDK struct {
// Bridges
Bridges Bridges `json:"bridges"`
// hp memory
HPMemory map[string]uint64 `json:"hp_memory"`
// pmd cpu
PMDCPU []uint64 `json:"pmd_cpu"`
}
// Bridges
type Bridges struct {
Backplane1 Backplane1 `json:"backplane1"`
}
// Backplane1
type Backplane1 struct {
Interfaces []string `json:"interfaces"`
NumaNode uint64 `json:"numa_node"`
}
// Role
type Role struct {
Actor string `json:"actor"`
Reason string `json:"reason"`
Time uint64 `json:"time"`
}

@ -25,7 +25,7 @@ type Total struct {
}
type ByPool struct {
// Disk count
DiskCount uint64 `json:"disk_count"`
@ -101,12 +101,6 @@ type SEPConfig map[string]interface{}
// Detailed information about SEP
type RecordSEP struct {
// CKey
CKey string `json:"_ckey"`
// Meta
Meta []interface{} `json:"_meta"`
// Config
Config SEPConfig `json:"config"`
@ -128,6 +122,9 @@ type RecordSEP struct {
// Milestones
Milestones uint64 `json:"milestones"`
// MultipathNum
MultipathNum uint64 `json:"multipathNum"`
// Name
Name string `json:"name"`

@ -242,6 +242,9 @@ type VNFDev struct {
// Main information about reservation
type ItemReservation struct {
// Account ID
AccountID uint64 `json:"account_id"`
// IP
IP string `json:"ip"`

Loading…
Cancel
Save