v1.14.4
v1.14.4
This commit is contained in:
53
CHANGELOG.md
53
CHANGELOG.md
@@ -1,4 +1,4 @@
|
|||||||
## Version 1.14.3
|
## Version 1.14.4
|
||||||
|
|
||||||
Методы `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 с соответствующими фильтрами
|
||||||
Методы `AccessGrant`, `AccessGrantToPool`, `AccessRevoke`, `AccessRevokeToPool` в cloudbroker/sep стали deprecated и в следующих версиях будут удалены
|
Методы `AccessGrant`, `AccessGrantToPool`, `AccessRevoke`, `AccessRevokeToPool` в cloudbroker/sep стали deprecated и в следующих версиях будут удалены
|
||||||
@@ -9,62 +9,27 @@
|
|||||||
|
|
||||||
### Добавлено
|
### Добавлено
|
||||||
|
|
||||||
#### compute
|
#### image
|
||||||
| Идентификатор<br>задачи | Описание |
|
| Идентификатор<br>задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-805 | Вычисляемое поле `Provision` в структуру ответа `ItemComputeDisk` в cloudapi/compute и в структуру ответа `ItemDisk` в cloudbroker/compute |
|
| BGOS-812 | Методы `CreateMultiImage`, `MultiImageAddLinks`, `MultiImageDelLinks` и `MultiImageExport` в cloudbroker/image |
|
||||||
|
| BGOS-812 | Структуры запросов `CreateMultiImageRequest`, `MultiImageAddLinksRequest`, `MultiImageDelLinksRequest` и `MultiImageExportRequest` в cloudbroker/image |
|
||||||
#### disks
|
| BGOS-813 | Вычисляемое поле `LinksTo` в структуры ответа `RecordImage` и `ItemImage` в cloudbroker/image и в структуру ответа `RecordImage` в cloudapi/image |
|
||||||
| Идентификатор<br>задачи | Описание |
|
|
||||||
| --- | --- |
|
|
||||||
| BGOS-806 | Вычисляемое поле `Provision` в структуры ответа `ItemDisk`, `ItemDiskUnattached` и `RecordDisk` в cloudapi/disks и в структуру ответа `InfoDisk` в cloudbroker/disks |
|
|
||||||
|
|
||||||
### node
|
### node
|
||||||
| Идентификатор<br>задачи | Описание |
|
| Идентификатор<br>задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-802 | Опциональное поле `Target` в структуру запроса `GetLogicalCoresCountRequest` в cloudbroker/node |
|
| BGOS-811 | Вычисляемое поле `ThreadCount` в структуру ответа `CpuInfo` в cloudbroker/node |
|
||||||
|
|
||||||
#### rg
|
|
||||||
| Идентификатор<br>задачи | Описание |
|
|
||||||
| --- | --- |
|
|
||||||
| BGOS-803 | Опциональное поле `CPUAllocationParameter` в структуру запроса `UpdateRequest` в cloudbroker/rg |
|
|
||||||
|
|
||||||
#### SDN Logical Ports
|
|
||||||
| Идентификатор<br>задачи | Описание |
|
|
||||||
| --- | --- |
|
|
||||||
| BGOS-695 | Опциональное поле `Labels` в структуры запроса `CreateRequest` и `UpdateRequest` в sdn/logical_ports |
|
|
||||||
| BGOS-695 | Вычисляемое поле `Labels` в структуру ответа `LogicalPort` в sdn/logical_ports |
|
|
||||||
| BGOS-695 | Опциональные поля `OperationStatus` и `HypervisorStatus` в структуру запроса `ListRequest` в sdn/logical_ports |
|
|
||||||
| BGOS-695 | Вычисляемые поля `OperationStatus` и `HypervisorStatus` в структуре `Status` в структуру ответа `LogicalPort` в sdn/logical_ports |
|
|
||||||
|
|
||||||
### Изменено
|
### Изменено
|
||||||
|
|
||||||
#### compute
|
#### compute
|
||||||
| Идентификатор<br>задачи | Описание |
|
| Идентификатор<br>задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-794 | Тип возвращаемого значения метода `AbortSharedSnapshotMerge` с `bool` на `string` в cloudapi/compute и в cloudbroker/compute |
|
| BGOS-814 | Тип возвращаемого значения метода `CheckComputePlacement` с `map[string]CheckComputePlacementItem` на `map[uint64]CheckComputePlacementItem` в cloudbroker/compute |
|
||||||
|
|
||||||
#### kvmx86
|
#### rg
|
||||||
| Идентификатор<br>задачи | Описание |
|
| Идентификатор<br>задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-808 | Минимальное значение поля `MTU` в структуре `Interface` в cloudapi/kvmx86 и cloudbroker/kvmx86 и в структуре `InterfaceMassCreate` в cloudbroker/kvmx86 с 1 на 1500 |
|
| BGOS-815 | JSON-тэг у поля `RGID` в структуре ответа `ItemResourceConsumption` с `rgid` на `id` в cloudbroker/rg |
|
||||||
|
|
||||||
#### zone
|
|
||||||
| Идентификатор<br>задачи | Описание |
|
|
||||||
| --- | --- |
|
|
||||||
| BGOS-807 | JSON-тег у вычисляемого поля `LBIDs` в структуре ответа `RecordZone` с `lbIds` на `lbsIds` в cloudapi/zone |
|
|
||||||
|
|
||||||
#### SDN Logical Ports
|
|
||||||
| Идентификатор<br>задачи | Описание |
|
|
||||||
| --- | --- |
|
|
||||||
| BGOS-695 | Имя вычисляемого поля со `Status` на `OperationStatus` в sdn/logical_ports |
|
|
||||||
|
|
||||||
### Удалено
|
|
||||||
|
|
||||||
#### SDN Logical Ports
|
|
||||||
| Идентификатор<br>задачи | Описание |
|
|
||||||
| --- | --- |
|
|
||||||
| BGOS-695 | Обязательное поле `IsExcludedFromFirewall` в структурах запроса `CreateRequest` и `UpdateRequest` в sdn/logical_ports |
|
|
||||||
| BGOS-695 | Вычисляемое поле `IsExcludedFromFirewall` в структуре `Bindings` в структуре ответа `LogicalPort` в sdn/logical_ports |
|
|
||||||
| BGOS-695 | Вычисляемое поле `Common` в структуре `Status` в структуре ответа `LogicalPort` в sdn/logical_ports |
|
|
||||||
| BGOS-695 | Структуры запроса `ExcludeFirewallRequest`, `UnexcludeFirewallRequest`, `CreateBatchRequest` и `DeleteBatchRequest` и методы `ExcludeFirewall`, `UnexcludeFirewall`, `CreateBatch` и `DeleteBatch` в sdn/logical_ports |
|
|
||||||
|
|||||||
@@ -149,6 +149,9 @@ type RecordImage struct {
|
|||||||
// Link to
|
// Link to
|
||||||
LinkTo uint64 `json:"linkTo"`
|
LinkTo uint64 `json:"linkTo"`
|
||||||
|
|
||||||
|
// Links to
|
||||||
|
LinksTo []uint64 `json:"linksTo"`
|
||||||
|
|
||||||
// Milestones
|
// Milestones
|
||||||
Milestones uint64 `json:"milestones"`
|
Milestones uint64 `json:"milestones"`
|
||||||
|
|
||||||
|
|||||||
@@ -1535,4 +1535,4 @@ type CheckComputePlacementItem struct {
|
|||||||
Error CheckComputePlacementError `json:"error,omitempty"`
|
Error CheckComputePlacementError `json:"error,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CheckComputePlacementResult map[string]CheckComputePlacementItem
|
type CheckComputePlacementResult map[uint64]CheckComputePlacementItem
|
||||||
|
|||||||
47
pkg/cloudbroker/image/create_multi_image.go
Normal file
47
pkg/cloudbroker/image/create_multi_image.go
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
package image
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/constants"
|
||||||
|
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||||
|
)
|
||||||
|
|
||||||
|
// CreateMultiImageRequest struct to create multi image
|
||||||
|
type CreateMultiImageRequest struct {
|
||||||
|
// Name of the multi image
|
||||||
|
// Required: true
|
||||||
|
Name string `url:"name" json:"name" validate:"required"`
|
||||||
|
|
||||||
|
// IDs of real images
|
||||||
|
// Required: true
|
||||||
|
TargetIDs []uint64 `url:"target_ids" json:"target_ids" validate:"required"`
|
||||||
|
|
||||||
|
// Account ID
|
||||||
|
// Required: false
|
||||||
|
AccountID uint64 `url:"account_id,omitempty" json:"account_id,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateMultiImage creates multi image
|
||||||
|
func (i Image) CreateMultiImage(ctx context.Context, req CreateMultiImageRequest) (uint64, error) {
|
||||||
|
err := validators.ValidateRequest(req)
|
||||||
|
if err != nil {
|
||||||
|
return 0, validators.ValidationErrors(validators.GetErrors(err))
|
||||||
|
}
|
||||||
|
|
||||||
|
url := "/cloudbroker/image/create_multi_image"
|
||||||
|
|
||||||
|
res, err := i.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
|
||||||
|
result, err := strconv.ParseUint(string(res), 10, 64)
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return result, nil
|
||||||
|
}
|
||||||
@@ -62,6 +62,9 @@ type RecordImage struct {
|
|||||||
// Link to
|
// Link to
|
||||||
LinkTo uint64 `json:"linkTo"`
|
LinkTo uint64 `json:"linkTo"`
|
||||||
|
|
||||||
|
// Links to
|
||||||
|
LinksTo []uint64 `json:"linksTo"`
|
||||||
|
|
||||||
// Milestones
|
// Milestones
|
||||||
Milestones uint64 `json:"milestones"`
|
Milestones uint64 `json:"milestones"`
|
||||||
|
|
||||||
@@ -197,6 +200,9 @@ type ItemImage struct {
|
|||||||
// Link to
|
// Link to
|
||||||
LinkTo uint64 `json:"linkTo"`
|
LinkTo uint64 `json:"linkTo"`
|
||||||
|
|
||||||
|
// Links to
|
||||||
|
LinksTo []uint64 `json:"linksTo"`
|
||||||
|
|
||||||
// Milestones
|
// Milestones
|
||||||
Milestones uint64 `json:"milestones"`
|
Milestones uint64 `json:"milestones"`
|
||||||
|
|
||||||
|
|||||||
43
pkg/cloudbroker/image/multi_image_add_links.go
Normal file
43
pkg/cloudbroker/image/multi_image_add_links.go
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
package image
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/constants"
|
||||||
|
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MultiImageAddLinksRequest struct to add links to multi image
|
||||||
|
type MultiImageAddLinksRequest struct {
|
||||||
|
// ID of the multi image
|
||||||
|
// Required: true
|
||||||
|
ImageID uint64 `url:"image_id" json:"image_id" validate:"required"`
|
||||||
|
|
||||||
|
// IDs of real images
|
||||||
|
// Required: true
|
||||||
|
TargetIDs []uint64 `url:"target_ids" json:"target_ids" validate:"required"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// MultiImageAddLinks adds image links to multi image
|
||||||
|
func (i Image) MultiImageAddLinks(ctx context.Context, req MultiImageAddLinksRequest) (bool, error) {
|
||||||
|
err := validators.ValidateRequest(req)
|
||||||
|
if err != nil {
|
||||||
|
return false, validators.ValidationErrors(validators.GetErrors(err))
|
||||||
|
}
|
||||||
|
|
||||||
|
url := "/cloudbroker/image/multi_image_add_links"
|
||||||
|
|
||||||
|
res, err := i.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req)
|
||||||
|
if err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
|
||||||
|
result, err := strconv.ParseBool(string(res))
|
||||||
|
if err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return result, nil
|
||||||
|
}
|
||||||
43
pkg/cloudbroker/image/multi_image_del_links.go
Normal file
43
pkg/cloudbroker/image/multi_image_del_links.go
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
package image
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/constants"
|
||||||
|
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MultiImageDelLinksRequest struct to delete links from multi image
|
||||||
|
type MultiImageDelLinksRequest struct {
|
||||||
|
// ID of the multi image
|
||||||
|
// Required: true
|
||||||
|
ImageID uint64 `url:"image_id" json:"image_id" validate:"required"`
|
||||||
|
|
||||||
|
// IDs of real images
|
||||||
|
// Required: true
|
||||||
|
TargetIDs []uint64 `url:"target_ids" json:"target_ids" validate:"required"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// MultiImageDelLinks removes image links from multi image
|
||||||
|
func (i Image) MultiImageDelLinks(ctx context.Context, req MultiImageDelLinksRequest) (bool, error) {
|
||||||
|
err := validators.ValidateRequest(req)
|
||||||
|
if err != nil {
|
||||||
|
return false, validators.ValidationErrors(validators.GetErrors(err))
|
||||||
|
}
|
||||||
|
|
||||||
|
url := "/cloudbroker/image/multi_image_del_links"
|
||||||
|
|
||||||
|
res, err := i.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req)
|
||||||
|
if err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
|
||||||
|
result, err := strconv.ParseBool(string(res))
|
||||||
|
if err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return result, nil
|
||||||
|
}
|
||||||
42
pkg/cloudbroker/image/multi_image_export.go
Normal file
42
pkg/cloudbroker/image/multi_image_export.go
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
package image
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MultiImageExportRequest struct to export multi image to a pool
|
||||||
|
type MultiImageExportRequest struct {
|
||||||
|
// ID of the multi image
|
||||||
|
// Required: true
|
||||||
|
MultiImageID uint64 `url:"multi_image_id" json:"multi_image_id" validate:"required"`
|
||||||
|
|
||||||
|
// Name of the target pool
|
||||||
|
// Required: true
|
||||||
|
PoolName string `url:"pool_name" json:"pool_name" validate:"required"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// MultiImageExport copies a physical image from multi image to the specified pool
|
||||||
|
func (i Image) MultiImageExport(ctx context.Context, req MultiImageExportRequest) (bool, error) {
|
||||||
|
err := validators.ValidateRequest(req)
|
||||||
|
if err != nil {
|
||||||
|
return false, validators.ValidationErrors(validators.GetErrors(err))
|
||||||
|
}
|
||||||
|
|
||||||
|
url := "/cloudbroker/image/multi_image_export"
|
||||||
|
|
||||||
|
res, err := i.client.DecortApiCall(ctx, http.MethodPost, url, req)
|
||||||
|
if err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
|
||||||
|
result, err := strconv.ParseBool(string(res))
|
||||||
|
if err != nil {
|
||||||
|
return false, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return result, nil
|
||||||
|
}
|
||||||
@@ -155,6 +155,9 @@ type CpuInfo struct {
|
|||||||
// PhysCount
|
// PhysCount
|
||||||
PhysCount uint64 `json:"physCount"`
|
PhysCount uint64 `json:"physCount"`
|
||||||
|
|
||||||
|
// Thread count
|
||||||
|
ThreadCount uint64 `json:"threadCount"`
|
||||||
|
|
||||||
// Flags
|
// Flags
|
||||||
Flags []string `json:"flags"`
|
Flags []string `json:"flags"`
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ type ItemResourceConsumption struct {
|
|||||||
ResourceLimits ResourceLimits `json:"resourceLimits"`
|
ResourceLimits ResourceLimits `json:"resourceLimits"`
|
||||||
|
|
||||||
// Resource group ID
|
// Resource group ID
|
||||||
RGID uint64 `json:"rgid"`
|
RGID uint64 `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ListResourceConsumption struct {
|
type ListResourceConsumption struct {
|
||||||
|
|||||||
@@ -795,6 +795,10 @@ func getRequestsMapCloudbroker() map[string]interface{} {
|
|||||||
"/restmachine/cloudbroker/image/rename": image_cb.RenameRequest{},
|
"/restmachine/cloudbroker/image/rename": image_cb.RenameRequest{},
|
||||||
"/restmachine/cloudbroker/image/revokeAccess": image_cb.RevokeAccessRequest{},
|
"/restmachine/cloudbroker/image/revokeAccess": image_cb.RevokeAccessRequest{},
|
||||||
"/restmachine/cloudbroker/image/share": image_cb.ShareRequest{},
|
"/restmachine/cloudbroker/image/share": image_cb.ShareRequest{},
|
||||||
|
"/restmachine/cloudbroker/image/create_multi_image": image_cb.CreateMultiImageRequest{},
|
||||||
|
"/restmachine/cloudbroker/image/multi_image_add_links": image_cb.MultiImageAddLinksRequest{},
|
||||||
|
"/restmachine/cloudbroker/image/multi_image_del_links": image_cb.MultiImageDelLinksRequest{},
|
||||||
|
"/restmachine/cloudbroker/image/multi_image_export": image_cb.MultiImageExportRequest{},
|
||||||
|
|
||||||
// k8ci
|
// k8ci
|
||||||
"/restmachine/cloudbroker/k8ci/accessAdd": k8ci_cb.AccessAddRequest{},
|
"/restmachine/cloudbroker/k8ci/accessAdd": k8ci_cb.AccessAddRequest{},
|
||||||
|
|||||||
Reference in New Issue
Block a user