diff --git a/CHANGELOG.md b/CHANGELOG.md
index 718d604..645475b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-## Version 1.14.1
+## Version 1.14.2
Методы `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 и в следующих версиях будут удалены
@@ -12,30 +12,26 @@
#### account
| Идентификатор
задачи | Описание |
| --- | --- |
-| BGOS-780 | Вычисляемое поле `DeletedBy` в структуру ответа `ItemAccount` в cloudapi/account |
+| BGOS-796 | Опциональное поле `CpuAllocationParameter` в структуру запроса `UpdateRequest` в cloudbroker/account |
+| BGOS-790 | Вычисляемое поле `UpdatedBy` в структуру ответа `ItemAccount` в cloudapi/account |
#### compute
| Идентификатор
задачи | Описание |
| --- | --- |
-| BGOS-777 | Структура ответа `RecordCloneAbort` в cloudbroker/compute |
-| BGOS-774 | Опциональное поле `Weight` в структуру запроса `UpdateRequest` в cloudbroker/compute |
-| BGOS-774 | Вычисляемое поле `Weight` в структуры ответа `InfoCompute` и `RecordCompute` в cloudbroker/compute и в структуры ответа `RecordCompute` и `ItemCompute` в cloudapi/compute |
+| BGOS-793 | Вычисляемые поля `Aborted` и `BlockcopyAbortJobID` в структуру ответа `RecordCloneAbort` в cloudbroker/compute |
+| BGOS-792 | Структуры ответа `RecordCloneAbort` и `ListCloneAbort` в cloudapi/compute |
+| BGOS-791 | Вычисляемое поле `Independent` в структуру ответа `ItemComputeDisk` в cloudapi/compute и в структуру ответа `ItemDisk` в cloudbroker/compute |
-#### kvmx86
+#### disks
| Идентификатор
задачи | Описание |
| --- | --- |
-| BGOS-775 | Опциональное поле `Weight` в структуры запроса `CreateRequest`, `CreateBlankRequest` и `MassCreateRequest` в cloudbroker/kvmx86 |
+| BGOS-791 | Вычисляемое поле `Independent` в структуры ответа `ItemDisk` и `RecordDisk` в cloudapi/disks и в структуру ответа `RecordDisk` в cloudbroker/disks |
+| BGOS-797 | Вычисляемые поля `ToClean` и `StoragePolicyID` в структуру ответа `ItemDiskUnattached` в cloudapi/disks |
-#### rg
+#### image
| Идентификатор
задачи | Описание |
| --- | --- |
-| BGOS-776 | Вычисляемое поле `Email` в структуры ответа `ItemACL` в cloudapi/rg и в `ACL` в cloudbroker/rg |
-| BGOS-779 | Опциональные поля `RGID` и `ComputeID` в структуру запроса `ListRequest` в cloudapi/rg и в cloudbroker/rg |
-
-#### stpolicy
-| Идентификатор
задачи | Описание |
-| --- | --- |
-| BGOS-784 | Вычисляемое поле `Usage` в структуру ответа `InfoStoragePolicyWithID` в cloudbroker/stpolicy |
+| BGOS-791 | Вычисляемое поле `Independent` в структуру ответа `RecordImage` в cloudapi/image и в структуры ответа `RecordImage` и `ItemImage` в cloudbroker/image |
### Изменено
@@ -43,28 +39,17 @@
#### compute
| Идентификатор
задачи | Описание |
| --- | --- |
-| BGOS-777 | Тип возвращаемого значения метода `CloneAbort` с `bool` на `[]RecordCloneAbort` в cloudbroker/compute |
+| BGOS-799 | Минимальное значение поля `MTU` в структуре запроса `NetAttachRequest` в cloudapi/compute и cloudbroker/compute с 1 на 1500 |
+| BGOS-792 | Тип возвращаемого значения метода `CloneAbort` с `bool` на `ListCloneAbort` в cloudapi/compute |
+
+#### node
+| Идентификатор
задачи | Описание |
+| --- | --- |
+| BGOS-789 | Дефолтное значение поля `Force` в структуре запроса `EnableRequest` в cloudbroker/node с `true` на `false` |
### Удалено
#### compute
| Идентификатор
задачи | Описание |
| --- | --- |
-| BGOS-781 | Опциональное поле `DiskType` из структур `DiskAddRequest` и `DiskAttachRequest` в cloudapi/compute и в cloudbroker/compute |
-| BGOS-785 | Вычисляемое поле `Type` из структур `ItemDisk`, `RecordDisk` и `ItemDiskUnattached` в cloudapi/compute и из структуры `InfoDisk` в cloudbroker/compute |
-
-#### disks
-| Идентификатор
задачи | Описание |
-| --- | --- |
-| BGOS-781 | Структура запросов `ListTypesRequest`, структура ответов `ListTypes`, метод `ListTypes` в cloudapi/disks и в cloudbroker/disks |
-| BGOS-781 | Опциональное поле `Type` из структур `ListRequest`, `ListDeletedRequest` и `ListUnattachedRequest` в cloudapi/disks и в cloudbroker/disks |
-
-#### kvmx86
-| Идентификатор
задачи | Описание |
-| --- | --- |
-| BGOS-773 | Опциональные поля `IS` и `IPAType` из структур запроса `CreateRequest` в cloudapi/kvmx86 и в cloudbroker/kvmx86 |
-
-#### stpolicy
-| Идентификатор
задачи | Описание |
-| --- | --- |
-| BGOS-784 | Вычисляемое поле `StoragePolicyID` из структуры ответа `InfoStoragePolicyWithID` в cloudbroker/stpolicy |
+| BGOS-793 | Вычисляемое поле `Status` из структуры ответа `RecordCloneAbort` в cloudbroker/compute |
diff --git a/internal/validators/values.go b/internal/validators/values.go
index 0d9f560..17adc27 100644
--- a/internal/validators/values.go
+++ b/internal/validators/values.go
@@ -83,7 +83,7 @@ var (
)
const (
- mtuMin = 1
+ mtuMin = 1500
mtuMax = 9216
trunkTagsMin = 1
diff --git a/pkg/cloudapi/account/models.go b/pkg/cloudapi/account/models.go
index dd43fa7..1c548d7 100644
--- a/pkg/cloudapi/account/models.go
+++ b/pkg/cloudapi/account/models.go
@@ -110,6 +110,9 @@ type ItemAccount struct {
// Status
Status string `json:"status"`
+ // Updated by
+ UpdatedBy string `json:"updatedBy"`
+
// Updated time
UpdatedTime uint64 `json:"updatedTime"`
diff --git a/pkg/cloudapi/compute/clone_abort.go b/pkg/cloudapi/compute/clone_abort.go
index b235b09..c772688 100644
--- a/pkg/cloudapi/compute/clone_abort.go
+++ b/pkg/cloudapi/compute/clone_abort.go
@@ -2,8 +2,8 @@ package compute
import (
"context"
+ "encoding/json"
"net/http"
- "strconv"
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/constants"
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
@@ -17,22 +17,24 @@ type CloneAbortRequest struct {
}
// CloneAbort aborts a compute clone
-func (c Compute) CloneAbort(ctx context.Context, req CloneAbortRequest) (bool, error) {
+func (c Compute) CloneAbort(ctx context.Context, req CloneAbortRequest) (ListCloneAbort, error) {
err := validators.ValidateRequest(req)
if err != nil {
- return false, validators.ValidationErrors(validators.GetErrors(err))
+ return nil, validators.ValidationErrors(validators.GetErrors(err))
}
url := "/cloudapi/compute/clone_abort"
res, err := c.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req)
if err != nil {
- return false, err
+ return nil, err
}
- result, err := strconv.ParseBool(string(res))
+ var result ListCloneAbort
+
+ err = json.Unmarshal(res, &result)
if err != nil {
- return false, err
+ return nil, err
}
return result, nil
diff --git a/pkg/cloudapi/compute/models.go b/pkg/cloudapi/compute/models.go
index 51b5021..0fa2386 100644
--- a/pkg/cloudapi/compute/models.go
+++ b/pkg/cloudapi/compute/models.go
@@ -843,6 +843,9 @@ type ItemComputeDisk struct {
// Image ID
ImageID uint64 `json:"imageId"`
+ // Independent
+ Independent bool `json:"independent"`
+
// List image IDs
Images []uint64 `json:"images"`
@@ -1382,6 +1385,21 @@ type RecordCloneStatus struct {
Status CloneStatus `json:"status"`
}
+// Information about aborted clone disk
+type RecordCloneAbort struct {
+ // Disk ID
+ DiskID uint64 `json:"disk_id"`
+
+ // Aborted
+ Aborted bool `json:"aborted"`
+
+ // Blockcopy abort job ID
+ BlockcopyAbortJobID string `json:"blockcopy_abort_job_id"`
+}
+
+// List of aborted clone disks
+type ListCloneAbort []RecordCloneAbort
+
type CloneStatus struct {
// Type
Type int `json:"type"`
diff --git a/pkg/cloudapi/compute/net_attach.go b/pkg/cloudapi/compute/net_attach.go
index 160544e..8782fc8 100644
--- a/pkg/cloudapi/compute/net_attach.go
+++ b/pkg/cloudapi/compute/net_attach.go
@@ -39,9 +39,8 @@ type NetAttachRequest struct {
// Required: false
MACAddr string `url:"mac_addr,omitempty" json:"mac_addr,omitempty"`
- // Used only for EXTNET and DPDK
- // For DPDK must be 1-9216
- // For EXTNET must be 1500-9216
+ // Used for EXTNET, TRUNK and DPDK
+ // Must be 1500-9216
// Required: false
MTU uint64 `url:"mtu,omitempty" json:"mtu,omitempty" validate:"omitempty,mtu"`
diff --git a/pkg/cloudapi/disks/filter_test.go b/pkg/cloudapi/disks/filter_test.go
index e89f579..8a2b1f6 100644
--- a/pkg/cloudapi/disks/filter_test.go
+++ b/pkg/cloudapi/disks/filter_test.go
@@ -403,7 +403,6 @@ var unattachedDisks = ListDisksUnattached{
Snapshots: nil,
Status: "CREATED",
TechStatus: techStatusAllocated,
- Type: "D",
VMID: 0,
},
{
@@ -457,7 +456,6 @@ var unattachedDisks = ListDisksUnattached{
Snapshots: nil,
Status: "CREATED",
TechStatus: techStatusAllocated,
- Type: "B",
VMID: 0,
},
},
diff --git a/pkg/cloudapi/disks/models.go b/pkg/cloudapi/disks/models.go
index 49c24e5..5448e3c 100644
--- a/pkg/cloudapi/disks/models.go
+++ b/pkg/cloudapi/disks/models.go
@@ -50,6 +50,9 @@ type ItemDisk struct {
// Image ID
ImageID uint64 `json:"imageId"`
+ // Independent
+ Independent bool `json:"independent"`
+
// List of image IDs
Images []uint64 `json:"images"`
@@ -280,6 +283,12 @@ type ItemDiskUnattached struct {
// Tech status
TechStatus string `json:"techStatus"`
+ // Need to clean before destroy
+ ToClean bool `json:"to_clean"`
+
+ // ID of the Storage Policy
+ StoragePolicyID uint64 `json:"storage_policy_id"`
+
// Virtual machine ID
VMID uint64 `json:"vmid"`
}
@@ -423,6 +432,9 @@ type RecordDisk struct {
// Image ID
ImageID uint64 `json:"imageId"`
+ // Independent
+ Independent bool `json:"independent"`
+
// List of image IDs
Images []uint64 `json:"images"`
diff --git a/pkg/cloudapi/image/models.go b/pkg/cloudapi/image/models.go
index aad32e5..e25dc9f 100644
--- a/pkg/cloudapi/image/models.go
+++ b/pkg/cloudapi/image/models.go
@@ -140,6 +140,9 @@ type RecordImage struct {
// ID
ID uint64 `json:"id"`
+ // Independent
+ Independent bool `json:"independent"`
+
// Last modified
LastModified uint64 `json:"lastModified"`
diff --git a/pkg/cloudbroker/account/update.go b/pkg/cloudbroker/account/update.go
index b7e4f50..ccc9f45 100644
--- a/pkg/cloudbroker/account/update.go
+++ b/pkg/cloudbroker/account/update.go
@@ -64,6 +64,10 @@ type UpdateRequest struct {
// Default zone ID
// Required: false
DefaultZoneID uint64 `url:"defaultZoneId,omitempty" json:"defaultZoneId,omitempty"`
+
+ // CPU allocation parameter
+ // Required: false
+ CpuAllocationParameter string `url:"cpu_allocation_parameter,omitempty" json:"cpu_allocation_parameter,omitempty"`
}
// Update updates an account name and resource types and limits
diff --git a/pkg/cloudbroker/compute/models.go b/pkg/cloudbroker/compute/models.go
index 3e8ecd1..ad4fb30 100644
--- a/pkg/cloudbroker/compute/models.go
+++ b/pkg/cloudbroker/compute/models.go
@@ -442,6 +442,9 @@ type ItemDisk struct {
// Image ID
ImageID uint64 `json:"imageId"`
+ // Independent
+ Independent bool `json:"independent"`
+
// List image IDs
Images []uint64 `json:"images"`
@@ -1479,8 +1482,11 @@ type RecordCloneAbort struct {
// Disk ID
DiskID uint64 `json:"disk_id"`
- // Abort status
- Status bool `json:"status"`
+ // Aborted
+ Aborted bool `json:"aborted"`
+
+ // Blockcopy abort job ID
+ BlockcopyAbortJobID string `json:"blockcopy_abort_job_id"`
}
type RecordCloneStatus struct {
diff --git a/pkg/cloudbroker/compute/net_attach.go b/pkg/cloudbroker/compute/net_attach.go
index fe424c6..3909b58 100644
--- a/pkg/cloudbroker/compute/net_attach.go
+++ b/pkg/cloudbroker/compute/net_attach.go
@@ -39,9 +39,8 @@ type NetAttachRequest struct {
// Required: false
MACAddr string `url:"mac_addr,omitempty" json:"mac_addr,omitempty"`
- // Used only for EXTNET and DPDK
- // For DPDK must be 1-9216
- // For EXTNET must be 1500-9216
+ // Used for EXTNET, TRUNK and DPDK
+ // Must be 1500-9216
// Required: false
MTU uint64 `url:"mtu,omitempty" json:"mtu,omitempty" validate:"omitempty,mtu"`
diff --git a/pkg/cloudbroker/disks/models.go b/pkg/cloudbroker/disks/models.go
index e46606d..cce7f70 100644
--- a/pkg/cloudbroker/disks/models.go
+++ b/pkg/cloudbroker/disks/models.go
@@ -242,6 +242,9 @@ type RecordDisk struct {
// Main information about disk
InfoDisk
+ // Independent
+ Independent bool `json:"independent"`
+
//Updated by
UpdatedBy string `json:"updatedBy"`
diff --git a/pkg/cloudbroker/image/models.go b/pkg/cloudbroker/image/models.go
index 3884513..75e9e8f 100644
--- a/pkg/cloudbroker/image/models.go
+++ b/pkg/cloudbroker/image/models.go
@@ -53,6 +53,9 @@ type RecordImage struct {
// ID
ID uint64 `json:"id"`
+ // Independent
+ Independent bool `json:"independent"`
+
// Last modified
LastModified uint64 `json:"lastModified"`
@@ -185,6 +188,9 @@ type ItemImage struct {
// ID
ID uint64 `json:"id"`
+ // Independent
+ Independent bool `json:"independent"`
+
// Last modified
LastModified uint64 `json:"lastModified"`
diff --git a/pkg/cloudbroker/node/enable.go b/pkg/cloudbroker/node/enable.go
index 9bae924..1169520 100644
--- a/pkg/cloudbroker/node/enable.go
+++ b/pkg/cloudbroker/node/enable.go
@@ -18,9 +18,9 @@ type EnableRequest struct {
Message string `url:"message,omitempty" json:"message,omitempty"`
// Do not check locks, iscsi-sessions or disk-present
- // Default: true
+ // Default: false
// Required: false
- Force interface{} `url:"force" json:"force" validate:"isBool" `
+ Force interface{} `url:"force" json:"force" validate:"isBool"`
// Reason
// Required: false
@@ -41,7 +41,7 @@ func (n Node) Enable(ctx context.Context, req EnableRequest) (string, error) {
}
if req.Force == nil {
- req.Force = true
+ req.Force = false
}
reqWrapped := wrapperEnableRequest{
@@ -67,7 +67,7 @@ func (n Node) EnableAsync(ctx context.Context, req EnableRequest) (string, error
}
if req.Force == nil {
- req.Force = true
+ req.Force = false
}
reqWrapped := wrapperEnableRequest{