Compare commits

..
2 Commits
Author SHA1 Message Date
aafetisov 3b0a73c424 v16.12.0 2026-11-20 17:14:41 +03:00
aafetisov ee7a8ebb55 v16.11.0 2026-11-13 16:31:52 +03:00
16 changed files with 201 additions and 62 deletions

No files matched your search

+29 -50
View File
@@ -1,4 +1,4 @@
## Version 16.10.0
## Version 16.12.0
### Deprecated
@@ -8,91 +8,70 @@
| Метод | CloudAPI | CloudBroker |
| --- | --- | --- |
| `account/AddUser` | :heavy_check_mark: | :heavy_check_mark: |
| `account/AddUserAsync` | :heavy_check_mark: | :heavy_check_mark: |
| `account/DeleteUser` | :heavy_check_mark: | :heavy_check_mark: |
| `account/DeleteUserAsync` | :heavy_check_mark: | :heavy_check_mark: |
| `account/UpdateUser` | :heavy_check_mark: | :heavy_check_mark: |
| `account/UpdateUserAsync` | :heavy_check_mark: | :heavy_check_mark: |
| `compute/CreateTemplate` | :heavy_check_mark: | :heavy_check_mark: |
| `compute/CreateTemplateAsync` | :x: | :heavy_check_mark: |
| `compute/CreateTemplateFromBlank` | :heavy_check_mark: | :heavy_check_mark: |
| `compute/CreateTemplateFromBlankAsync` | :heavy_check_mark: | :heavy_check_mark: |
| `compute/DiskQOS` | :heavy_check_mark: | :heavy_check_mark: |
| `compute/DiskQOSAsync` | :heavy_check_mark: | :heavy_check_mark: |
| `compute/Migrate` | :x: | :heavy_check_mark: |
| `compute/AsyncMigrate` | :x: | :heavy_check_mark: |
| `compute/MigrateAbort` | :x: | :heavy_check_mark: |
| `compute/MigrateAbortAsync` | :x: | :heavy_check_mark: |
| `compute/MigrateStorage` | :x: | :heavy_check_mark: |
| `compute/MigrateStorageAbort` | :x: | :heavy_check_mark: |
| `compute/MigrateStorageAbortAsync` | :x: | :heavy_check_mark: |
| `compute/MigrateStorageCleanUp` | :x: | :heavy_check_mark: |
| `compute/MigrateStorageCleanUpAsync` | :x: | :heavy_check_mark: |
| `compute/MigrateStorageInfo` | :x: | :heavy_check_mark: |
| `compute/MigrateStorageInfoRaw` | :x: | :heavy_check_mark: |
| `compute/MigrateStorageList` | :x: | :heavy_check_mark: |
| `compute/UserGrant` | :heavy_check_mark: | :heavy_check_mark: |
| `compute/UserList` | :heavy_check_mark: | :heavy_check_mark: |
| `compute/UserRevoke` | :heavy_check_mark: | :heavy_check_mark: |
| `compute/UserUpdate` | :heavy_check_mark: | :heavy_check_mark: |
| `disks/FromPlatformDisk` | :heavy_check_mark: | :heavy_check_mark: |
| `disks/FromPlatformDiskAsync` | :heavy_check_mark: | :heavy_check_mark: |
| `rg/AccessGrant` | :heavy_check_mark: | :heavy_check_mark: |
| `rg/AccessRevoke` | :heavy_check_mark: | :heavy_check_mark: |
| `sep/ConfigFieldEdit` | :x: | :heavy_check_mark: |
| `apiaccess/userList` | :x: | :heavy_check_mark: |
### Добавлено
#### Общее
#### audit
| Идентификатор задачи | Описание |
| --- | --- |
| BGOS-1153 | Валидаторы `migrateV2UserMatch` и `migrateV2Status` |
#### account
| Идентификатор задачи | Описание |
| --- | --- |
| BGOS-1161 | Методы `AddACLAccessAsync`, `AddUserAsync`, `DeleteACLAccessAsync`, `DeleteUserAsync`, `RestoreAsync`, `UpdateACLAccessAsync`, `UpdateAsync` и `UpdateUserAsync` в cloudapi/account |
| BGOS-1161 | Структуры запроса `wrapperAddACLAccessRequest`, `wrapperAddUserRequest`, `wrapperDelACLAccessRequest`, `wrapperDeleteUserRequest`, `wrapperRestoreRequest`, `wrapperUpdateACLAccessRequest`, `wrapperUpdateRequest` и `wrapperUpdateUserRequest` в cloudapi/account |
| BGOS-1161 | Методы `AddACLAccessAsync`, `AddStoragePolicyAsync`, `AddUserAsync`, `AddZoneAsync`, `CreateAsync`, `DelStoragePolicyAsync`, `DeleteACLAccessAsync`, `DeleteAccountsAsync`, `DeleteAsync`, `DeleteUserAsync`, `DisableAccountsAsync`, `EnableAccountsAsync`, `GrantAccessTemplatesAsync`, `RemoveZoneAsync`, `RestoreAsync`, `RevokeAccessTemplatesAsync`, `SetCPUAllocationParameterAsync`, `SetCPUAllocationRatioAsync`, `UpdateACLAccessAsync`, `UpdateAsync`, `UpdateComputeFeaturesAsync`, `UpdateResourceTypesAsync` и `UpdateUserAsync` в cloudbroker/account |
| BGOS-1161 | Структуры запроса `wrapperAddACLAccessRequest`, `wrapperAddStoragePolicyRequest`, `wrapperAddUserRequest`, `wrapperAddZoneRequest`, `wrapperCreateRequest`, `wrapperDelACLAccessRequest`, `wrapperDelStoragePolicyRequest`, `wrapperDeleteAccountsRequest`, `wrapperDeleteRequest`, `wrapperDeleteUserRequest`, `wrapperDisableAccountsRequest`, `wrapperEnableAccountsRequest`, `wrapperGrantAccessTemplatesRequest`, `wrapperRemoveZoneRequest`, `wrapperRestoreRequest`, `wrapperRevokeAccessTemplatesRequest`, `wrapperSetCPUAllocationParameterRequest`, `wrapperSetCPUAllocationRatioRequest`, `wrapperUpdateACLAccessRequest`, `wrapperUpdateComputeFeaturesRequest`, `wrapperUpdateRequest`, `wrapperUpdateResourceTypesRequest` и `wrapperUpdateUserRequest` в cloudbroker/account |
#### compute
| Идентификатор задачи | Описание |
| --- | --- |
| BGOS-1152 | Опциональные поля `CopyParallelism` и `BandwidthBytesPerSecond` в структуру запроса `MigrateV2Request` в cloudbroker/compute |
| BGOS-1152 | Вычисляемые поля `CopyParallelism`, `BandwidthBytesPerSecond`, `DiskPlanReady`, `ExecutionKind`, `OfflineCommitStarted`, `ReservesComputeResources`, `RequestedStorage`, `SourceDisks` и `TargetShadowCompute` в структуру ответа `MigrateV2Record` в cloudbroker/compute |
| BGOS-1152 | Вычисляемые поля `CopyNodeID`, `CopyState` и `WriterStopped` в структуру ответа `Disk` в cloudbroker/compute |
| BGOS-1152 | Вычисляемые поля `Items` и `PercentIsEstimated` в структуру ответа `ProgressDisks` в cloudbroker/compute |
| BGOS-1152 | Опциональные поля `AccountID`, `RGID`, `User`, `UserMatch`, `UserIsNull`, `SourceNodeIDIsNull` и `TargetNodeIDIsNull` в структуру запроса `MigrateV2ListRequest` в cloudbroker/compute |
| BGOS-1152 | Вычисляемые поля `CopyParallelism`, `BandwidthBytesPerSecond`, `DiskPlanReady`, `ExecutionKind`, `OfflineCommitStarted`, `RequestedStorage` и `SourceDisks` в структуру ответа `MigrateV2Item` в cloudbroker/compute |
| BGOS-1174 | Вычисляемое поле `TTL` в структуре ответа `RecordAudit` в cloudapi/audit |
#### disks
| Идентификатор задачи | Описание |
| --- | --- |
| BGOS-1153 | Методы `MigrateV2`, `MigrateV2Abort`, `MigrateV2AbortRaw`, `MigrateV2Cleanup`, `MigrateV2Get`, `MigrateV2GetRaw`, `MigrateV2List`, `MigrateV2ListRaw`, `MigrateV2Resolve` и `MigrateV2ResolveRaw` в cloudbroker/disks |
| BGOS-1153 | Структуры запроса `MigrateV2Request`, `MigrateV2Storage`, `MigrateV2Target`, `MigrateV2AbortRequest`, `MigrateV2CleanupRequest`, `MigrateV2GetRequest`, `MigrateV2ListRequest` и `MigrateV2ResolveRequest` в cloudbroker/disks |
| BGOS-1153 | Структуры ответа `MigrateV2Record`, `ListMigrateV2`, `MigrateV2Item`, `MigrateV2SourceDisk`, `MigrateV2RequestedStorage`, `MigrateV2RequestedTarget`, `MigrateV2Origin`, `MigrateV2Progress`, `MigrateV2Observation`, `MigrateV2Memory`, `MigrateV2ProgressDisks`, `MigrateV2ProgressItem`, `MigrateV2Disk`, `MigrateV2CleanupInfo`, `MigrateV2Resolution`, `MigrateV2AbortRecord`, `MigrateV2AbortResult` и `MigrateV2ResolveRecord` в cloudbroker/disks |
| BGOS-1162 | Вычисляемые поля `Bandwidth`, `CopyRate`, `LastSync`, `PairID`, `ProfileID`, `ScheduleID`, `ScheduleName`, `Status`, `Target` и `Type` в структуру ответа `ItemReplication` в cloudapi/disks |
| BGOS-1162 | Вычисляемые поля `Bandwidth`, `CopyRate`, `LastSync`, `PairID`, `ProfileID`, `ScheduleID`, `ScheduleName`, `Status`, `Target` и `Type` в структуру ответа `ItemReplication` в cloudbroker/disks |
#### node
| Идентификатор задачи | Описание |
| --- | --- |
| BGOS-1151 | Вычисляемое поле `PhysicalNetState` в структуру ответа `RecordNode` в cloudbroker/node |
| BGOS-1178 | Вычисляемые поля `ReadBytesSecMaxLength`, `ReadIOPSSecMaxLength`, `TotalBytesSecMaxLength`, `TotalIOPSSecMaxLength`, `WriteBytesSecMaxLength` и `WriteIOPSSecMaxLength` в структуре ответа `IOTune` в cloudapi/disks |
| BGOS-1178 | Вычисляемые поля `ReadBytesSecMaxLength`, `ReadIOPSSecMaxLength`, `TotalBytesSecMaxLength`, `TotalIOPSSecMaxLength`, `WriteBytesSecMaxLength` и `WriteIOPSSecMaxLength` в структуре ответа `IOTune` в cloudbroker/disks |
| BGOS-1169 | Метод `ReplicationCancelSync` и структура запроса `ReplicationCancelSyncRequest` в cloudapi/disks |
| BGOS-1169 | Метод `ReplicationCancelSync` и структура запроса `ReplicationCancelSyncRequest` в cloudbroker/disks |
#### zone
| Идентификатор задачи | Описание |
| --- | --- |
| BGOS-1154 | Вычисляемое поле `TaskDiskTimeout` в структуры ответа `RecordZone`, `ItemZone` в cloudbroker/zone |
| BGOS-1154 | Вычисляемое поле `TaskDiskTimeout` в структуры ответа `RecordZone`, `ItemZone` в cloudapi/zone |
### Удалено
#### basismpm
| Идентификатор задачи | Описание |
| --- | --- |
| BGOS-1163 | Опциональное поле `LogFile` из структур запроса `StartRequest` и `UpdateRequest` в cloudbroker/basismpm |
#### compute
| Идентификатор задачи | Описание |
| --- | --- |
| BGOS-1152 | Вычисляемые поля `Scope`, `TargetDevs`, `CompletedDisks` и `CurrentDisk` из структуры ответа `ProgressDisks` в cloudbroker/compute |
| BGOS-1175 | Вычисляемое поле `TTL` в структуры ответа `RecordZone` и `ItemZone` в cloudapi/zone |
| BGOS-1175 | Вычисляемое поле `TTL` в структуры ответа `RecordZone` и `ItemZone` в cloudbroker/zone |
### Изменено
#### account
#### grid
| Идентификатор задачи | Описание |
| --- | --- |
| BGOS-1161 | Метод `Restore` выполняется в синхронном режиме (`async_mode=false`) в cloudapi/account |
| BGOS-1161 | Методы `Delete`, `DeleteAccounts`, `DisableAccounts`, `EnableAccounts` и `Restore` выполняются в синхронном режиме (`async_mode=false`) в cloudbroker/account |
| BGOS-1161 | Тип возвращаемого значения методов `DeleteAccounts`, `DisableAccounts` и `EnableAccounts` с `string` на `[]uint64` в cloudbroker/account |
| BGOS-1172 | Тип обязательного поля `Ratio` с `uint64` на `float64` в структуре запроса `SetMemAllocationRatioRequest` в cloudbroker/grid |
#### node
| Идентификатор задачи | Описание |
| --- | --- |
| BGOS-1173 | Тип вычисляемого поля `MemAllocationRatio` с `uint64` на `float64` в структурах ответа `RecordNode` и `ItemNode` в cloudbroker/node |
| BGOS-1173 | Тип обязательного поля `Ratio` с `uint64` на `float64` в структуре запроса `SetMemAllocationRatioRequest` в cloudbroker/node |
+1 -1
View File
@@ -8,7 +8,7 @@ type Audit struct {
}
// Builder for audit endpoint
func New(client interfaces.Caller) *Audit {
func New(client interfaces.Caller) *Audit{
return &Audit{
client: client,
}
+36 -2
View File
@@ -1,8 +1,10 @@
package audit
import "encoding/json"
// Main info about audit
type RecordAudit struct {
// Arguments
// Arguments as JSON text
Arguments string `json:"args"`
// Call
@@ -14,7 +16,7 @@ type RecordAudit struct {
// Correlation ID
CorrelationID string `json:"correlation_id"`
// Kwargs
// Keyword arguments as JSON text
Kwargs string `json:"kwargs"`
// RemoteAddr
@@ -43,6 +45,38 @@ type RecordAudit struct {
// Public Session ID
PublicSessionID string `json:"public_session_id"`
// TTL
TTL string `json:"_ttl"`
}
// UnmarshalJSON accepts both JSON-encoded strings and structured arguments.
func (r *RecordAudit) UnmarshalJSON(data []byte) error {
type recordAudit RecordAudit
response := struct {
*recordAudit
Arguments auditJSONText `json:"args"`
Kwargs auditJSONText `json:"kwargs"`
}{
recordAudit: (*recordAudit)(r),
Arguments: auditJSONText{value: &r.Arguments, opening: '['},
Kwargs: auditJSONText{value: &r.Kwargs, opening: '{'},
}
return json.Unmarshal(data, &response)
}
type auditJSONText struct {
value *string
opening byte
}
func (f *auditJSONText) UnmarshalJSON(data []byte) error {
if len(data) > 0 && data[0] == f.opening {
*f.value = string(data)
return nil
}
return json.Unmarshal(data, f.value)
}
// Main info about audit
+18
View File
@@ -399,6 +399,24 @@ type IOTune struct {
// WriteIOPSSecMax
WriteIOPSSecMax uint64 `json:"write_iops_sec_max"`
// ReadBytesSecMaxLength
ReadBytesSecMaxLength uint64 `json:"read_bytes_sec_max_length"`
// ReadIOPSSecMaxLength
ReadIOPSSecMaxLength uint64 `json:"read_iops_sec_max_length"`
// TotalBytesSecMaxLength
TotalBytesSecMaxLength uint64 `json:"total_bytes_sec_max_length"`
// TotalIOPSSecMaxLength
TotalIOPSSecMaxLength uint64 `json:"total_iops_sec_max_length"`
// WriteBytesSecMaxLength
WriteBytesSecMaxLength uint64 `json:"write_bytes_sec_max_length"`
// WriteIOPSSecMaxLength
WriteIOPSSecMaxLength uint64 `json:"write_iops_sec_max_length"`
}
// Detailed information about disk
@@ -0,0 +1,39 @@
package disks
import (
"context"
"net/http"
"strconv"
"strings"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators"
)
type ReplicationCancelSyncRequest struct {
// Disk ID
// Required: true
DiskID uint64 `url:"disk_id" json:"disk_id" validate:"required"`
}
// ReplicationCancelSync cancels ongoing disk replication synchronization
func (d Disks) ReplicationCancelSync(ctx context.Context, req ReplicationCancelSyncRequest) (bool, error) {
err := validators.ValidateRequest(req)
if err != nil {
return false, validators.ValidationErrors(validators.GetErrors(err))
}
url := "/cloudapi/disks/replication_cancel_sync"
res, err := d.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req)
if err != nil {
return false, err
}
result, err := strconv.ParseBool(strings.TrimSpace(string(res)))
if err != nil {
return false, err
}
return result, nil
}
+6
View File
@@ -129,6 +129,9 @@ type RecordZone struct {
// Timeout
TaskDiskTimeout string `json:"task_disk_timeout"`
// TTL
TTL string `json:"ttl"`
}
// A zone item from a list
@@ -219,4 +222,7 @@ type ItemZone struct {
// Timeout
TaskDiskTimeout string `json:"task_disk_timeout"`
// TTL
TTL string `json:"ttl"`
}
+1 -1
View File
@@ -8,7 +8,7 @@ type Audit struct {
}
// Builder for audit endpoint
func New(client interfaces.Caller) *Audit {
func New(client interfaces.Caller) *Audit{
return &Audit{
client: client,
}
+18
View File
@@ -40,6 +40,24 @@ type IOTune struct {
// WriteIOPSSecMax
WriteIOPSSecMax uint64 `json:"write_iops_sec_max"`
// ReadBytesSecMaxLength
ReadBytesSecMaxLength uint64 `json:"read_bytes_sec_max_length"`
// ReadIOPSSecMaxLength
ReadIOPSSecMaxLength uint64 `json:"read_iops_sec_max_length"`
// TotalBytesSecMaxLength
TotalBytesSecMaxLength uint64 `json:"total_bytes_sec_max_length"`
// TotalIOPSSecMaxLength
TotalIOPSSecMaxLength uint64 `json:"total_iops_sec_max_length"`
// WriteBytesSecMaxLength
WriteBytesSecMaxLength uint64 `json:"write_bytes_sec_max_length"`
// WriteIOPSSecMaxLength
WriteIOPSSecMaxLength uint64 `json:"write_iops_sec_max_length"`
}
// Main information about disks
@@ -0,0 +1,39 @@
package disks
import (
"context"
"net/http"
"strconv"
"strings"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators"
)
type ReplicationCancelSyncRequest struct {
// Disk ID
// Required: true
DiskID uint64 `url:"disk_id" json:"disk_id" validate:"required"`
}
// ReplicationCancelSync cancels ongoing disk replication synchronization
func (d Disks) ReplicationCancelSync(ctx context.Context, req ReplicationCancelSyncRequest) (bool, error) {
err := validators.ValidateRequest(req)
if err != nil {
return false, validators.ValidationErrors(validators.GetErrors(err))
}
url := "/cloudbroker/disks/replication_cancel_sync"
res, err := d.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req)
if err != nil {
return false, err
}
result, err := strconv.ParseBool(strings.TrimSpace(string(res)))
if err != nil {
return false, err
}
return result, nil
}
+1 -1
View File
@@ -152,7 +152,7 @@ func (e ExtNet) Create(ctx context.Context, req CreateRequest) (uint64, error) {
reqWrappedAsync := asyncWrapperCreateRequest{
wrapperCreateRequest: reqWrapped,
AsyncMode: true,
AsyncMode: false,
}
url := "/cloudbroker/extnet/create"
@@ -16,7 +16,7 @@ type SetMemAllocationRatioRequest struct {
// Allocation ratio
// Required: true
Ratio uint64 `url:"ratio" json:"ratio" validate:"required"`
Ratio float64 `url:"ratio" json:"ratio" validate:"required,gte=1"`
}
// SetMemAllocationRatio sets memory allocation ratio
+1 -1
View File
@@ -19,7 +19,7 @@ type AccessAddRequest struct {
}
// Add accountId to sharedWith access list for k8ci.
func (k K8CI) AccessAdd(ctx context.Context, req AccessAddRequest) (string, error) {
func (k K8CI) AccessAdd (ctx context.Context, req AccessAddRequest) (string, error) {
err := validators.ValidateRequest(req)
if err != nil {
return "", validators.ValidationErrors(validators.GetErrors(err))
+1 -1
View File
@@ -19,7 +19,7 @@ type AccessRemoveRequest struct {
}
// Remove accountId from sharedWith access list for k8ci.
func (k K8CI) AccessRemove(ctx context.Context, req AccessRemoveRequest) (string, error) {
func (k K8CI) AccessRemove (ctx context.Context, req AccessRemoveRequest) (string, error) {
err := validators.ValidateRequest(req)
if err != nil {
return "", validators.ValidationErrors(validators.GetErrors(err))
+2 -2
View File
@@ -27,7 +27,7 @@ type RecordNode struct {
IsolatedCpus []interface{} `json:"isolatedCpus"`
// MemAllocationRatio
MemAllocationRatio uint64 `json:"mem_allocation_ratio"`
MemAllocationRatio float64 `json:"mem_allocation_ratio"`
// Name
Name string `json:"name"`
@@ -363,7 +363,7 @@ type ItemNode struct {
CPUAllocationRatio uint64 `json:"cpu_allocation_ratio"`
// MemAllocationRatio
MemAllocationRatio uint64 `json:"mem_allocation_ratio"`
MemAllocationRatio float64 `json:"mem_allocation_ratio"`
// Packages
Packages map[string]PackageInfo `json:"packages"`
@@ -14,9 +14,9 @@ type SetMemAllocationRatioRequest struct {
// Required: true
NodeID uint64 `url:"node_id" json:"node_id" validate:"required"`
// Allocation ratio (zero or positive value)
// Allocation ratio (at least 1)
// Required: true
Ratio uint64 `url:"ratio" json:"ratio" validate:"required"`
Ratio float64 `url:"ratio" json:"ratio" validate:"required,gte=1"`
}
// SetMemAllocationRatio set memory allocation ratio
+6
View File
@@ -198,6 +198,9 @@ type RecordZone struct {
// Timeout
TaskDiskTimeout string `json:"task_disk_timeout"`
// TTL
TTL string `json:"ttl"`
}
// A zone item from a list
@@ -291,4 +294,7 @@ type ItemZone struct {
// Timeout
TaskDiskTimeout string `json:"task_disk_timeout"`
// TTL
TTL string `json:"ttl"`
}