v1.16.6
v1.16.6
This commit is contained in:
82
CHANGELOG.md
82
CHANGELOG.md
@@ -1,4 +1,4 @@
|
|||||||
## Version 1.16.5
|
## Version 1.16.6
|
||||||
|
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
@@ -17,68 +17,82 @@
|
|||||||
| `rg/AccessGrant` | :heavy_check_mark: | :heavy_check_mark: |
|
| `rg/AccessGrant` | :heavy_check_mark: | :heavy_check_mark: |
|
||||||
| `rg/AccessRevoke` | :heavy_check_mark: | :heavy_check_mark: |
|
| `rg/AccessRevoke` | :heavy_check_mark: | :heavy_check_mark: |
|
||||||
| `sep/ConfigFieldEdit` | :x: | :heavy_check_mark: |
|
| `sep/ConfigFieldEdit` | :x: | :heavy_check_mark: |
|
||||||
|
| `apiaccess/userList` | :x: | :heavy_check_mark: |
|
||||||
|
|
||||||
|
|
||||||
### Добавлено
|
### Добавлено
|
||||||
|
|
||||||
|
#### apiaccess
|
||||||
|
| Идентификатор задачи | Описание |
|
||||||
|
| --- | --- |
|
||||||
|
| BGOS-1091 | Опциональное поле `UserID` в структуру запроса `ListRequest` в cloudbroker/apiaccess |
|
||||||
|
|
||||||
#### audit
|
#### audit
|
||||||
| Идентификатор задачи | Описание |
|
| Идентификатор задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-1072 | Вычисляемые поля `ResgroupID`, `AccountID`, `ComputeID`, `VINSID`, `ServiceID`, `K8SID`, `FLIPGroupID`, `LBID`, `SEPID`, `NodeIDs`, `DiskIDs` и `APITask` в структуру ответа `ItemAudit` в cloudapi/audit |
|
| BGOS-1088 | Опциональные поля `DiskID` и `VMFolderID` в структуру запроса `ListRequest` в cloudapi/audit |
|
||||||
| BGOS-1072 | Вычисляемые поля `ResgroupID`, `AccountID`, `ComputeID`, `VINSID`, `ServiceID`, `K8SID`, `FLIPGroupID`, `LBID`, `SEPID`, `NodeIDs`, `DiskIDs` и `APITask` в структуру ответа `ItemAudit` в cloudbroker/audit |
|
| BGOS-1088 | Опциональные поля `DiskID` и `VMFolderID` в структуру запроса `ListRequest` в cloudbroker/audit |
|
||||||
|
|
||||||
#### compute
|
|
||||||
| Идентификатор задачи | Описание |
|
|
||||||
| --- | --- |
|
|
||||||
| BGOS-1069 | Вычисляемое поле `FolderID` в структуры ответа `RecordCompute` и `ItemCompute` в cloudapi/compute |
|
|
||||||
| BGOS-1069 | Вычисляемое поле `FolderID` в структуры ответа `RecordCompute` и `InfoCompute` в cloudapi/compute |
|
|
||||||
| BGOS-1068 | Структуры ответа `MigrationReport`, `MigrationReportItem`, `AffinityRuleAddResult` и `AntiAffinityRuleAddResult` в cloudapi/compute |
|
|
||||||
| BGOS-1068 | Структуры ответа `MigrationReport`, `MigrationReportItem`, `AffinityRuleAddResult` и `AntiAffinityRuleAddResult` в cloudbroker/compute |
|
|
||||||
| BGOS-1063 | Структуры запроса `MigrateV2Request`, `MigrateV2AbortRequest`, `MigrateV2CleanupRequest`, `MigrateV2GetRequest`, `MigrateV2ListRequest` и `MigrateV2ResolveRequest` и методы `MigrateV2`, `MigrateV2Abort`, `MigrateV2Cleanup`, `MigrateV2Get`, `MigrateV2List` и `MigrateV2ResolveRequest` в cloudbroker/compute |
|
|
||||||
|
|
||||||
#### extnet
|
#### extnet
|
||||||
| Идентификатор задачи | Описание |
|
| Идентификатор задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-1073 | Вычисляемое поле `AutoAssignable` в структуру ответа `ItemReservation` в cloudapi/extnet |
|
| BGOS-1092 | Метод `EnableAsync` в cloudbroker/extnet |
|
||||||
| BGOS-1073 | Вычисляемые поля `AccountID` и `AutoAssignable` в структуру ответа `Excluded` в cloudapi/extnet |
|
|
||||||
| BGOS-1073 | Вычисляемое поле `AutoAssignable` в структуру ответа `ItemReservation` в cloudbroker/extnet |
|
|
||||||
|
|
||||||
#### grid
|
#### node
|
||||||
| Идентификатор задачи | Описание |
|
| Идентификатор задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-1074 | Вычисляемое поле `VMFoldersEnabled` в структуры ответа `RecordGrid` и `ItemGridList` в cloudbroker/grid |
|
| BGOS-1065 | Структура запроса `RemoveSSHIdentityRequest` и метод `RemoveSSHIdentity` в cloudbroker/node |
|
||||||
|
| BGOS-1101 | Вычисляемое поле `SharedLocks` в структуру ответа `ItemNode` в cloudbroker/node |
|
||||||
|
| BGOS-1086 | Вычисляемые поля `LinkState` и `LinkSpeed` в структуру ответа `ItemNicInfo` в cloudbroker/node |
|
||||||
|
|
||||||
#### kvmx86
|
#### vins
|
||||||
| Идентификатор задачи | Описание |
|
| Идентификатор задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-1067 | Опциональное поле `PCIdevices` в структуры запросов `CreateRequest` и `CreateBlankRequest` в cloudapi/kvmx86 |
|
| BGOS-1102 | Вычисляемое поле `EnableDefaultGateway` в структуры ответа `VNFsConfig` и `ItemInterface` в cloudbroker/vins |
|
||||||
| BGOS-1067 | Опциональное поле `PCIdevices` в структуры запросов `CreateRequest` и `CreateBlankRequest` в cloudbroker/kvmx86 |
|
| BGOS-1102 | Вычисляемое поле `EnableDefaultGateway` в структуры ответа `RecordDHCPConfig` и `ItemVNFInterface` в cloudapi/vins |
|
||||||
| BGOS-1081 | Опциональное поле `VGPUs` в структуры запросов `CreateRequest` и `CreateBlankRequest` в cloudapi/kvmx86 |
|
|
||||||
| BGOS-1081 | Опциональное поле `VGPUs` в структуры запросов `CreateRequest` и `CreateBlankRequest` в cloudbroker/kvmx86 |
|
#### user
|
||||||
|
| Идентификатор задачи | Описание |
|
||||||
|
| --- | --- |
|
||||||
|
| BGOS-1064 | Опциональное поле `ServiceAccount` в структуру запроса `CreateRequest` в clooudbroker/user |
|
||||||
|
| BGOS-1064 | Структура запроса `UpdateServiceAccountRequest` и метод `UpdateServiceAccount` в clooudbroker/user |
|
||||||
|
|
||||||
### Изменено
|
### Изменено
|
||||||
|
|
||||||
#### apiaccess
|
#### apiaccess
|
||||||
| Идентификатор задачи | Описание |
|
| Идентификатор задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-1082 | Тип поля `APIs` с опционального на обязательный в структуре запроса `UpdateRequest` в cloudbroker/apiaccess |
|
| BGOS-1091 | Тип вычисляемых полей `Account`, `APIAccess`, `AuditCollector`, `Backup`, `BackupCreator`, `BService`, `Compute`, `Disks`, `DPDKNet`, `Eco`, `ExtNet`, `FlIPgroup`, `Grid`, `Group`, `Health`, `Image`, `K8CI`, `K8S`, `KVMX86`, `LB`, `Metering`, `Milestones`, `PCIDevice`, `PGPU`, `Prometheus`, `RG`, `SecurityGroup`, `Sep`, `StoragePolicy`, `Tasks`, `TLock`, `Trunk`, `User`, `VFPool`, `VGPU`, `VINS`, `VMFolder`, `VNFDev`, `ZeroAccess` и `Zone` со `string` на `interface{}` в структуре ответа `CloudBrokerEndpoints` в cloudbroker/apiaccess |
|
||||||
|
|
||||||
#### compute
|
#### compute
|
||||||
| Идентификатор задачи | Описание |
|
| Идентификатор задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-1068 | Тип ответа метода `AffinityRuleAdd` с `bool` на структуру `AffinityRuleAddResult` в cloudapi/compute |
|
| BGOS-1089 | Значение по умолчанию поля `MemoryBalloonMode` с `auto` на `none` в структуре запроса `UpdateRequest` в cloudapi/compute |
|
||||||
| BGOS-1068 | Тип ответа метода `AffinityRuleAdd` с `bool` на структуру `AffinityRuleAddResult` в cloudbroker/compute |
|
| BGOS-1089 | Значение по умолчанию поля `MemoryBalloonMode` с `auto` на `none` в структуре запроса `UpdateRequest` в cloudbroker/compute |
|
||||||
| BGOS-1068 | Тип ответа метода `AntiAffinityRuleAdd` с `bool` на структуру `AntiAffinityRuleAddResult` в cloudapi/compute |
|
|
||||||
| BGOS-1068 | Тип ответа метода `AntiAffinityRuleAdd` с `bool` на структуру `AntiAffinityRuleAddResult` в cloudbroker/compute |
|
#### kvmx86
|
||||||
|
| Идентификатор задачи | Описание |
|
||||||
|
| --- | --- |
|
||||||
|
| BGOS-1089 | Значение по умолчанию поля `MemoryBalloonMode` с `auto` на `none` в структурах запроса `CreateRequest` и `CreateBlankRequest` в cloudapi/kvmx86 |
|
||||||
|
| BGOS-1089 | Значение по умолчанию поля `MemoryBalloonMode` с `auto` на `none` в структурах запроса `CreateRequest`, `CreateBlankRequest` и `MassCreateRequest` в cloudbroker/kvmx86 |
|
||||||
|
|
||||||
|
#### sep
|
||||||
|
| Идентификатор задачи | Описание |
|
||||||
|
| --- | --- |
|
||||||
|
| BGOS-1084 | Тэг `url` поля `AsyncMode` с `sync` на `async_mode` в структурах запроса `SharedLockStartRequest` и `SharedLockStopRequest` в cloudbroker/sep |
|
||||||
|
|
||||||
|
|
||||||
|
### Исправлено
|
||||||
|
|
||||||
|
#### session
|
||||||
|
| Идентификатор задачи | Описание |
|
||||||
|
| --- | --- |
|
||||||
|
| BGOS-1085 | Тип опционального поля `SID` с `uint64` на `string` в cloudbroker/session |
|
||||||
|
| BGOS-1085 | Тэг опционального поля `SortBy` с `sortBy` на `sort_by` в cloudbroker/session |
|
||||||
|
|
||||||
### Удалено
|
### Удалено
|
||||||
|
|
||||||
#### compute
|
#### node
|
||||||
| Идентификатор задачи | Описание |
|
| Идентификатор задачи | Описание |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| BGOS-1080 | Опциональное поле `AccountID` из структуры запроса `CreateTemplateFromBlankRequest` в cloudapi/compute |
|
| BGOS-1083 | Опциональное поле `Message` из структуры запроса `EnableRequest` в cloudbroker/node |
|
||||||
|
|
||||||
#### disks
|
|
||||||
| Идентификатор задачи | Описание |
|
|
||||||
| --- | --- |
|
|
||||||
| BGOS-1080 | Опциональное поле `AccountID` из структуры запроса `FromPlatformDiskRequest` в cloudapi/disks |
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ type ListVINSRequest struct {
|
|||||||
|
|
||||||
// Find by VINS ID
|
// Find by VINS ID
|
||||||
// Required: false
|
// Required: false
|
||||||
VINSID uint64 `url:"vins,omitempty" json:"vinsId,omitempty"`
|
VINSID uint64 `url:"vinsId,omitempty" json:"vinsId,omitempty"`
|
||||||
|
|
||||||
// Find by name
|
// Find by name
|
||||||
// Required: false
|
// Required: false
|
||||||
|
|||||||
@@ -63,6 +63,14 @@ type ListRequest struct {
|
|||||||
// Required: false
|
// Required: false
|
||||||
AccountID uint64 `url:"account_id,omitempty" json:"account_id,omitempty"`
|
AccountID uint64 `url:"account_id,omitempty" json:"account_id,omitempty"`
|
||||||
|
|
||||||
|
// Find by disk id
|
||||||
|
// Required: false
|
||||||
|
DiskID uint64 `url:"disk_id,omitempty" json:"disk_id,omitempty"`
|
||||||
|
|
||||||
|
// Find by vm folder id
|
||||||
|
// Required: false
|
||||||
|
VMFolderID uint64 `url:"vmfolder_id,omitempty" json:"vmfolder_id,omitempty"`
|
||||||
|
|
||||||
// Find by vins id
|
// Find by vins id
|
||||||
// Required: false
|
// Required: false
|
||||||
VINSID uint64 `url:"vins_id,omitempty" json:"vins_id,omitempty"`
|
VINSID uint64 `url:"vins_id,omitempty" json:"vins_id,omitempty"`
|
||||||
@@ -92,7 +100,7 @@ type ListRequest struct {
|
|||||||
ExcludeAuditLines bool `url:"exclude_audit_lines,omitempty" json:"exclude_audit_lines,omitempty"`
|
ExcludeAuditLines bool `url:"exclude_audit_lines,omitempty" json:"exclude_audit_lines,omitempty"`
|
||||||
|
|
||||||
// Public Session ID
|
// Public Session ID
|
||||||
PublicSessionID string `json:"public_session_id"`
|
PublicSessionID string `url:"public_session_id,omitempty" json:"public_session_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// List gets audit records for the specified account object
|
// List gets audit records for the specified account object
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ type UpdateRequest struct {
|
|||||||
|
|
||||||
// Memory balloon mode. One of ["auto","legacy","none"]
|
// Memory balloon mode. One of ["auto","legacy","none"]
|
||||||
// Required: false
|
// Required: false
|
||||||
// Default: "auto"
|
// Default: none
|
||||||
MemoryBalloonMode string `url:"memory_balloon_mode,omitempty" json:"memory_balloon_mode,omitempty" validate:"omitempty,memoryBalloonMode"`
|
MemoryBalloonMode string `url:"memory_balloon_mode,omitempty" json:"memory_balloon_mode,omitempty" validate:"omitempty,memoryBalloonMode"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ type CreateRequest struct {
|
|||||||
|
|
||||||
// Memory balloon mode. One of ["auto","legacy","none"]
|
// Memory balloon mode. One of ["auto","legacy","none"]
|
||||||
// Required: false
|
// Required: false
|
||||||
// Default: "auto"
|
// Default: none
|
||||||
MemoryBalloonMode string `url:"memory_balloon_mode,omitempty" json:"memory_balloon_mode,omitempty" validate:"omitempty,memoryBalloonMode"`
|
MemoryBalloonMode string `url:"memory_balloon_mode,omitempty" json:"memory_balloon_mode,omitempty" validate:"omitempty,memoryBalloonMode"`
|
||||||
|
|
||||||
// List of vGPU IDs to attach to the VM
|
// List of vGPU IDs to attach to the VM
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ type CreateBlankRequest struct {
|
|||||||
|
|
||||||
// Memory balloon mode. One of ["auto","legacy","none"]
|
// Memory balloon mode. One of ["auto","legacy","none"]
|
||||||
// Required: false
|
// Required: false
|
||||||
// Default: "auto"
|
// Default: none
|
||||||
MemoryBalloonMode string `url:"memory_balloon_mode,omitempty" json:"memory_balloon_mode,omitempty" validate:"omitempty,memoryBalloonMode"`
|
MemoryBalloonMode string `url:"memory_balloon_mode,omitempty" json:"memory_balloon_mode,omitempty" validate:"omitempty,memoryBalloonMode"`
|
||||||
|
|
||||||
// List of vGPU IDs to attach to the VM
|
// List of vGPU IDs to attach to the VM
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import (
|
|||||||
type SetDataRequest struct {
|
type SetDataRequest struct {
|
||||||
// Data to set to user in json format
|
// Data to set to user in json format
|
||||||
// Required: true
|
// Required: true
|
||||||
Data string `url:"data" json:"data" validation:"required"`
|
Data string `url:"data" json:"data" validate:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetData sets extra user information.
|
// SetData sets extra user information.
|
||||||
|
|||||||
@@ -340,6 +340,9 @@ type ItemVNFInterface struct {
|
|||||||
|
|
||||||
// List of VNF IDs
|
// List of VNF IDs
|
||||||
VNFs []uint64 `json:"vnfs"`
|
VNFs []uint64 `json:"vnfs"`
|
||||||
|
|
||||||
|
// Whether default gateway is enabled
|
||||||
|
EnableDefaultGateway bool `json:"enable_default_gateway"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Main information about QOS
|
// Main information about QOS
|
||||||
@@ -630,6 +633,9 @@ type RecordDHCPConfig struct {
|
|||||||
|
|
||||||
// List of reservations
|
// List of reservations
|
||||||
Reservations ListReservations `json:"reservations"`
|
Reservations ListReservations `json:"reservations"`
|
||||||
|
|
||||||
|
// Whether default gateway is enabled
|
||||||
|
EnableDefaultGateway bool `json:"enable_default_gateway"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// List of static routes
|
// List of static routes
|
||||||
|
|||||||
@@ -38,6 +38,10 @@ type ListRequest struct {
|
|||||||
// Required: false
|
// Required: false
|
||||||
SortBy string `url:"sort_by,omitempty" json:"sort_by,omitempty" validate:"omitempty,sortBy"`
|
SortBy string `url:"sort_by,omitempty" json:"sort_by,omitempty" validate:"omitempty,sortBy"`
|
||||||
|
|
||||||
|
// Filter by user ID
|
||||||
|
// Required: false
|
||||||
|
UserID string `url:"user_id,omitempty" json:"user_id,omitempty"`
|
||||||
|
|
||||||
// Page number
|
// Page number
|
||||||
// Required: false
|
// Required: false
|
||||||
Page uint64 `url:"page,omitempty" json:"page,omitempty"`
|
Page uint64 `url:"page,omitempty" json:"page,omitempty"`
|
||||||
|
|||||||
@@ -161,51 +161,51 @@ type CloudAPIEndpoints struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type CloudBrokerEndpoints struct {
|
type CloudBrokerEndpoints struct {
|
||||||
Account []string `json:"account,omitempty"`
|
Account interface{} `json:"account,omitempty"`
|
||||||
APIAccess []string `json:"apiaccess,omitempty"`
|
APIAccess interface{} `json:"apiaccess,omitempty"`
|
||||||
Audit interface{} `json:"audit,omitempty"`
|
Audit interface{} `json:"audit,omitempty"`
|
||||||
AuditBeat []string `json:"auditbeat,omitempty"`
|
AuditBeat []string `json:"auditbeat,omitempty"`
|
||||||
AuditCollector []string `json:"auditcollector,omitempty"`
|
AuditCollector interface{} `json:"auditcollector,omitempty"`
|
||||||
Backup []string `json:"backup,omitempty"`
|
Backup interface{} `json:"backup,omitempty"`
|
||||||
BackupCreator []string `json:"backupcreator,omitempty"`
|
BackupCreator interface{} `json:"backupcreator,omitempty"`
|
||||||
BService []string `json:"bservice,omitempty"`
|
BService interface{} `json:"bservice,omitempty"`
|
||||||
Compute []string `json:"compute,omitempty"`
|
Compute interface{} `json:"compute,omitempty"`
|
||||||
Disks []string `json:"disks,omitempty"`
|
Disks interface{} `json:"disks,omitempty"`
|
||||||
DPDKNet []string `json:"dpdknet,omitempty"`
|
DPDKNet interface{} `json:"dpdknet,omitempty"`
|
||||||
Eco []string `json:"eco,omitempty"`
|
Eco interface{} `json:"eco,omitempty"`
|
||||||
ExtNet []string `json:"extnet,omitempty"`
|
ExtNet interface{} `json:"extnet,omitempty"`
|
||||||
FlIPgroup []string `json:"flipgroup,omitempty"`
|
FlIPgroup interface{} `json:"flipgroup,omitempty"`
|
||||||
Grid []string `json:"grid,omitempty"`
|
Grid interface{} `json:"grid,omitempty"`
|
||||||
Group []string `json:"group,omitempty"`
|
Group interface{} `json:"group,omitempty"`
|
||||||
Health []string `json:"health,omitempty"`
|
Health interface{} `json:"health,omitempty"`
|
||||||
Image []string `json:"image,omitempty"`
|
Image interface{} `json:"image,omitempty"`
|
||||||
Job interface{} `json:"job,omitempty"`
|
Job interface{} `json:"job,omitempty"`
|
||||||
K8CI []string `json:"k8ci,omitempty"`
|
K8CI interface{} `json:"k8ci,omitempty"`
|
||||||
K8S []string `json:"k8s,omitempty"`
|
K8S interface{} `json:"k8s,omitempty"`
|
||||||
KVMX86 []string `json:"kvmx86,omitempty"`
|
KVMX86 interface{} `json:"kvmx86,omitempty"`
|
||||||
LB []string `json:"lb,omitempty"`
|
LB interface{} `json:"lb,omitempty"`
|
||||||
Metering []string `json:"metering,omitempty"`
|
Metering interface{} `json:"metering,omitempty"`
|
||||||
Milestones []string `json:"milestones,omitempty"`
|
Milestones interface{} `json:"milestones,omitempty"`
|
||||||
Node []string `json:"node,omitempty"`
|
Node []string `json:"node,omitempty"`
|
||||||
PCIDevice []string `json:"pcidevice,omitempty"`
|
PCIDevice interface{} `json:"pcidevice,omitempty"`
|
||||||
PGPU []string `json:"pgpu,omitempty"`
|
PGPU interface{} `json:"pgpu,omitempty"`
|
||||||
Prometheus []string `json:"prometheus,omitempty"`
|
Prometheus interface{} `json:"prometheus,omitempty"`
|
||||||
Resmon interface{} `json:"resmon,omitempty"`
|
Resmon interface{} `json:"resmon,omitempty"`
|
||||||
RG []string `json:"rg,omitempty"`
|
RG interface{} `json:"rg,omitempty"`
|
||||||
SecurityGroup []string `json:"security_group,omitempty"`
|
SecurityGroup interface{} `json:"security_group,omitempty"`
|
||||||
Sep []string `json:"sep,omitempty"`
|
Sep interface{} `json:"sep,omitempty"`
|
||||||
StoragePolicy []string `json:"storage_policy,omitempty"`
|
StoragePolicy interface{} `json:"storage_policy,omitempty"`
|
||||||
Tasks []string `json:"tasks,omitempty"`
|
Tasks interface{} `json:"tasks,omitempty"`
|
||||||
TLock []string `json:"tlock,omitempty"`
|
TLock interface{} `json:"tlock,omitempty"`
|
||||||
Trunk []string `json:"trunk,omitempty"`
|
Trunk interface{} `json:"trunk,omitempty"`
|
||||||
User []string `json:"user,omitempty"`
|
User interface{} `json:"user,omitempty"`
|
||||||
VFPool []string `json:"vfpool,omitempty"`
|
VFPool interface{} `json:"vfpool,omitempty"`
|
||||||
VGPU []string `json:"vgpu,omitempty"`
|
VGPU interface{} `json:"vgpu,omitempty"`
|
||||||
VINS []string `json:"vins,omitempty"`
|
VINS interface{} `json:"vins,omitempty"`
|
||||||
VMFolder []string `json:"vmfolder,omitempty"`
|
VMFolder interface{} `json:"vmfolder,omitempty"`
|
||||||
VNFDev []string `json:"vnfdev,omitempty"`
|
VNFDev interface{} `json:"vnfdev,omitempty"`
|
||||||
ZeroAccess []string `json:"zeroaccess,omitempty"`
|
ZeroAccess interface{} `json:"zeroaccess,omitempty"`
|
||||||
Zone []string `json:"zone,omitempty"`
|
Zone interface{} `json:"zone,omitempty"`
|
||||||
All bool `json:"ALL,omitempty"`
|
All bool `json:"ALL,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ type UserListRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// UserList gets a list of users currently included in the specified group.
|
// UserList gets a list of users currently included in the specified group.
|
||||||
|
//
|
||||||
|
// Deprecated: will be removed in SDK v1.17
|
||||||
func (a APIAccess) UserList(ctx context.Context, req UserListRequest) ([]string, error) {
|
func (a APIAccess) UserList(ctx context.Context, req UserListRequest) ([]string, error) {
|
||||||
err := validators.ValidateRequest(req)
|
err := validators.ValidateRequest(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -63,6 +63,14 @@ type ListRequest struct {
|
|||||||
// Required: false
|
// Required: false
|
||||||
AccountID uint64 `url:"account_id,omitempty" json:"account_id,omitempty"`
|
AccountID uint64 `url:"account_id,omitempty" json:"account_id,omitempty"`
|
||||||
|
|
||||||
|
// Find by disk id
|
||||||
|
// Required: false
|
||||||
|
DiskID uint64 `url:"disk_id,omitempty" json:"disk_id,omitempty"`
|
||||||
|
|
||||||
|
// Find by vm folder id
|
||||||
|
// Required: false
|
||||||
|
VMFolderID uint64 `url:"vmfolder_id,omitempty" json:"vmfolder_id,omitempty"`
|
||||||
|
|
||||||
// Find by vins id
|
// Find by vins id
|
||||||
// Required: false
|
// Required: false
|
||||||
VINSID uint64 `url:"vins_id,omitempty" json:"vins_id,omitempty"`
|
VINSID uint64 `url:"vins_id,omitempty" json:"vins_id,omitempty"`
|
||||||
@@ -96,7 +104,7 @@ type ListRequest struct {
|
|||||||
ExcludeAuditLines bool `url:"exclude_audit_lines,omitempty" json:"exclude_audit_lines,omitempty"`
|
ExcludeAuditLines bool `url:"exclude_audit_lines,omitempty" json:"exclude_audit_lines,omitempty"`
|
||||||
|
|
||||||
// Public Session ID
|
// Public Session ID
|
||||||
PublicSessionID string `json:"public_session_id"`
|
PublicSessionID string `url:"public_session_id,omitempty" json:"public_session_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// List gets audit records for the specified account object
|
// List gets audit records for the specified account object
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ type UpdateRequest struct {
|
|||||||
|
|
||||||
// Memory balloon mode. One of ["auto","legacy","none"]
|
// Memory balloon mode. One of ["auto","legacy","none"]
|
||||||
// Required: false
|
// Required: false
|
||||||
// Default: "auto"
|
// Default: none
|
||||||
MemoryBalloonMode string `url:"memory_balloon_mode,omitempty" json:"memory_balloon_mode,omitempty" validate:"omitempty,memoryBalloonMode"`
|
MemoryBalloonMode string `url:"memory_balloon_mode,omitempty" json:"memory_balloon_mode,omitempty" validate:"omitempty,memoryBalloonMode"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package extnet
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
@@ -15,6 +16,11 @@ type EnableRequest struct {
|
|||||||
NetID uint64 `url:"net_id" json:"net_id" validate:"required"`
|
NetID uint64 `url:"net_id" json:"net_id" validate:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type asyncWrapperEnableRequest struct {
|
||||||
|
EnableRequest
|
||||||
|
AsyncMode bool `url:"async_mode"`
|
||||||
|
}
|
||||||
|
|
||||||
// Enable enables external networks
|
// Enable enables external networks
|
||||||
func (e ExtNet) Enable(ctx context.Context, req EnableRequest) (bool, error) {
|
func (e ExtNet) Enable(ctx context.Context, req EnableRequest) (bool, error) {
|
||||||
err := validators.ValidateRequest(req)
|
err := validators.ValidateRequest(req)
|
||||||
@@ -24,7 +30,12 @@ func (e ExtNet) Enable(ctx context.Context, req EnableRequest) (bool, error) {
|
|||||||
|
|
||||||
url := "/cloudbroker/extnet/enable"
|
url := "/cloudbroker/extnet/enable"
|
||||||
|
|
||||||
res, err := e.client.DecortApiCall(ctx, http.MethodPost, url, req)
|
aReq := asyncWrapperEnableRequest{
|
||||||
|
EnableRequest: req,
|
||||||
|
AsyncMode: false,
|
||||||
|
}
|
||||||
|
|
||||||
|
res, err := e.client.DecortApiCall(ctx, http.MethodPost, url, aReq)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
@@ -36,3 +47,32 @@ func (e ExtNet) Enable(ctx context.Context, req EnableRequest) (bool, error) {
|
|||||||
|
|
||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// EnableAsync enables external networks in async mode
|
||||||
|
func (e ExtNet) EnableAsync(ctx context.Context, req EnableRequest) (string, error) {
|
||||||
|
err := validators.ValidateRequest(req)
|
||||||
|
if err != nil {
|
||||||
|
return "", validators.ValidationErrors(validators.GetErrors(err))
|
||||||
|
}
|
||||||
|
|
||||||
|
url := "/cloudbroker/extnet/enable"
|
||||||
|
|
||||||
|
aReq := asyncWrapperEnableRequest{
|
||||||
|
EnableRequest: req,
|
||||||
|
AsyncMode: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
res, err := e.client.DecortApiCall(ctx, http.MethodPost, url, aReq)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
var resp string
|
||||||
|
|
||||||
|
err = json.Unmarshal(res, &resp)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
return resp, nil
|
||||||
|
}
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ type CreateRequest struct {
|
|||||||
|
|
||||||
// Memory balloon mode. One of ["auto","legacy","none"]
|
// Memory balloon mode. One of ["auto","legacy","none"]
|
||||||
// Required: false
|
// Required: false
|
||||||
// Default: "auto"
|
// Default: none
|
||||||
MemoryBalloonMode string `url:"memory_balloon_mode,omitempty" json:"memory_balloon_mode,omitempty" validate:"omitempty,memoryBalloonMode"`
|
MemoryBalloonMode string `url:"memory_balloon_mode,omitempty" json:"memory_balloon_mode,omitempty" validate:"omitempty,memoryBalloonMode"`
|
||||||
|
|
||||||
// List of vGPU IDs to attach to the VM
|
// List of vGPU IDs to attach to the VM
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ type CreateBlankRequest struct {
|
|||||||
|
|
||||||
// Memory balloon mode. One of ["auto","legacy","none"]
|
// Memory balloon mode. One of ["auto","legacy","none"]
|
||||||
// Required: false
|
// Required: false
|
||||||
// Default: "auto"
|
// Default: none
|
||||||
MemoryBalloonMode string `url:"memory_balloon_mode,omitempty" json:"memory_balloon_mode,omitempty" validate:"omitempty,memoryBalloonMode"`
|
MemoryBalloonMode string `url:"memory_balloon_mode,omitempty" json:"memory_balloon_mode,omitempty" validate:"omitempty,memoryBalloonMode"`
|
||||||
|
|
||||||
// List of vGPU IDs to attach to the VM
|
// List of vGPU IDs to attach to the VM
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ type MassCreateRequest struct {
|
|||||||
|
|
||||||
// Memory balloon mode. One of ["auto","legacy","none"]
|
// Memory balloon mode. One of ["auto","legacy","none"]
|
||||||
// Required: false
|
// Required: false
|
||||||
// Default: "auto"
|
// Default: none
|
||||||
MemoryBalloonMode string `url:"memory_balloon_mode,omitempty" json:"memory_balloon_mode,omitempty" validate:"omitempty,memoryBalloonMode"`
|
MemoryBalloonMode string `url:"memory_balloon_mode,omitempty" json:"memory_balloon_mode,omitempty" validate:"omitempty,memoryBalloonMode"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ type EnableRequest struct {
|
|||||||
// Required: true
|
// Required: true
|
||||||
NID uint64 `url:"nid" json:"nid" validate:"required"`
|
NID uint64 `url:"nid" json:"nid" validate:"required"`
|
||||||
|
|
||||||
// Message
|
|
||||||
// Required: false
|
|
||||||
Message string `url:"message,omitempty" json:"message,omitempty"`
|
|
||||||
|
|
||||||
// Do not check locks, iscsi-sessions or disk-present
|
// Do not check locks, iscsi-sessions or disk-present
|
||||||
// Default: false
|
// Default: false
|
||||||
// Required: false
|
// Required: false
|
||||||
|
|||||||
@@ -340,6 +340,9 @@ type ItemNode struct {
|
|||||||
|
|
||||||
// PCI devices attached to the node
|
// PCI devices attached to the node
|
||||||
PCIDevices []ItemPCIDevice `json:"pci_devices"`
|
PCIDevices []ItemPCIDevice `json:"pci_devices"`
|
||||||
|
|
||||||
|
// Shared locks
|
||||||
|
SharedLocks map[string]interface{} `json:"shared_locks"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PackageInfo struct {
|
type PackageInfo struct {
|
||||||
@@ -429,6 +432,12 @@ type ItemNicInfo struct {
|
|||||||
|
|
||||||
// VFList
|
// VFList
|
||||||
VFList []interface{} `json:"vflist"`
|
VFList []interface{} `json:"vflist"`
|
||||||
|
|
||||||
|
// Link state
|
||||||
|
LinkState string `json:"linkState"`
|
||||||
|
|
||||||
|
// Link speed
|
||||||
|
LinkSpeed int64 `json:"linkSpeed"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ListNetAddr []ItemNetAddr
|
type ListNetAddr []ItemNetAddr
|
||||||
|
|||||||
42
pkg/cloudbroker/node/remove_ssh_identity.go
Normal file
42
pkg/cloudbroker/node/remove_ssh_identity.go
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
package node
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||||
|
)
|
||||||
|
|
||||||
|
// RemoveSSHIdentityRequest to remove an ssh identity from a node
|
||||||
|
type RemoveSSHIdentityRequest struct {
|
||||||
|
// Node ID
|
||||||
|
// Required: true
|
||||||
|
NodeID uint64 `url:"node_id" json:"node_id" validate:"required"`
|
||||||
|
|
||||||
|
// Key to remove
|
||||||
|
// Required: true
|
||||||
|
ClientPublicKey string `url:"client_public_key" json:"client_public_key" validate:"required"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// RemoveSSHIdentity removes an ssh identity from a node
|
||||||
|
func (n Node) RemoveSSHIdentity(ctx context.Context, req RemoveSSHIdentityRequest) (bool, error) {
|
||||||
|
err := validators.ValidateRequest(req)
|
||||||
|
if err != nil {
|
||||||
|
return false, validators.ValidationErrors(validators.GetErrors(err))
|
||||||
|
}
|
||||||
|
|
||||||
|
url := "/cloudbroker/node/remove_ssh_identity"
|
||||||
|
|
||||||
|
res, err := n.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
|
||||||
|
}
|
||||||
@@ -32,7 +32,7 @@ type SharedLockStartRequest struct {
|
|||||||
type wrapperSharedLockStartRequest struct {
|
type wrapperSharedLockStartRequest struct {
|
||||||
SharedLockStartRequest
|
SharedLockStartRequest
|
||||||
|
|
||||||
AsyncMode bool `url:"sync"`
|
AsyncMode bool `url:"async_mode"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SharedLockStart start shared locks without AsyncMode
|
// SharedLockStart start shared locks without AsyncMode
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ type SharedLockStopRequest struct {
|
|||||||
type wrapperSharedLockStopRequest struct {
|
type wrapperSharedLockStopRequest struct {
|
||||||
SharedLockStopRequest
|
SharedLockStopRequest
|
||||||
|
|
||||||
AsyncMode bool `url:"sync"`
|
AsyncMode bool `url:"async_mode"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SharedLockStop stop shared locks without AsyncMode
|
// SharedLockStop stop shared locks without AsyncMode
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ type ListRequest struct {
|
|||||||
Sub string `url:"sub,omitempty" json:"sub,omitempty"`
|
Sub string `url:"sub,omitempty" json:"sub,omitempty"`
|
||||||
|
|
||||||
// Filter by sid from JWT
|
// Filter by sid from JWT
|
||||||
SID uint64 `url:"sid,omitempty" json:"sid,omitempty"`
|
SID string `url:"sid,omitempty" json:"sid,omitempty"`
|
||||||
|
|
||||||
// Filter sessions with login_time >= timestamp (Unix timestamp)
|
// Filter sessions with login_time >= timestamp (Unix timestamp)
|
||||||
TimestampAt uint64 `url:"timestamp_at,omitempty" json:"timestamp_at,omitempty"`
|
TimestampAt uint64 `url:"timestamp_at,omitempty" json:"timestamp_at,omitempty"`
|
||||||
@@ -48,7 +48,7 @@ type ListRequest struct {
|
|||||||
|
|
||||||
// Sort by one of supported fields, format +|-(field)
|
// Sort by one of supported fields, format +|-(field)
|
||||||
// Required: false
|
// Required: false
|
||||||
SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty"`
|
SortBy string `url:"sort_by,omitempty" json:"sort_by,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// List gets list of sessions as a ListSession struct
|
// List gets list of sessions as a ListSession struct
|
||||||
|
|||||||
@@ -29,6 +29,11 @@ type CreateRequest struct {
|
|||||||
// one of: bvs, decs3o
|
// one of: bvs, decs3o
|
||||||
// Required: false
|
// Required: false
|
||||||
Provider string `url:"provider,omitempty" json:"provider,omitempty" validate:"omitempty,userProvider"`
|
Provider string `url:"provider,omitempty" json:"provider,omitempty" validate:"omitempty,userProvider"`
|
||||||
|
|
||||||
|
// Whether we create a service account
|
||||||
|
// Default value: false
|
||||||
|
// Required: false
|
||||||
|
ServiceAccount interface{} `url:"serviceaccount,omitempty" json:"serviceaccount,omitempty" validate:"omitempty,isBool"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create creates a user.
|
// Create creates a user.
|
||||||
|
|||||||
42
pkg/cloudbroker/user/update_service_account.go
Normal file
42
pkg/cloudbroker/user/update_service_account.go
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
package user
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||||
|
)
|
||||||
|
|
||||||
|
// UpdateServiceAccountRequest to update ServiceAccount field
|
||||||
|
type UpdateServiceAccountRequest struct {
|
||||||
|
// User ID
|
||||||
|
// Required: true
|
||||||
|
UserID string `url:"user_id" json:"user_id" validate:"required"`
|
||||||
|
|
||||||
|
// Whether the account is a service account
|
||||||
|
// Required: true
|
||||||
|
ServiceAccount interface{} `url:"serviceaccount" json:"serviceaccount" validate:"required,isBool"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateServiceAccount updates ServiceAccount field
|
||||||
|
func (u User) UpdateServiceAccount(ctx context.Context, req UpdateServiceAccountRequest) (bool, error) {
|
||||||
|
err := validators.ValidateRequest(req)
|
||||||
|
if err != nil {
|
||||||
|
return false, validators.ValidationErrors(validators.GetErrors(err))
|
||||||
|
}
|
||||||
|
|
||||||
|
url := "/cloudbroker/user/update_service_account"
|
||||||
|
|
||||||
|
res, err := u.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
|
||||||
|
}
|
||||||
@@ -184,6 +184,9 @@ type ItemInterface struct {
|
|||||||
|
|
||||||
// List of VNF IDs
|
// List of VNF IDs
|
||||||
VNFs []uint64 `json:"vnfs"`
|
VNFs []uint64 `json:"vnfs"`
|
||||||
|
|
||||||
|
// Whether default gateway is enabled
|
||||||
|
EnableDefaultGateway bool `json:"enable_default_gateway"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// List of interfaces
|
// List of interfaces
|
||||||
@@ -304,6 +307,9 @@ type VNFsConfig struct {
|
|||||||
|
|
||||||
// List of reservations
|
// List of reservations
|
||||||
Reservations ListReservations `json:"reservations"`
|
Reservations ListReservations `json:"reservations"`
|
||||||
|
|
||||||
|
// Whether default gateway is enabled
|
||||||
|
EnableDefaultGateway bool `json:"enable_default_gateway"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Primary
|
// Primary
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ import (
|
|||||||
type DelACLAccessRequest struct {
|
type DelACLAccessRequest struct {
|
||||||
// ID of a folder
|
// ID of a folder
|
||||||
// Required: true
|
// Required: true
|
||||||
FolderID uint64 `url:"folder_id" json:"folder_id"`
|
FolderID uint64 `url:"folder_id" json:"folder_id" validate:"required"`
|
||||||
|
|
||||||
// User or group name to revoke access from
|
// User or group name to revoke access from
|
||||||
// Required: true
|
// Required: true
|
||||||
User string `url:"user" json:"user"`
|
User string `url:"user" json:"user" validate:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteACLAccess deletes ACL access from a vm foler
|
// DeleteACLAccess deletes ACL access from a vm foler
|
||||||
|
|||||||
@@ -938,6 +938,7 @@ func getRequestsMapCloudbroker() map[string]interface{} {
|
|||||||
"/restmachine/cloudbroker/node/pci_device_driver_to_vfio": node_cb.PCIDeviceDriverToVFIORequest{},
|
"/restmachine/cloudbroker/node/pci_device_driver_to_vfio": node_cb.PCIDeviceDriverToVFIORequest{},
|
||||||
"/restmachine/cloudbroker/node/pci_device_driver_to_kernel": node_cb.PCIDeviceDriverToKernelRequest{},
|
"/restmachine/cloudbroker/node/pci_device_driver_to_kernel": node_cb.PCIDeviceDriverToKernelRequest{},
|
||||||
"/restmachine/cloudbroker/node/install": node_cb.InstallRequest{},
|
"/restmachine/cloudbroker/node/install": node_cb.InstallRequest{},
|
||||||
|
"/restmachine/cloudbroker/node/remove_ssh_identity": node_cb.RemoveSSHIdentityRequest{},
|
||||||
|
|
||||||
// pcidevice
|
// pcidevice
|
||||||
"/restmachine/cloudbroker/pcidevice/create": pcidevice_cb.CreateRequest{},
|
"/restmachine/cloudbroker/pcidevice/create": pcidevice_cb.CreateRequest{},
|
||||||
@@ -1097,6 +1098,7 @@ func getRequestsMapCloudbroker() map[string]interface{} {
|
|||||||
"/restmachine/cloudbroker/user/getMatchingUsernames": user_cb.GetMatchingUsernamesRequest{},
|
"/restmachine/cloudbroker/user/getMatchingUsernames": user_cb.GetMatchingUsernamesRequest{},
|
||||||
"/restmachine/cloudbroker/user/list": user_cb.ListRequest{},
|
"/restmachine/cloudbroker/user/list": user_cb.ListRequest{},
|
||||||
"/restmachine/cloudbroker/user/unblock": user_cb.UnblockRequest{},
|
"/restmachine/cloudbroker/user/unblock": user_cb.UnblockRequest{},
|
||||||
|
"/restmachine/cloudbroker/user/update_service_account": user_cb.UpdateServiceAccountRequest{},
|
||||||
|
|
||||||
// vfpool
|
// vfpool
|
||||||
"/restmachine/cloudbroker/vfpool/create": vfpool_cb.CreateRequest{},
|
"/restmachine/cloudbroker/vfpool/create": vfpool_cb.CreateRequest{},
|
||||||
|
|||||||
Reference in New Issue
Block a user