This commit is contained in:
2026-06-05 17:30:36 +03:00
parent 3e2edf53a5
commit f1112e5a11
1246 changed files with 6117 additions and 1589 deletions

View File

@@ -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"
)
type Interface struct {
@@ -63,9 +63,9 @@ type Interface struct {
// Required: false
SDNSegmentID string `url:"sdn_segment_id,omitempty" json:"sdn_segment_id,omitempty"`
// SDN Object Group ID
// SDN Object Group IDs
// Required: false
SDNObjectGroupID string `url:"sdn_object_group_id,omitempty" json:"sdn_object_group_id,omitempty"`
SDNObjectGroupIDs []string `url:"sdn_object_group_ids,omitempty" json:"sdn_object_group_ids,omitempty"`
// SDN Logical Port Display Name
// Required: false
@@ -112,9 +112,9 @@ type DataDisk struct {
// Required: false
Cache string `url:"cache,omitempty" json:"cache,omitempty"`
// BLK Discard
// Discard
// Required: false
BLKDiscard interface{} `url:"blkdiscard,omitempty" json:"blkdiscard,omitempty" validate:"omitempty,isBool"`
Discard string `url:"discard,omitempty" json:"discard,omitempty"`
}
// CreateRequest struct to create KVM x86 VM
@@ -233,14 +233,23 @@ type CreateRequest 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,omitempty" json:"boot_disk_blkdiscard,omitempty" 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
@@ -268,7 +277,7 @@ func (k KVMX86) Create(ctx context.Context, req CreateRequest) (uint64, error) {
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 {
@@ -285,7 +294,7 @@ func (k KVMX86) Create(ctx context.Context, req CreateRequest) (uint64, error) {
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 {

View File

@@ -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 {

View File

@@ -1,7 +1,7 @@
// API to manage KVM x86 compute instances (x86 VMs)
package kvmx86
import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/interfaces"
import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces"
// Structure for creating request to KVMX86
type KVMX86 struct {

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators"
)
type InterfaceMassCreate struct {
@@ -57,9 +57,9 @@ type InterfaceMassCreate struct {
// Required: false
SDNSegmentID string `url:"sdn_segment_id,omitempty" json:"sdn_segment_id,omitempty"`
// SDN Object Group ID
// SDN Object Group IDs
// Required: false
SDNObjectGroupID string `url:"sdn_object_group_id,omitempty" json:"sdn_object_group_id,omitempty"`
SDNObjectGroupIDs []string `url:"sdn_object_group_ids,omitempty" json:"sdn_object_group_ids,omitempty"`
// SDN Logical Port Display Name
// Required: false
@@ -158,14 +158,23 @@ type MassCreateRequest 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"`
}
type asyncWrapperMassCreateRequest struct {
@@ -198,7 +207,7 @@ func (k KVMX86) MassCreate(ctx context.Context, req MassCreateRequest) ([]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 {
@@ -215,7 +224,7 @@ func (k KVMX86) MassCreate(ctx context.Context, req MassCreateRequest) ([]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 {
@@ -262,7 +271,7 @@ func (k KVMX86) MassCreateAsync(ctx context.Context, req MassCreateRequest) (str
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 {
@@ -279,7 +288,7 @@ func (k KVMX86) MassCreateAsync(ctx context.Context, req MassCreateRequest) (str
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 {