Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74c12914c9 | ||
|
|
365a4991d2 |
58
CHANGELOG.md
58
CHANGELOG.md
@@ -1,46 +1,50 @@
|
|||||||
## Version 1.13.3
|
## Version 1.13.5
|
||||||
|
|
||||||
Методы `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
|
#### disks
|
||||||
| Идентификатор<br>задачи | Описание |
|
| Идентификатор<br>задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-713 | Опциональное поле `NetMap` в структуру запроса `StartMigrationOutRequest` в cloudbroker/compute |
|
| BGOS-735 | Вычисляемое поле `Cache` в структуры ответа `ItemDiskUnattached` в cloudapi/disks и в cloudbroker/disks |
|
||||||
|
|
||||||
#### sep
|
#### node
|
||||||
| Идентификатор<br>задачи | Описание |
|
| Идентификатор<br>задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-712 | Возвращаемый тип методов `AddConsumerNodes` и `AddProviderNodes` изменен с `bool` на `uint64` в cloudbroker/sep |
|
| BGOS-738 | Структура запроса `AutoStartRequest`, метод `AutoStart` в cloudbroker/node |
|
||||||
| BGOS-722 | Валидатор для поля `SEPType` в структуре запроса `CreateRequest` в cloudbroker/sep |
|
| 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 |
|
||||||
|
|
||||||
### Изменено
|
### Изменено
|
||||||
|
|
||||||
#### compute
|
|
||||||
| Идентификатор<br>задачи | Описание |
|
|
||||||
| --- | --- |
|
|
||||||
| BGOS-721 | Тип поля `StoragePolicyID` изменен с опционального на обязательный в структуре запроса `CloneRequest` cloudbroker/compute |
|
|
||||||
|
|
||||||
#### grid
|
|
||||||
| Идентификатор<br>задачи | Описание |
|
|
||||||
| --- | --- |
|
|
||||||
| BGOS-719 | Поле `Age` в структуре запроса `PurgeLogsRequest` стало необязательным в cloudbroker/grid |
|
|
||||||
|
|
||||||
#### storage policy
|
|
||||||
| Идентификатор<br>задачи | Описание |
|
|
||||||
| --- | --- |
|
|
||||||
| BGOS-720 | Тип поля `AccessSEPsPools` изменен с обязательного на опциональный в структуре запроса `UpdateRequest` в cloudbroker/stpolicy |
|
|
||||||
|
|
||||||
|
|
||||||
### Удалено
|
|
||||||
|
|
||||||
#### sep
|
#### sep
|
||||||
| Идентификатор<br>задачи | Описание |
|
| Идентификатор<br>задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-712 | Поля `ProviderNIDs` и `ConsumerNIDs` удалены из структуры запроса `CreateRequest` в cloudbroker/sep |
|
| BGOS-740 | Тип поля `Force` с обязательного на опциональный в структуре запроса `DelConsumerNodesRequest` в cloudbroker/sep |
|
||||||
|
|
||||||
|
### Удалено
|
||||||
|
|
||||||
|
#### bservice
|
||||||
|
| Идентификатор<br>задачи | Описание |
|
||||||
|
| --- | --- |
|
||||||
|
| BGOS-739 | Обязательное поле `Driver` в структурах запроса `GroupAddRequest` в cloudapi/bservice и в cloudbroker/bservice |
|
||||||
|
|
||||||
|
#### flipgroup
|
||||||
|
| Идентификатор<br>задачи | Описание |
|
||||||
|
| --- | --- |
|
||||||
|
| BGOS-742 | Опциональное поле `RGID` из структуры запроса `ListRequest` в cloudapi/flipgroup и в cloudbroker/flipgroup |
|
||||||
|
| BGOS-742 | Вычисляемые поля `RGName` и `RGID` из структуры ответа `RecordFLIPGroup` в cloudapi/flipgroup и в cloudbroker/flipgroup |
|
||||||
|
|||||||
@@ -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"`
|
||||||
|
|||||||
@@ -25,15 +25,15 @@ type GroupResizeRequest struct {
|
|||||||
// Chipset for new computes, either i440fx or Q35 (i440fx by default)
|
// Chipset for new computes, either i440fx or Q35 (i440fx by default)
|
||||||
// Available values : i440fx, Q35
|
// Available values : i440fx, Q35
|
||||||
// Default value : Q35
|
// Default value : Q35
|
||||||
// Required: true
|
// Required: false
|
||||||
Chipset string `url:"chipset" json:"chipset" validate:"required,chipset"`
|
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
|
||||||
|
|
||||||
// Either delta or absolute value of computes
|
// Either delta or absolute value of computes
|
||||||
// Should be one of:
|
// Should be one of:
|
||||||
// - ABSOLUTE
|
// - ABSOLUTE
|
||||||
// - RELATIVE
|
// - RELATIVE
|
||||||
// Required: true
|
// Required: false
|
||||||
Mode string `url:"mode" json:"mode" validate:"bserviceMode"`
|
Mode string `url:"mode,omitempty" json:"mode,omitempty" validate:"omitempty,bserviceMode"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GroupResize resize the group by changing the number of computes
|
// GroupResize resize the group by changing the number of computes
|
||||||
|
|||||||
@@ -58,6 +58,10 @@ type DiskAddRequest struct {
|
|||||||
// Desired bus number (hex string, e.g. "0x03")
|
// Desired bus number (hex string, e.g. "0x03")
|
||||||
// Required: false
|
// Required: false
|
||||||
BusNumber string `url:"bus_number,omitempty" json:"bus_number,omitempty"`
|
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
|
// DiskAdd creates new disk and attach to compute
|
||||||
|
|||||||
@@ -795,6 +795,9 @@ type ItemComputeDisk struct {
|
|||||||
// Bus number
|
// Bus number
|
||||||
BusNumber uint64 `json:"bus_number"`
|
BusNumber uint64 `json:"bus_number"`
|
||||||
|
|
||||||
|
// Chache
|
||||||
|
Cache string `json:"cache"`
|
||||||
|
|
||||||
// Created by
|
// Created by
|
||||||
CreatedBy string `json:"createdBy"`
|
CreatedBy string `json:"createdBy"`
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,11 @@ type NetAttachRequest struct {
|
|||||||
// Required: false
|
// Required: false
|
||||||
MTU uint64 `url:"mtu,omitempty" json:"mtu,omitempty" validate:"omitempty,mtu"`
|
MTU uint64 `url:"mtu,omitempty" json:"mtu,omitempty" validate:"omitempty,mtu"`
|
||||||
|
|
||||||
|
// Net mask
|
||||||
|
// Used only to DPDK or VFNIC net type
|
||||||
|
// Required: false
|
||||||
|
NetMask uint64 `url:"netMask,omitempty" json:"netMask,omitempty"`
|
||||||
|
|
||||||
// Unique identifier of logical port on SDN side
|
// Unique identifier of logical port on SDN side
|
||||||
// Required: false
|
// Required: false
|
||||||
SDNInterfaceID string `url:"sdn_interface_id,omitempty" json:"sdn_interface_id,omitempty" validate:"omitempty"`
|
SDNInterfaceID string `url:"sdn_interface_id,omitempty" json:"sdn_interface_id,omitempty" validate:"omitempty"`
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ type CreateRequest struct {
|
|||||||
// Pool name to create disk
|
// Pool name to create disk
|
||||||
// Required: false
|
// Required: false
|
||||||
Pool string `url:"pool,omitempty" json:"pool,omitempty"`
|
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
|
// Create creates a disk
|
||||||
|
|||||||
@@ -139,6 +139,9 @@ type ItemDisk struct {
|
|||||||
|
|
||||||
// Updated by
|
// Updated by
|
||||||
UpdatedBy string `json:"updatedBy"`
|
UpdatedBy string `json:"updatedBy"`
|
||||||
|
|
||||||
|
// Cache mode of disk
|
||||||
|
Cache string `json:"cache"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ItemDiskUnattached struct {
|
type ItemDiskUnattached struct {
|
||||||
@@ -160,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"`
|
||||||
|
|
||||||
@@ -503,6 +509,9 @@ type RecordDisk struct {
|
|||||||
|
|
||||||
// Updated by
|
// Updated by
|
||||||
UpdatedBy string `json:"updatedBy"`
|
UpdatedBy string `json:"updatedBy"`
|
||||||
|
|
||||||
|
// Cache mode of disk
|
||||||
|
Cache string `json:"cache"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ItemReplication struct {
|
type ItemReplication struct {
|
||||||
|
|||||||
@@ -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"`
|
||||||
|
|
||||||
|
|||||||
@@ -209,6 +209,10 @@ type CreateRequest struct {
|
|||||||
// Zone ID
|
// Zone ID
|
||||||
// Required: false
|
// Required: false
|
||||||
ZoneID uint64 `url:"zoneId,omitempty" json:"zoneId,omitempty"`
|
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
|
// GetRAM returns RAM field values
|
||||||
|
|||||||
@@ -115,6 +115,10 @@ type CreateBlankRequest struct {
|
|||||||
// The OS version that will be installed on the virtual machine
|
// The OS version that will be installed on the virtual machine
|
||||||
// Required: false
|
// Required: false
|
||||||
OSVersion string `url:"os_version,omitempty" json:"os_version,omitempty"`
|
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
|
// GetRAM returns RAM field values
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ type CreateRequest struct {
|
|||||||
HighlyAvailable bool `url:"highlyAvailable,omitempty" json:"highlyAvailable,omitempty"`
|
HighlyAvailable bool `url:"highlyAvailable,omitempty" json:"highlyAvailable,omitempty"`
|
||||||
|
|
||||||
// Start now Load balancer
|
// Start now Load balancer
|
||||||
// Required: true
|
// Required: false
|
||||||
Start bool `url:"start" json:"start" validate:"required"`
|
Start interface{} `url:"start,omitempty" json:"start,omitempty" validate:"omitempty,isBool"`
|
||||||
|
|
||||||
// Text description of this load balancer
|
// Text description of this load balancer
|
||||||
// Required: false
|
// Required: false
|
||||||
|
|||||||
@@ -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"`
|
||||||
|
|||||||
@@ -22,18 +22,18 @@ type GroupResizeRequest struct {
|
|||||||
// Required: true
|
// Required: true
|
||||||
Count int64 `url:"count" json:"count" validate:"required"`
|
Count int64 `url:"count" json:"count" validate:"required"`
|
||||||
|
|
||||||
//Chipset for new computes, either i440fx or Q35 (i440fx by default)
|
// Chipset for new computes, either i440fx or Q35 (i440fx by default)
|
||||||
//Available values : i440fx, Q35
|
// Available values : i440fx, Q35
|
||||||
//Default value : Q35
|
// Default value : Q35
|
||||||
//Required: true
|
// Required: false
|
||||||
Chipset string `url:"chipset" json:"chipset" validate:"required,chipset"`
|
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
|
||||||
|
|
||||||
// Either delta or absolute value of computes
|
// Either delta or absolute value of computes
|
||||||
// Should be one of:
|
// Should be one of:
|
||||||
// - ABSOLUTE
|
// - ABSOLUTE
|
||||||
// - RELATIVE
|
// - RELATIVE
|
||||||
// Required: true
|
// Required: false
|
||||||
Mode string `url:"mode" json:"mode" validate:"bserviceMode"`
|
Mode string `url:"mode,omitempty" json:"mode,omitempty" validate:"omitempty,bserviceMode"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GroupResize resize the group by changing the number of computes
|
// GroupResize resize the group by changing the number of computes
|
||||||
|
|||||||
@@ -58,6 +58,10 @@ type DiskAddRequest struct {
|
|||||||
// Desired bus number (hex string, e.g. "0x03")
|
// Desired bus number (hex string, e.g. "0x03")
|
||||||
// Required: false
|
// Required: false
|
||||||
BusNumber string `url:"bus_number,omitempty" json:"bus_number,omitempty"`
|
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
|
// DiskAdd creates new disk and attach to compute
|
||||||
|
|||||||
@@ -397,6 +397,9 @@ type ItemDisk struct {
|
|||||||
// Bus number
|
// Bus number
|
||||||
BusNumber uint64 `json:"bus_number"`
|
BusNumber uint64 `json:"bus_number"`
|
||||||
|
|
||||||
|
// Chache
|
||||||
|
Cache string `json:"cache"`
|
||||||
|
|
||||||
// Created by
|
// Created by
|
||||||
CreatedBy string `json:"createdBy"`
|
CreatedBy string `json:"createdBy"`
|
||||||
|
|
||||||
@@ -1173,7 +1176,7 @@ type RecordCompute struct {
|
|||||||
ZoneID uint64 `json:"zoneId"`
|
ZoneID uint64 `json:"zoneId"`
|
||||||
|
|
||||||
//todo
|
//todo
|
||||||
_ uint64 `json:"nodeId"`
|
_ uint64 `json:"nodeId"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type LoaderMetaIso struct {
|
type LoaderMetaIso struct {
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ type CreateRequest struct {
|
|||||||
// Pool name to create disk
|
// Pool name to create disk
|
||||||
// Required: false
|
// Required: false
|
||||||
Pool string `url:"pool,omitempty" json:"pool,omitempty"`
|
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
|
// Create creates a disk
|
||||||
|
|||||||
@@ -187,6 +187,9 @@ type InfoDisk struct {
|
|||||||
|
|
||||||
// Updated by
|
// Updated by
|
||||||
UpdatedBy string `json:"updatedBy"`
|
UpdatedBy string `json:"updatedBy"`
|
||||||
|
|
||||||
|
// Cache mode of disk
|
||||||
|
Cache string `json:"cache"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ItemReplication struct {
|
type ItemReplication struct {
|
||||||
|
|||||||
42
pkg/cloudbroker/disks/update.go
Normal file
42
pkg/cloudbroker/disks/update.go
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
package disks
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||||
|
)
|
||||||
|
|
||||||
|
// UpdateRequest struct to update disk
|
||||||
|
type UpdateRequest struct {
|
||||||
|
// ID of the disk to update
|
||||||
|
// Required: true
|
||||||
|
DiskID uint64 `url:"disk_id" json:"disk_id" validate:"required"`
|
||||||
|
|
||||||
|
// Cache mode of disk
|
||||||
|
// Required: false
|
||||||
|
Cache string `url:"cache,omitempty" json:"cache,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update updates disk
|
||||||
|
func (d Disks) Update(ctx context.Context, req UpdateRequest) (bool, error) {
|
||||||
|
err := validators.ValidateRequest(req)
|
||||||
|
if err != nil {
|
||||||
|
return false, validators.ValidationErrors(validators.GetErrors(err))
|
||||||
|
}
|
||||||
|
|
||||||
|
url := "/cloudbroker/disks/update"
|
||||||
|
|
||||||
|
res, err := d.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
|
||||||
|
}
|
||||||
@@ -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"`
|
||||||
|
|
||||||
|
|||||||
@@ -211,6 +211,10 @@ type CreateRequest struct {
|
|||||||
// Zone ID
|
// Zone ID
|
||||||
// Required: false
|
// Required: false
|
||||||
ZoneID uint64 `url:"zoneId,omitempty" json:"zoneId,omitempty"`
|
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
|
// GetRAM returns RAM field values
|
||||||
|
|||||||
@@ -115,6 +115,10 @@ type CreateBlankRequest struct {
|
|||||||
// The OS version that will be installed on the virtual machine
|
// The OS version that will be installed on the virtual machine
|
||||||
// Required: false
|
// Required: false
|
||||||
OSVersion string `url:"os_version,omitempty" json:"os_version,omitempty"`
|
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
|
// GetRAM returns RAM field values
|
||||||
|
|||||||
@@ -132,6 +132,10 @@ type MassCreateRequest struct {
|
|||||||
// The OS version that will be installed on the virtual machine
|
// The OS version that will be installed on the virtual machine
|
||||||
// Required: false
|
// Required: false
|
||||||
OSVersion string `url:"os_version,omitempty" json:"os_version,omitempty"`
|
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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type asyncWrapperMassCreateRequest struct {
|
type asyncWrapperMassCreateRequest struct {
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ type CreateRequest struct {
|
|||||||
VINSID uint64 `url:"vinsId" json:"vinsId"`
|
VINSID uint64 `url:"vinsId" json:"vinsId"`
|
||||||
|
|
||||||
// Start now Load balancer
|
// Start now Load balancer
|
||||||
// Required: true
|
// Required: false
|
||||||
Start bool `url:"start" json:"start" validate:"required"`
|
Start interface{} `url:"start,omitempty" json:"start,omitempty" validate:"omitempty,isBool"`
|
||||||
|
|
||||||
// Custom sysctl values for Load Balancer instance. Applied on boot
|
// Custom sysctl values for Load Balancer instance. Applied on boot
|
||||||
// Required: false
|
// Required: false
|
||||||
|
|||||||
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
|
// 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
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ type UpdateRequest struct {
|
|||||||
TrunkID uint64 `url:"id" json:"id" validate:"required"`
|
TrunkID uint64 `url:"id" json:"id" validate:"required"`
|
||||||
|
|
||||||
// New name of the trunk
|
// New name of the trunk
|
||||||
// Required: true
|
// Required: false
|
||||||
Name string `url:"name" json:"name" validate:"required"`
|
Name string `url:"name,omitempty" json:"name,omitempty"`
|
||||||
|
|
||||||
// List of trunk tags (values between 1-4095)
|
// List of trunk tags (values between 1-4095)
|
||||||
// Required: true
|
// Required: false
|
||||||
TrunkTags string `url:"trunk_tags" json:"trunk_tags" validate:"required,trunkTags"`
|
TrunkTags string `url:"trunk_tags,omitempty" json:"trunk_tags,omitempty" validate:"omitempty,trunkTags"`
|
||||||
|
|
||||||
// New description of the trunk
|
// New description of the trunk
|
||||||
// Required: false
|
// Required: false
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ type GetMatchingUsernamesRequest struct {
|
|||||||
UsernameRegex string `url:"usernameregex" json:"usernameregex" validate:"required"`
|
UsernameRegex string `url:"usernameregex" json:"usernameregex" validate:"required"`
|
||||||
|
|
||||||
// The number of usernames to return.
|
// The number of usernames to return.
|
||||||
// Required: true
|
// Required: false
|
||||||
Limit uint64 `url:"limit" json:"limit" validate:"required"`
|
Limit uint64 `url:"limit,omitempty" json:"limit,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetMatchingUsernames gets a list of the matching usernames for a given string.
|
// GetMatchingUsernames gets a list of the matching usernames for a given string.
|
||||||
|
|||||||
@@ -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/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
|
// 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
|
||||||
|
|||||||
@@ -693,6 +693,7 @@ func getRequestsMapCloudbroker() map[string]interface{} {
|
|||||||
"/restmachine/cloudbroker/disks/migrate": disks_cb.MigrateRequest{},
|
"/restmachine/cloudbroker/disks/migrate": disks_cb.MigrateRequest{},
|
||||||
"/restmachine/cloudbroker/disks/migrate_abort": disks_cb.MigrateAbortRequest{},
|
"/restmachine/cloudbroker/disks/migrate_abort": disks_cb.MigrateAbortRequest{},
|
||||||
"/restmachine/cloudbroker/disks/migrate_status": disks_cb.GetMigrateStatusRequest{},
|
"/restmachine/cloudbroker/disks/migrate_status": disks_cb.GetMigrateStatusRequest{},
|
||||||
|
"/restmachine/cloudbroker/disks/update": disks_cb.UpdateRequest{},
|
||||||
|
|
||||||
// dpdknet
|
// dpdknet
|
||||||
"/restmachine/cloudbroker/dpdknet/get": dpdknet_cb.GetRequest{},
|
"/restmachine/cloudbroker/dpdknet/get": dpdknet_cb.GetRequest{},
|
||||||
@@ -889,10 +890,11 @@ func getRequestsMapCloudbroker() map[string]interface{} {
|
|||||||
"/restmachine/cloudbroker/node/setVFsNumber": node_cb.SetVFsNumberRequest{},
|
"/restmachine/cloudbroker/node/setVFsNumber": node_cb.SetVFsNumberRequest{},
|
||||||
"/restmachine/cloudbroker/node/update": node_cb.UpdateRequest{},
|
"/restmachine/cloudbroker/node/update": node_cb.UpdateRequest{},
|
||||||
"/restmachine/cloudbroker/node/update_description": node_cb.UpdateDescriptionRequest{},
|
"/restmachine/cloudbroker/node/update_description": node_cb.UpdateDescriptionRequest{},
|
||||||
"/restmachine/cloudbroker/node/setVFsParams": node_cb.VFParam{},
|
"/restmachine/cloudbroker/node/setVFsParams": node_cb.SetVFsParamsRequest{},
|
||||||
"/restmachine/cloudbroker/node/get_logical_cores_count": node_cb.GetLogicalCoresCountRequest{},
|
"/restmachine/cloudbroker/node/get_logical_cores_count": node_cb.GetLogicalCoresCountRequest{},
|
||||||
"/restmachine/cloudbroker/node/set_cpu_allocation_ratio": node_cb.SetCpuAllocationRatioRequest{},
|
"/restmachine/cloudbroker/node/set_cpu_allocation_ratio": node_cb.SetCpuAllocationRatioRequest{},
|
||||||
"/restmachine/cloudbroker/node/set_mem_allocation_ratio": node_cb.SetMemAllocationRatioRequest{},
|
"/restmachine/cloudbroker/node/set_mem_allocation_ratio": node_cb.SetMemAllocationRatioRequest{},
|
||||||
|
"/restmachine/cloudbroker/node/autostart": node_cb.AutoStartRequest{},
|
||||||
|
|
||||||
// pcidevice
|
// pcidevice
|
||||||
"/restmachine/cloudbroker/pcidevice/create": pcidevice_cb.CreateRequest{},
|
"/restmachine/cloudbroker/pcidevice/create": pcidevice_cb.CreateRequest{},
|
||||||
@@ -1091,13 +1093,14 @@ func getRequestsMapCloudbroker() map[string]interface{} {
|
|||||||
"/restmachine/cloudbroker/vins/migrateToZone": vins_cb.MigrateToZoneRequest{},
|
"/restmachine/cloudbroker/vins/migrateToZone": vins_cb.MigrateToZoneRequest{},
|
||||||
|
|
||||||
// zone
|
// zone
|
||||||
"/restmachine/cloudbroker/zone/get": zone_cb.GetRequest{},
|
"/restmachine/cloudbroker/zone/get": zone_cb.GetRequest{},
|
||||||
"/restmachine/cloudbroker/zone/list": zone_cb.ListRequest{},
|
"/restmachine/cloudbroker/zone/list": zone_cb.ListRequest{},
|
||||||
"/restmachine/cloudbroker/zone/create": zone_cb.CreateRequest{},
|
"/restmachine/cloudbroker/zone/create": zone_cb.CreateRequest{},
|
||||||
"/restmachine/cloudbroker/zone/delete": zone_cb.DeleteRequest{},
|
"/restmachine/cloudbroker/zone/delete": zone_cb.DeleteRequest{},
|
||||||
"/restmachine/cloudbroker/zone/update": zone_cb.UpdateRequest{},
|
"/restmachine/cloudbroker/zone/update": zone_cb.UpdateRequest{},
|
||||||
"/restmachine/cloudbroker/zone/addNode": zone_cb.AddNodeRequest{},
|
"/restmachine/cloudbroker/zone/addNode": zone_cb.AddNodeRequest{},
|
||||||
"/restmachine/cloudbroker/zone/delNode": zone_cb.DelNodeRequest{},
|
"/restmachine/cloudbroker/zone/delNode": zone_cb.DelNodeRequest{},
|
||||||
|
"/restmachine/cloudbroker/zone/node_autostart": zone_cb.NodeAutoStartRequest{},
|
||||||
|
|
||||||
// security policy
|
// security policy
|
||||||
"/sdn/security_policy/create": secpolicies.CreateRequest{},
|
"/sdn/security_policy/create": secpolicies.CreateRequest{},
|
||||||
|
|||||||
@@ -238,6 +238,25 @@ func getErrorsFromJSON(bytes []byte, t *testing.T, cloud string) {
|
|||||||
if len(params) != typStruct.NumField() {
|
if len(params) != typStruct.NumField() {
|
||||||
errs = append(errs, fmt.Sprintf("Platform (%d) and golang structure (%d) have different amount of fields.", len(params), typStruct.NumField()))
|
errs = append(errs, fmt.Sprintf("Platform (%d) and golang structure (%d) have different amount of fields.", len(params), typStruct.NumField()))
|
||||||
}
|
}
|
||||||
|
paramMap := make(map[string]bool)
|
||||||
|
paramRequiredMap := make(map[string]bool)
|
||||||
|
for _, p := range params {
|
||||||
|
param, ok := p.(map[string]interface{})
|
||||||
|
if !ok {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
name, ok := param["name"].(string)
|
||||||
|
if ok {
|
||||||
|
paramMap[name] = true
|
||||||
|
required, ok := param["required"].(bool)
|
||||||
|
if ok {
|
||||||
|
paramRequiredMap[name] = required
|
||||||
|
} else {
|
||||||
|
paramRequiredMap[name] = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for _, p := range params {
|
for _, p := range params {
|
||||||
param, ok := p.(map[string]interface{})
|
param, ok := p.(map[string]interface{})
|
||||||
if !ok {
|
if !ok {
|
||||||
@@ -292,6 +311,33 @@ func getErrorsFromJSON(bytes []byte, t *testing.T, cloud string) {
|
|||||||
errs = append(errs, fmt.Sprintf("Platform has field %s that golang structure doesn't", name))
|
errs = append(errs, fmt.Sprintf("Platform has field %s that golang structure doesn't", name))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if required fields in Go structure are missing from platform JSON
|
||||||
|
// or if they exist but are not required on platform
|
||||||
|
for i := 0; i < typStruct.NumField(); i++ {
|
||||||
|
jsonTag := typStruct.Field(i).Tag.Get("json")
|
||||||
|
validation, _ := typStruct.Field(i).Tag.Lookup("validate")
|
||||||
|
|
||||||
|
fieldName := strings.Split(jsonTag, ",")[0]
|
||||||
|
if fieldName == "" || fieldName == "-" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if strings.Contains(validation, "required") {
|
||||||
|
if !paramMap[fieldName] {
|
||||||
|
errs = append(errs, fmt.Sprintf("Golang structure has required field %s that platform doesn't", fieldName))
|
||||||
|
} else {
|
||||||
|
platformRequired := paramRequiredMap[fieldName]
|
||||||
|
if !platformRequired {
|
||||||
|
fieldType := typStruct.Field(i).Type
|
||||||
|
if fieldType.Kind() == reflect.Bool {
|
||||||
|
errs = append(errs, fmt.Sprintf("Golang structure has required field %s that platform doesn't", fieldName))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if len(errs) > 0 {
|
if len(errs) > 0 {
|
||||||
msg := fmt.Sprintf("Path %s has following errors: %v", k, errs)
|
msg := fmt.Sprintf("Path %s has following errors: %v", k, errs)
|
||||||
t.Error(msg)
|
t.Error(msg)
|
||||||
|
|||||||
Reference in New Issue
Block a user