main v1.13.1
dayterr 12 hours ago
parent f0dee6360a
commit 055b256d6b

@ -1,4 +1,4 @@
## Version 1.13.0 ## Version 1.13.1
Методы `Audits` в cloudapi/compute, cloudbroker/compute, cloudapi/account, cloudbroker/account, cloudapi/vins, cloudbroker/vins, cloudapi/rg и cloudbroker/rg стали deprecated и в следующих версиях будут удалены, вместо них необходимо использовать метод `List` в cloudapi/audit и cloudbroker/audit с соответствующими фильтрами Методы `Audits` в cloudapi/compute, cloudbroker/compute, cloudapi/account, cloudbroker/account, cloudapi/vins, cloudbroker/vins, cloudapi/rg и cloudbroker/rg стали deprecated и в следующих версиях будут удалены, вместо них необходимо использовать метод `List` в cloudapi/audit и cloudbroker/audit с соответствующими фильтрами
Метод `ListNodes` в cloudbroker/image стал deprecated и в следующих версиях будет удалён Метод `ListNodes` в cloudbroker/image стал deprecated и в следующих версиях будет удалён
@ -9,60 +9,63 @@
### Добавлено ### Добавлено
#### kvmx86 #### account
| Идентификатор<br>задачи | Описание |
| --- | ---|
| BGOS-665 | Опциональные поля `HPBacked`, `CPUPin`, `NumaAffinity` в структуру запроса `CreateBlankRequest` в cloudapi/kvmx86 и cloudbroker/kvmx86 |
#### node
| Идентификатор<br>задачи | Описание | | Идентификатор<br>задачи | Описание |
| --- | ---| | --- | ---|
| BGOS-664 | Методы `GetLogicalCoresCount`, `SetCpuAllocationRatio`, `SetMemAllocationRatio` и структуры `GetLogicalCoresCountRequest`,`SetCpuAllocationRatioRequest`,`SetMemAllocationRatioRequest` в cloudbroker/node| | BGOS-686 | Поле `Policies` в структуры ответа `LimitsRG` в cloudapi/account и `Limits` в cloudbroker/account |
| BGOS-666 | Поля `OpenvSwitchBridges`, `Description`, `SDNHypervisorName` в структуру ответа `RecordNode` и поля `OpenvSwitchBridges`, `APIUrl`, `Drivers`, `OldCompatLVMID` в структуру ответа `ItemNode` в cloudbroker/node |
| BGOS-676 | Поля `Flags`, `ModelName`, в структуру ответа `CpuInfo` и поля `CPUAllocationRatio`, `MemAllocationRatio`, `Packages` в структуру ответа `ItemNode` в cloudbroker/node |
#### access groups
#### compute
| Идентификатор<br>задачи | Описание | | Идентификатор<br>задачи | Описание |
| --- | ---| | --- | --- |
| BGOS-675 | Метод `ChangeReadOnly` в cloudbroker/compute | | BGOS-693 | Поле `OwnerDisplayName` в структуру запроса `ListGroupsRequest` и поле `Comment` в структуру ответа `AccessGroupItem` |
| BGOS-675 | Поле `ReadOnly` в структуру `InfoCompute`, `RecordCompute`, `ItemCompute` в cloudbroker/compute и cloudapi/compute |
### Изменено
#### Общее #### backup
| Идентификатор<br>задачи | Описание | | Идентификатор<br>задачи | Описание |
| --- | --- | | --- | --- |
| BGOS-664 | StackID был заменен на NodeID | | BGOS-688 | Опциональное поле `NodeID` в структуры запросов `RestoreDiskFromBackupRequest` и `RestoreDisksFromBackupRequest` в cloudbroker/backup |
#### node #### node
| Идентификатор<br>задачи | Описание | | Идентификатор<br>задачи | Описание |
| --- | ---| | --- | ---|
| BGOS-666 | Изменен json-тег поля `VCPU` на `vCPUs` в структуре `FreeResourcesInfo` в cloudbroker/node | | BGOS-691 | Поле `UsableCPUs` в структурах ответа `RecordNode` и `ItemNode` в cloudbroker/node |
#### account #### storage policy
| Идентификатор<br>задачи | Описание | | Идентификатор<br>задачи | Описание |
| --- | ---| | --- | ---|
| BGOS-667 | Валидатор `accountCUType` теперь допускает значения `CU_M`, `CU_C`, `CU_D`, `CU_DM`, `CU_I`, `gpu_units` | | BGOS-690 | Поле `SepTechStatus` в структуру `AccessSEPPool` в структуре ответа `ItemStoragePolicy` в cloudapi/stpolicy и в cloudbroker/stpolicy |
#### compute #### user
| Идентификатор<br>задачи | Описание | | Идентификатор<br>задачи | Описание |
| --- | ---| | --- | ---|
| BGOS-683 | Изменен тип поля `StoragePolicyID` с required на optional в структурах запроса `RedeployRequest` в cloudapi/compute и cloudbroker/compute | | BGOS-692 | Поле `SortBy` в структуру запроса `GetAuditRequest` в cloudbroker/user |
### Изменено
#### user
| Идентификатор<br>задачи | Описание |
| --- | ---|
| BGOS-700 | Изменен тип поля `EmailAddress` с `[]string` на `string` в структуре запроса `CreateRequest` в cloudbroker/user |
| BGOS-700 | Изменен тип возвращаемого значения метода `Create` с `bool` на `string` в cloudbroker/user |
### Удалено ### Удалено
#### account #### account
| Идентификатор<br>задачи | Описание | | Идентификатор<br>задачи | Описание |
| --- | ---| | --- | ---|
| BGOS-667 | Поле `MaxNetworkPeerTransfer` из структур запросов `UpdateRequest` и `CreateRequest` в cloudapi/account и cloudbroker/account | | BGOS-686 | Поле `CUNP` из структуры ответа `ResourceLimits` в cloudapi/account и cloudbroker/account |
| BGOS-686 | Поле `ExtTraffic` из структур ответа `Resource` и `LimitsRG` в cloudapi/account и `Resource` и `Limits` в cloudbroker/account |
#### grid
| Идентификатор<br>задачи | Описание |
| --- | --- |
| BGOS-686 | Поле `ExtTraffic` из структуры ответа `RecordResource` в cloudbroker/grid |
#### rg #### rg
| Идентификатор<br>задачи | Описание | | Идентификатор<br>задачи | Описание |
| --- | ---| | --- | ---|
| BGOS-670 | Поля `MaxNetworkPeerTransfer` из структур запроса `CreateRequest` и `UpdateRequest`, поле `CUNP` из структуры`ResourceLimits` в cloudapi/rg и cloudbroker/rg | | BGOS-686 | Поле `ExtTraffic` из структур ответа `Resource` и `RecordResourceUsage` в cloudapi/rg и `Reservation` в cloudbroker/rg |
#### stack #### user
| Идентификатор<br>задачи | Описание | | Идентификатор<br>задачи | Описание |
| --- | --- | | --- | --- |
| BGOS-664 | Удалена группа stack | | BGOS-686 | Поле `ExtTraffic` из структуры ответа `Resources` в cloudapi/user |

