v13.5.0
This commit is contained in:
57
CHANGELOG.md
57
CHANGELOG.md
@@ -1,53 +1,50 @@
|
|||||||
## Version 13.4.0
|
## Version 13.5.0
|
||||||
|
|
||||||
Методы `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 и в следующих версиях будет удалён
|
||||||
Методы `AccessGrant`, `AccessGrantToPool`, `AccessRevoke`, `AccessRevokeToPool` в cloudbroker/sep стали deprecated и в следующих версиях будут удалены
|
Методы `AccessGrant`, `AccessGrantToPool`, `AccessRevoke`, `AccessRevokeToPool` в cloudbroker/sep стали deprecated и в следующих версиях будут удалены
|
||||||
Методы `ComputeCISet`, `ComputeCIUnset`, `GetAudits` в cloudbroker/computeGetAudits и `GetAudits` в cloudbroker/compute стали deprecated и будут удалены в следующих версиях
|
Методы `ComputeCISet`, `ComputeCIUnset`, `GetAudits` в cloudbroker/computeGetAudits и `GetAudits` в cloudbroker/compute стали deprecated и будут удалены в следующих версиях
|
||||||
|
Методы `ComputeCISet`, `ComputeCIUnset` в cloudbroker/image стали deprecated и будут удалены в следующих версиях
|
||||||
|
|
||||||
Все методы группы `.SDN()` находятся в альфа-версии.
|
Все методы группы `.SDN()` находятся в альфа-версии.
|
||||||
|
|
||||||
### Добавлено
|
### Добавлено
|
||||||
|
|
||||||
#### compute
|
|
||||||
| Идентификатор<br>задачи | Описание |
|
|
||||||
| --- | --- |
|
|
||||||
| BGOS-732 | Опциональное поле `NetMask` в структуру запроса `NetAttachRequest` в cloudapi/compute |
|
|
||||||
| BGOS-727 | Опциональное поле `Cache` в структуру запроса `DiskAddRequest` в cloudapi/compute и в cloudbroker/compute |
|
|
||||||
| BGOS-727 | Поле `Cache` в структуры ответа `ItemComputeDisk` в cloudapi/compute и в `ItemDisk` в cloudbroker/compute |
|
|
||||||
|
|
||||||
#### disks
|
#### disks
|
||||||
| Идентификатор<br>задачи | Описание |
|
| Идентификатор<br>задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-725 | Структура запроса `UpdateRequest`, метод `Update` в cloudbroker/disks |
|
| BGOS-735 | Вычисляемое поле `Cache` в структуры ответа `ItemDiskUnattached` в cloudapi/disks и в cloudbroker/disks |
|
||||||
| BGOS-725 | Опциональное поле `Cache` в структуру запроса `CreateRequest` в cloudapi/disks и в cloudbroker/disks |
|
|
||||||
| BGOS-725 | Поле `Cache` в структуру ответа `InfoDisk` в cloudbroker/disks |
|
|
||||||
| BGOS-725 | Поле `Cache` в структуры ответа `RecordDisk`,`ItemDisk` в cloudapi/disks |
|
|
||||||
|
|
||||||
#### kvmx86
|
#### node
|
||||||
| Идентификатор<br>задачи | Описание |
|
| Идентификатор<br>задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-727 | Опциональное поле `BootDiskCache` в структуры запроса `CreateRequest`, `CreateBlankRequest` в cloudapi/kvmx86 и в cloudbroker/kvmx86 |
|
| BGOS-738 | Структура запроса `AutoStartRequest`, метод `AutoStart` в cloudbroker/node |
|
||||||
| BGOS-727 | Опциональное поле `BootDiskCache` в структуру запроса `MassCreateRequest` в cloudbroker/kvmx86 |
|
| BGOS-738 | Опциональное поле `AutoStart` в структуру запроса `MaintenanceRequest` в cloudbroker/node |
|
||||||
|
| BGOS-738 | Вычисляемые поля `AutoStart`, `AutoStartCount` в структуры ответов `ItemNode` и `RecordNode` в cloudbroker/node |
|
||||||
|
| BGOS-743 | Структура запроса `NodeAutoStartRequest`, метод `NodeAutoStart` в cloudbroker/zone |
|
||||||
|
|
||||||
|
#### zone
|
||||||
|
| Идентификатор<br>задачи | Описание |
|
||||||
|
| --- | --- |
|
||||||
|
| BGOS-737 | Опциональное поле `AutoStart` в структуру запроса `UpdateRequest` в cloudbroker/zone |
|
||||||
|
| BGOS-737 | Вычисляемое поле `AutoStart` в структуры ответа `RecordZone` в cloudapi/zone и в cloudbroker/zone |
|
||||||
|
|
||||||
### Изменено
|
### Изменено
|
||||||
|
|
||||||
|
#### sep
|
||||||
|
| Идентификатор<br>задачи | Описание |
|
||||||
|
| --- | --- |
|
||||||
|
| BGOS-740 | Тип поля `Force` с обязательного на опциональный в структуре запроса `DelConsumerNodesRequest` в cloudbroker/sep |
|
||||||
|
|
||||||
|
### Удалено
|
||||||
|
|
||||||
#### bservice
|
#### bservice
|
||||||
| Идентификатор<br>задачи | Описание |
|
| Идентификатор<br>задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-728 | Тип полей `Chipset` и `Mode` с обязательного на опциональный в структуре запроса `GroupResizeRequest` в cloudapi/bservice и в cloudbroker/bservice |
|
| BGOS-739 | Обязательное поле `Driver` в структурах запроса `GroupAddRequest` в cloudapi/bservice и в cloudbroker/bservice |
|
||||||
|
|
||||||
#### lb
|
#### flipgroup
|
||||||
| Идентификатор<br>задачи | Описание |
|
| Идентификатор<br>задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-733 | Тип поля `Start` с обязательного на опциональный в структуре запроса `CreateRequest`в cloudapi/lb и в cloudbroker/lb |
|
| BGOS-742 | Опциональное поле `RGID` из структуры запроса `ListRequest` в cloudapi/flipgroup и в cloudbroker/flipgroup |
|
||||||
|
| BGOS-742 | Вычисляемые поля `RGName` и `RGID` из структуры ответа `RecordFLIPGroup` в cloudapi/flipgroup и в cloudbroker/flipgroup |
|
||||||
#### trunk
|
|
||||||
| Идентификатор<br>задачи | Описание |
|
|
||||||
| --- | --- |
|
|
||||||
| BGOS-730 | Тип полей `Name` и `TrunkTags` с обязательного на опциональный в структуре запроса `UpdateRequest` в cloudbroker/trunk |
|
|
||||||
|
|
||||||
#### user
|
|
||||||
| Идентификатор<br>задачи | Описание |
|
|
||||||
| --- | --- |
|
|
||||||
| BGOS-729 | Тип поля `Limit` с обязательного на опциональный в структуре запроса `GetMatchingUsernamesRequest` в cloudbroker/user |
|
|
||||||
|
|||||||
@@ -38,10 +38,6 @@ type GroupAddRequest struct {
|
|||||||
// Required: true
|
// Required: true
|
||||||
ImageID uint64 `url:"imageId" json:"imageId" validate:"required"`
|
ImageID uint64 `url:"imageId" json:"imageId" validate:"required"`
|
||||||
|
|
||||||
// Compute driver like a KVM_X86, etc.
|
|
||||||
// Required: true
|
|
||||||
Driver string `url:"driver" json:"driver" validate:"required"`
|
|
||||||
|
|
||||||
// Storage endpoint provider ID
|
// Storage endpoint provider ID
|
||||||
// Required: false
|
// Required: false
|
||||||
SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"`
|
SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"`
|
||||||
|
|||||||
@@ -163,6 +163,9 @@ type ItemDiskUnattached struct {
|
|||||||
// Boot Partition
|
// Boot Partition
|
||||||
BootPartition uint64 `json:"bootPartition"`
|
BootPartition uint64 `json:"bootPartition"`
|
||||||
|
|
||||||
|
// Cache
|
||||||
|
Cache string `json:"cache"`
|
||||||
|
|
||||||
// Created time
|
// Created time
|
||||||
CreatedTime uint64 `json:"createdTime"`
|
CreatedTime uint64 `json:"createdTime"`
|
||||||
|
|
||||||
|
|||||||
@@ -34,10 +34,6 @@ type ListRequest struct {
|
|||||||
// Required: false
|
// Required: false
|
||||||
AccountId uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
|
AccountId uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
|
||||||
|
|
||||||
// Find by resource group ID
|
|
||||||
// Required: false
|
|
||||||
RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"`
|
|
||||||
|
|
||||||
// Find by id
|
// Find by id
|
||||||
// Required: false
|
// Required: false
|
||||||
ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`
|
ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`
|
||||||
|
|||||||
@@ -85,12 +85,6 @@ type RecordFLIPGroup struct {
|
|||||||
// Network
|
// Network
|
||||||
Network string `json:"network"`
|
Network string `json:"network"`
|
||||||
|
|
||||||
// Resource group ID
|
|
||||||
RGID uint64 `json:"rgId"`
|
|
||||||
|
|
||||||
// Resource group name
|
|
||||||
RGName string `json:"rgName"`
|
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ type ListZones struct {
|
|||||||
|
|
||||||
// Detailed information about the zone record
|
// Detailed information about the zone record
|
||||||
type RecordZone struct {
|
type RecordZone struct {
|
||||||
|
// If true, all nodes belonging to the given zone will be marked for autostart
|
||||||
|
AutoStart bool `json:"autostart"`
|
||||||
|
|
||||||
// ID
|
// ID
|
||||||
ID uint64 `json:"id"`
|
ID uint64 `json:"id"`
|
||||||
|
|
||||||
|
|||||||
@@ -38,10 +38,6 @@ type GroupAddRequest struct {
|
|||||||
// Required: true
|
// Required: true
|
||||||
ImageID uint64 `url:"imageId" json:"imageId" validate:"required"`
|
ImageID uint64 `url:"imageId" json:"imageId" validate:"required"`
|
||||||
|
|
||||||
// Compute driver like a KVM_X86, etc.
|
|
||||||
// Required: true
|
|
||||||
Driver string `url:"driver" json:"driver" validate:"required"`
|
|
||||||
|
|
||||||
// Storage endpoint provider ID
|
// Storage endpoint provider ID
|
||||||
// Required: false
|
// Required: false
|
||||||
SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"`
|
SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"`
|
||||||
|
|||||||
@@ -34,10 +34,6 @@ type ListRequest struct {
|
|||||||
// Required: false
|
// Required: false
|
||||||
AccountId uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
|
AccountId uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
|
||||||
|
|
||||||
// Find by resource group ID
|
|
||||||
// Required: false
|
|
||||||
RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"`
|
|
||||||
|
|
||||||
// Find by id
|
// Find by id
|
||||||
// Required: false
|
// Required: false
|
||||||
ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`
|
ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ type RecordFLIPGroupCreated struct {
|
|||||||
// IP
|
// IP
|
||||||
IP string `json:"ip"`
|
IP string `json:"ip"`
|
||||||
|
|
||||||
// Name
|
// Name
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
|
||||||
// Network mask
|
// Network mask
|
||||||
@@ -85,12 +85,6 @@ type RecordFLIPGroup struct {
|
|||||||
// Network
|
// Network
|
||||||
Network string `json:"network"`
|
Network string `json:"network"`
|
||||||
|
|
||||||
// Resource group ID
|
|
||||||
RGID uint64 `json:"rgId"`
|
|
||||||
|
|
||||||
// Resource group name
|
|
||||||
RGName string `json:"rgName"`
|
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
|
|
||||||
|
|||||||
42
pkg/cloudbroker/node/autostart.go
Normal file
42
pkg/cloudbroker/node/autostart.go
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
package node
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
|
||||||
|
)
|
||||||
|
|
||||||
|
// AutoStartRequest struct to set node autostart
|
||||||
|
type AutoStartRequest struct {
|
||||||
|
// Node ID
|
||||||
|
// Required: true
|
||||||
|
NodeID uint64 `url:"node_id" json:"node_id" validate:"required"`
|
||||||
|
|
||||||
|
// Auto start
|
||||||
|
// Required: true
|
||||||
|
AutoStart bool `url:"autostart" json:"autostart" validate:"required"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// AutoStart sets node autostart
|
||||||
|
func (n Node) AutoStart(ctx context.Context, req AutoStartRequest) (bool, error) {
|
||||||
|
err := validators.ValidateRequest(req)
|
||||||
|
if err != nil {
|
||||||
|
return false, validators.ValidationErrors(validators.GetErrors(err))
|
||||||
|
}
|
||||||
|
|
||||||
|
url := "/cloudbroker/node/autostart"
|
||||||
|
|
||||||
|
res, err := n.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
|
||||||
|
}
|
||||||
@@ -26,6 +26,11 @@ type MaintenanceRequest struct {
|
|||||||
// Reason
|
// Reason
|
||||||
// Required: false
|
// Required: false
|
||||||
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
|
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
|
||||||
|
|
||||||
|
// Allow node auto-enable
|
||||||
|
// Default: false
|
||||||
|
// Required: false
|
||||||
|
AutoStart bool `url:"autostart" json:"autostart"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Maintenance places node in maintenance state
|
// Maintenance places node in maintenance state
|
||||||
|
|||||||
@@ -85,6 +85,12 @@ type RecordNode struct {
|
|||||||
|
|
||||||
// CPU used by the node
|
// CPU used by the node
|
||||||
UsableCPUs []string `json:"usable_cpus"`
|
UsableCPUs []string `json:"usable_cpus"`
|
||||||
|
|
||||||
|
// AutoStart
|
||||||
|
AutoStart bool `json:"autostart"`
|
||||||
|
|
||||||
|
// AutoStart Count
|
||||||
|
AutoStartCount uint64 `json:"autostart_count"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resource consumption of the node
|
// Resource consumption of the node
|
||||||
@@ -301,6 +307,12 @@ type ItemNode struct {
|
|||||||
|
|
||||||
// CPU used by the node
|
// CPU used by the node
|
||||||
UsableCPUs []string `json:"usable_cpus"`
|
UsableCPUs []string `json:"usable_cpus"`
|
||||||
|
|
||||||
|
// AutoStart
|
||||||
|
AutoStart bool `json:"autostart"`
|
||||||
|
|
||||||
|
// AutoStart Count
|
||||||
|
AutoStartCount uint64 `json:"autostart_count"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PackageInfo struct {
|
type PackageInfo struct {
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ type DelConsumerNodesRequest struct {
|
|||||||
|
|
||||||
// The force flag must be set to true only if the node will never come back online
|
// The force flag must be set to true only if the node will never come back online
|
||||||
// Default: false
|
// Default: false
|
||||||
// Required: true
|
// Required: false
|
||||||
Force bool `url:"force" json:"force" validate:"required"`
|
Force bool `url:"force" json:"force"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// DelConsumerNodes excludes consumer nodes from SEP parameters
|
// DelConsumerNodes excludes consumer nodes from SEP parameters
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ type ListZones struct {
|
|||||||
|
|
||||||
// Detailed information about the zone record
|
// Detailed information about the zone record
|
||||||
type RecordZone struct {
|
type RecordZone struct {
|
||||||
|
// If true, all nodes belonging to the given zone will be marked for autostart
|
||||||
|
AutoStart bool `json:"autostart"`
|
||||||
|
|
||||||
// ID
|
// ID
|
||||||
ID uint64 `json:"id"`
|
ID uint64 `json:"id"`
|
||||||
|
|
||||||
|
|||||||
43
pkg/cloudbroker/zone/node_autostart.go
Normal file
43
pkg/cloudbroker/zone/node_autostart.go
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
package zone
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NodeAutoStartRequest struct to set node autostart in zone
|
||||||
|
type NodeAutoStartRequest struct {
|
||||||
|
// ID of zone
|
||||||
|
// Required: true
|
||||||
|
ZoneID uint64 `url:"zone_id" json:"zone_id" validate:"required"`
|
||||||
|
|
||||||
|
// AutoStart nodes in zone
|
||||||
|
// Required: true
|
||||||
|
AutoStart bool `url:"autostart" json:"autostart" validate:"required"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NodeAutoStart sets node autostart in zone
|
||||||
|
func (e Zone) NodeAutoStart(ctx context.Context, req NodeAutoStartRequest) (bool, error) {
|
||||||
|
err := validators.ValidateRequest(req)
|
||||||
|
if err != nil {
|
||||||
|
return false, validators.ValidationErrors(validators.GetErrors(err))
|
||||||
|
}
|
||||||
|
|
||||||
|
url := "/cloudbroker/zone/node_autostart"
|
||||||
|
|
||||||
|
res, err := e.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
|
||||||
|
}
|
||||||
@@ -21,6 +21,10 @@ type UpdateRequest struct {
|
|||||||
// Description
|
// Description
|
||||||
// Required: false
|
// Required: false
|
||||||
Description string `url:"description,omitempty" json:"description,omitempty"`
|
Description string `url:"description,omitempty" json:"description,omitempty"`
|
||||||
|
|
||||||
|
// If true, all nodes belonging to the given zone will be marked for autostart
|
||||||
|
// Required: false
|
||||||
|
AutoStart interface{} `url:"autostart,omitempty" json:"autostart,omitempty" validate:"omitempty,isBool"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update updates zone object
|
// Update updates zone object
|
||||||
|
|||||||
Reference in New Issue
Block a user