Compare commits

...
12 Commits
Author SHA1 Message Date
arsvolkov a70efe8875 v13.12.0 2026-09-28 15:34:18 +04:00
arsvolkov 5e467118e3 v13.11.0 2026-07-17 16:42:27 +04:00
aafetisov da60d143b9 v13.10.0 2026-06-11 17:14:11 +03:00
dayterr 8d885fc061 v13.9.0
v13.9.0
2026-03-20 17:47:09 +03:00
aafetisov 274b349012 v13.8.0 2026-02-11 12:27:03 +03:00
dayterr 9a34be9d4e v13.7.0 2026-02-06 17:20:56 +03:00
aafetisov b3df483fc2 v13.6.0 2026-01-30 17:13:30 +03:00
dayterr 403574496b v13.5.0 2026-01-23 16:36:21 +03:00
asteam 25fa57f583 v13.4.0 2026-01-16 17:05:59 +03:00
aafetisov 3588755461 v13.3.0 2025-12-29 14:48:59 +03:00
dayterr a59feae2f2 v13.2.0 2025-12-23 17:49:46 +03:00
dayterr aac7108d8a v13.1.0 2025-12-16 14:40:04 +03:00
105 changed files with 779 additions and 319 deletions

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
## Version 13.12.0
Методы `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/compute и `GetAudits` в cloudapi/compute стали deprecated и будут удалены в следующих версиях
Методы `ComputeCISet`, `ComputeCIUnset` в cloudbroker/image стали deprecated и будут удалены в следующих версиях
Все методы группы `.SDN()` находятся в альфа-версии.
### Добавлено
#### apiaccess
| Идентификатор задачи | Описание |
| --- | --- |
| BGOS-1060 | Опциональное поле `SDN` в структуру `APIsEndpoints` в cloudbroker/apiaccess |
| BGOS-1060 | Опциональные поля `Audit`, `DPDKNet`, `SecurityGroup`, `SEP`, `StoragePolicy`, `Trunk`, `VFPool` и `Zone` в структуру `CloudAPIEndpoints` в cloudbroker/apiaccess |
| BGOS-1060 | Опциональные поля `Backup`, `DPDKNet`, `SecurityGroup`, `StoragePolicy`, `Trunk`, `VFPool` и `Zone` в структуру `CloudBrokerEndpoints` в cloudbroker/apiaccess |
| BGOS-1060 | Опциональное поле `Cache` в структуру `SystemEndpoints` в cloudbroker/apiaccess |
### Удалено
#### apiaccess
| Идентификатор задачи | Описание |
| --- | --- |
| BGOS-1060 | Опциональное поле `LibCloud` из структуры `APIsEndpoints` в cloudbroker/apiaccess |
| BGOS-1060 | Опциональные поля `CloudSpace`, `ComputeCI`, `DPDK`, `Machine`, `Openshift`, `OpenshiftCI`, `PortForwarding` и `Sizes` из структуры `CloudAPIEndpoints` в cloudbroker/apiaccess |
| BGOS-1060 | Опциональные поля `CloudSpace`, `ComputeCI`, `Desnode`, `Diagnostics`, `DPDK`, `IaaS`, `Machine`, `Openshift`, `OpenshiftCI`, `Ovsnode` и `QOS` из структуры `CloudBrokerEndpoints` в cloudbroker/apiaccess |
| BGOS-1060 | Опциональные поля `AgentController`, `Alerts`, `ErrorConditionHandler`, `Job`, `Log` и `Logo` из структуры `SystemEndpoints` в cloudbroker/apiaccess |
### Исправлено
#### apiaccess
| Идентификатор задачи | Описание |
| --- | --- |
| BGOS-1060 | Ошибка при вызове метода `Update` в cloudbroker/apiaccess |
| BGOS-1060 | Исправлен тип ответа методов `Update` и `DescUpdate` в cloudbroker/apiaccess |
+35 -35
View File
@@ -366,7 +366,7 @@ func main() {
- `pkg/cloudbroker/vfpool` - для `VFPool` - `pkg/cloudbroker/vfpool` - для `VFPool`
- `pkg/cloudbroker/vins` - для `VINS` - `pkg/cloudbroker/vins` - для `VINS`
- `pkg/cloudbroker/zone` - для `Zone` - `pkg/cloudbroker/zone` - для `Zone`
- **sdn**: - **sdn**:
- `pkg/sdn/acsgroups` - для `Access groups` - `pkg/sdn/acsgroups` - для `Access groups`
- `pkg/sdn/adrspools` - для `Address pool` - `pkg/sdn/adrspools` - для `Address pool`
- `pkg/sdn/defsecpolicies` - для `DefaultSecurityPolicies` - `pkg/sdn/defsecpolicies` - для `DefaultSecurityPolicies`
@@ -575,7 +575,7 @@ func main() {
- `.VINS()` - для работы с `VINS` - `.VINS()` - для работы с `VINS`
- `.Zone()` - для работы с `Zone` - `.Zone()` - для работы с `Zone`
Доступные методы для `.SDN()`: Доступные методы для `.SDN()`:
- `.AccessGroup()` - для работы с `Access group` - `.AccessGroup()` - для работы с `Access group`
- `.AddressPool()` - для работы с `Addres pool` - `.AddressPool()` - для работы с `Addres pool`
@@ -946,7 +946,7 @@ func main() {
- ToString(): строковое представление результата выполнения задачи - ToString(): строковое представление результата выполнения задачи
- ID() и Name(): получение ID и имени созданного в результате выполнения задачи ресурса - ID() и Name(): получение ID и имени созданного в результате выполнения задачи ресурса
- ToMaps(): получение списка карт, содержащих информацию о дисках, восстановленных в результате выполнения задачи. - ToMaps(): получение списка карт, содержащих информацию о дисках, восстановленных в результате выполнения задачи.
Все методы оборудованы возвратом ошибок. Непустая ошибка означает, что из поля Result нельзя получить информацию, которую предоставляет метод. Все методы оборудованы возвратом ошибок. Непустая ошибка означает, что из поля Result нельзя получить информацию, которую предоставляет метод.
```go ```go
package main package main
@@ -1624,46 +1624,46 @@ package main
import ( import (
"fmt" "fmt"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/config" "repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/config"
decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v13" decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v13"
) )
func main() { func main() {
// Настройка конфигурации // Настройка конфигурации
legacyCfg := config.LegacyConfig{ legacyCfg := config.LegacyConfig{
Username: "<USERNAME>", Username: "<USERNAME>",
Password: "<PASSWORD>", Password: "<PASSWORD>",
Domain: "dynamix", Domain: "dynamix",
DecortURL: "https://mr4.digitalenergy.online", DecortURL: "https://mr4.digitalenergy.online",
Retries: 5, Retries: 5,
}
legacyCfg.SetTimeout(5 * time.Minute)
cfg := config.UniversalConfig{
LegacyConfig: &legacyCfg,
} }
legacyCfg.SetTimeout(5 * time.Minute) // Создание клиента
universalClient := decort.NewUniversal(cfg)
cfg := config.UniversalConfig{ // Создание структуры запроса
LegacyConfig: &legacyCfg, // CreateRequest - реквест на создание виртуальной машины
} req := kvmx86.CreateRequest{
RGID: 123,
Name: "compute",
CPU: 4,
RAM: 4096,
ImageID: 321,
}
// Создание клиента // Выполнение запроса
universalClient := decort.NewUniversal(cfg) res, err := universalClient.CloudAPI().KVMX86().Create(context.Background(), req)
if err != nil {
log.Fatal(err)
}
// Создание структуры запроса fmt.Println(res)
// CreateRequest - реквест на создание виртуальной машины
req := kvmx86.CreateRequest{
RGID: 123,
Name: "compute",
CPU: 4,
RAM: 4096,
ImageID: 321,
}
// Выполнение запроса
res, err := universalClient.CloudAPI().KVMX86().Create(context.Background(), req)
if err != nil {
log.Fatal(err)
}
fmt.Println(res)
} }
``` ```
+7
View File
@@ -471,3 +471,10 @@ func addressPoolNetTypeValidator(fe validator.FieldLevel) bool {
return IsInSlice(fieldValue, addressPoolNetTypeValues) return IsInSlice(fieldValue, addressPoolNetTypeValues)
} }
// sepTechStatusValidator is used to validate SepTechStatus fields
func sepTechStatusValidator(fe validator.FieldLevel) bool {
fieldValue := fe.Field().String()
return IsInSlice(fieldValue, sepTechStatusValues)
}
+6
View File
@@ -366,6 +366,12 @@ func errorMessage(fe validator.FieldError) string {
prefix, prefix,
fe.Field(), fe.Field(),
joinValues(ipTypeValues)) joinValues(ipTypeValues))
case "sepTechStatus":
return fmt.Sprintf("%s %s must be one of the following: %s",
prefix,
fe.Field(),
joinValues(sepTechStatusValues))
} }
return fe.Error() return fe.Error()
+5
View File
@@ -311,5 +311,10 @@ func registerAllValidators(validate *validator.Validate) error {
return err return err
} }
err = validate.RegisterValidation("sepTechStatus", sepTechStatusValidator)
if err != nil {
return err
}
return nil return nil
} }
+3 -1
View File
@@ -66,7 +66,7 @@ var (
loaderTypeValues = []string{"linux", "windows", "unknown"} loaderTypeValues = []string{"linux", "windows", "unknown"}
sepTypeValues = []string{"hitachi", "dorado", "tatlin", "shared", "local", "des"} sepTypeValues = []string{"hitachi", "dorado", "tatlin", "shared", "local", "des", "ustor"}
languageValues = []string{"ru", "en"} languageValues = []string{"ru", "en"}
@@ -81,6 +81,8 @@ var (
addressPoolNetTypeValues = []string{"IPv4", "IPv6", "MAC"} addressPoolNetTypeValues = []string{"IPv4", "IPv6", "MAC"}
ipTypeValues = []string{"v4, v6"} ipTypeValues = []string{"v4, v6"}
sepTechStatusValues = []string{"ENABLED", "DISABLED"}
) )
const ( const (
+3 -9
View File
@@ -68,9 +68,6 @@ type ResourceLimits struct {
// RAM size, MB // RAM size, MB
CUM float64 `json:"CU_M"` CUM float64 `json:"CU_M"`
// Traffic volume, GB
CUNP float64 `json:"CU_NP"`
// Number of graphics cores // Number of graphics cores
GPUUnits float64 `json:"gpu_units"` GPUUnits float64 `json:"gpu_units"`
@@ -150,9 +147,6 @@ type Resource struct {
// Number of External IPs // Number of External IPs
ExtIPs int64 `json:"extips"` ExtIPs int64 `json:"extips"`
// External traffic
ExtTraffic int64 `json:"exttraffic"`
// Number of grafic cores // Number of grafic cores
GPU int64 `json:"gpu"` GPU int64 `json:"gpu"`
@@ -554,9 +548,6 @@ type LimitsRG struct {
// Number of External IPs // Number of External IPs
ExtIPs int64 `json:"extips"` ExtIPs int64 `json:"extips"`
// External traffic
ExtTraffic int64 `json:"exttraffic"`
// Number of grafic cores // Number of grafic cores
GPU int64 `json:"gpu"` GPU int64 `json:"gpu"`
@@ -565,6 +556,9 @@ type LimitsRG struct {
// SEPs // SEPs
SEPs uint64 `json:"seps"` SEPs uint64 `json:"seps"`
// Policies
Policies map[string]Policy `json:"policies"`
} }
// Main information about resource group // Main information about resource group
-4
View File
@@ -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"`
+4 -4
View File
@@ -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
+2 -3
View File
@@ -38,9 +38,8 @@ type AffinityRuleAddRequest struct {
Key string `url:"key" json:"key" validate:"required"` Key string `url:"key" json:"key" validate:"required"`
// Value that must match the key to be taken into account when analyzing this rule // Value that must match the key to be taken into account when analyzing this rule
// Required: false // Required: true
// Not required on purpose: despite required tag on platform, empty string is allowed Value string `url:"value" json:"value" validate:"required"`
Value string `url:"value" json:"value"`
} }
// AffinityRuleAdd add affinity rule // AffinityRuleAdd add affinity rule
+2 -3
View File
@@ -38,9 +38,8 @@ type AffinityRuleRemoveRequest struct {
Key string `url:"key" json:"key" validate:"required"` Key string `url:"key" json:"key" validate:"required"`
// Value that must match the key to be taken into account when analyzing this rule // Value that must match the key to be taken into account when analyzing this rule
// Required: false // Required: true
// Not required on purpose: despite required tag on platform, empty string is allowed Value string `url:"value" json:"value" validate:"required"`
Value string `url:"value" json:"value"`
} }
// AffinityRuleRemove remove affinity rule // AffinityRuleRemove remove affinity rule
@@ -38,9 +38,8 @@ type AntiAffinityRuleAddRequest struct {
Key string `url:"key" json:"key" validate:"required"` Key string `url:"key" json:"key" validate:"required"`
// Value that must match the key to be taken into account when analyzing this rule // Value that must match the key to be taken into account when analyzing this rule
// Required: false // Required: true
// Not required on purpose: despite required tag on platform, empty string is allowed Value string `url:"value" json:"value" validate:"required"`
Value string `url:"value" json:"value"`
} }
// AntiAffinityRuleAdd add anti affinity rule // AntiAffinityRuleAdd add anti affinity rule
@@ -38,9 +38,8 @@ type AntiAffinityRuleRemoveRequest struct {
Key string `url:"key" json:"key" validate:"required"` Key string `url:"key" json:"key" validate:"required"`
// Value that must match the key to be taken into account when analyzing this rule // Value that must match the key to be taken into account when analyzing this rule
// Required: false // Required: true
// Not required on purpose: despite required tag on platform, empty string is allowed Value string `url:"value" json:"value" validate:"required"`
Value string `url:"value" json:"value"`
} }
// AntiAffinityRuleRemove remove anti affinity rule // AntiAffinityRuleRemove remove anti affinity rule
+1
View File
@@ -4,6 +4,7 @@ import (
"context" "context"
"encoding/json" "encoding/json"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators" "repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
+1
View File
@@ -4,6 +4,7 @@ import (
"context" "context"
"encoding/json" "encoding/json"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators" "repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
+2 -1
View File
@@ -3,8 +3,9 @@ package compute
import ( import (
"context" "context"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
"strconv" "strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
// ChangeLinkStateRequest struct to change link state // ChangeLinkStateRequest struct to change link state
+9
View File
@@ -789,12 +789,18 @@ type ItemComputeDisk struct {
// Account ID // Account ID
AccountID uint64 `json:"accountId"` AccountID uint64 `json:"accountId"`
// BLK Discard
BLKDiscard bool `json:"blkdiscard"`
// Boot partition // Boot partition
BootPartition uint64 `json:"bootPartition"` BootPartition uint64 `json:"bootPartition"`
// 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"`
@@ -1237,6 +1243,9 @@ type ListInfoDisks []InfoDisk
type InfoDisk struct { type InfoDisk struct {
// ID // ID
ID uint64 `json:"id"` ID uint64 `json:"id"`
// SEP ID
SepID int64 `json:"sepId"`
} }
// List information about computes // List information about computes
+22 -1
View File
@@ -20,7 +20,7 @@ type NetAttachRequest struct {
// 'VFNIC' for connect to vfpool // 'VFNIC' for connect to vfpool
// 'DPDK' for connect to DPDK // 'DPDK' for connect to DPDK
// `EMPTY` for connect empty network // `EMPTY` for connect empty network
// `SDT` for connect to SDN // `SDN` for connect to SDN
// `TRUNK` for connect to TRUNK // `TRUNK` for connect to TRUNK
// Required: true // Required: true
NetType string `url:"netType" json:"netType" validate:"computex86NetType"` NetType string `url:"netType" json:"netType" validate:"computex86NetType"`
@@ -45,6 +45,27 @@ 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"`
// 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 // 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"`
+18 -3
View File
@@ -11,6 +11,9 @@ type ItemDisk struct {
// Account name // Account name
AccountName string `json:"accountName"` AccountName string `json:"accountName"`
// BLK Discard
BLKDiscard bool `json:"blkdiscard"`
// Computes // Computes
Computes map[string]string `json:"computes"` Computes map[string]string `json:"computes"`
@@ -139,12 +142,12 @@ 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 {
// CKey
CKey string `json:"_ckey"`
// Meta // Meta
Meta []interface{} `json:"_meta"` Meta []interface{} `json:"_meta"`
@@ -157,9 +160,15 @@ type ItemDiskUnattached struct {
// Access Control List // Access Control List
ACL map[string]interface{} `json:"acl"` ACL map[string]interface{} `json:"acl"`
// BLK Discard
BLKDiscard bool `json:"blkdiscard"`
// 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"`
@@ -375,6 +384,9 @@ type RecordDisk struct {
// Account name // Account name
AccountName string `json:"accountName"` AccountName string `json:"accountName"`
// BLK Discard
BLKDiscard bool `json:"blkdiscard"`
// Computes // Computes
Computes map[string]string `json:"computes"` Computes map[string]string `json:"computes"`
@@ -503,6 +515,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 {
-4
View File
@@ -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"`
-6
View File
@@ -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"`
-3
View File
@@ -92,9 +92,6 @@ type RecordImage struct {
// UNCPathj // UNCPathj
UNCPath string `json:"UNCPath"` UNCPath string `json:"UNCPath"`
// CKey
CKey string `json:"_ckey"`
// Account ID // Account ID
AccountID uint64 `json:"accountId"` AccountID uint64 `json:"accountId"`
+21
View File
@@ -35,10 +35,31 @@ type Interface 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"`
// MAC address to assign to this VM when connecting to the specified network // MAC address to assign to this VM when connecting to the specified network
// Required: false // Required: false
MAC string `url:"mac,omitempty" json:"mac,omitempty" validate:"omitempty"` 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 // SDN interface id
// Required: false // Required: false
SDNInterfaceID string `url:"sdn_interface_id,omitempty" json:"sdn_interface_id,omitempty"` SDNInterfaceID string `url:"sdn_interface_id,omitempty" json:"sdn_interface_id,omitempty"`
+2 -2
View File
@@ -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
+1
View File
@@ -2,6 +2,7 @@ package pcidevice
import ( import (
"encoding/json" "encoding/json"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/serialization" "repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/serialization"
) )
-6
View File
@@ -14,9 +14,6 @@ type Resource struct {
// Number of External IPs // Number of External IPs
ExtIPs int64 `json:"extips"` ExtIPs int64 `json:"extips"`
// External traffic
ExtTraffic int64 `json:"exttraffic"`
// Number of grafic cores // Number of grafic cores
GPU int64 `json:"gpu"` GPU int64 `json:"gpu"`
@@ -846,9 +843,6 @@ type RecordResourceUsage struct {
// Number of external IPs // Number of external IPs
ExtIPs uint64 `json:"extips"` ExtIPs uint64 `json:"extips"`
// ExtraTraffic
ExtraTraffic uint64 `json:"exttraffic"`
// Number of GPU // Number of GPU
GPU uint64 `json:"gpu"` GPU uint64 `json:"gpu"`
+4
View File
@@ -56,6 +56,10 @@ type ListRequest struct {
// Search by pool name // Search by pool name
// Required: false // Required: false
PoolName string `url:"pool_name,omitempty" json:"pool_name,omitempty"` PoolName string `url:"pool_name,omitempty" json:"pool_name,omitempty"`
// Filter SEP's by tech status (ENABLED, DISABLED)
// Required: false
SepTechStatus string `url:"sep_tech_status,omitempty" json:"sep_tech_status,omitempty" validate:"omitempty,sepTechStatus"`
} }
// List gets list of storage policies as a ListStoragePolicies struct // List gets list of storage policies as a ListStoragePolicies struct
+3
View File
@@ -77,6 +77,9 @@ type AccessSEPPool struct {
// Pool names // Pool names
PoolNames []string `json:"pool_names"` PoolNames []string `json:"pool_names"`
// Technical status of the SEP
SepTechStatus string `json:"sep_tech_status"`
} }
type Usage struct { type Usage struct {
+3
View File
@@ -29,6 +29,9 @@ type ItemTrunk struct {
// MAC // MAC
MAC string `json:"mac"` MAC string `json:"mac"`
// MTU
MTU uint64 `json:"mtu"`
// Name of a trunk // Name of a trunk
Name string `json:"name"` Name string `json:"name"`
-3
View File
@@ -156,9 +156,6 @@ type Resources struct {
// ExtIPs // ExtIPs
ExtIPs uint64 `json:"extips"` ExtIPs uint64 `json:"extips"`
// ExtTraffic
ExtTraffic uint64 `json:"exttraffic"`
// GPU // GPU
GPU uint64 `json:"gpu"` GPU uint64 `json:"gpu"`
+3
View File
@@ -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"`
+3 -9
View File
@@ -71,9 +71,6 @@ type Resource struct {
// Number of External IPs // Number of External IPs
ExtIPs int64 `json:"extips"` ExtIPs int64 `json:"extips"`
// External traffic
ExtTraffic int64 `json:"exttraffic"`
// Number of grafic cores // Number of grafic cores
GPU int64 `json:"gpu"` GPU int64 `json:"gpu"`
@@ -143,9 +140,6 @@ type ResourceLimits struct {
// CuM // CuM
CuM float64 `json:"CU_M"` CuM float64 `json:"CU_M"`
// CuNP
CuNP float64 `json:"CU_NP"`
// GPUUnits // GPUUnits
GPUUnits float64 `json:"gpu_units"` GPUUnits float64 `json:"gpu_units"`
@@ -480,9 +474,6 @@ type Limits struct {
// External IPs // External IPs
ExtIPs int64 `json:"extips"` ExtIPs int64 `json:"extips"`
// External traffic
ExtTraffic int64 `json:"exttraffic"`
// Number of GPU // Number of GPU
GPU int64 `json:"gpu"` GPU int64 `json:"gpu"`
@@ -491,6 +482,9 @@ type Limits struct {
// SEPs number // SEPs number
SEPs uint64 `json:"seps"` SEPs uint64 `json:"seps"`
// Policies
Policies map[string]Policy `json:"policies"`
} }
// Resources of resource group // Resources of resource group
@@ -3,8 +3,9 @@ package account
import ( import (
"context" "context"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
"strconv" "strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
// SetCPUAllocationParameterRequest struct for setting CPU allocation parameter // SetCPUAllocationParameterRequest struct for setting CPU allocation parameter
+9 -7
View File
@@ -2,8 +2,8 @@ package apiaccess
import ( import (
"context" "context"
"encoding/json"
"net/http" "net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators" "repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
@@ -20,23 +20,25 @@ type DescUpdateRequest struct {
} }
// DescUpdate sets a new text description of the apiaccess group. // DescUpdate sets a new text description of the apiaccess group.
func (a APIAccess) DescUpdate(ctx context.Context, req DescUpdateRequest) (bool, error) { func (a APIAccess) DescUpdate(ctx context.Context, req DescUpdateRequest) (*ItemAPIAccess, error) {
err := validators.ValidateRequest(req) err := validators.ValidateRequest(req)
if err != nil { if err != nil {
return false, validators.ValidationErrors(validators.GetErrors(err)) return nil, validators.ValidationErrors(validators.GetErrors(err))
} }
url := "/cloudbroker/apiaccess/descUpdate" url := "/cloudbroker/apiaccess/descUpdate"
res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, req) res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil { if err != nil {
return false, err return nil, err
} }
result, err := strconv.ParseBool(string(res)) info := ItemAPIAccess{}
err = json.Unmarshal(res, &info)
if err != nil { if err != nil {
return false, err return nil, err
} }
return result, nil return &info, nil
} }
+105 -64
View File
@@ -1,5 +1,7 @@
package apiaccess package apiaccess
import "encoding/json"
type ItemAPIAccess struct { type ItemAPIAccess struct {
// APIs // APIs
APIs APIsEndpoints `json:"apis"` APIs APIsEndpoints `json:"apis"`
@@ -88,43 +90,73 @@ type APIsEndpoints struct {
// CloudBroker endpoints // CloudBroker endpoints
CloudBroker CloudBrokerEndpoints `json:"cloudbroker,omitempty"` CloudBroker CloudBrokerEndpoints `json:"cloudbroker,omitempty"`
// LibCloud endpoints // SDN endpoints
LibCloud LibCloudEndpoints `json:"libcloud,omitempty"` SDN SDNEndpoints `json:"sdn,omitempty"`
// System endpoints // System endpoints
System SystemEndpoints `json:"system,omitempty"` System SystemEndpoints `json:"system,omitempty"`
} }
// MarshalJSON omits empty namespaces, so that "{}" is not sent in requests.
func (a APIsEndpoints) MarshalJSON() ([]byte, error) {
namespaces := []struct {
key string
value interface{}
}{
{"cloudapi", a.CloudAPI},
{"cloudbroker", a.CloudBroker},
{"sdn", a.SDN},
{"system", a.System},
}
result := make(map[string]json.RawMessage, len(namespaces))
for _, ns := range namespaces {
data, err := json.Marshal(ns.value)
if err != nil {
return nil, err
}
if string(data) == "{}" {
continue
}
result[ns.key] = data
}
return json.Marshal(result)
}
type CloudAPIEndpoints struct { type CloudAPIEndpoints struct {
Account []string `json:"account,omitempty"` Account []string `json:"account,omitempty"`
BService []string `json:"bservice,omitempty"` Audit []string `json:"audit,omitempty"`
CloudSpace []string `json:"cloudspace,omitempty"` BService []string `json:"bservice,omitempty"`
Compute []string `json:"compute,omitempty"` Compute []string `json:"compute,omitempty"`
ComputeCI []string `json:"computeci,omitempty"` Disks []string `json:"disks,omitempty"`
Disks []string `json:"disks,omitempty"` DPDKNet []string `json:"dpdknet,omitempty"`
DPDK []string `json:"dpdk,omitempty"` ExtNet []string `json:"extnet,omitempty"`
ExtNet []string `json:"extnet,omitempty"` FLIPGroup []string `json:"flipgroup,omitempty"`
FLIPGroup []string `json:"flipgroup,omitempty"` GPU []string `json:"gpu,omitempty"`
GPU []string `json:"gpu,omitempty"` Image []string `json:"image,omitempty"`
Image []string `json:"image,omitempty"` K8CI []string `json:"k8ci,omitempty"`
K8CI []string `json:"k8ci,omitempty"` K8S []string `json:"k8s,omitempty"`
K8S []string `json:"k8s,omitempty"` KVMX86 []string `json:"kvmx86,omitempty"`
KVMX86 []string `json:"kvmx86,omitempty"` LB []string `json:"lb,omitempty"`
LB []string `json:"lb,omitempty"` Loactions []string `json:"locations,omitempty"`
Loactions []string `json:"locations,omitempty"` PCIDevice []string `json:"pcidevice,omitempty"`
Machine []string `json:"machine,omitempty"` Prometheus []string `json:"prometheus,omitempty"`
Openshift []string `json:"openshift,omitempty"` RG []string `json:"rg,omitempty"`
OpenshiftCI []string `json:"openshiftci,omitempty"` SecurityGroup []string `json:"security_group,omitempty"`
PCIDevice []string `json:"pcidevice,omitempty"` SEP []string `json:"sep,omitempty"`
PortForwarding []string `json:"portforwarding,omitempty"` StoragePolicy []string `json:"storage_policy,omitempty"`
Prometheus []string `json:"prometheus,omitempty"` Tasks []string `json:"tasks,omitempty"`
RG []string `json:"rg,omitempty"` Trunk []string `json:"trunk,omitempty"`
Sizes []string `json:"sizes,omitempty"` User []string `json:"user,omitempty"`
Tasks []string `json:"tasks,omitempty"` VFPool []string `json:"vfpool,omitempty"`
User []string `json:"user,omitempty"` VGPU []string `json:"vgpu,omitempty"`
VGPU []string `json:"vgpu,omitempty"` VINS []string `json:"vins,omitempty"`
VINS []string `json:"vins,omitempty"` Zone []string `json:"zone,omitempty"`
All bool `json:"ALL,omitempty"` All bool `json:"ALL,omitempty"`
} }
type CloudBrokerEndpoints struct { type CloudBrokerEndpoints struct {
@@ -133,74 +165,83 @@ type CloudBrokerEndpoints struct {
Audit interface{} `json:"audit,omitempty"` Audit interface{} `json:"audit,omitempty"`
AuditBeat []string `json:"auditbeat,omitempty"` AuditBeat []string `json:"auditbeat,omitempty"`
AuditCollector []string `json:"auditcollector,omitempty"` AuditCollector []string `json:"auditcollector,omitempty"`
Backup []string `json:"backup,omitempty"`
BackupCreator []string `json:"backupcreator,omitempty"` BackupCreator []string `json:"backupcreator,omitempty"`
BService []string `json:"bservice,omitempty"` BService []string `json:"bservice,omitempty"`
CloudSpace []string `json:"cloudspace,omitempty"`
Compute []string `json:"compute,omitempty"` Compute []string `json:"compute,omitempty"`
ComputeCI []string `json:"computeci,omitempty"`
Desnode []string `json:"desnode,omitempty"`
Diagnostics []string `json:"diagnostics,omitempty"`
Disks []string `json:"disks,omitempty"` Disks []string `json:"disks,omitempty"`
DPDK []string `json:"dpdk,omitempty"` DPDKNet []string `json:"dpdknet,omitempty"`
Eco []string `json:"eco,omitempty"` Eco []string `json:"eco,omitempty"`
ExtNet []string `json:"extnet,omitempty"` ExtNet []string `json:"extnet,omitempty"`
FlIPgroup []string `json:"flipgroup,omitempty"` FlIPgroup []string `json:"flipgroup,omitempty"`
Grid []string `json:"grid,omitempty"` Grid []string `json:"grid,omitempty"`
Group []string `json:"group,omitempty"` Group []string `json:"group,omitempty"`
Health []string `json:"health,omitempty"` Health []string `json:"health,omitempty"`
IaaS []string `json:"iaas,omitempty"`
Image []string `json:"image,omitempty"` Image []string `json:"image,omitempty"`
Job interface{} `json:"job,omitempty"` Job interface{} `json:"job,omitempty"`
K8CI []string `json:"k8ci,omitempty"` K8CI []string `json:"k8ci,omitempty"`
K8S []string `json:"k8s,omitempty"` K8S []string `json:"k8s,omitempty"`
KVMX86 []string `json:"kvmx86,omitempty"` KVMX86 []string `json:"kvmx86,omitempty"`
LB []string `json:"lb,omitempty"` LB []string `json:"lb,omitempty"`
Machine []string `json:"machine,omitempty"`
Metering []string `json:"metering,omitempty"` Metering []string `json:"metering,omitempty"`
Milestones []string `json:"milestones,omitempty"` Milestones []string `json:"milestones,omitempty"`
Openshift []string `json:"openshift,omitempty"` Node []string `json:"node,omitempty"`
OpenshiftCI []string `json:"openshiftci,omitempty"`
Ovsnode []string `json:"ovsnode,omitempty"`
PCIDevice []string `json:"pcidevice,omitempty"` PCIDevice []string `json:"pcidevice,omitempty"`
PGPU []string `json:"pgpu,omitempty"` PGPU []string `json:"pgpu,omitempty"`
Prometheus []string `json:"prometheus,omitempty"` Prometheus []string `json:"prometheus,omitempty"`
QOS []string `json:"qos,omitempty"`
Resmon interface{} `json:"resmon,omitempty"` Resmon interface{} `json:"resmon,omitempty"`
RG []string `json:"rg,omitempty"` RG []string `json:"rg,omitempty"`
SecurityGroup []string `json:"security_group,omitempty"`
Sep []string `json:"sep,omitempty"` Sep []string `json:"sep,omitempty"`
Node []string `json:"node,omitempty"` StoragePolicy []string `json:"storage_policy,omitempty"`
Tasks []string `json:"tasks,omitempty"` Tasks []string `json:"tasks,omitempty"`
TLock []string `json:"tlock,omitempty"` TLock []string `json:"tlock,omitempty"`
Trunk []string `json:"trunk,omitempty"`
User []string `json:"user,omitempty"` User []string `json:"user,omitempty"`
VFPool []string `json:"vfpool,omitempty"`
VGPU []string `json:"vgpu,omitempty"` VGPU []string `json:"vgpu,omitempty"`
VINS []string `json:"vins,omitempty"` VINS []string `json:"vins,omitempty"`
VNFDev []string `json:"vnfdev,omitempty"` VNFDev []string `json:"vnfdev,omitempty"`
ZeroAccess []string `json:"zeroaccess,omitempty"` ZeroAccess []string `json:"zeroaccess,omitempty"`
Zone []string `json:"zone,omitempty"`
All bool `json:"ALL,omitempty"` All bool `json:"ALL,omitempty"`
} }
type LibCloudEndpoints struct { type SDNEndpoints struct {
Libvirt []string `json:"libvirt,omitempty"` AccessGroup []string `json:"access_group,omitempty"`
All bool `json:"ALL,omitempty"` AddressPool []string `json:"address_pool,omitempty"`
DefaultSecurityPolicy []string `json:"default_security_policy,omitempty"`
ExternalNetwork []string `json:"external_network,omitempty"`
FloatingIP []string `json:"floating_ip,omitempty"`
Hypervisor []string `json:"hypervisor,omitempty"`
L2ExternalNetwork []string `json:"l2_external_network,omitempty"`
LogicalPort []string `json:"logical_port,omitempty"`
NetworkObjectGroup []string `json:"network_object_group,omitempty"`
Router []string `json:"router,omitempty"`
RouterGatewayPort []string `json:"router/gateway_port,omitempty"`
RouterPolicies []string `json:"router/policies,omitempty"`
RouterRouterPort []string `json:"router/router_port,omitempty"`
RouterStaticRoute []string `json:"router/static_route,omitempty"`
SecurityPolicy []string `json:"security_policy,omitempty"`
SecurityPolicyRule []string `json:"security_policy/rule,omitempty"`
SecurityRule []string `json:"security_rule,omitempty"`
Segment []string `json:"segment,omitempty"`
Version []string `json:"version,omitempty"`
All bool `json:"ALL,omitempty"`
} }
type SystemEndpoints struct { type SystemEndpoints struct {
AgentController []string `json:"agentcontroller,omitempty"` Audits []string `json:"audits,omitempty"`
Alerts []string `json:"alerts,omitempty"` Cache []string `json:"cache,omitempty"`
Audits []string `json:"audits,omitempty"` ContentManager []string `json:"contentmanager,omitempty"`
ContentManager []string `json:"contentmanager,omitempty"` DocGenerator []string `json:"docgenerator,omitempty"`
DocGenerator []string `json:"docgenerator,omitempty"` EmailSender []string `json:"emailsender,omitempty"`
EmailSender []string `json:"emailsender,omitempty"` GridManager []string `json:"gridmanager,omitempty"`
ErrorConditionHandler []string `json:"errorconditionhandler,omitempty"` Health []string `json:"health,omitempty"`
GridManager []string `json:"gridmanager,omitempty"` Info []string `json:"info,omitempty"`
Health []string `json:"health,omitempty"` InfoMGR []string `json:"infomgr,omitempty"`
Info []string `json:"info,omitempty"` Oauth []string `json:"oauth,omitempty"`
InfoMGR []string `json:"infomgr,omitempty"` Task []string `json:"task,omitempty"`
Job []string `json:"job,omitempty"` UserManager []string `json:"usermanager,omitempty"`
Log []string `json:"log,omitempty"` All bool `json:"ALL,omitempty"`
Logo []string `json:"logo,omitempty"`
Oauth []string `json:"oauth,omitempty"`
Task []string `json:"task,omitempty"`
UserManager []string `json:"usermanager,omitempty"`
All bool `json:"ALL,omitempty"`
} }
+9 -8
View File
@@ -4,7 +4,6 @@ import (
"context" "context"
"encoding/json" "encoding/json"
"net/http" "net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators" "repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
@@ -27,10 +26,10 @@ type wrapperUpdateRequest struct {
} }
// Update updates apis of apiaccess group. // Update updates apis of apiaccess group.
func (a APIAccess) Update(ctx context.Context, req UpdateRequest) (bool, error) { func (a APIAccess) Update(ctx context.Context, req UpdateRequest) (*ItemAPIAccess, error) {
err := validators.ValidateRequest(req) err := validators.ValidateRequest(req)
if err != nil { if err != nil {
return false, validators.ValidationErrors(validators.GetErrors(err)) return nil, validators.ValidationErrors(validators.GetErrors(err))
} }
url := "/cloudbroker/apiaccess/update" url := "/cloudbroker/apiaccess/update"
@@ -41,20 +40,22 @@ func (a APIAccess) Update(ctx context.Context, req UpdateRequest) (bool, error)
apiJSON, err := json.Marshal(&req.APIs) apiJSON, err := json.Marshal(&req.APIs)
if err != nil { if err != nil {
return false, err return nil, err
} }
reqWrapped.APIString = string(apiJSON) reqWrapped.APIString = string(apiJSON)
res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped)
if err != nil { if err != nil {
return false, err return nil, err
} }
result, err := strconv.ParseBool(string(res)) info := ItemAPIAccess{}
err = json.Unmarshal(res, &info)
if err != nil { if err != nil {
return false, err return nil, err
} }
return result, nil return &info, nil
} }
+9
View File
@@ -95,6 +95,15 @@ type RecordAudit struct {
// TTL // TTL
TTL string `json:"_ttl"` TTL string `json:"_ttl"`
// Resgroup ID
ResgroupID uint64 `json:"resgroup_id"`
// Account ID
AccountID uint64 `json:"account_id"`
// Compute ID
ComputeID uint64 `json:"compute_id"`
} }
// List of Linked Jobs // List of Linked Jobs
@@ -14,6 +14,9 @@ type RestoreDiskFromBackupRequest struct {
// Compute ID // Compute ID
ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"`
// Node ID
NodeID uint64 `url:"nodeId,omitempty" json:"nodeId,omitempty"`
// Disk ID // Disk ID
DiskID uint64 `url:"diskId" json:"diskId" validate:"required"` DiskID uint64 `url:"diskId" json:"diskId" validate:"required"`
@@ -25,6 +25,9 @@ type RestoreDisksFromBackupRequest struct {
// Compute ID // Compute ID
ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"`
// Node ID
NodeID uint64 `url:"nodeId,omitempty" json:"nodeId,omitempty"`
//Backup files //Backup files
BackupFiles []BackupFile `url:"disks" json:"disks" validate:"required,dive"` BackupFiles []BackupFile `url:"disks" json:"disks" validate:"required,dive"`
} }
-4
View File
@@ -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"`
+7 -7
View File
@@ -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
+2 -3
View File
@@ -40,9 +40,8 @@ type AffinityRuleAddRequest struct {
Key string `url:"key" json:"key" validate:"required"` Key string `url:"key" json:"key" validate:"required"`
// Value that must match the key to be taken into account when analyzing this rule // Value that must match the key to be taken into account when analyzing this rule
// Required: false // Required: true
// Not required on purpose: despite required tag on platform, empty string is allowed Value string `url:"value" json:"value" validate:"required"`
Value string `url:"value" json:"value"`
} }
// AffinityRuleAdd adds affinity rule // AffinityRuleAdd adds affinity rule
@@ -38,9 +38,8 @@ type AffinityRuleRemoveRequest struct {
Key string `url:"key" json:"key" validate:"required"` Key string `url:"key" json:"key" validate:"required"`
// Value that must match the key to be taken into account when analyzing this rule // Value that must match the key to be taken into account when analyzing this rule
// Required: false // Required: true
// Not required on purpose: despite required tag on platform, empty string is allowed Value string `url:"value" json:"value" validate:"required"`
Value string `url:"value" json:"value"`
} }
// AffinityRuleRemove remove affinity rule // AffinityRuleRemove remove affinity rule
@@ -38,9 +38,8 @@ type AntiAffinityRuleAddRequest struct {
Key string `url:"key" json:"key" validate:"required"` Key string `url:"key" json:"key" validate:"required"`
// Value that must match the key to be taken into account when analyzing this rule // Value that must match the key to be taken into account when analyzing this rule
// Required: false // Required: true
// Not required on purpose: despite required tag on platform, empty string is allowed Value string `url:"value" json:"value" validate:"required"`
Value string `url:"value" json:"value"`
} }
// AntiAffinityRuleAdd adds anti affinity rule // AntiAffinityRuleAdd adds anti affinity rule
@@ -38,9 +38,8 @@ type AntiAffinityRuleRemoveRequest struct {
Key string `url:"key" json:"key" validate:"required"` Key string `url:"key" json:"key" validate:"required"`
// Value that must match the key to be taken into account when analyzing this rule // Value that must match the key to be taken into account when analyzing this rule
// Required: false // Required: true
// Not required on purpose: despite required tag on platform, empty string is allowed Value string `url:"value" json:"value" validate:"required"`
Value string `url:"value" json:"value"`
} }
// AntiAffinityRuleRemove removes anti affinity rule // AntiAffinityRuleRemove removes anti affinity rule
+2 -1
View File
@@ -3,8 +3,9 @@ package compute
import ( import (
"context" "context"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
"strconv" "strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
// ChangeLinkStateRequest struct for changing link state // ChangeLinkStateRequest struct for changing link state
+1 -1
View File
@@ -12,7 +12,7 @@ import (
type GetCloneStatusRequest struct { type GetCloneStatusRequest struct {
// ID of compute instance // ID of compute instance
// Required: true // Required: true
ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"` ComputeID string `url:"compute_id" json:"compute_id" validate:"required"`
} }
// GetCloneStatus gets information about compute clone status as a RecordCloneStatus struct // GetCloneStatus gets information about compute clone status as a RecordCloneStatus struct
+8
View File
@@ -58,6 +58,14 @@ 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"`
// BLK Discard
// Required: false
BLKDiscard interface{} `url:"blkdiscard,omitempty" json:"blkdiscard,omitempty" validate:"omitempty,isBool"`
} }
// DiskAdd creates new disk and attach to compute // DiskAdd creates new disk and attach to compute
+13 -1
View File
@@ -391,12 +391,18 @@ type ItemDisk struct {
// Access Control List // Access Control List
ACL ItemACL `json:"acl"` ACL ItemACL `json:"acl"`
// BLK Discard
BLKDiscard bool `json:"blkdiscard"`
// Boot partition // Boot partition
BootPartition uint64 `json:"bootPartition"` BootPartition uint64 `json:"bootPartition"`
// 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"`
@@ -841,7 +847,7 @@ type InfoCompute struct {
SnapSets ListSnapshots `json:"snapSets"` SnapSets ListSnapshots `json:"snapSets"`
// Node ID // Node ID
NodeID uint64 `json:"nodeId"` NodeID uint64 `json:"node_id"`
// Node name // Node name
NodeName string `json:"nodeName"` NodeName string `json:"nodeName"`
@@ -1171,6 +1177,9 @@ type RecordCompute struct {
// Zone ID // Zone ID
ZoneID uint64 `json:"zoneId"` ZoneID uint64 `json:"zoneId"`
//todo
_ uint64 `json:"nodeId"`
} }
type LoaderMetaIso struct { type LoaderMetaIso struct {
@@ -1280,6 +1289,9 @@ type ItemDeletedCompute struct {
type InfoDisk struct { type InfoDisk struct {
// ID // ID
ID uint64 `json:"id"` ID uint64 `json:"id"`
// SEP ID
SepID int64 `json:"sepId"`
} }
// List computes // List computes
+22 -1
View File
@@ -20,7 +20,7 @@ type NetAttachRequest struct {
// 'VFNIC' for connect to vfpool // 'VFNIC' for connect to vfpool
// 'DPDK' for connect to DPDK // 'DPDK' for connect to DPDK
// `EMPTY` for connect empty network // `EMPTY` for connect empty network
// `SDT` for connect to SDN // `SDN` for connect to SDN
// `TRUNK` for connect to TRUNK // `TRUNK` for connect to TRUNK
// Required: true // Required: true
NetType string `url:"netType" json:"netType" validate:"computex86NetType"` NetType string `url:"netType" json:"netType" validate:"computex86NetType"`
@@ -45,6 +45,27 @@ 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"`
// 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 // 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"`
+1 -1
View File
@@ -20,7 +20,7 @@ type StartRequest struct {
// ID of node to start compute // ID of node to start compute
// Required: false // Required: false
NodeID uint64 `url:"nodeId,omitempty" json:"nodeId,omitempty"` NodeID uint64 `url:"node_id,omitempty" json:"node_id,omitempty"`
} }
// Start starts compute // Start starts compute
@@ -33,7 +33,11 @@ type StartMigrationOutRequest struct {
// Mapping of guest disk target names to absolute paths on the destination host. // Mapping of guest disk target names to absolute paths on the destination host.
// Required: false // Required: false
Diskmap map[string]string `url:"diskmap,omitempty" json:"diskmap,omitempty"` DiskMap map[string]string `url:"diskmap,omitempty" json:"diskmap,omitempty"`
// Mapping of network interfaces
// Required: false
NetMap map[string]string `url:"netmap,omitempty" json:"netmap,omitempty"`
// Mapping for CD/DVD devices or their source paths to new ISO/device paths on the destination // Mapping for CD/DVD devices or their source paths to new ISO/device paths on the destination
// Required: false // Required: false
+8
View File
@@ -37,6 +37,14 @@ 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"`
// BLK Discard
// Required: false
BLKDiscard interface{} `url:"blkdiscard,omitempty" json:"blkdiscard,omitempty" validate:"omitempty,isBool"`
} }
// Create creates a disk // Create creates a disk
+2 -1
View File
@@ -3,8 +3,9 @@ package disks
import ( import (
"context" "context"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
"strconv" "strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
// DepresentRequest struct to depresent disk from node // DepresentRequest struct to depresent disk from node
+6 -3
View File
@@ -53,6 +53,9 @@ type InfoDisk struct {
// Access Control Control // Access Control Control
ACL map[string]interface{} `json:"acl"` ACL map[string]interface{} `json:"acl"`
// BLK Discard
BLKDiscard bool `json:"blkdiscard"`
// Boot partition // Boot partition
BootPartition uint64 `json:"bootPartition"` BootPartition uint64 `json:"bootPartition"`
@@ -187,6 +190,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 {
@@ -261,9 +267,6 @@ type SearchListDisks []ItemDisk
// Main information about unattached disk // Main information about unattached disk
type ItemUnattachedDisk struct { type ItemUnattachedDisk struct {
// CKey
CKey string `json:"_ckey"`
// Meta // Meta
Meta []interface{} `json:"_meta"` Meta []interface{} `json:"_meta"`
+2 -1
View File
@@ -3,8 +3,9 @@ package disks
import ( import (
"context" "context"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
"strconv" "strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
// PresentRequest struct to present disk to node // PresentRequest struct to present disk to node
+46
View File
@@ -0,0 +1,46 @@
package disks
import (
"context"
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/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"`
// BLK Discard
// Required: false
BLKDiscard interface{} `url:"blkdiscard,omitempty" json:"blkdiscard,omitempty" validate:"omitempty,isBool"`
}
// 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
}
-4
View File
@@ -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"`
-6
View File
@@ -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"`
-6
View File
@@ -11,7 +11,6 @@ var grids = ListGrids{
DiskSize: 976, DiskSize: 976,
DiskSizeMax: 1200, DiskSizeMax: 1200,
ExtIPs: 132, ExtIPs: 132,
ExtTraffic: 0,
GPU: 79500, GPU: 79500,
RAM: 0, RAM: 0,
SEPs: map[string]map[string]DiskUsage{}, SEPs: map[string]map[string]DiskUsage{},
@@ -21,7 +20,6 @@ var grids = ListGrids{
DiskSize: 976, DiskSize: 976,
DiskSizeMax: 1200, DiskSizeMax: 1200,
ExtIPs: 132, ExtIPs: 132,
ExtTraffic: 0,
GPU: 0, GPU: 0,
RAM: 152600, RAM: 152600,
SEPs: map[string]map[string]DiskUsage{}, SEPs: map[string]map[string]DiskUsage{},
@@ -41,7 +39,6 @@ var grids = ListGrids{
DiskSize: 976, DiskSize: 976,
DiskSizeMax: 1200, DiskSizeMax: 1200,
ExtIPs: 132, ExtIPs: 132,
ExtTraffic: 0,
GPU: 79500, GPU: 79500,
RAM: 0, RAM: 0,
SEPs: map[string]map[string]DiskUsage{}, SEPs: map[string]map[string]DiskUsage{},
@@ -51,7 +48,6 @@ var grids = ListGrids{
DiskSize: 976, DiskSize: 976,
DiskSizeMax: 1200, DiskSizeMax: 1200,
ExtIPs: 132, ExtIPs: 132,
ExtTraffic: 0,
GPU: 0, GPU: 0,
RAM: 152600, RAM: 152600,
SEPs: map[string]map[string]DiskUsage{}, SEPs: map[string]map[string]DiskUsage{},
@@ -71,7 +67,6 @@ var grids = ListGrids{
DiskSize: 976, DiskSize: 976,
DiskSizeMax: 1200, DiskSizeMax: 1200,
ExtIPs: 132, ExtIPs: 132,
ExtTraffic: 0,
GPU: 79500, GPU: 79500,
RAM: 0, RAM: 0,
SEPs: map[string]map[string]DiskUsage{}, SEPs: map[string]map[string]DiskUsage{},
@@ -81,7 +76,6 @@ var grids = ListGrids{
DiskSize: 976, DiskSize: 976,
DiskSizeMax: 1200, DiskSizeMax: 1200,
ExtIPs: 132, ExtIPs: 132,
ExtTraffic: 0,
GPU: 0, GPU: 0,
RAM: 152600, RAM: 152600,
SEPs: map[string]map[string]DiskUsage{}, SEPs: map[string]map[string]DiskUsage{},
-3
View File
@@ -43,9 +43,6 @@ type RecordResource struct {
// External IPs // External IPs
ExtIPs uint64 `json:"extips"` ExtIPs uint64 `json:"extips"`
// External traffic
ExtTraffic uint64 `json:"exttraffic"`
// Number of GPU // Number of GPU
GPU uint64 `json:"gpu"` GPU uint64 `json:"gpu"`
+2 -2
View File
@@ -15,8 +15,8 @@ type PurgeLogsRequest struct {
GID uint64 `url:"gid" json:"gid" validate:"required"` GID uint64 `url:"gid" json:"gid" validate:"required"`
// Age of the records to remove, e.g. -1h for records older than 1 hour, -1w - one week, etc // Age of the records to remove, e.g. -1h for records older than 1 hour, -1w - one week, etc
// Required: true // Required: false
Age string `url:"age" json:"age" validate:"required"` Age string `url:"age,omitempty" json:"age,omitempty"`
} }
// PurgeLogs clear Log and ECO records that are older than the specified age. // PurgeLogs clear Log and ECO records that are older than the specified age.
@@ -3,8 +3,9 @@ package grid
import ( import (
"context" "context"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
"strconv" "strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
// SetCPUAllocationParameterRequest for setting CPU allocation parameter // SetCPUAllocationParameterRequest for setting CPU allocation parameter
@@ -3,8 +3,9 @@ package grid
import ( import (
"context" "context"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
"strconv" "strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
// SetCPUAllocationRatioForVMRequest for setting CPU allocation ratio for computes // SetCPUAllocationRatioForVMRequest for setting CPU allocation ratio for computes
+37
View File
@@ -37,6 +37,11 @@ type Interface struct {
// Required: false // Required: false
MAC string `url:"mac,omitempty" json:"mac,omitempty" validate:"omitempty"` MAC string `url:"mac,omitempty" json:"mac,omitempty" validate:"omitempty"`
// Net mask
// Used only to DPDK or VFNIC net type
// Required: false
NetMask uint64 `url:"netMask,omitempty" json:"netMask,omitempty"`
// SDN interface id // SDN interface id
// Required: false // Required: false
SDNInterfaceID string `url:"sdn_interface_id,omitempty" json:"sdn_interface_id,omitempty"` SDNInterfaceID string `url:"sdn_interface_id,omitempty" json:"sdn_interface_id,omitempty"`
@@ -52,6 +57,22 @@ type Interface struct {
// Flag indicating whether this interface is enabled (only for VINS, EXTNET, DPDK, SDN, TRUNK) // Flag indicating whether this interface is enabled (only for VINS, EXTNET, DPDK, SDN, TRUNK)
// Required: false // Required: false
Enabled interface{} `url:"enabled,omitempty" json:"enabled,omitempty" validate:"omitempty,isBool"` 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 // DataDisk detailed struct for DataDisks field in CreateRequest, CreateBlankRequest and MassCreateRequest
@@ -85,6 +106,14 @@ type DataDisk struct {
// Specify image id for create disk from template // Specify image id for create disk from template
// Required: false // Required: false
ImageID uint64 `url:"imageId,omitempty" json:"imageId,omitempty"` ImageID uint64 `url:"imageId,omitempty" json:"imageId,omitempty"`
// Cache mode for 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"`
} }
// CreateRequest struct to create KVM x86 VM // CreateRequest struct to create KVM x86 VM
@@ -206,6 +235,14 @@ 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"`
// 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 // GetRAM returns RAM field values
+8
View File
@@ -115,6 +115,14 @@ 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"`
// Boot Disk BLK Discard
// Required: false
BootDiskBLKDiscard interface{} `url:"boot_disk_blkdiscard" json:"boot_disk_blkdiscard" validate:"omitempty,isBool"`
} }
// GetRAM returns RAM field values // GetRAM returns RAM field values
+28
View File
@@ -14,9 +14,13 @@ type InterfaceMassCreate struct {
// - VINS // - VINS
// - EXTNET // - EXTNET
// - TRUNK // - 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"` NetType string `url:"netType" json:"netType" validate:"required,massCreateNetType"`
// Network ID for connect // Network ID for connect
// Required: false
NetID uint64 `url:"netId" json:"netId" validate:"required"` NetID uint64 `url:"netId" json:"netId" validate:"required"`
// IP address to assign to this VM when connecting to the specified network // 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) // Flag indicating whether this interface is enabled (only for VINS, EXTNET, DPDK, SDN, TRUNK)
// Required: false // Required: false
Enabled interface{} `url:"enabled,omitempty" json:"enabled,omitempty" validate:"omitempty,isBool"` 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 // MassCreateRequest struct to mass create KVM x86
@@ -132,6 +152,14 @@ 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"`
// Boot Disk BLK Discard
// Required: false
BootDiskBLKDiscard interface{} `url:"boot_disk_blkdiscard" json:"boot_disk_blkdiscard" validate:"omitempty,isBool"`
} }
type asyncWrapperMassCreateRequest struct { type asyncWrapperMassCreateRequest struct {
+2 -2
View File
@@ -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
View 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
}
+5
View File
@@ -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
+22 -1
View File
@@ -26,6 +26,9 @@ type RecordNode struct {
// Isolated Cpus // Isolated Cpus
IsolatedCpus []interface{} `json:"isolatedCpus"` IsolatedCpus []interface{} `json:"isolatedCpus"`
// MemAllocationRatio
MemAllocationRatio float64 `json:"mem_allocation_ratio"`
// Name // Name
Name string `json:"name"` Name string `json:"name"`
@@ -82,6 +85,15 @@ type RecordNode struct {
// SDN Hypervisor Name // SDN Hypervisor Name
SDNHypervisorName string `json:"sdn_hypervisor_name"` SDNHypervisorName string `json:"sdn_hypervisor_name"`
// 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 // Resource consumption of the node
@@ -291,10 +303,19 @@ type ItemNode struct {
CPUAllocationRatio float64 `json:"cpu_allocation_ratio"` CPUAllocationRatio float64 `json:"cpu_allocation_ratio"`
// MemAllocationRatio // MemAllocationRatio
MemAllocationRatio float64 `json:"mem_allocation_ratio"` MemAllocationRatio float64 `json:"mem_allocation_ratio"`
// Packages // Packages
Packages map[string]PackageInfo `json:"packages"` Packages map[string]PackageInfo `json:"packages"`
// 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 { type PackageInfo struct {
+4 -3
View File
@@ -5,13 +5,14 @@ import (
"net/http" "net/http"
"strconv" "strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/constants"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators" "repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
type VFParam struct { type VFParam struct {
// Number of VF to assign // ID of the FN
// Required: true // Required: true
VFNum uint64 `url:"vfNum" json:"vfNum" validate:"required"` FNID uint64 `url:"fnId" json:"fnId" validate:"required"`
// Trust // Trust
// Required: true // Required: true
@@ -46,7 +47,7 @@ func (n Node) SetVFsParams(ctx context.Context, req SetVFsParamsRequest) (bool,
url := "/cloudbroker/node/setVFsParams" url := "/cloudbroker/node/setVFsParams"
res, err := n.client.DecortApiCall(ctx, http.MethodPost, url, req) res, err := n.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req)
if err != nil { if err != nil {
return false, err return false, err
+2 -1
View File
@@ -3,8 +3,9 @@ package pcidevice
import ( import (
"context" "context"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
"strconv" "strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
// DeleteRequest struct to deleting PCI device // DeleteRequest struct to deleting PCI device
+2 -1
View File
@@ -3,8 +3,9 @@ package pcidevice
import ( import (
"context" "context"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
"strconv" "strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
// DisableRequest struct for disabling PCI device // DisableRequest struct for disabling PCI device
+2 -1
View File
@@ -3,8 +3,9 @@ package pcidevice
import ( import (
"context" "context"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
"strconv" "strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
// EnableRequest struct for enabling PCI device // EnableRequest struct for enabling PCI device
+1
View File
@@ -2,6 +2,7 @@ package pcidevice
import ( import (
"encoding/json" "encoding/json"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/serialization" "repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/serialization"
) )
+1 -4
View File
@@ -35,9 +35,6 @@ type Reservation struct {
// External IPs // External IPs
ExtIPs int64 `json:"extips"` ExtIPs int64 `json:"extips"`
// External traffic
ExtTraffic int64 `json:"exttraffic"`
// Number of GPU // Number of GPU
GPU int64 `json:"gpu"` GPU int64 `json:"gpu"`
@@ -69,7 +66,7 @@ type ItemResourceConsumption struct {
ResourceLimits ResourceLimits `json:"resourceLimits"` ResourceLimits ResourceLimits `json:"resourceLimits"`
// Resource group ID // Resource group ID
RGID uint64 `json:"rgid"` RGID uint64 `json:"id"`
} }
type ListResourceConsumption struct { type ListResourceConsumption struct {
@@ -3,8 +3,9 @@ package rg
import ( import (
"context" "context"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
"strconv" "strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
// SetCPUAllocationParameterRequest struct for setting CPU allocation parameter // SetCPUAllocationParameterRequest struct for setting CPU allocation parameter
@@ -3,8 +3,9 @@ package rg
import ( import (
"context" "context"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
"strconv" "strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
// SetCPUAllocationRatioRequest struct for setting CPU allocation ratio // SetCPUAllocationRatioRequest struct for setting CPU allocation ratio
+8 -7
View File
@@ -2,8 +2,8 @@ package sep
import ( import (
"context" "context"
"encoding/json"
"net/http" "net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators" "repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
@@ -20,23 +20,24 @@ type AddConsumerNodesRequest struct {
} }
// AddConsumerNodes adds consumer nodes to SEP parameters // AddConsumerNodes adds consumer nodes to SEP parameters
func (s SEP) AddConsumerNodes(ctx context.Context, req AddConsumerNodesRequest) (bool, error) { func (s SEP) AddConsumerNodes(ctx context.Context, req AddConsumerNodesRequest) ([]uint64, error) {
err := validators.ValidateRequest(req) err := validators.ValidateRequest(req)
list := []uint64{}
if err != nil { if err != nil {
return false, validators.ValidationErrors(validators.GetErrors(err)) return list, validators.ValidationErrors(validators.GetErrors(err))
} }
url := "/cloudbroker/sep/addConsumerNodes" url := "/cloudbroker/sep/addConsumerNodes"
res, err := s.client.DecortApiCall(ctx, http.MethodPost, url, req) res, err := s.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil { if err != nil {
return false, err return list, err
} }
result, err := strconv.ParseBool(string(res)) err = json.Unmarshal(res, &list)
if err != nil { if err != nil {
return false, err return nil, err
} }
return result, nil return list, nil
} }
+5 -5
View File
@@ -20,22 +20,22 @@ type AddProviderNodesRequest struct {
} }
// AddProviderNodes adds provider nodes to SEP parameters // AddProviderNodes adds provider nodes to SEP parameters
func (s SEP) AddProviderNodes(ctx context.Context, req AddProviderNodesRequest) (bool, error) { func (s SEP) AddProviderNodes(ctx context.Context, req AddProviderNodesRequest) (uint64, error) {
err := validators.ValidateRequest(req) err := validators.ValidateRequest(req)
if err != nil { if err != nil {
return false, validators.ValidationErrors(validators.GetErrors(err)) return 0, validators.ValidationErrors(validators.GetErrors(err))
} }
url := "/cloudbroker/sep/addProviderNodes" url := "/cloudbroker/sep/addProviderNodes"
res, err := s.client.DecortApiCall(ctx, http.MethodPost, url, req) res, err := s.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil { if err != nil {
return false, err return 0, err
} }
result, err := strconv.ParseBool(string(res)) result, err := strconv.ParseUint(string(res), 10, 64)
if err != nil { if err != nil {
return false, err return 0, err
} }
return result, nil return result, nil
+1 -9
View File
@@ -20,7 +20,7 @@ type CreateRequest struct {
// Type of storage // Type of storage
// Required: true // Required: true
SEPType string `url:"sep_type" json:"sep_type" validate:"required"` SEPType string `url:"sep_type" json:"sep_type" validate:"required,sepType"`
// SEP config // SEP config
// Required: true // Required: true
@@ -30,14 +30,6 @@ type CreateRequest struct {
// Required: false // Required: false
Description string `url:"description,omitempty" json:"description,omitempty"` Description string `url:"description,omitempty" json:"description,omitempty"`
// List of provider node IDs
// Required: false
ProviderNIDs []uint64 `url:"provider_nids,omitempty" json:"provider_nids,omitempty"`
// List of consumer node IDs
// Required: false
ConsumerNIDs []uint64 `url:"consumer_nids,omitempty" json:"consumer_nids,omitempty"`
// Enable SEP after creation // Enable SEP after creation
// Required: false // Required: false
Enable bool `url:"enable,omitempty" json:"enable,omitempty"` Enable bool `url:"enable,omitempty" json:"enable,omitempty"`
+2 -2
View File
@@ -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
+3
View File
@@ -42,6 +42,9 @@ type ListRequest struct {
// Required: false // Required: false
SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"` SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"`
// Sort by SEP IDs
SepIDs []uint64 `url:"sep_ids,omitempty" json:"sep_ids,omitempty"`
// Page size // Page size
// Required: false // Required: false
Size uint64 `url:"size,omitempty" json:"size,omitempty"` Size uint64 `url:"size,omitempty" json:"size,omitempty"`
+4
View File
@@ -56,6 +56,10 @@ type ListRequest struct {
// Search by pool name // Search by pool name
// Required: false // Required: false
PoolName string `url:"pool_name,omitempty" json:"pool_name,omitempty"` PoolName string `url:"pool_name,omitempty" json:"pool_name,omitempty"`
// Filter SEP's by tech status (ENABLED, DISABLED)
// Required: false
SepTechStatus string `url:"sep_tech_status,omitempty" json:"sep_tech_status,omitempty" validate:"omitempty,sepTechStatus"`
} }
// List gets list of storage policies as a ListStoragePolicies struct // List gets list of storage policies as a ListStoragePolicies struct
+3
View File
@@ -103,6 +103,9 @@ type AccessSEPPool struct {
// Pool names // Pool names
PoolNames []string `json:"pool_names"` PoolNames []string `json:"pool_names"`
// Technical status of the SEP
SepTechStatus string `json:"sep_tech_status"`
} }
type Usage struct { type Usage struct {
+6 -1
View File
@@ -5,6 +5,7 @@ import (
"encoding/json" "encoding/json"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/constants"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators" "repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
@@ -13,6 +14,10 @@ type UpdateRequest struct {
// Required: true // Required: true
StoragePolicyID uint64 `url:"storage_policy_id" json:"storage_policy_id" validate:"required"` StoragePolicyID uint64 `url:"storage_policy_id" json:"storage_policy_id" validate:"required"`
// List of storage endpoint access objects
// Required: false
AccessSEPsPools []AccessSEPsPool `url:"access_seps_pools,omitempty" json:"access_seps_pools,omitempty"`
// New name for the storage policy // New name for the storage policy
// Required: false // Required: false
Name string `url:"name,omitempty" json:"name,omitempty"` Name string `url:"name,omitempty" json:"name,omitempty"`
@@ -51,6 +56,6 @@ func (sp StPolicy) UpdateRaw(ctx context.Context, req UpdateRequest) ([]byte, er
url := "/cloudbroker/storage_policy/update" url := "/cloudbroker/storage_policy/update"
res, err := sp.client.DecortApiCall(ctx, http.MethodPost, url, req) res, err := sp.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req)
return res, err return res, err
} }
+5
View File
@@ -33,6 +33,11 @@ type CreateRequest struct {
// Native VLAN ID // Native VLAN ID
// Required: false // Required: false
NativeVLANID uint64 `url:"native_vlan_id,omitempty" json:"native_vlan_id,omitempty"` NativeVLANID uint64 `url:"native_vlan_id,omitempty" json:"native_vlan_id,omitempty"`
// MTU
// Default value: 1500
// Required: false
MTU uint64 `url:"mtu,omitempty" json:"mtu,omitempty"`
} }
// Create creates a user. // Create creates a user.
+3
View File
@@ -29,6 +29,9 @@ type ItemTrunk struct {
// MAC // MAC
MAC string `json:"mac"` MAC string `json:"mac"`
// MTU
MTU uint64 `json:"mtu"`
// Name of a trunk // Name of a trunk
Name string `json:"name"` Name string `json:"name"`
+9 -4
View File
@@ -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
@@ -29,6 +29,11 @@ type UpdateRequest struct {
// New native VLAN ID // New native VLAN ID
// Required: false // Required: false
NativeVLANID uint64 `url:"native_vlan_id,omitempty" json:"native_vlan_id,omitempty"` NativeVLANID uint64 `url:"native_vlan_id,omitempty" json:"native_vlan_id,omitempty"`
// MTU
// Default value: 1500
// Required: false
MTU uint64 `url:"mtu,omitempty" json:"mtu,omitempty"`
} }
// Update updates a trunk // Update updates a trunk
+6 -12
View File
@@ -3,7 +3,6 @@ package user
import ( import (
"context" "context"
"net/http" "net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators" "repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
@@ -14,9 +13,9 @@ type CreateRequest struct {
// Required: true // Required: true
Username string `url:"username" json:"username" validate:"required"` Username string `url:"username" json:"username" validate:"required"`
// Email addresses of the user. // Email address of the user.
// Required: true // Required: true
EmailAddress []string `url:"emailaddress" json:"emailaddress" validate:"required"` EmailAddress string `url:"emailaddress" json:"emailaddress" validate:"required"`
// Password of user // Password of user
// Required: false // Required: false
@@ -34,23 +33,18 @@ type CreateRequest struct {
} }
// Create creates a user. // Create creates a user.
func (u User) Create(ctx context.Context, req CreateRequest) (bool, error) { func (u User) Create(ctx context.Context, req CreateRequest) (string, error) {
err := validators.ValidateRequest(req) err := validators.ValidateRequest(req)
if err != nil { if err != nil {
return false, validators.ValidationErrors(validators.GetErrors(err)) return "", validators.ValidationErrors(validators.GetErrors(err))
} }
url := "/cloudbroker/user/create" url := "/cloudbroker/user/create"
res, err := u.client.DecortApiCall(ctx, http.MethodPost, url, req) res, err := u.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil { if err != nil {
return false, err return "", err
} }
result, err := strconv.ParseBool(string(res)) return string(res), nil
if err != nil {
return false, err
}
return result, nil
} }
+5
View File
@@ -28,6 +28,11 @@ type GetAuditRequest struct {
// Required: false // Required: false
TimestampTo uint64 `url:"timestampTo,omitempty" json:"timestampTo,omitempty"` TimestampTo uint64 `url:"timestampTo,omitempty" json:"timestampTo,omitempty"`
// Sort by a field, format +|-(field)
// Default: -timestamp
// Required: false
SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"`
// Page number. // Page number.
// Required: false // Required: false
Page uint64 `url:"page,omitempty" json:"page,omitempty"` Page uint64 `url:"page,omitempty" json:"page,omitempty"`
@@ -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.
+3 -3
View File
@@ -104,16 +104,16 @@ type ItemAudit struct {
Call string `json:"Call"` Call string `json:"Call"`
// Response time // Response time
ResponseTime ResponseTime `json:"Response Time"` ResponseTime ResponseTime `json:"responsetime"`
// StatusCode // StatusCode
StatusCode StatusCode `json:"Status Code"` StatusCode StatusCode `json:"statuscode"`
// Guid // Guid
GUID string `json:"Guid"` GUID string `json:"Guid"`
// Time // Time
Time float64 `json:"Time"` Time float64 `json:"timestampEnd"`
} }
type ListAudits struct { type ListAudits struct {
+7 -13
View File
@@ -38,7 +38,7 @@ type UpdateRequest struct {
type wrapperUpdateRequest struct { type wrapperUpdateRequest struct {
UpdateRequest UpdateRequest
Config []string `url:"config,omitempty"` Config string `url:"config,omitempty"`
} }
// Update updates vfpool device // Update updates vfpool device
@@ -48,21 +48,15 @@ func (v VFPool) Update(ctx context.Context, req UpdateRequest) (bool, error) {
return false, validators.ValidationErrors(validators.GetErrors(err)) return false, validators.ValidationErrors(validators.GetErrors(err))
} }
var config []string var config string
if len(req.Config) != 0 { if len(req.Config) != 0 {
config = make([]string, 0, len(req.Config)) b, err := json.Marshal(req.Config)
if err != nil {
for c := range req.Config { return false, err
b, err := json.Marshal(req.Config[c])
if err != nil {
return false, err
}
config = append(config, string(b))
} }
} else {
config = []string{} config = string(b)
} }
reqWrapped := wrapperUpdateRequest{ reqWrapped := wrapperUpdateRequest{
+2 -1
View File
@@ -3,8 +3,9 @@ package vgpu
import ( import (
"context" "context"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
"strconv" "strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
// AllocateRequest struct for allocating VGPU // AllocateRequest struct for allocating VGPU
+2 -1
View File
@@ -3,8 +3,9 @@ package vgpu
import ( import (
"context" "context"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
"strconv" "strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
// CreateRequest struct for creating VGPU // CreateRequest struct for creating VGPU
+2 -1
View File
@@ -3,8 +3,9 @@ package vgpu
import ( import (
"context" "context"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
"strconv" "strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
// DeallocateRequest struct for deallocating VGPU // DeallocateRequest struct for deallocating VGPU
+2 -1
View File
@@ -3,8 +3,9 @@ package vgpu
import ( import (
"context" "context"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
"strconv" "strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
) )
// DestroyRequest struct for destroying VGPU // DestroyRequest struct for destroying VGPU
+4
View File
@@ -17,6 +17,10 @@ type CreateRequest 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"`
} }
// Create creates zone object // Create creates zone object
Loaded 100 of 105 files, more files were not shown because too many files have changed in this diff. Show more