@ -68,9 +68,6 @@ type ResourceLimits struct {
// RAM size, MB // RAM size, MB
CUM float64 `json:"CU_M"` CUM float64 `json:"CU_M"`
// Traffic volume, GB
CUNP float64 `json:"CU_NP"`
// Number of graphics cores // Number of graphics cores
GPUUnits float64 `json:"gpu_units"` GPUUnits float64 `json:"gpu_units"`
@ -150,9 +147,6 @@ type Resource struct {
// Number of External IPs // Number of External IPs
ExtIPs int64 `json:"extips"` ExtIPs int64 `json:"extips"`
// External traffic
ExtTraffic int64 `json:"exttraffic"`
// Number of grafic cores // Number of grafic cores
GPU int64 `json:"gpu"` GPU int64 `json:"gpu"`
@ -554,9 +548,6 @@ type LimitsRG struct {
// Number of External IPs // Number of External IPs
ExtIPs int64 `json:"extips"` ExtIPs int64 `json:"extips"`
// External traffic
ExtTraffic int64 `json:"exttraffic"`
// Number of grafic cores // Number of grafic cores
GPU int64 `json:"gpu"` GPU int64 `json:"gpu"`
@ -565,6 +556,9 @@ type LimitsRG struct {
// SEPs // SEPs
SEPs uint64 `json:"seps"` SEPs uint64 `json:"seps"`
// Policies
Policies map[string]Policy `json:"policies"`
} }
// Main information about resource group // Main information about resource group

@ -14,9 +14,6 @@ type Resource struct {
// Number of External IPs // Number of External IPs
ExtIPs int64 `json:"extips"` ExtIPs int64 `json:"extips"`
// External traffic
ExtTraffic int64 `json:"exttraffic"`
// Number of grafic cores // Number of grafic cores
GPU int64 `json:"gpu"` GPU int64 `json:"gpu"`
@ -846,9 +843,6 @@ type RecordResourceUsage struct {
// Number of external IPs // Number of external IPs
ExtIPs uint64 `json:"extips"` ExtIPs uint64 `json:"extips"`
// ExtraTraffic
ExtraTraffic uint64 `json:"exttraffic"`
// Number of GPU // Number of GPU
GPU uint64 `json:"gpu"` GPU uint64 `json:"gpu"`

@ -77,6 +77,9 @@ type AccessSEPPool struct {
// Pool names // Pool names
PoolNames []string `json:"pool_names"` PoolNames []string `json:"pool_names"`
// Technical status of the SEP
SepTechStatus string `json:"sep_tech_status"`
} }
type Usage struct { type Usage struct {

@ -156,9 +156,6 @@ type Resources struct {
// ExtIPs // ExtIPs
ExtIPs uint64 `json:"extips"` ExtIPs uint64 `json:"extips"`
// ExtTraffic
ExtTraffic uint64 `json:"exttraffic"`
// GPU // GPU
GPU uint64 `json:"gpu"` GPU uint64 `json:"gpu"`

@ -71,9 +71,6 @@ type Resource struct {
// Number of External IPs // Number of External IPs
ExtIPs int64 `json:"extips"` ExtIPs int64 `json:"extips"`
// External traffic
ExtTraffic int64 `json:"exttraffic"`
// Number of grafic cores // Number of grafic cores
GPU int64 `json:"gpu"` GPU int64 `json:"gpu"`
@ -143,9 +140,6 @@ type ResourceLimits struct {
// CuM // CuM
CuM float64 `json:"CU_M"` CuM float64 `json:"CU_M"`
// CuNP
CuNP float64 `json:"CU_NP"`
// GPUUnits // GPUUnits
GPUUnits float64 `json:"gpu_units"` GPUUnits float64 `json:"gpu_units"`
@ -480,9 +474,6 @@ type Limits struct {
// External IPs // External IPs
ExtIPs int64 `json:"extips"` ExtIPs int64 `json:"extips"`
// External traffic
ExtTraffic int64 `json:"exttraffic"`
// Number of GPU // Number of GPU
GPU int64 `json:"gpu"` GPU int64 `json:"gpu"`
@ -491,6 +482,9 @@ type Limits struct {
// SEPs number // SEPs number
SEPs uint64 `json:"seps"` SEPs uint64 `json:"seps"`
// Policies
Policies map[string]Policy `json:"policies"`
} }
// Resources of resource group // Resources of resource group

@ -14,6 +14,9 @@ type RestoreDiskFromBackupRequest struct {
// Compute ID // Compute ID
ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"`
// Node ID
NodeID uint64 `url:"nodeId,omitempty" json:"nodeId,omitempty"`
// Disk ID // Disk ID
DiskID uint64 `url:"diskId" json:"diskId" validate:"required"` DiskID uint64 `url:"diskId" json:"diskId" validate:"required"`

@ -25,6 +25,9 @@ type RestoreDisksFromBackupRequest struct {
// Compute ID // Compute ID
ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"`
// Node ID
NodeID uint64 `url:"nodeId,omitempty" json:"nodeId,omitempty"`
//Backup files //Backup files
BackupFiles []BackupFile `url:"disks" json:"disks" validate:"required,dive"` BackupFiles []BackupFile `url:"disks" json:"disks" validate:"required,dive"`
} }

@ -11,7 +11,6 @@ var grids = ListGrids{
DiskSize: 976, DiskSize: 976,
DiskSizeMax: 1200, DiskSizeMax: 1200,
ExtIPs: 132, ExtIPs: 132,
ExtTraffic: 0,
GPU: 79500, GPU: 79500,
RAM: 0, RAM: 0,
SEPs: map[string]map[string]DiskUsage{}, SEPs: map[string]map[string]DiskUsage{},
@ -21,7 +20,6 @@ var grids = ListGrids{
DiskSize: 976, DiskSize: 976,
DiskSizeMax: 1200, DiskSizeMax: 1200,
ExtIPs: 132, ExtIPs: 132,
ExtTraffic: 0,
GPU: 0, GPU: 0,
RAM: 152600, RAM: 152600,
SEPs: map[string]map[string]DiskUsage{}, SEPs: map[string]map[string]DiskUsage{},
@ -41,7 +39,6 @@ var grids = ListGrids{
DiskSize: 976, DiskSize: 976,
DiskSizeMax: 1200, DiskSizeMax: 1200,
ExtIPs: 132, ExtIPs: 132,
ExtTraffic: 0,
GPU: 79500, GPU: 79500,
RAM: 0, RAM: 0,
SEPs: map[string]map[string]DiskUsage{}, SEPs: map[string]map[string]DiskUsage{},
@ -51,7 +48,6 @@ var grids = ListGrids{
DiskSize: 976, DiskSize: 976,
DiskSizeMax: 1200, DiskSizeMax: 1200,
ExtIPs: 132, ExtIPs: 132,
ExtTraffic: 0,
GPU: 0, GPU: 0,
RAM: 152600, RAM: 152600,
SEPs: map[string]map[string]DiskUsage{}, SEPs: map[string]map[string]DiskUsage{},
@ -71,7 +67,6 @@ var grids = ListGrids{
DiskSize: 976, DiskSize: 976,
DiskSizeMax: 1200, DiskSizeMax: 1200,
ExtIPs: 132, ExtIPs: 132,
ExtTraffic: 0,
GPU: 79500, GPU: 79500,
RAM: 0, RAM: 0,
SEPs: map[string]map[string]DiskUsage{}, SEPs: map[string]map[string]DiskUsage{},
@ -81,7 +76,6 @@ var grids = ListGrids{
DiskSize: 976, DiskSize: 976,
DiskSizeMax: 1200, DiskSizeMax: 1200,
ExtIPs: 132, ExtIPs: 132,
ExtTraffic: 0,
GPU: 0, GPU: 0,
RAM: 152600, RAM: 152600,
SEPs: map[string]map[string]DiskUsage{}, SEPs: map[string]map[string]DiskUsage{},

@ -43,9 +43,6 @@ type RecordResource struct {
// External IPs // External IPs
ExtIPs uint64 `json:"extips"` ExtIPs uint64 `json:"extips"`
// External traffic
ExtTraffic uint64 `json:"exttraffic"`
// Number of GPU // Number of GPU
GPU uint64 `json:"gpu"` GPU uint64 `json:"gpu"`

@ -82,6 +82,9 @@ type RecordNode struct {
// SDN Hypervisor Name // SDN Hypervisor Name
SDNHypervisorName string `json:"sdn_hypervisor_name"` SDNHypervisorName string `json:"sdn_hypervisor_name"`
// CPU used by the node
UsableCPUs []string `json:"usable_cpus"`
} }
// Resource consumption of the node // Resource consumption of the node
@ -291,10 +294,13 @@ type ItemNode struct {
CPUAllocationRatio float64 `json:"cpu_allocation_ratio"` CPUAllocationRatio float64 `json:"cpu_allocation_ratio"`
// MemAllocationRatio // MemAllocationRatio
MemAllocationRatio float64 `json:"mem_allocation_ratio"` MemAllocationRatio float64 `json:"mem_allocation_ratio"`
// Packages // Packages
Packages map[string]PackageInfo `json:"packages"` Packages map[string]PackageInfo `json:"packages"`
// CPU used by the node
UsableCPUs []string `json:"usable_cpus"`
} }
type PackageInfo struct { type PackageInfo struct {

@ -35,9 +35,6 @@ type Reservation struct {
// External IPs // External IPs
ExtIPs int64 `json:"extips"` ExtIPs int64 `json:"extips"`
// External traffic
ExtTraffic int64 `json:"exttraffic"`
// Number of GPU // Number of GPU
GPU int64 `json:"gpu"` GPU int64 `json:"gpu"`

@ -103,6 +103,9 @@ type AccessSEPPool struct {
// Pool names // Pool names
PoolNames []string `json:"pool_names"` PoolNames []string `json:"pool_names"`
// Technical status of the SEP
SepTechStatus string `json:"sep_tech_status"`
} }
type Usage struct { type Usage struct {

@ -3,7 +3,6 @@ package user
import ( import (
"context" "context"
"net/http" "net/http"
"strconv"
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators" "repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
) )
@ -14,9 +13,9 @@ type CreateRequest struct {
// Required: true // Required: true
Username string `url:"username" json:"username" validate:"required"` Username string `url:"username" json:"username" validate:"required"`
// Email addresses of the user. // Email address of the user.
// Required: true // Required: true
EmailAddress []string `url:"emailaddress" json:"emailaddress" validate:"required"` EmailAddress string `url:"emailaddress" json:"emailaddress" validate:"required"`
// Password of user // Password of user
// Required: false // Required: false
@ -34,23 +33,18 @@ type CreateRequest struct {
} }
// Create creates a user. // Create creates a user.
func (u User) Create(ctx context.Context, req CreateRequest) (bool, error) { func (u User) Create(ctx context.Context, req CreateRequest) (string, error) {
err := validators.ValidateRequest(req) err := validators.ValidateRequest(req)
if err != nil { if err != nil {
return false, validators.ValidationErrors(validators.GetErrors(err)) return "", validators.ValidationErrors(validators.GetErrors(err))
} }
url := "/cloudbroker/user/create" url := "/cloudbroker/user/create"
res, err := u.client.DecortApiCall(ctx, http.MethodPost, url, req) res, err := u.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil { if err != nil {
return false, err return "", err
} }
result, err := strconv.ParseBool(string(res)) return string(res), nil
if err != nil {
return false, err
}
return result, nil
} }

@ -28,6 +28,11 @@ type GetAuditRequest struct {
// Required: false // Required: false
TimestampTo uint64 `url:"timestampTo,omitempty" json:"timestampTo,omitempty"` TimestampTo uint64 `url:"timestampTo,omitempty" json:"timestampTo,omitempty"`
// Sort by a field, format +|-(field)
// Default: -timestamp
// Required: false
SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"`
// Page number. // Page number.
// Required: false // Required: false
Page uint64 `url:"page,omitempty" json:"page,omitempty"` Page uint64 `url:"page,omitempty" json:"page,omitempty"`

@ -104,16 +104,16 @@ type ItemAudit struct {
Call string `json:"Call"` Call string `json:"Call"`
// Response time // Response time
ResponseTime ResponseTime `json:"Response Time"` ResponseTime ResponseTime `json:"responsetime"`
// StatusCode // StatusCode
StatusCode StatusCode `json:"Status Code"` StatusCode StatusCode `json:"statuscode"`
// Guid // Guid
GUID string `json:"Guid"` GUID string `json:"Guid"`
// Time // Time
Time float64 `json:"Time"` Time float64 `json:"timestampEnd"`
} }
type ListAudits struct { type ListAudits struct {

@ -22,6 +22,10 @@ type ListGroupsRequest struct {
// Required: false // Required: false
DisplayName string `url:"display_name,omitempty" json:"display_name,omitempty"` DisplayName string `url:"display_name,omitempty" json:"display_name,omitempty"`
// Owner display name filter
// Required: false
OwnerDisplayName string `url:"owner_display_name,omitempty" json:"owner_display_name,omitempty"`
// Page number for pagination // Page number for pagination
// Required: false // Required: false
Page uint64 `url:"page,omitempty" json:"page,omitempty"` Page uint64 `url:"page,omitempty" json:"page,omitempty"`

@ -3,6 +3,7 @@ package acsgroups
type AccessGroupItem struct { type AccessGroupItem struct {
Name string `json:"display_name"` Name string `json:"display_name"`
ID string `json:"id"` ID string `json:"id"`
Comment string `json:"comment"`
} }
type AccessGroupList struct { type AccessGroupList struct {

Loading…
Cancel
Save