This commit is contained in:
asteam
2025-09-26 18:56:58 +03:00
parent f1ffb4c0fd
commit 48e2b0f2f9
931 changed files with 1444 additions and 1130 deletions

View File

@@ -4,7 +4,7 @@ import (
"context"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v9/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
)
// ApplyIpmiActionRequest struct to apply ipmi action on node

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v9/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
)
// ConsumptionRequest struct to get node summary by resources and consumption

View File

@@ -4,7 +4,7 @@ import (
"context"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v9/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
)
// DecommissionRequest struct to set node status to DECOMMISSIONED

View File

@@ -4,7 +4,7 @@ import (
"context"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v9/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
)
// EnableRequest struct to enable node from maintenance status to enabled

View File

@@ -4,7 +4,7 @@ import (
"context"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v9/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
)
// EnableNodesRequest struct to enable nodes from maintenance status to enabled

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v9/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
)
// GetRequest struct to get detailed information about node

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v9/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
)
// ListRequest struct to get list of nodes

View File

@@ -4,7 +4,7 @@ import (
"context"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v9/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
)
// MaintenanceRequest struct to place node in maintenance state

View File

@@ -11,6 +11,9 @@ type RecordNode struct {
// CPU Allocation Ratio
CPUAllocationRatio float64 `json:"cpu_allocation_ratio"`
// DPDK info
DPDK DPDK `json:"dpdk"`
// GID
GID uint64 `json:"gid"`
@@ -29,6 +32,12 @@ type RecordNode struct {
// NeedReboot
NeedReboot bool `json:"needReboot"`
// Netaddr
NetAddr NetAddr `json:"netaddr"`
// Network mode
NetworkMode string `json:"networkmode"`
// Nic Info
NicInfo ListNicInfo `json:"nicInfo"`
@@ -50,6 +59,18 @@ type RecordNode struct {
// Status
Status string `json:"status"`
// To active
ToActive Role `json:"to_active"`
// To installing
ToInstalling Role `json:"to_installing"`
// To maintenance
ToMaintenance Role `json:"to_maintenance"`
// To restricted
ToRestricted Role `json:"to_restricted"`
// Version
Version string `json:"version"`
}
@@ -122,6 +143,9 @@ type ItemNode struct {
// Description
Description string `json:"description"`
// DPDK
DPDK DPDK `json:"dpdk"`
// GID
GID uint64 `json:"gid"`
@@ -224,6 +248,9 @@ type ItemNode struct {
// Type
Type string `json:"type"`
//UEFI Firmware File
UEFIFirmwareFile string `json:"uefiFirmwareFile"`
// Version
Version string `json:"version"`
}
@@ -314,3 +341,42 @@ type ListNodes struct {
// Entry count
EntryCount uint64 `json:"entryCount"`
}
// Net address
type NetAddr struct {
// Name
Name string `json:"name"`
// IP list backplane1 node
IP []string `json:"ip"`
}
// DPDK info
type DPDK struct {
// Bridges
Bridges Bridges `json:"bridges"`
// hp memory
HPMemory map[string]uint64 `json:"hp_memory"`
// pmd cpu
PMDCPU []uint64 `json:"pmd_cpu"`
}
// Bridges
type Bridges struct {
Backplane1 Backplane1 `json:"backplane1"`
}
// Backplane1
type Backplane1 struct {
Interfaces []string `json:"interfaces"`
NumaNode uint64 `json:"numa_node"`
}
// Role
type Role struct {
Actor string `json:"actor"`
Reason string `json:"reason"`
Time uint64 `json:"time"`
}

View File

@@ -2,7 +2,7 @@
package node
import (
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v9/interfaces"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/interfaces"
)
// Structure for creating request to node

View File

@@ -4,7 +4,7 @@ import (
"context"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v9/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
)
// RestrictRequest struct to set node status to 'RESTRICTED'

View File

@@ -3,7 +3,7 @@ package node
import (
"encoding/json"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v9/internal/serialization"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/serialization"
)
// Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.

View File

@@ -4,7 +4,7 @@ import (
"context"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v9/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
)
// SetCoreIsolationRequest struct to isolate selected cores on node boot

View File

@@ -4,7 +4,7 @@ import (
"context"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v9/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
)
// SetHugePagesRequest struct to set on-boot Huge Pages configuration

View File

@@ -4,7 +4,7 @@ import (
"context"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v9/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
)
// SetSRIOVStatusRequest struct to set Single-root input/output virtualization kernel config on node

View File

@@ -4,7 +4,7 @@ import (
"context"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v9/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
)
// SetVFsNumberRequest struct to set number of VFs for individual NIC on node
@@ -24,6 +24,10 @@ type SetVFsNumberRequest struct {
// Trust
// Required: true
Trust bool `url:"trust" json:"trust" validate:"required"`
// Enable spoof checking
// Required: true
Spoofchk bool `url:"spoofchk" json:"spoofchk" validate:"required"`
}
// SetVFsNumber sets number of VFs for individual NIC on node

View File

@@ -4,7 +4,7 @@ import (
"context"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v9/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
)
// UpdateRequest struct to update node for actual version