v15.0.0
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators"
|
||||
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators"
|
||||
)
|
||||
|
||||
// CreateBlankRequest struct to create KVM x86 VM from scratch
|
||||
@@ -120,14 +120,23 @@ type CreateBlankRequest struct {
|
||||
// Required: false
|
||||
BootDiskCache string `url:"boot_disk_cache,omitempty" json:"boot_disk_cache,omitempty"`
|
||||
|
||||
// Boot Disk BLK Discard
|
||||
// Boot Disk Discard
|
||||
// Required: false
|
||||
BootDiskBLKDiscard interface{} `url:"boot_disk_blkdiscard" json:"boot_disk_blkdiscard" validate:"omitempty,isBool"`
|
||||
BootDiskDiscard string `url:"boot_disk_discard,omitempty" json:"boot_disk_discard,omitempty"`
|
||||
|
||||
// Priority weight of the VM: higher value means higher priority and later migration
|
||||
// Required: false
|
||||
// Default: 1
|
||||
Weight uint64 `url:"weight,omitempty" json:"weight,omitempty"`
|
||||
|
||||
// CPU alignment profile name
|
||||
// Required: false
|
||||
CPUAlignmentProfile string `url:"cpu_alignment_profile,omitempty" json:"cpu_alignment_profile,omitempty"`
|
||||
|
||||
// Clock type for the VM
|
||||
// Required: false
|
||||
// Default: default
|
||||
Clock string `url:"clock,omitempty" json:"clock,omitempty"`
|
||||
}
|
||||
|
||||
// GetRAM returns RAM field values
|
||||
@@ -155,7 +164,7 @@ func (k KVMX86) CreateBlank(ctx context.Context, req CreateBlankRequest) (uint64
|
||||
|
||||
var interfaces []string
|
||||
|
||||
if req.Interfaces != nil && len(req.Interfaces) != 0 {
|
||||
if len(req.Interfaces) != 0 {
|
||||
interfaces = make([]string, 0, len(req.Interfaces))
|
||||
|
||||
for i := range req.Interfaces {
|
||||
@@ -172,7 +181,7 @@ func (k KVMX86) CreateBlank(ctx context.Context, req CreateBlankRequest) (uint64
|
||||
|
||||
var dataDisks []string
|
||||
|
||||
if req.DataDisks != nil && len(req.DataDisks) != 0 {
|
||||
if len(req.DataDisks) != 0 {
|
||||
dataDisks = make([]string, 0, len(req.DataDisks))
|
||||
|
||||
for i := range req.DataDisks {
|
||||
|
||||
Reference in New Issue
Block a user