From 2ba8f61cb57d7d9aaca46fd61340113024fef08c Mon Sep 17 00:00:00 2001 From: src Date: Fri, 30 Oct 2026 16:45:47 +0300 Subject: [PATCH] v1.0.9 --- CHANGELOG.md | 16 +++++---- go.mod | 2 ++ tags/dx_disks/models.go | 12 ++++++- tags/dx_extnet/models.go | 22 +++++------- tags/dx_k8ci/models.go | 26 ++++---------- tags/dx_rg/models.go | 74 ++++------------------------------------ tags/dx_sp/models.go | 41 +++++----------------- tags/dx_vins/models.go | 49 +++++--------------------- 8 files changed, 60 insertions(+), 182 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d8fe06..7bbad9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,12 @@ -## Version v1.0.8 +## Version 1.0.9 ### Изменено -| Идентификатор задачи | Описание | -|----------------------|-----------------------------------------------------------------------------------------------------------------------------| -| COD-66 | Изменён метод `DeCustomApp.Install` (`POST /digitalenergy/customapp/install`): поле запроса `hostname` стало необязательным | -| COD-66 | Изменён метод `DeFalco.Install` (`POST /digitalenergy/falco/install`): удалено поле запроса `IntegagentHostname` | -| COD-66 | Изменён метод `DeIstio.Install` (`POST /digitalenergy/istio/install`): удалено поле запроса `IntegagentHostname` | -| COD-66 | Изменён метод `DeOpenELB.Install` (`POST /digitalenergy/openelb/install`): удалено поле запроса `IntegagentHostname` | +| Идентификатор задачи | Описание | +|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| COD-74 | Изменён метод `DxDisks.ListTypes` (`POST /dynamix/disk/listTypes`): в ответе тип поля `Records` изменён с `[]any` на `[]SEPData` | +| COD-74 | Изменён метод `DxExtNet.List` (`POST /dynamix/extnet/list`): в ответе удалено необязательное поле `FreeIPs` | +| COD-74 | Изменён метод `DxK8CI.List` (`POST /dynamix/k8ci/list`): в ответе удалены необязательные поля `CreatedTime`, `Desc`, `LBImageID`, `NetworkPlugins`, `Status` и `Version` | +| COD-74 | Изменён метод `DxRG.List` (`POST /dynamix/rg/list`): в ответе удалены необязательные поля `ACL`, `AccountACL`, `AccountName`, `CPUAllocationParameter`, `CPUAllocationRatio`, `ComputeFeatures`, `CreatedBy`, `CreatedTime`, `DefNetID`, `DefNetType`, `DeletedBy`, `DeletedTime`, `Desc`, `Dirty`, `GID`, `GUID`, `LockStatus`, `Milestones`, `ResourceLimits`, `ResourceTypes`, `SDNAccessGroupID`, `Secret`, `Status`, `StoragePolicyIDs`, `UniqPools`, `UpdatedBy`, `UpdatedTime`, `VMs` и `ViNS` | +| COD-74 | Изменён метод `DxSP.List` (`POST /dynamix/sp/list`): в ответе удалены необязательные поля `Description`, `GUID`, `LimitIOPS`, `Status`, `StoragePolicyID` и `Usage` | +| COD-74 | Изменён метод `DxViNS.List` (`POST /dynamix/vins/list`): в ответе удалены необязательные поля `AccountID`, `AccountName`, `CreatedBy`, `CreatedTime`, `DeletedBy`, `DeletedTime`, `ExternalIP`, `FreeIPs`, `Name`, `RGName`, `UpdatedBy`, `UpdatedTime` и `VXLANID` | diff --git a/go.mod b/go.mod index ea037a3..c8c38da 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,8 @@ module repository.basistech.ru/BASIS/de-golang-sdk go 1.26.0 retract ( + v1.0.8 // Pre-release version for DE 1.8.0, doesn't contain some changes + v1.0.7 // Pre-release version for DE 1.8.0, doesn't contain some changes v1.0.6 // Pre-release version for DE 1.8.0, doesn't contain some changes v1.0.5 // Pre-release version for DE 1.8.0, doesn't contain some changes v1.0.4 // Pre-release version for DE 1.8.0, doesn't contain some changes diff --git a/tags/dx_disks/models.go b/tags/dx_disks/models.go index 7256e18..de2b44a 100755 --- a/tags/dx_disks/models.go +++ b/tags/dx_disks/models.go @@ -3,7 +3,7 @@ package dx_disks type ListDiskTypesResult struct { - Records []any `json:"records,omitempty"` + Records []SEPData `json:"records,omitempty"` } type ListDiskTypesResultWithError struct { @@ -12,3 +12,13 @@ type ListDiskTypesResultWithError struct { Message string `json:"message,omitempty"` Result ListDiskTypesResult `json:"result,omitempty"` } + +type SEPData struct { + Pools []SEPPool `json:"pools,omitempty"` + SEPID int64 `json:"sepId,omitempty"` + SEPName string `json:"sepName,omitempty"` +} + +type SEPPool struct { + Name string `json:"name,omitempty"` +} diff --git a/tags/dx_extnet/models.go b/tags/dx_extnet/models.go index 94e48b8..d474261 100755 --- a/tags/dx_extnet/models.go +++ b/tags/dx_extnet/models.go @@ -19,19 +19,6 @@ type CloudAPIExtNetExcluded struct { VMID int64 `json:"vmId,omitempty"` } -type CloudAPIExtNetItemExtNet struct { - // Free IPs - FreeIPs int64 `json:"freeIps,omitempty"` - // ID - ID int64 `json:"id,omitempty"` - // IPCIDR - IPCIDR string `json:"ipcidr,omitempty"` - // Name - Name string `json:"name,omitempty"` - // Status - Status string `json:"status,omitempty"` -} - type CloudAPIExtNetItemReservation struct { // Account ID AccountID int64 `json:"account_id,omitempty"` @@ -148,6 +135,13 @@ type CloudAPIExtNetVNFs struct { DHCP int64 `json:"dhcp,omitempty"` } +type ExtNet struct { + ID int64 `json:"id,omitempty"` + IPCIDR string `json:"ipcidr,omitempty"` + Name string `json:"name,omitempty"` + Status string `json:"status,omitempty"` +} + type GetExtNetResult struct { Record CloudAPIExtNetRecordExtNet `json:"record,omitempty"` } @@ -160,7 +154,7 @@ type GetExtNetResultWithError struct { } type ListExtNetResult struct { - Records []CloudAPIExtNetItemExtNet `json:"records,omitempty"` + Records []ExtNet `json:"records,omitempty"` } type ListExtNetResultWithError struct { diff --git a/tags/dx_k8ci/models.go b/tags/dx_k8ci/models.go index d22873a..d77a018 100755 --- a/tags/dx_k8ci/models.go +++ b/tags/dx_k8ci/models.go @@ -2,25 +2,6 @@ package dx_k8ci -type CloudAPIK8CIItemK8CI struct { - // Created time - CreatedTime int64 `json:"createdTime,omitempty"` - // Description - Desc string `json:"desc,omitempty"` - // ID - ID int64 `json:"id,omitempty"` - // LB image ID - LBImageID int64 `json:"lbImageId,omitempty"` - // Name - Name string `json:"name,omitempty"` - // Network plugins - NetworkPlugins []string `json:"networkPlugins,omitempty"` - // Status - Status string `json:"status,omitempty"` - // Version - Version string `json:"version,omitempty"` -} - type CloudAPIK8CIRecordK8CI struct { // Description Desc string `json:"desc,omitempty"` @@ -45,8 +26,13 @@ type GetK8CIResultWithError struct { Result GetK8CIResult `json:"result,omitempty"` } +type K8CI struct { + ID int64 `json:"id,omitempty"` + Name string `json:"name,omitempty"` +} + type ListK8CIResult struct { - Records []CloudAPIK8CIItemK8CI `json:"records,omitempty"` + Records []K8CI `json:"records,omitempty"` } type ListK8CIResultWithError struct { diff --git a/tags/dx_rg/models.go b/tags/dx_rg/models.go index 942ffed..7d1643f 100755 --- a/tags/dx_rg/models.go +++ b/tags/dx_rg/models.go @@ -19,72 +19,6 @@ type CloudAPIRGItemACL struct { UserGroupID string `json:"userGroupId,omitempty"` } -type CloudAPIRGItemResourceGroup struct { - AccountACL CloudAPIRGItemACL `json:"accountAcl,omitempty"` - // Account ID - AccountID int64 `json:"accountId,omitempty"` - // Account name - AccountName string `json:"accountName,omitempty"` - // Access Control List - ACL []CloudAPIRGItemACL `json:"acl,omitempty"` - // Compute Features - ComputeFeatures []string `json:"computeFeatures,omitempty"` - // CPU allocation parameter - CPUAllocationParameter string `json:"cpu_allocation_parameter,omitempty"` - // CPU allocation ratio - CPUAllocationRatio int64 `json:"cpu_allocation_ratio,omitempty"` - // Created by - CreatedBy string `json:"createdBy,omitempty"` - // Created time - CreatedTime int64 `json:"createdTime,omitempty"` - // DefNetID - DefNetID int64 `json:"def_net_id,omitempty"` - // DefNetType - DefNetType string `json:"def_net_type,omitempty"` - // Deleted by - DeletedBy string `json:"deletedBy,omitempty"` - // Deleted time - DeletedTime int64 `json:"deletedTime,omitempty"` - // Description - Desc string `json:"desc,omitempty"` - // Dirty - Dirty bool `json:"dirty,omitempty"` - // Grid ID - GID int64 `json:"gid,omitempty"` - // GUID - GUID int64 `json:"guid,omitempty"` - // ID - ID int64 `json:"id,omitempty"` - // Lock status - LockStatus string `json:"lockStatus,omitempty"` - // Milestones - Milestones int64 `json:"milestones,omitempty"` - // Name - Name string `json:"name,omitempty"` - // Resource limits - ResourceLimits CloudAPIRGResourceLimits `json:"resourceLimits,omitempty"` - // List of resource types - ResourceTypes []string `json:"resourceTypes,omitempty"` - // SDN access group id - SDNAccessGroupID string `json:"sdn_access_group_id,omitempty"` - // Secret - Secret string `json:"secret,omitempty"` - // Status - Status string `json:"status,omitempty"` - // Storage policy ids - StoragePolicyIDs []int64 `json:"storage_policy_ids,omitempty"` - // UniqPools - UniqPools []string `json:"uniqPools,omitempty"` - // Updated by - UpdatedBy string `json:"updatedBy,omitempty"` - // Updated time - UpdatedTime int64 `json:"updatedTime,omitempty"` - // List of VINS IDs - ViNS []int64 `json:"vins,omitempty"` - // List of compute IDs - VMs []int64 `json:"vms,omitempty"` -} - type CloudAPIRGRecordResourceGroup struct { // Account ID AccountID int64 `json:"accountId,omitempty"` @@ -184,7 +118,7 @@ type GetRGResultWithError struct { } type ListRGResult struct { - Records []CloudAPIRGItemResourceGroup `json:"records,omitempty"` + Records []ResourceGroup `json:"records,omitempty"` } type ListRGResultWithError struct { @@ -193,3 +127,9 @@ type ListRGResultWithError struct { Message string `json:"message,omitempty"` Result ListRGResult `json:"result,omitempty"` } + +type ResourceGroup struct { + AccountID int64 `json:"accountId,omitempty"` + ID int64 `json:"id,omitempty"` + Name string `json:"name,omitempty"` +} diff --git a/tags/dx_sp/models.go b/tags/dx_sp/models.go index 0c59472..9dfd703 100755 --- a/tags/dx_sp/models.go +++ b/tags/dx_sp/models.go @@ -3,38 +3,14 @@ package dx_sp type AccessSEPPool struct { - // Pool names PoolNames []string `json:"pool_names,omitempty"` - // SEP ID - SEPID int64 `json:"sep_id,omitempty"` - // SEP name - SEPName string `json:"sep_name,omitempty"` -} - -type ItemStoragePolicy struct { - // List of pools in SEP for storage policy - AccessSEPsPools []AccessSEPPool `json:"access_seps_pools,omitempty"` - // Description of the storage policy - Description string `json:"description,omitempty"` - // GUID - GUID int64 `json:"guid,omitempty"` - // ID of the storage policy - ID int64 `json:"id,omitempty"` - // Max IOPS for the sotrage policy - LimitIOPS int64 `json:"limit_iops,omitempty"` - // Name of the storage policy - Name string `json:"name,omitempty"` - // Status of the storage policy - Status string `json:"status,omitempty"` - // Storage policy ID - StoragePolicyID int64 `json:"storage_policy_id,omitempty"` - // Which accounts and resource groups use the storage policy - Usage Usage `json:"usage,omitempty"` + SEPID int64 `json:"sep_id,omitempty"` + SEPName string `json:"sep_name,omitempty"` } type ListSecurityPoliciesResult struct { - DxVersion Version `json:"dxVersion,omitempty"` - Records []ItemStoragePolicy `json:"records,omitempty"` + DxVersion Version `json:"dxVersion,omitempty"` + Records []StoragePolicy `json:"records,omitempty"` } type ListSecurityPoliciesResultWithError struct { @@ -44,9 +20,8 @@ type ListSecurityPoliciesResultWithError struct { Result ListSecurityPoliciesResult `json:"result,omitempty"` } -type Usage struct { - // List of accounts - Accounts []int64 `json:"accounts,omitempty"` - // List of resource groups - Resgroups []int64 `json:"resgroups,omitempty"` +type StoragePolicy struct { + AccessSEPsPools []AccessSEPPool `json:"access_seps_pools,omitempty"` + ID int64 `json:"id,omitempty"` + Name string `json:"name,omitempty"` } diff --git a/tags/dx_vins/models.go b/tags/dx_vins/models.go index fe37480..d8d6b10 100755 --- a/tags/dx_vins/models.go +++ b/tags/dx_vins/models.go @@ -49,45 +49,6 @@ type CloudAPIViNSItemRoutes struct { NetMask string `json:"netmask,omitempty"` } -type CloudAPIViNSItemViNS struct { - // Account ID - AccountID int64 `json:"accountId,omitempty"` - // Account name - AccountName string `json:"accountName,omitempty"` - // Created by - CreatedBy string `json:"createdBy,omitempty"` - // Created time - CreatedTime int64 `json:"createdTime,omitempty"` - // Deleted by - DeletedBy string `json:"deletedBy,omitempty"` - // Deleted time - DeletedTime int64 `json:"deletedTime,omitempty"` - // External IP - ExternalIP string `json:"externalIP,omitempty"` - // Extnet ID - ExtNetID int64 `json:"extnetId,omitempty"` - // Free IPs - FreeIPs int64 `json:"freeIPs,omitempty"` - // ID - ID int64 `json:"id,omitempty"` - // Name - Name string `json:"name,omitempty"` - // Network - Network string `json:"network,omitempty"` - // Resource group ID - RGID int64 `json:"rgId,omitempty"` - // Resource group name - RGName string `json:"rgName,omitempty"` - // Status - Status string `json:"status,omitempty"` - // Updated by - UpdatedBy string `json:"updatedBy,omitempty"` - // Updated time - UpdatedTime int64 `json:"updatedTime,omitempty"` - // VXLAN ID - VXLANID int64 `json:"vxlanId,omitempty"` -} - type CloudAPIViNSItemViNSCompute struct { // ID ID int64 `json:"id,omitempty"` @@ -516,7 +477,7 @@ type GetViNSResultWithError struct { } type ListViNSResult struct { - Records []CloudAPIViNSItemViNS `json:"records,omitempty"` + Records []ViNS `json:"records,omitempty"` } type ListViNSResultWithError struct { @@ -525,3 +486,11 @@ type ListViNSResultWithError struct { Message string `json:"message,omitempty"` Result ListViNSResult `json:"result,omitempty"` } + +type ViNS struct { + ExtNetID int64 `json:"extnetId,omitempty"` + ID int64 `json:"id,omitempty"` + Network string `json:"network,omitempty"` + RGID int64 `json:"rgId,omitempty"` + Status string `json:"status,omitempty"` +}