This commit is contained in:
asteam
2025-09-26 19:17:30 +03:00
parent 48e2b0f2f9
commit 1ccc37a104
1022 changed files with 6440 additions and 1688 deletions

View File

@@ -1,7 +1,7 @@
package cloudapi
import (
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/pkg/cloudapi/account"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/pkg/cloudapi/account"
)
// Accessing the Account method group

View File

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

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// AddUserRequest struct to add permission to access account for a user

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// AuditsRequest struct to give list of account audits

View File

@@ -1,75 +0,0 @@
package account
import (
"context"
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
)
// CreateRequest struct for creating account
type CreateRequest struct {
// Display name
// Required: true
Name string `url:"name" json:"name" validate:"required"`
// Name of the account
// Required: true
Username string `url:"username" json:"username" validate:"required"`
// Email
// Required: false
EmailAddress string `url:"emailaddress,omitempty" json:"emailaddress,omitempty" validate:"omitempty,email"`
// Max size of memory in MB
// Required: false
MaxMemoryCapacity int64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"`
// Max size of aggregated vdisks in GB
// Required: false
MaxVDiskCapacity int64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"`
// Max number of CPU cores
// Required: false
MaxCPUCapacity int64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"`
// Max sent/received network transfer peering
// Required: false
MaxNetworkPeerTransfer int64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"`
// Max number of assigned public IPs
// Required: false
MaxNumPublicIP int64 `url:"maxNumPublicIP,omitempty" json:"maxNumPublicIP,omitempty"`
// If true send emails when a user is granted access to resources
// Required: false
SendAccessEmails bool `url:"sendAccessEmails" json:"sendAccessEmails"`
// Limit (positive) or disable (0) GPU resources
// Required: false
GPUUnits int64 `url:"gpu_units,omitempty" json:"gpu_units,omitempty"`
}
// Create creates account
// Setting a cloud unit maximum to -1 or empty will not put any restrictions on the resource
func (a Account) Create(ctx context.Context, req CreateRequest) (uint64, error) {
err := validators.ValidateRequest(req)
if err != nil {
return 0, validators.ValidationErrors(validators.GetErrors(err))
}
url := "/cloudapi/account/create"
res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil {
return 0, err
}
result, err := strconv.ParseUint(string(res), 10, 64)
if err != nil {
return 0, err
}
return result, nil
}

View File

