This commit is contained in:
2024-05-31 13:35:39 +03:00
parent e7c968797b
commit 3393934456
65 changed files with 905 additions and 393 deletions

View File

@@ -27,7 +27,7 @@ type CreateTemplateRequest struct {
type wrapperCreateTemplateRequest struct {
CreateTemplateRequest
Async bool `url:"async"`
AsyncMode bool `url:"asyncMode"`
}
// CreateTemplateAsync create template from compute instance
@@ -39,7 +39,7 @@ func (c Compute) CreateTemplateAsync(ctx context.Context, req CreateTemplateRequ
reqWrapped := wrapperCreateTemplateRequest{
CreateTemplateRequest: req,
Async: true,
AsyncMode: true,
}
url := "/cloudbroker/compute/createTemplate"
@@ -63,7 +63,7 @@ func (c Compute) CreateTemplate(ctx context.Context, req CreateTemplateRequest)
reqWrapped := wrapperCreateTemplateRequest{
CreateTemplateRequest: req,
Async: false,
AsyncMode: false,
}
url := "/cloudbroker/compute/createTemplate"

View File

@@ -440,7 +440,7 @@ type ItemDisk struct {
RealityDeviceNumber uint64 `json:"realityDeviceNumber"`
// Replication
Replication interface{} `json:"replication"`
Replication ItemReplication `json:"replication"`
// Reference ID
ReferenceID string `json:"referenceId"`
@@ -485,6 +485,26 @@ type ItemDisk struct {
VMID uint64 `json:"vmid"`
}
type ItemReplication struct {
// DiskID
DiskID uint64 `json:"diskId"`
// PoolID
PoolID string `json:"poolId"`
// Role
Role string `json:"role"`
// SelfVolumeID
SelfVolumeID string `json:"selfVolumeId"`
// StorageID
StorageID string `json:"storageId"`
// VolumeID
VolumeID string `json:"volumeId"`
}
// List disks
type ListDisks []ItemDisk
@@ -706,6 +726,9 @@ type InfoCompute struct {
// Resource name
ResName string `json:"resName"`
// Reserved Node Cpus
ReservedNodeCpus []uint64 `json:"reservedNodeCpus"`
// Resource group ID
RGID uint64 `json:"rgId"`
@@ -919,6 +942,9 @@ type RecordCompute struct {
// Resource name
ResName string `json:"resName"`
// Reserved Node Cpus
ReservedNodeCpus []uint64 `json:"reservedNodeCpus"`
// Resource group ID
RGID uint64 `json:"rgId"`
@@ -1010,6 +1036,7 @@ type ListComputes struct {
EntryCount uint64 `json:"entryCount"`
}
// Short information about audit
// Short information about audit
type ItemAudit struct {
// Epoch

View File

@@ -16,9 +16,10 @@ type NetAttachRequest struct {
// Network type
// 'EXTNET' for connect to external network directly
// and 'VINS' for connect to ViNS
// 'VINS' for connect to ViNS
// 'VFNIC' for connect to vfpool
// Required: true
NetType string `url:"netType" json:"netType" validate:"computeNetType"`
NetType string `url:"netType" json:"netType" validate:"computex86NetType"`
// Network ID for connect to
// For EXTNET - external network ID

View File

@@ -18,6 +18,11 @@ type StopRequest struct {
// Required: false
Force bool `url:"force,omitempty" json:"force,omitempty"`
// whether to depresent compute disks from node or not
// Default: true
// Required: false
Depresent bool `url:"depresent" json:"depresent"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`

View File

@@ -22,6 +22,24 @@ type UpdateRequest struct {
// Required: false
Description string `url:"desc,omitempty" json:"desc,omitempty"`
// Rule for VM placement with NUMA affinity.
// Possible values - none (placement without NUMA affinity),
// strict (strictly with NUMA affinity, if not possible - do not start VM),
// loose (use NUMA affinity if possible)
// Required: false
// Default: none
NumaAffinity string `url:"numaAffinity,omitempty" json:"numaAffinity,omitempty" validate:"omitempty,numaAffinity"`
// Run VM on dedicated CPUs. To use this feature, the system must be pre-configured by allocating CPUs on the physical node
// Required: false
// Default: false
CPUPin bool `url:"cpupin" json:"cpupin"`
// Use Huge Pages to allocate RAM of the virtual machine. The system must be pre-configured by allocating Huge Pages on the physical node
// Required: false
// Default: false
HPBacked bool `url:"hpBacked" json:"hpBacked"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`