Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d149ba19fd | ||
| c17b6f2336 | |||
|
|
b1fbd6872d |
42
CHANGELOG.md
42
CHANGELOG.md
@@ -1,9 +1,10 @@
|
||||
## Version 1.13.4
|
||||
## Version 1.13.7
|
||||
|
||||
Методы `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 и в следующих версиях будет удалён
|
||||
Методы `AccessGrant`, `AccessGrantToPool`, `AccessRevoke`, `AccessRevokeToPool` в cloudbroker/sep стали deprecated и в следующих версиях будут удалены
|
||||
Методы `ComputeCISet`, `ComputeCIUnset`, `GetAudits` в cloudbroker/computeGetAudits и `GetAudits` в cloudbroker/compute стали deprecated и будут удалены в следующих версиях
|
||||
Методы `AccessGrant`, `AccessGrantToPool`, `AccessRevoke`, `AccessRevokeToPool` в cloudbroker/sep стали deprecated и в следующих версиях будут удалены
|
||||
Методы `ComputeCISet`, `ComputeCIUnset`, `GetAudits` в cloudbroker/compute и `GetAudits` в cloudapi/compute стали deprecated и будут удалены в следующих версиях
|
||||
Методы `ComputeCISet`, `ComputeCIUnset` в cloudbroker/image стали deprecated и будут удалены в следующих версиях
|
||||
|
||||
Все методы группы `.SDN()` находятся в альфа-версии.
|
||||
|
||||
@@ -12,42 +13,41 @@
|
||||
#### 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 |
|
||||
| BGOS-757 | Опциональное поле `BLKDiscard` в структуру запроса `DiskAddRequest` в cloudbroker/compute |
|
||||
| BGOS-757 | Вычисляемое поле `BLKDiscard` в структуру ответа `ItemComputeDisk` в cloudapi/compute и в структуру ответа в `ItemDisk` в cloudbroker/compute |
|
||||
|
||||
#### disks
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BGOS-725 | Структура запроса `UpdateRequest`, метод `Update` в cloudbroker/disks |
|
||||
| BGOS-725 | Опциональное поле `Cache` в структуру запроса `CreateRequest` в cloudapi/disks и в cloudbroker/disks |
|
||||
| BGOS-725 | Поле `Cache` в структуру ответа `InfoDisk` в cloudbroker/disks |
|
||||
| BGOS-725 | Поле `Cache` в структуры ответа `RecordDisk`,`ItemDisk` в cloudapi/disks |
|
||||
| BGOS-756 | Опциональное поле `BLKDiscard` в структуры запроса `CreateRequest` и `UpdateRequest` в cloudbroker/disks |
|
||||
| BGOS-756 | Поле `BLKDiscard` в структуры ответа `RecordDisk`, `ItemDisk` и `ItemDiskUnattached` в cloudapi/disks и в структуру ответа `InfoDisk` в cloudbroker/disks |
|
||||
|
||||
#### kvmx86
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BGOS-727 | Опциональное поле `BootDiskCache` в структуры запроса `CreateRequest`, `CreateBlankRequest` в cloudapi/kvmx86 и в cloudbroker/kvmx86 |
|
||||
| BGOS-727 | Опциональное поле `BootDiskCache` в структуру запроса `MassCreateRequest` в cloudbroker/kvmx86 |
|
||||
| BGOS-760 | Опциональное поле `Cache` в структуру запроса `DataDisk` в cloudbroker/kvmx86 |
|
||||
| BGOS-757 | Опциональное поле `BootDiskBLKDiscard` в структуры запроса `CreateBlankRequest`, `CreateRequest` и `MassCreateRequest` в cloudbroker/kvmx86 |
|
||||
|
||||
### Изменено
|
||||
|
||||
#### bservice
|
||||
### Удалено
|
||||
|
||||
#### compute
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BGOS-728 | Тип полей `Chipset` и `Mode` с обязательного на опциональный в структуре запроса `GroupResizeRequest` в cloudapi/bservice и в cloudbroker/bservice |
|
||||
| BGOS-755 | Опциональное поле `Cache` из структуры запроса `DiskAddRequest` в cloudapi/compute |
|
||||
|
||||
#### lb
|
||||
#### disks
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BGOS-733 | Тип поля `Start` с обязательного на опциональный в структуре запроса `CreateRequest`в cloudapi/lb и в cloudbroker/lb |
|
||||
| BGOS-755 | Опциональное поле `Cache` из структуры запроса `CreateRequest` в cloudapi/disks |
|
||||
| BGOS-761 | Вычисляемое поле `CKey` из структуры ответа `ItemDiskUnattached` в cloudapi/disks и из структуры ответа `ItemUnattachedDisk` в cloudbroker/disks |
|
||||
|
||||
#### trunk
|
||||
#### image
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BGOS-730 | Тип полей `Name` и `TrunkTags` с обязательного на опциональный в структуре запроса `UpdateRequest` в cloudbroker/trunk |
|
||||
| BGOS-758 | Поле `CKey` из структуры ответа `RecordImage` в cloudapi/image |
|
||||
|
||||
#### user
|
||||
#### kvmx86
|
||||
| Идентификатор<br>задачи | Описание |
|
||||
| --- | --- |
|
||||
| BGOS-729 | Тип поля `Limit` с обязательного на опциональный в структуре запроса `GetMatchingUsernamesRequest` в cloudbroker/user |
|
||||
| BGOS-755 | Опциональное поле `BootDiskCache` из структур запроса `CreateRequest` и `CreateBlankRequest` в cloudapi/kvmx86 |
|
||||
|
||||
@@ -38,10 +38,6 @@ type GroupAddRequest struct {
|
||||
// Required: true
|
||||
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
|
||||
// Required: false
|
||||
SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"`
|
||||
|
||||
@@ -58,10 +58,6 @@ type DiskAddRequest struct {
|
||||
// Desired bus number (hex string, e.g. "0x03")
|
||||
// Required: false
|
||||
BusNumber string `url:"bus_number,omitempty" json:"bus_number,omitempty"`
|
||||
|
||||
// Disk cache mode
|
||||
// Required: false
|
||||
Cache string `url:"cache,omitempty" json:"cache,omitempty"`
|
||||
}
|
||||
|
||||
// DiskAdd creates new disk and attach to compute
|
||||
|
||||
@@ -789,6 +789,9 @@ type ItemComputeDisk struct {
|
||||
// Account ID
|
||||
AccountID uint64 `json:"accountId"`
|
||||
|
||||
// BLK Discard
|
||||
BLKDiscard bool `json:"blkdiscard"`
|
||||
|
||||
// Boot partition
|
||||
BootPartition uint64 `json:"bootPartition"`
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ type NetAttachRequest struct {
|
||||
// 'VFNIC' for connect to vfpool
|
||||
// 'DPDK' for connect to DPDK
|
||||
// `EMPTY` for connect empty network
|
||||
// `SDT` for connect to SDN
|
||||
// `SDN` for connect to SDN
|
||||
// `TRUNK` for connect to TRUNK
|
||||
// Required: true
|
||||
NetType string `url:"netType" json:"netType" validate:"computex86NetType"`
|
||||
@@ -50,6 +50,22 @@ type NetAttachRequest struct {
|
||||
// Required: false
|
||||
NetMask uint64 `url:"netMask,omitempty" json:"netMask,omitempty"`
|
||||
|
||||
// SDN Segment ID
|
||||
// Required: false
|
||||
SDNSegmentID string `url:"sdn_segment_id,omitempty" json:"sdn_segment_id,omitempty"`
|
||||
|
||||
// SDN Object Group ID
|
||||
// Required: false
|
||||
SDNObjectGroupID string `url:"sdn_object_group_id,omitempty" json:"sdn_object_group_id,omitempty"`
|
||||
|
||||
// SDN Logical Port Display Name
|
||||
// Required: false
|
||||
SDNLogicalPortDisplayName string `url:"sdn_logical_port_display_name,omitempty" json:"sdn_logical_port_display_name,omitempty"`
|
||||
|
||||
// SDN Logical Port Description
|
||||
// Required: false
|
||||
SDNLogicalPortDescription string `url:"sdn_logical_port_description,omitempty" json:"sdn_logical_port_description,omitempty"`
|
||||
|
||||
// Unique identifier of logical port on SDN side
|
||||
// Required: false
|
||||
SDNInterfaceID string `url:"sdn_interface_id,omitempty" json:"sdn_interface_id,omitempty" validate:"omitempty"`
|
||||
|
||||
@@ -37,10 +37,6 @@ type CreateRequest struct {
|
||||
// Pool name to create disk
|
||||
// Required: false
|
||||
Pool string `url:"pool,omitempty" json:"pool,omitempty"`
|
||||
|
||||
// Cache mode of disk
|
||||
// Required: false
|
||||
Cache string `url:"cache,omitempty" json:"cache,omitempty"`
|
||||
}
|
||||
|
||||
// Create creates a disk
|
||||
|
||||
@@ -11,6 +11,9 @@ type ItemDisk struct {
|
||||
// Account name
|
||||
AccountName string `json:"accountName"`
|
||||
|
||||
// BLK Discard
|
||||
BLKDiscard bool `json:"blkdiscard"`
|
||||
|
||||
// Computes
|
||||
Computes map[string]string `json:"computes"`
|
||||
|
||||
@@ -145,9 +148,6 @@ type ItemDisk struct {
|
||||
}
|
||||
|
||||
type ItemDiskUnattached struct {
|
||||
// CKey
|
||||
CKey string `json:"_ckey"`
|
||||
|
||||
// Meta
|
||||
Meta []interface{} `json:"_meta"`
|
||||
|
||||
@@ -160,9 +160,15 @@ type ItemDiskUnattached struct {
|
||||
// Access Control List
|
||||
ACL map[string]interface{} `json:"acl"`
|
||||
|
||||
// BLK Discard
|
||||
BLKDiscard bool `json:"blkdiscard"`
|
||||
|
||||
// Boot Partition
|
||||
BootPartition uint64 `json:"bootPartition"`
|
||||
|
||||
// Cache
|
||||
Cache string `json:"cache"`
|
||||
|
||||
// Created time
|
||||
CreatedTime uint64 `json:"createdTime"`
|
||||
|
||||
@@ -378,6 +384,9 @@ type RecordDisk struct {
|
||||
// Account name
|
||||
AccountName string `json:"accountName"`
|
||||
|
||||
// BLK Discard
|
||||
BLKDiscard bool `json:"blkdiscard"`
|
||||
|
||||
// Computes
|
||||
Computes map[string]string `json:"computes"`
|
||||
|
||||
|
||||
@@ -34,10 +34,6 @@ type ListRequest struct {
|
||||
// Required: false
|
||||
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
|
||||
// Required: false
|
||||
ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`
|
||||
|
||||
@@ -85,12 +85,6 @@ type RecordFLIPGroup struct {
|
||||
// Network
|
||||
Network string `json:"network"`
|
||||
|
||||
// Resource group ID
|
||||
RGID uint64 `json:"rgId"`
|
||||
|
||||
// Resource group name
|
||||
RGName string `json:"rgName"`
|
||||
|
||||
// Status
|
||||
Status string `json:"status"`
|
||||
|
||||
|
||||
@@ -92,9 +92,6 @@ type RecordImage struct {
|
||||
// UNCPathj
|
||||
UNCPath string `json:"UNCPath"`
|
||||
|
||||
// CKey
|
||||
CKey string `json:"_ckey"`
|
||||
|
||||
// Account ID
|
||||
AccountID uint64 `json:"accountId"`
|
||||
|
||||
|
||||
@@ -44,6 +44,22 @@ type Interface struct {
|
||||
// Required: false
|
||||
MAC string `url:"mac,omitempty" json:"mac,omitempty" validate:"omitempty"`
|
||||
|
||||
// SDN Segment ID
|
||||
// Required: false
|
||||
SDNSegmentID string `url:"sdn_segment_id,omitempty" json:"sdn_segment_id,omitempty"`
|
||||
|
||||
// SDN Object Group ID
|
||||
// Required: false
|
||||
SDNObjectGroupID string `url:"sdn_object_group_id,omitempty" json:"sdn_object_group_id,omitempty"`
|
||||
|
||||
// SDN Logical Port Display Name
|
||||
// Required: false
|
||||
SDNLogicalPortDisplayName string `url:"sdn_logical_port_display_name,omitempty" json:"sdn_logical_port_display_name,omitempty"`
|
||||
|
||||
// SDN Logical Port Description
|
||||
// Required: false
|
||||
SDNLogicalPortDescription string `url:"sdn_logical_port_description,omitempty" json:"sdn_logical_port_description,omitempty"`
|
||||
|
||||
// SDN interface id
|
||||
// Required: false
|
||||
SDNInterfaceID string `url:"sdn_interface_id,omitempty" json:"sdn_interface_id,omitempty"`
|
||||
@@ -209,10 +225,6 @@ type CreateRequest struct {
|
||||
// Zone ID
|
||||
// Required: false
|
||||
ZoneID uint64 `url:"zoneId,omitempty" json:"zoneId,omitempty"`
|
||||
|
||||
// Cache mode for boot disk
|
||||
// Required: false
|
||||
BootDiskCache string `url:"boot_disk_cache,omitempty" json:"boot_disk_cache,omitempty"`
|
||||
}
|
||||
|
||||
// GetRAM returns RAM field values
|
||||
|
||||
@@ -115,10 +115,6 @@ type CreateBlankRequest struct {
|
||||
// The OS version that will be installed on the virtual machine
|
||||
// Required: false
|
||||
OSVersion string `url:"os_version,omitempty" json:"os_version,omitempty"`
|
||||
|
||||
// Cache mode for boot disk
|
||||
// Required: false
|
||||
BootDiskCache string `url:"boot_disk_cache,omitempty" json:"boot_disk_cache,omitempty"`
|
||||
}
|
||||
|
||||
// GetRAM returns RAM field values
|
||||
|
||||
@@ -10,6 +10,9 @@ type ListZones struct {
|
||||
|
||||
// Detailed information about the zone record
|
||||
type RecordZone struct {
|
||||
// If true, all nodes belonging to the given zone will be marked for autostart
|
||||
AutoStart bool `json:"autostart"`
|
||||
|
||||
// ID
|
||||
ID uint64 `json:"id"`
|
||||
|
||||
|
||||
@@ -38,10 +38,6 @@ type GroupAddRequest struct {
|
||||
// Required: true
|
||||
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
|
||||
// Required: false
|
||||
SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"`
|
||||
|
||||
@@ -62,6 +62,10 @@ type DiskAddRequest struct {
|
||||
// Disk cache mode
|
||||
// Required: false
|
||||
Cache string `url:"cache,omitempty" json:"cache,omitempty"`
|
||||
|
||||
// BLK Discard
|
||||
// Required: false
|
||||
BLKDiscard interface{} `url:"blkdiscard" json:"blkdiscard" validate:"omitempty,isBool"`
|
||||
}
|
||||
|
||||
// DiskAdd creates new disk and attach to compute
|
||||
|
||||
@@ -391,6 +391,9 @@ type ItemDisk struct {
|
||||
// Access Control List
|
||||
ACL ItemACL `json:"acl"`
|
||||
|
||||
// BLK Discard
|
||||
BLKDiscard bool `json:"blkdiscard"`
|
||||
|
||||
// Boot partition
|
||||
BootPartition uint64 `json:"bootPartition"`
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ type NetAttachRequest struct {
|
||||
// 'VFNIC' for connect to vfpool
|
||||
// 'DPDK' for connect to DPDK
|
||||
// `EMPTY` for connect empty network
|
||||
// `SDT` for connect to SDN
|
||||
// `SDN` for connect to SDN
|
||||
// `TRUNK` for connect to TRUNK
|
||||
// Required: true
|
||||
NetType string `url:"netType" json:"netType" validate:"computex86NetType"`
|
||||
@@ -50,6 +50,22 @@ type NetAttachRequest struct {
|
||||
// Required: false
|
||||
NetMask uint64 `url:"netMask,omitempty" json:"netMask,omitempty"`
|
||||
|
||||
// SDN Segment ID
|
||||
// Required: false
|
||||
SDNSegmentID string `url:"sdn_segment_id,omitempty" json:"sdn_segment_id,omitempty"`
|
||||
|
||||
// SDN Object Group ID
|
||||
// Required: false
|
||||
SDNObjectGroupID string `url:"sdn_object_group_id,omitempty" json:"sdn_object_group_id,omitempty"`
|
||||
|
||||
// SDN Logical Port Display Name
|
||||
// Required: false
|
||||
SDNLogicalPortDisplayName string `url:"sdn_logical_port_display_name,omitempty" json:"sdn_logical_port_display_name,omitempty"`
|
||||
|
||||
// SDN Logical Port Description
|
||||
// Required: false
|
||||
SDNLogicalPortDescription string `url:"sdn_logical_port_description,omitempty" json:"sdn_logical_port_description,omitempty"`
|
||||
|
||||
// Unique identifier of logical port on SDN side
|
||||
// Required: false
|
||||
SDNInterfaceID string `url:"sdn_interface_id,omitempty" json:"sdn_interface_id,omitempty" validate:"omitempty"`
|
||||
|
||||
@@ -41,6 +41,10 @@ type CreateRequest struct {
|
||||
// Cache mode of disk
|
||||
// Required: false
|
||||
Cache string `url:"cache,omitempty" json:"cache,omitempty"`
|
||||
|
||||
// BLK Discard
|
||||
// Required: false
|
||||
BLKDiscard interface{} `url:"blkdiscard,omitempty" json:"blkdiscard,omitempty" validate:"omitempty,isBool"`
|
||||
}
|
||||
|
||||
// Create creates a disk
|
||||
|
||||
@@ -53,6 +53,9 @@ type InfoDisk struct {
|
||||
// Access Control Control
|
||||
ACL map[string]interface{} `json:"acl"`
|
||||
|
||||
// BLK Discard
|
||||
BLKDiscard bool `json:"blkdiscard"`
|
||||
|
||||
// Boot partition
|
||||
BootPartition uint64 `json:"bootPartition"`
|
||||
|
||||
@@ -264,9 +267,6 @@ type SearchListDisks []ItemDisk
|
||||
|
||||
// Main information about unattached disk
|
||||
type ItemUnattachedDisk struct {
|
||||
// CKey
|
||||
CKey string `json:"_ckey"`
|
||||
|
||||
// Meta
|
||||
Meta []interface{} `json:"_meta"`
|
||||
|
||||
|
||||
@@ -17,6 +17,10 @@ type UpdateRequest struct {
|
||||
// Cache mode of disk
|
||||
// Required: false
|
||||
Cache string `url:"cache,omitempty" json:"cache,omitempty"`
|
||||
|
||||
// BLK Discard
|
||||
// Required: false
|
||||
BLKDiscard interface{} `url:"blkdiscard,omitempty" json:"blkdiscard,omitempty" validate:"omitempty,isBool"`
|
||||
}
|
||||
|
||||
// Update updates disk
|
||||
|
||||
@@ -34,10 +34,6 @@ type ListRequest struct {
|
||||
// Required: false
|
||||
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
|
||||
// Required: false
|
||||
ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`
|
||||
|
||||
@@ -11,7 +11,7 @@ type RecordFLIPGroupCreated struct {
|
||||
// IP
|
||||
IP string `json:"ip"`
|
||||
|
||||
// Name
|
||||
// Name
|
||||
Name string `json:"name"`
|
||||
|
||||
// Network mask
|
||||
@@ -85,12 +85,6 @@ type RecordFLIPGroup struct {
|
||||
// Network
|
||||
Network string `json:"network"`
|
||||
|
||||
// Resource group ID
|
||||
RGID uint64 `json:"rgId"`
|
||||
|
||||
// Resource group name
|
||||
RGName string `json:"rgName"`
|
||||
|
||||
// Status
|
||||
Status string `json:"status"`
|
||||
|
||||
|
||||
@@ -57,6 +57,22 @@ type Interface struct {
|
||||
// Flag indicating whether this interface is enabled (only for VINS, EXTNET, DPDK, SDN, TRUNK)
|
||||
// Required: false
|
||||
Enabled interface{} `url:"enabled,omitempty" json:"enabled,omitempty" validate:"omitempty,isBool"`
|
||||
|
||||
// SDN Segment ID
|
||||
// Required: false
|
||||
SDNSegmentID string `url:"sdn_segment_id,omitempty" json:"sdn_segment_id,omitempty"`
|
||||
|
||||
// SDN Object Group ID
|
||||
// Required: false
|
||||
SDNObjectGroupID string `url:"sdn_object_group_id,omitempty" json:"sdn_object_group_id,omitempty"`
|
||||
|
||||
// SDN Logical Port Display Name
|
||||
// Required: false
|
||||
SDNLogicalPortDisplayName string `url:"sdn_logical_port_display_name,omitempty" json:"sdn_logical_port_display_name,omitempty"`
|
||||
|
||||
// SDN Logical Port Description
|
||||
// Required: false
|
||||
SDNLogicalPortDescription string `url:"sdn_logical_port_description,omitempty" json:"sdn_logical_port_description,omitempty"`
|
||||
}
|
||||
|
||||
// DataDisk detailed struct for DataDisks field in CreateRequest, CreateBlankRequest and MassCreateRequest
|
||||
@@ -90,6 +106,10 @@ type DataDisk struct {
|
||||
// Specify image id for create disk from template
|
||||
// Required: false
|
||||
ImageID uint64 `url:"imageId,omitempty" json:"imageId,omitempty"`
|
||||
|
||||
// Cache mode for disk
|
||||
// Required: false
|
||||
Cache string `url:"cache,omitempty" json:"cache,omitempty"`
|
||||
}
|
||||
|
||||
// CreateRequest struct to create KVM x86 VM
|
||||
@@ -215,6 +235,10 @@ type CreateRequest struct {
|
||||
// Cache mode for boot disk
|
||||
// Required: false
|
||||
BootDiskCache string `url:"boot_disk_cache,omitempty" json:"boot_disk_cache,omitempty"`
|
||||
|
||||
// Boot Disk BLK Discard
|
||||
// Required: false
|
||||
BootDiskBLKDiscard interface{} `url:"boot_disk_blkdiscard,omitempty" json:"boot_disk_blkdiscard,omitempty" validate:"omitempty,isBool"`
|
||||
}
|
||||
|
||||
// GetRAM returns RAM field values
|
||||
|
||||
@@ -119,6 +119,10 @@ type CreateBlankRequest struct {
|
||||
// Cache mode for boot disk
|
||||
// Required: false
|
||||
BootDiskCache string `url:"boot_disk_cache,omitempty" json:"boot_disk_cache,omitempty"`
|
||||
|
||||
// Boot Disk BLK Discard
|
||||
// Required: false
|
||||
BootDiskBLKDiscard interface{} `url:"boot_disk_blkdiscard" json:"boot_disk_blkdiscard" validate:"omitempty,isBool"`
|
||||
}
|
||||
|
||||
// GetRAM returns RAM field values
|
||||
|
||||
@@ -14,9 +14,13 @@ type InterfaceMassCreate struct {
|
||||
// - VINS
|
||||
// - EXTNET
|
||||
// - TRUNK
|
||||
// - SDN
|
||||
// For SDN, one of the fields sdn_interface_id or sdn_segment_id is specified, but not both at the same time
|
||||
// Required: false
|
||||
NetType string `url:"netType" json:"netType" validate:"required,massCreateNetType"`
|
||||
|
||||
// Network ID for connect
|
||||
// Required: false
|
||||
NetID uint64 `url:"netId" json:"netId" validate:"required"`
|
||||
|
||||
// IP address to assign to this VM when connecting to the specified network
|
||||
@@ -47,6 +51,22 @@ type InterfaceMassCreate struct {
|
||||
// Flag indicating whether this interface is enabled (only for VINS, EXTNET, DPDK, SDN, TRUNK)
|
||||
// Required: false
|
||||
Enabled interface{} `url:"enabled,omitempty" json:"enabled,omitempty" validate:"omitempty,isBool"`
|
||||
|
||||
// SDN Segment ID
|
||||
// Required: false
|
||||
SDNSegmentID string `url:"sdn_segment_id,omitempty" json:"sdn_segment_id,omitempty"`
|
||||
|
||||
// SDN Object Group ID
|
||||
// Required: false
|
||||
SDNObjectGroupID string `url:"sdn_object_group_id,omitempty" json:"sdn_object_group_id,omitempty"`
|
||||
|
||||
// SDN Logical Port Display Name
|
||||
// Required: false
|
||||
SDNLogicalPortDisplayName string `url:"sdn_logical_port_display_name,omitempty" json:"sdn_logical_port_display_name,omitempty"`
|
||||
|
||||
// SDN Logical Port Description
|
||||
// Required: false
|
||||
SDNLogicalPortDescription string `url:"sdn_logical_port_description,omitempty" json:"sdn_logical_port_description,omitempty"`
|
||||
}
|
||||
|
||||
// MassCreateRequest struct to mass create KVM x86
|
||||
@@ -136,6 +156,10 @@ type MassCreateRequest struct {
|
||||
// Cache mode for boot disk
|
||||
// Required: false
|
||||
BootDiskCache string `url:"boot_disk_cache,omitempty" json:"boot_disk_cache,omitempty"`
|
||||
|
||||
// Boot Disk BLK Discard
|
||||
// Required: false
|
||||
BootDiskBLKDiscard interface{} `url:"boot_disk_blkdiscard" json:"boot_disk_blkdiscard" validate:"omitempty,isBool"`
|
||||
}
|
||||
|
||||
type asyncWrapperMassCreateRequest struct {
|
||||
|
||||
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/decort-golang-sdk/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
|
||||
// Required: false
|
||||
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
|
||||
|
||||
@@ -26,6 +26,9 @@ type RecordNode struct {
|
||||
// Isolated Cpus
|
||||
IsolatedCpus []interface{} `json:"isolatedCpus"`
|
||||
|
||||
// MemAllocationRatio
|
||||
MemAllocationRatio float64 `json:"mem_allocation_ratio"`
|
||||
|
||||
// Name
|
||||
Name string `json:"name"`
|
||||
|
||||
@@ -85,6 +88,12 @@ type RecordNode struct {
|
||||
|
||||
// CPU used by the node
|
||||
UsableCPUs []string `json:"usable_cpus"`
|
||||
|
||||
// AutoStart
|
||||
AutoStart bool `json:"autostart"`
|
||||
|
||||
// AutoStart Count
|
||||
AutoStartCount uint64 `json:"autostart_count"`
|
||||
}
|
||||
|
||||
// Resource consumption of the node
|
||||
@@ -301,6 +310,12 @@ type ItemNode struct {
|
||||
|
||||
// CPU used by the node
|
||||
UsableCPUs []string `json:"usable_cpus"`
|
||||
|
||||
// AutoStart
|
||||
AutoStart bool `json:"autostart"`
|
||||
|
||||
// AutoStart Count
|
||||
AutoStartCount uint64 `json:"autostart_count"`
|
||||
}
|
||||
|
||||
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
|
||||
// Default: false
|
||||
// Required: true
|
||||
Force bool `url:"force" json:"force" validate:"required"`
|
||||
// Required: false
|
||||
Force bool `url:"force" json:"force"`
|
||||
}
|
||||
|
||||
// DelConsumerNodes excludes consumer nodes from SEP parameters
|
||||
|
||||
@@ -17,6 +17,10 @@ type CreateRequest struct {
|
||||
// Description
|
||||
// Required: false
|
||||
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"`
|
||||
}
|
||||
|
||||
// Create creates zone object
|
||||
|
||||
@@ -10,6 +10,9 @@ type ListZones struct {
|
||||
|
||||
// Detailed information about the zone record
|
||||
type RecordZone struct {
|
||||
// If true, all nodes belonging to the given zone will be marked for autostart
|
||||
AutoStart bool `json:"autostart"`
|
||||
|
||||
// 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/decort-golang-sdk/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
|
||||
// Required: false
|
||||
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
|
||||
|
||||
@@ -894,6 +894,7 @@ func getRequestsMapCloudbroker() map[string]interface{} {
|
||||
"/restmachine/cloudbroker/node/get_logical_cores_count": node_cb.GetLogicalCoresCountRequest{},
|
||||
"/restmachine/cloudbroker/node/set_cpu_allocation_ratio": node_cb.SetCpuAllocationRatioRequest{},
|
||||
"/restmachine/cloudbroker/node/set_mem_allocation_ratio": node_cb.SetMemAllocationRatioRequest{},
|
||||
"/restmachine/cloudbroker/node/autostart": node_cb.AutoStartRequest{},
|
||||
|
||||
// pcidevice
|
||||
"/restmachine/cloudbroker/pcidevice/create": pcidevice_cb.CreateRequest{},
|
||||
@@ -1092,13 +1093,14 @@ func getRequestsMapCloudbroker() map[string]interface{} {
|
||||
"/restmachine/cloudbroker/vins/migrateToZone": vins_cb.MigrateToZoneRequest{},
|
||||
|
||||
// zone
|
||||
"/restmachine/cloudbroker/zone/get": zone_cb.GetRequest{},
|
||||
"/restmachine/cloudbroker/zone/list": zone_cb.ListRequest{},
|
||||
"/restmachine/cloudbroker/zone/create": zone_cb.CreateRequest{},
|
||||
"/restmachine/cloudbroker/zone/delete": zone_cb.DeleteRequest{},
|
||||
"/restmachine/cloudbroker/zone/update": zone_cb.UpdateRequest{},
|
||||
"/restmachine/cloudbroker/zone/addNode": zone_cb.AddNodeRequest{},
|
||||
"/restmachine/cloudbroker/zone/delNode": zone_cb.DelNodeRequest{},
|
||||
"/restmachine/cloudbroker/zone/get": zone_cb.GetRequest{},
|
||||
"/restmachine/cloudbroker/zone/list": zone_cb.ListRequest{},
|
||||
"/restmachine/cloudbroker/zone/create": zone_cb.CreateRequest{},
|
||||
"/restmachine/cloudbroker/zone/delete": zone_cb.DeleteRequest{},
|
||||
"/restmachine/cloudbroker/zone/update": zone_cb.UpdateRequest{},
|
||||
"/restmachine/cloudbroker/zone/addNode": zone_cb.AddNodeRequest{},
|
||||
"/restmachine/cloudbroker/zone/delNode": zone_cb.DelNodeRequest{},
|
||||
"/restmachine/cloudbroker/zone/node_autostart": zone_cb.NodeAutoStartRequest{},
|
||||
|
||||
// security policy
|
||||
"/sdn/security_policy/create": secpolicies.CreateRequest{},
|
||||
|
||||
Reference in New Issue
Block a user