@@ -4,7 +4,7 @@ import (
"context"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// DeleteRequest struct to delete account

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// DeleteUserRequest struct to revoke access to account

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// DisableEnableRequest struct to change status of account
@@ -13,6 +13,10 @@ type DisableEnableRequest struct {
// ID of account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`
// Reason of disabling
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
// Disable disables an account

View File

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

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// GetConsumedAccountUnitsRequest struct to calculate the currently consumed units for all cloudspaces and resource groups in the account

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// GetConsumedCloudUnitsByTypeRequest struct to calculate the currently consumed cloud units of the specified type for all cloudspaces and resource groups in the account

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// GetReservedAccountUnitsRequest struct to calculate the reserved units for all cloudspaces and resource groups in the account

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// GetResourceConsumptionRequest struct to get resource consumption

View File

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

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// ListComputesRequest struct to get a list of compute instances

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// ListDeletedRequest struct to get a list of deleted accounts

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// ListDisksRequest struct to get a list of deleted disks

View File

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

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// ListRGRequest struct to get a list of resource groups

View File

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

View File

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

View File

@@ -62,6 +62,9 @@ type ItemAccount struct {
// Deleted time
DeletedTime uint64 `json:"deletedTime"`
// Description
Description string `json:"desc"`
// ID
ID uint64 `json:"id"`
@@ -197,6 +200,9 @@ type RecordAccount struct {
// Created time
CreatedTime uint64 `json:"createdTime"`
// Description
Description string `json:"desc"`
// Deactivation time
DeactivationTime float64 `json:"deactivationTime"`
@@ -512,6 +518,9 @@ type ItemRG struct {
// Deleted time
DeletedTime uint64 `json:"deletedTime"`
// Description
Description string `json:"desc"`
// Resource group ID
RGID uint64 `json:"id"`

View File

@@ -4,7 +4,7 @@ import (
"context"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// RestoreRequest struct to restore a deleted account

View File

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

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// UpdateRequest struct to update account
@@ -14,6 +14,10 @@ type UpdateRequest struct {
// Required: true
AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`
// Description
// Required: false
Description string `url:"desc,omitempty" json:"desc,omitempty"`
// Name of the account
// Required: false
Name string `url:"name,omitempty" json:"name,omitempty"`

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// UpdateUserRequest struct to update user access rights

View File

@@ -1,7 +1,7 @@
package cloudapi
import (
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/pkg/cloudapi/audit"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/pkg/cloudapi/audit"
)
// Accessing the Stack method group

View File

@@ -1,6 +1,6 @@
package audit
import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/interfaces"
import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/interfaces"
// Structure for creating request to audit
type Audit struct {

View File

@@ -5,14 +5,14 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// GetRequest struct to get information about account
type GetRequest struct {
// Audit GUID
// Required: true
AuditGuid string `url:"auditGuid" json:"auditGuid" validate:"required"`
AuditGuid string `url:"audit_guid" json:"audit_guid" validate:"required"`
}
// Get gets information about audit as a RecordAudit struct

View File

@@ -1,6 +1,6 @@
package cloudapi
import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/pkg/cloudapi/bservice"
import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/pkg/cloudapi/bservice"
// Accessing the BService method group
func (ca *CloudAPI) BService() *bservice.BService {

View File

@@ -1,7 +1,7 @@
// API Actor for managing Compute Group. This actor is a final API for endusers to manage Compute Group
package bservice
import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/interfaces"
import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/interfaces"
// Structure for creating request to bservice
type BService struct {

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// CreateRequest struct for BasicService

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// DeleteRequest struct to delete basic service

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// DisableRequest struct for disable service

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// EnableRequest struct to disable service

View File

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

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// GroupAddRequest struct to create new compute group within BasicService
@@ -71,6 +71,10 @@ type GroupAddRequest struct {
// Meta data for working group computes, format YAML "user_data": 1111
// Required: false
UserData string `url:"userData,omitempty" json:"userData,omitempty"`
//Chipset "i440fx" or "Q35
//Required: false
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"chipset,omitempty"`
}
// GetRAM returns RAM field values

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// GroupComputeRemoveRequest struct to remove group compute

View File

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

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// GroupParentAddRequest struct to add parent Compute Group relation to the specified Compute Group

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// GroupParentRemoveRequest struct to remove parent Compute Group

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// GroupRemoveRequest struct for destroy the specified Compute Group

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// GroupResizeRequest struct to resize the group
@@ -22,6 +22,12 @@ type GroupResizeRequest struct {
// Required: true
Count int64 `url:"count" json:"count" validate:"required"`
//Chipset for new computes, either i440fx or Q35 (i440fx by default)
//Available values : i440fx, Q35
//Default value : i440fx
//Required: true
Chipset string `url:"chipset" json:"chipset" validate:"required,chipset"`
// Either delta or absolute value of computes
// Should be one of:
// - ABSOLUTE

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// GroupStartRequest struct to start the specified Compute Group

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// GroupStopRequest struct to stop the specified Compute Group

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// GroupUpdateRequest struct to update existing Compute group

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// GroupUpdateExtNetRequest struct to update External Network settings

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// GroupUpdateVINSRequest struct to update VINS settings

View File

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

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// ListDeletedRequest struct to get list of deleted BasicService instances

View File

@@ -295,6 +295,9 @@ type ItemGroupCompute struct {
// List of information about OS Users
OSUsers ListOSUsers `json:"osUsers"`
//Chipset
Chipset string `json:"chipset"`
}
// List of Group Computes

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// RestoreRequest struct to restore BasicService instance

View File

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

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// SnapshotCreateRequest struct to create snapshot

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// SnapshotDeleteRequest struct to delete snapshot

View File

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

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// SnapshotRollbackRequest struct to rollback snapshot

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// StartRequest struct to start service

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// StopRequest struct to stop service

View File

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

View File

@@ -1,7 +1,7 @@
package cloudapi
import (
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/pkg/cloudapi/compute"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/pkg/cloudapi/compute"
)
// Accessing the Compute method group

View File

@@ -4,7 +4,7 @@ import (
"context"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// AffinityGroupCheckStartRequest struct to check all computes with current affinity label can start

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// AffinityLabelRemoveRequest struct to clear affinity label for compute

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// AffinityLabelSetRequest struct to set affinity label for compute

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// AffinityRelationsRequest struct to get dict of computes

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// AffinityRuleAddRequest struct to add affinity rule

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// AffinityRuleRemoveRequest struct to remove affinity rule

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// AffinityRulesClearRequest struct to clear affinity rules

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// AntiAffinityRuleAddRequest struct to add anti affinity rule

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// AntiAffinityRuleRemoveRequest struct to remove anti affinity rule

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// AntiAffinityRulesClearRequest struct to clear anti affinity rules

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// AttachGPURequest struct to attach GPU for compute

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// AttachPCIDeviceRequest struct to attach PCI device

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// AuditsRequest struct to get audit records

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// BootDiskSetRequest struct to set boot disk for compute

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// BootOrderGetRequest struct to get boot order

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// BootOrderSetRequest struct to set boot order

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// CDEjectRequest struct to eject CD image

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// CDInsertRequest struct to insert new CD image

View File

@@ -5,30 +5,30 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// ChangeIPRequest struct to change IP for network
type ChangeIPRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"`
ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"`
// Network type
// 'EXTNET' for connect to external network directly
// 'VINS' for connect to ViNS
// Required: true
NetType string `url:"netType" json:"netType" validate:"computeNetType"`
NetType string `url:"net_type" json:"net_type" validate:"computeNetType"`
// Network ID for connect to
// For EXTNET - external network ID
// For VINS - VINS ID
// Required: true
NetID uint64 `url:"netId" json:"netId" validate:"required"`
NetID uint64 `url:"net_id" json:"net_id" validate:"required"`
// IP address to which we will change the existing one, it must be from the same subnet
// Required: true
IPAddr string `url:"ipAddr" json:"ipAddr" validate:"required"`
IPAddr string `url:"ip_addr" json:"ip_addr" validate:"required"`
}
// ChangeIP change reserved IP for compute instance

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// ChangeLinkStateRequest struct to change link state

View File

@@ -0,0 +1,46 @@
package compute
import (
"context"
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// ChangeMACRequest struct to change MAC for network
type ChangeMACRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"`
// Current mac address
// Required: true
СurrentMAC string `url:"current_mac_address" json:"current_mac_address" validate:"required"`
// the MAC address to which we will change the existing one
// Required: true
NewMAC string `url:"new_mac_address" json:"new_mac_address" validate:"required"`
}
// ChangeMAC change MAC for compute instance
func (c Compute) ChangeMAC(ctx context.Context, req ChangeMACRequest) (bool, error) {
err := validators.ValidateRequest(req)
if err != nil {
return false, validators.ValidationErrors(validators.GetErrors(err))
}
url := "/cloudapi/compute/changeMac"
res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil {
return false, err
}
result, err := strconv.ParseBool(string(res))
if err != nil {
return false, err
}
return result, nil
}

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// CloneRequest struct to clone compute instance

View File

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

View File

@@ -6,7 +6,7 @@ import (
"strconv"
"strings"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// CreateTemplateRequest struct to create template

View File

@@ -6,7 +6,7 @@ import (
"strconv"
"strings"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// CreateTemplateFromBlankRequest struct to create template from boot disk of current compute
@@ -39,10 +39,6 @@ type CreateTemplateFromBlankRequest struct {
// Required: false
AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
// SEP ID
// Required: false
SepID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"`
// Pool for image create
// Required: false
PoolName string `url:"poolName,omitempty" json:"poolName,omitempty"`

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// DeleteRequest struct to delete compute

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// DeleteCustomFieldsRequest struct to delete compute's custom fields

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// DetachGPURequest struct to detach vgpu for compute

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// DetachPCIDeviceRequest struct to detach PCI device

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// DisableRequest struct to disable compute

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// DiskAddRequest struct to create and attach disk to compute

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// DiskAttachRequest struct to attach disk to compute

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// DiskDelRequest struct to detach and delete disk from compute

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// DiskDetachRequest struct to detach disk from compute

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// DiskMigrateRequest struct to migrate compute's disk to target disk

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// DiskQOSRequest struct to change QoS of the disk

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// DiskResizeRequest struct to change disk size

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// DiskSwitchToReplicationRequest struct to switch disk to it's replication

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strconv"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v10/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
)
// EnableRequest struct to enable compute

Some files were not shown because too many files have changed in this diff Show More