v13.1.0
This commit is contained in:
@@ -68,9 +68,6 @@ type ResourceLimits struct {
|
||||
// RAM size, MB
|
||||
CUM float64 `json:"CU_M"`
|
||||
|
||||
// Traffic volume, GB
|
||||
CUNP float64 `json:"CU_NP"`
|
||||
|
||||
// Number of graphics cores
|
||||
GPUUnits float64 `json:"gpu_units"`
|
||||
|
||||
@@ -150,9 +147,6 @@ type Resource struct {
|
||||
// Number of External IPs
|
||||
ExtIPs int64 `json:"extips"`
|
||||
|
||||
// External traffic
|
||||
ExtTraffic int64 `json:"exttraffic"`
|
||||
|
||||
// Number of grafic cores
|
||||
GPU int64 `json:"gpu"`
|
||||
|
||||
@@ -554,9 +548,6 @@ type LimitsRG struct {
|
||||
// Number of External IPs
|
||||
ExtIPs int64 `json:"extips"`
|
||||
|
||||
// External traffic
|
||||
ExtTraffic int64 `json:"exttraffic"`
|
||||
|
||||
// Number of grafic cores
|
||||
GPU int64 `json:"gpu"`
|
||||
|
||||
@@ -565,6 +556,9 @@ type LimitsRG struct {
|
||||
|
||||
// SEPs
|
||||
SEPs uint64 `json:"seps"`
|
||||
|
||||
// Policies
|
||||
Policies map[string]Policy `json:"policies"`
|
||||
}
|
||||
|
||||
// Main information about resource group
|
||||
|
||||
@@ -14,9 +14,6 @@ type Resource struct {
|
||||
// Number of External IPs
|
||||
ExtIPs int64 `json:"extips"`
|
||||
|
||||
// External traffic
|
||||
ExtTraffic int64 `json:"exttraffic"`
|
||||
|
||||
// Number of grafic cores
|
||||
GPU int64 `json:"gpu"`
|
||||
|
||||
@@ -846,9 +843,6 @@ type RecordResourceUsage struct {
|
||||
// Number of external IPs
|
||||
ExtIPs uint64 `json:"extips"`
|
||||
|
||||
// ExtraTraffic
|
||||
ExtraTraffic uint64 `json:"exttraffic"`
|
||||
|
||||
// Number of GPU
|
||||
GPU uint64 `json:"gpu"`
|
||||
|
||||
|
||||
@@ -77,6 +77,9 @@ type AccessSEPPool struct {
|
||||
|
||||
// Pool names
|
||||
PoolNames []string `json:"pool_names"`
|
||||
|
||||
// Technical status of the SEP
|
||||
SepTechStatus string `json:"sep_tech_status"`
|
||||
}
|
||||
|
||||
type Usage struct {
|
||||
|
||||
@@ -156,9 +156,6 @@ type Resources struct {
|
||||
// ExtIPs
|
||||
ExtIPs uint64 `json:"extips"`
|
||||
|
||||
// ExtTraffic
|
||||
ExtTraffic uint64 `json:"exttraffic"`
|
||||
|
||||
// GPU
|
||||
GPU uint64 `json:"gpu"`
|
||||
|
||||
|
||||
@@ -71,9 +71,6 @@ type Resource struct {
|
||||
// Number of External IPs
|
||||
ExtIPs int64 `json:"extips"`
|
||||
|
||||
// External traffic
|
||||
ExtTraffic int64 `json:"exttraffic"`
|
||||
|
||||
// Number of grafic cores
|
||||
GPU int64 `json:"gpu"`
|
||||
|
||||
@@ -143,9 +140,6 @@ type ResourceLimits struct {
|
||||
// CuM
|
||||
CuM float64 `json:"CU_M"`
|
||||
|
||||
// CuNP
|
||||
CuNP float64 `json:"CU_NP"`
|
||||
|
||||
// GPUUnits
|
||||
GPUUnits float64 `json:"gpu_units"`
|
||||
|
||||
@@ -480,9 +474,6 @@ type Limits struct {
|
||||
// External IPs
|
||||
ExtIPs int64 `json:"extips"`
|
||||
|
||||
// External traffic
|
||||
ExtTraffic int64 `json:"exttraffic"`
|
||||
|
||||
// Number of GPU
|
||||
GPU int64 `json:"gpu"`
|
||||
|
||||
@@ -491,6 +482,9 @@ type Limits struct {
|
||||
|
||||
// SEPs number
|
||||
SEPs uint64 `json:"seps"`
|
||||
|
||||
// Policies
|
||||
Policies map[string]Policy `json:"policies"`
|
||||
}
|
||||
|
||||
// Resources of resource group
|
||||
|
||||
@@ -14,6 +14,9 @@ type RestoreDiskFromBackupRequest struct {
|
||||
// Compute ID
|
||||
ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"`
|
||||
|
||||
// Node ID
|
||||
NodeID uint64 `url:"nodeId,omitempty" json:"nodeId,omitempty"`
|
||||
|
||||
// Disk ID
|
||||
DiskID uint64 `url:"diskId" json:"diskId" validate:"required"`
|
||||
|
||||
|
||||
@@ -25,6 +25,9 @@ type RestoreDisksFromBackupRequest struct {
|
||||
// Compute ID
|
||||
ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"`
|
||||
|
||||
// Node ID
|
||||
NodeID uint64 `url:"nodeId,omitempty" json:"nodeId,omitempty"`
|
||||
|
||||
//Backup files
|
||||
BackupFiles []BackupFile `url:"disks" json:"disks" validate:"required,dive"`
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ var grids = ListGrids{
|
||||
DiskSize: 976,
|
||||
DiskSizeMax: 1200,
|
||||
ExtIPs: 132,
|
||||
ExtTraffic: 0,
|
||||
GPU: 79500,
|
||||
RAM: 0,
|
||||
SEPs: map[string]map[string]DiskUsage{},
|
||||
@@ -21,7 +20,6 @@ var grids = ListGrids{
|
||||
DiskSize: 976,
|
||||
DiskSizeMax: 1200,
|
||||
ExtIPs: 132,
|
||||
ExtTraffic: 0,
|
||||
GPU: 0,
|
||||
RAM: 152600,
|
||||
SEPs: map[string]map[string]DiskUsage{},
|
||||
@@ -41,7 +39,6 @@ var grids = ListGrids{
|
||||
DiskSize: 976,
|
||||
DiskSizeMax: 1200,
|
||||
ExtIPs: 132,
|
||||
ExtTraffic: 0,
|
||||
GPU: 79500,
|
||||
RAM: 0,
|
||||
SEPs: map[string]map[string]DiskUsage{},
|
||||
@@ -51,7 +48,6 @@ var grids = ListGrids{
|
||||
DiskSize: 976,
|
||||
DiskSizeMax: 1200,
|
||||
ExtIPs: 132,
|
||||
ExtTraffic: 0,
|
||||
GPU: 0,
|
||||
RAM: 152600,
|
||||
SEPs: map[string]map[string]DiskUsage{},
|
||||
@@ -71,7 +67,6 @@ var grids = ListGrids{
|
||||
DiskSize: 976,
|
||||
DiskSizeMax: 1200,
|
||||
ExtIPs: 132,
|
||||
ExtTraffic: 0,
|
||||
GPU: 79500,
|
||||
RAM: 0,
|
||||
SEPs: map[string]map[string]DiskUsage{},
|
||||
@@ -81,7 +76,6 @@ var grids = ListGrids{
|
||||
DiskSize: 976,
|
||||
DiskSizeMax: 1200,
|
||||
ExtIPs: 132,
|
||||
ExtTraffic: 0,
|
||||
GPU: 0,
|
||||
RAM: 152600,
|
||||
SEPs: map[string]map[string]DiskUsage{},
|
||||
|
||||
@@ -43,9 +43,6 @@ type RecordResource struct {
|
||||
// External IPs
|
||||
ExtIPs uint64 `json:"extips"`
|
||||
|
||||
// External traffic
|
||||
ExtTraffic uint64 `json:"exttraffic"`
|
||||
|
||||
// Number of GPU
|
||||
GPU uint64 `json:"gpu"`
|
||||
|
||||
|
||||
@@ -82,6 +82,9 @@ type RecordNode struct {
|
||||
|
||||
// SDN Hypervisor Name
|
||||
SDNHypervisorName string `json:"sdn_hypervisor_name"`
|
||||
|
||||
// CPU used by the node
|
||||
UsableCPUs []string `json:"usable_cpus"`
|
||||
}
|
||||
|
||||
// Resource consumption of the node
|
||||
@@ -291,10 +294,13 @@ type ItemNode struct {
|
||||
CPUAllocationRatio float64 `json:"cpu_allocation_ratio"`
|
||||
|
||||
// MemAllocationRatio
|
||||
|
||||
MemAllocationRatio float64 `json:"mem_allocation_ratio"`
|
||||
|
||||
// Packages
|
||||
Packages map[string]PackageInfo `json:"packages"`
|
||||
|
||||
// CPU used by the node
|
||||
UsableCPUs []string `json:"usable_cpus"`
|
||||
}
|
||||
|
||||
type PackageInfo struct {
|
||||
|
||||
@@ -35,9 +35,6 @@ type Reservation struct {
|
||||
// External IPs
|
||||
ExtIPs int64 `json:"extips"`
|
||||
|
||||
// External traffic
|
||||
ExtTraffic int64 `json:"exttraffic"`
|
||||
|
||||
// Number of GPU
|
||||
GPU int64 `json:"gpu"`
|
||||
|
||||
|
||||
@@ -103,6 +103,9 @@ type AccessSEPPool struct {
|
||||
|
||||
// Pool names
|
||||
PoolNames []string `json:"pool_names"`
|
||||
|
||||
// Technical status of the SEP
|
||||
SepTechStatus string `json:"sep_tech_status"`
|
||||
}
|
||||
|
||||
type Usage struct {
|
||||
|
||||
@@ -3,7 +3,6 @@ package user
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v13/internal/validators"
|
||||
)
|
||||
@@ -14,9 +13,9 @@ type CreateRequest struct {
|
||||
// Required: true
|
||||
Username string `url:"username" json:"username" validate:"required"`
|
||||
|
||||
// Email addresses of the user.
|
||||
// Email address of the user.
|
||||
// Required: true
|
||||
EmailAddress []string `url:"emailaddress" json:"emailaddress" validate:"required"`
|
||||
EmailAddress string `url:"emailaddress" json:"emailaddress" validate:"required"`
|
||||
|
||||
// Password of user
|
||||
// Required: false
|
||||
@@ -34,23 +33,18 @@ type CreateRequest struct {
|
||||
}
|
||||
|
||||
// Create creates a user.
|
||||
func (u User) Create(ctx context.Context, req CreateRequest) (bool, error) {
|
||||
func (u User) Create(ctx context.Context, req CreateRequest) (string, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
return false, validators.ValidationErrors(validators.GetErrors(err))
|
||||
return "", validators.ValidationErrors(validators.GetErrors(err))
|
||||
}
|
||||
|
||||
url := "/cloudbroker/user/create"
|
||||
|
||||
res, err := u.client.DecortApiCall(ctx, http.MethodPost, url, req)
|
||||
if err != nil {
|
||||
return false, err
|
||||
return "", err
|
||||
}
|
||||
|
||||
result, err := strconv.ParseBool(string(res))
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
return result, nil
|
||||
return string(res), nil
|
||||
}
|
||||
|
||||
@@ -28,6 +28,11 @@ type GetAuditRequest struct {
|
||||
// Required: false
|
||||
TimestampTo uint64 `url:"timestampTo,omitempty" json:"timestampTo,omitempty"`
|
||||
|
||||
// Sort by a field, format +|-(field)
|
||||
// Default: -timestamp
|
||||
// Required: false
|
||||
SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"`
|
||||
|
||||
// Page number.
|
||||
// Required: false
|
||||
Page uint64 `url:"page,omitempty" json:"page,omitempty"`
|
||||
|
||||
@@ -104,16 +104,16 @@ type ItemAudit struct {
|
||||
Call string `json:"Call"`
|
||||
|
||||
// Response time
|
||||
ResponseTime ResponseTime `json:"Response Time"`
|
||||
ResponseTime ResponseTime `json:"responsetime"`
|
||||
|
||||
// StatusCode
|
||||
StatusCode StatusCode `json:"Status Code"`
|
||||
StatusCode StatusCode `json:"statuscode"`
|
||||
|
||||
// Guid
|
||||
GUID string `json:"Guid"`
|
||||
|
||||
// Time
|
||||
Time float64 `json:"Time"`
|
||||
Time float64 `json:"timestampEnd"`
|
||||
}
|
||||
|
||||
type ListAudits struct {
|
||||
|
||||
@@ -22,6 +22,10 @@ type ListGroupsRequest struct {
|
||||
// Required: false
|
||||
DisplayName string `url:"display_name,omitempty" json:"display_name,omitempty"`
|
||||
|
||||
// Owner display name filter
|
||||
// Required: false
|
||||
OwnerDisplayName string `url:"owner_display_name,omitempty" json:"owner_display_name,omitempty"`
|
||||
|
||||
// Page number for pagination
|
||||
// Required: false
|
||||
Page uint64 `url:"page,omitempty" json:"page,omitempty"`
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package acsgroups
|
||||
|
||||
type AccessGroupItem struct {
|
||||
Name string `json:"display_name"`
|
||||
ID string `json:"id"`
|
||||
Name string `json:"display_name"`
|
||||
ID string `json:"id"`
|
||||
Comment string `json:"comment"`
|
||||
}
|
||||
|
||||
type AccessGroupList struct {
|
||||
|
||||
Reference in New Issue
Block a user