This commit is contained in:
2026-08-21 18:12:55 +04:00
parent f34fa6055c
commit c296c62a0c
1285 changed files with 3959 additions and 3249 deletions

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators"
)
// ListRequest struct to get list of VGPU
@@ -18,33 +18,29 @@ type ListRequest struct {
// Required: false
Status string `url:"status,omitempty" json:"status,omitempty"`
// Find by vgpu type
// Find by mode
// Required: false
Type string `url:"type,omitempty" json:"type,omitempty"`
SplitMode string `url:"split_mode,omitempty" json:"split_mode,omitempty"`
// Find by vgpu mode
// Find by id node
// Required: false
Mode string `url:"mode,omitempty" json:"mode,omitempty"`
// Find by id resgroup
// Required: false
RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"`
NodeID uint64 `url:"node_id,omitempty" json:"node_id,omitempty"`
// Find by account id
// Required: false
AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
AccountID uint64 `url:"account_id,omitempty" json:"account_id,omitempty"`
// Find by compute id
// Required: false
ComputeID uint64 `url:"computeId,omitempty" json:"computeId,omitempty"`
ComputeID uint64 `url:"compute_id,omitempty" json:"compute_id,omitempty"`
// Find by pgpu id
// Required: false
PGPUID uint64 `url:"pgpuId,omitempty" json:"pgpuId,omitempty"`
PGPUID uint64 `url:"pgpu_id,omitempty" json:"pgpu_id,omitempty"`
// Sort by one of supported fields, format +|-(field)
// Required: false
SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"`
SortBy string `url:"sort_by,omitempty" json:"sort_by,omitempty" validate:"omitempty,sortBy"`
// Page number
// Required: false
@@ -83,6 +79,6 @@ func (v VGPU) ListRaw(ctx context.Context, req ListRequest) ([]byte, error) {
url := "/cloudapi/vgpu/list"
res, err := v.client.DecortApiCall(ctx, http.MethodPost, url, req)
res, err := v.client.DecortApiCall(ctx, http.MethodGet, url, req)
return res, err
}

View File

@@ -1,14 +1,23 @@
package vgpu
type ItemVGPU struct {
// Account ID
AccountID uint64 `json:"accountId"`
// Account IDs
AccountIDs []uint64 `json:"account_ids"`
// Bus number
BusNumber int `json:"bus_number"`
// ComputeID
ComputeID uint64 `json:"compute_id"`
// Created time
CreatedTime uint64 `json:"createdTime"`
CreatedTime uint64 `json:"created_time"`
// Deleted time
DeletedTime uint64 `json:"deletedTime"`
DeletedTime uint64 `json:"deleted_time"`
// Device Reference
DeviceReference string `json:"device_reference"`
//Grid ID
GID uint64 `json:"gid"`
@@ -19,44 +28,29 @@ type ItemVGPU struct {
// VGPU ID
ID uint64 `json:"id"`
// Last claimed by
LastClaimedBy uint64 `json:"lastClaimedBy"`
// Last Update time
LastUpdateTime uint64 `json:"last_update_time"`
// Last update time
LastUpdateTime uint64 `json:"lastUpdateTime"`
// Mdev UUID
MdevUUID string `json:"mdev_uuid"`
// Mode
Mode string `json:"mode"`
// Bus number
BusNumber int `json:"bus_number"`
// Parent PCI Address
ParentPCIAddress string `json:"parent_pci_address"`
// PCI Slot
PCISlot int `json:"pciSlot"`
PCISlot uint64 `json:"pci_slot"`
// PGPUID
PGPUID uint64 `json:"pgpuid"`
// PGPU ID
PGPUID uint64 `json:"pgpu_id"`
// Profile ID
ProfileID uint64 `json:"profileId"`
// Profile Reference
ProfileReference string `json:"profile_reference"`
// RAM
RAM uint64 `json:"ram"`
// Reference ID
ReferenceID string `json:"referenceId"`
// RGID
RGID uint64 `json:"rgId"`
// Split Mode
SplitMode string `json:"split_mode"`
// Status
Status string `json:"status"`
// Type
Type string `json:"type"`
// VMID
VMID uint64 `json:"vmid"`
}
// List of VGPU

View File

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

View File

@@ -1,6 +1,6 @@
package vgpu
import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces"
import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces"
// Structure for creating request to VGPU
type VGPU struct {