diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0aaf228..5fa98f4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,21 +1,68 @@
-## Version 1.12.10
+## Version 1.13.0
Методы `Audits` в cloudapi/compute, cloudbroker/compute, cloudapi/account, cloudbroker/account, cloudapi/vins, cloudbroker/vins, cloudapi/rg и cloudbroker/rg стали deprecated и в следующих версиях будут удалены, вместо них необходимо использовать метод `List` в cloudapi/audit и cloudbroker/audit с соответствующими фильтрами
-Метод `ListStacks` в cloudbroker/image стал deprecated и в следующих версиях будет удалён
+Метод `ListNodes` в cloudbroker/image стал deprecated и в следующих версиях будет удалён
Методы `AccessGrant`, `AccessGrantToPool`, `AccessRevoke`, `AccessRevokeToPool` в cloudbroker/sep стали deprecated и в следующих версиях будут удалены
+Методы `ComputeCISet`, `ComputeCIUnset`, `GetAudits` в cloudbroker/computeGetAudits и `GetAudits` в cloudbroker/compute стали deprecated и будут удалены в следующих версиях |
Все методы группы `.SDN()` находятся в альфа-версии.
### Добавлено
-#### ClientInterface
+#### kvmx86
| Идентификатор
задачи | Описание |
| --- | ---|
-| BGOS-673 | Добавлен mock для интерфейса ClientInterface с примерами |
+| BGOS-665 | Опциональные поля `HPBacked`, `CPUPin`, `NumaAffinity` в структуру запроса `CreateBlankRequest` в cloudapi/kvmx86 и cloudbroker/kvmx86 |
+
+#### node
+| Идентификатор
задачи | Описание |
+| --- | ---|
+| BGOS-664 | Методы `GetLogicalCoresCount`, `SetCpuAllocationRatio`, `SetMemAllocationRatio` и структуры `GetLogicalCoresCountRequest`,`SetCpuAllocationRatioRequest`,`SetMemAllocationRatioRequest` в cloudbroker/node|
+| BGOS-666 | Поля `OpenvSwitchBridges`, `Description`, `SDNHypervisorName` в структуру ответа `RecordNode` и поля `OpenvSwitchBridges`, `APIUrl`, `Drivers`, `OldCompatLVMID` в структуру ответа `ItemNode` в cloudbroker/node |
+| BGOS-676 | Поля `Flags`, `ModelName`, в структуру ответа `CpuInfo` и поля `CPUAllocationRatio`, `MemAllocationRatio`, `Packages` в структуру ответа `ItemNode` в cloudbroker/node |
+
+
+#### compute
+| Идентификатор
задачи | Описание |
+| --- | ---|
+| BGOS-675 | Метод `ChangeReadOnly` в cloudbroker/compute |
+| BGOS-675 | Поле `ReadOnly` в структуру `InfoCompute`, `RecordCompute`, `ItemCompute` в cloudbroker/compute и cloudapi/compute |
+
+### Изменено
+
+#### Общее
+| Идентификатор
задачи | Описание |
+| --- | --- |
+| BGOS-664 | StackID был заменен на NodeID |
+
+#### node
+| Идентификатор
задачи | Описание |
+| --- | ---|
+| BGOS-666 | Изменен json-тег поля `VCPU` на `vCPUs` в структуре `FreeResourcesInfo` в cloudbroker/node |
+
+#### account
+| Идентификатор
задачи | Описание |
+| --- | ---|
+| BGOS-667 | Валидатор `accountCUType` теперь допускает значения `CU_M`, `CU_C`, `CU_D`, `CU_DM`, `CU_I`, `gpu_units` |
+
+#### compute
+| Идентификатор
задачи | Описание |
+| --- | ---|
+| BGOS-683 | Изменен тип поля `StoragePolicyID` с required на optional в структурах запроса `RedeployRequest` в cloudapi/compute и cloudbroker/compute |
### Удалено
-#### logical ports
+#### account
+| Идентификатор
задачи | Описание |
+| --- | ---|
+| BGOS-667 | Поле `MaxNetworkPeerTransfer` из структур запросов `UpdateRequest` и `CreateRequest` в cloudapi/account и cloudbroker/account |
+
+#### rg
+| Идентификатор
задачи | Описание |
+| --- | ---|
+| BGOS-670 | Поля `MaxNetworkPeerTransfer` из структур запроса `CreateRequest` и `UpdateRequest`, поле `CUNP` из структуры`ResourceLimits` в cloudapi/rg и cloudbroker/rg |
+
+#### stack
| Идентификатор
задачи | Описание |
| --- | --- |
-| BGOS-668 | Поля `LogicalPortID` и `VersionID` в структуре запроса `CreateRequest` |
\ No newline at end of file
+| BGOS-664 | Удалена группа stack |
diff --git a/README.md b/README.md
index 0c4987e..f52096b 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,7 @@ Decort SDK - это библиотека, написанная на языке G
- Версия 1.10.х Decort-SDK соответствует 4.2.0 версии платформы
- Версия 1.11.х Decort-SDK соответствует 4.3.0 версии платформы
- Версия 1.12.х Decort-SDK соответствует 4.4.0 версии платформы
+ - Версия 1.13.х Decort-SDK соответствует 4.5.0 версии платформы
## Оглавление
@@ -125,7 +126,6 @@ go get -u repository.basistech.ru/BASIS/decort-golang-sdk
- `RG` - управление ресурсными группами аккаунта;
- `Security group` – управление группами безопасности;
- `SEP` - управление storage endpoint (sep);
-- `Stack` - получение информации о вычислительных узлах;
- `Storage policy` – получение информации о политиках хранения;
- `Tasks` - получение информации о ходе выполнения асинхронных задач (например, создание кластера);
- `Trunk` - получение информации о транковых портах;
@@ -162,7 +162,6 @@ go get -u repository.basistech.ru/BASIS/decort-golang-sdk
- `RG` - управление ресурсными группами аккаунта;
- `Security group` – управление группами безопасности;
- `SEP` - управление storage endpoint (sep);
-- `Stack` - получение информации о вычислительных узлах;
- `Storage policy` – управление политиками хранения;
- `Tasks` - получение информации о ходе выполнения асинхронных задач (например, создание кластера);
- `Trunk` - управление транковыми портами;
@@ -337,7 +336,6 @@ func main() {
- `pkg/cloudapi/rg` - для `RG`
- `pkg/cloudapi/secgroup` - для `Security group`
- `pkg/cloudapi/sep` - для `SEP`
- - `pkg/cloudapi/stack` - для `Stack`
- `pkg/cloudapi/stpolicy` - для `Storage policy`
- `pkg/cloudapi/tasks` - для `Tasks`
- `pkg/cloudapi/trunk` - для `Trunk`
@@ -369,7 +367,6 @@ func main() {
- `pkg/cloudbroker/rg` - для `RG`
- `pkg/cloudbroker/secgroup` - для `Security group`
- `pkg/cloudbroker/sep` - для `SEP`
- - `pkg/cloudbroker/stack` - для `Stack`
- `pkg/cloudbroker/stpolicy` - для `Storage policy`
- `pkg/cloudbroker/tasks` - для `Tasks`
- `pkg/cloudbroker/trunk` - для `Trunk`
@@ -466,9 +463,9 @@ type CreateRequest struct {
// Required: false
Start bool `url:"start,omitempty" json:"start,omitempty"`
- // Stack ID
+ // Node ID
// Required: false
- StackID uint64 `url:"stackId,omitempty" json:"stackId,omitempty"`
+ NodeID uint64 `url:"nodeId,omitempty" json:"nodeId,omitempty"`
// System name
// Required: false
@@ -545,7 +542,6 @@ func main() {
- `.RG()` - для работы с `RG`
- `.SecurityGroup()` - для работы с `Security Group`
- `.SEP()` - для работы с `SEP`
- - `.Stack()` - для работы с `Stack`
- `.StPolicy()` - для работы с `Storage Policy`
- `.Tasks()` - для работы с `Tasks`
- `.Trunk()` - для работы с `Trunk`
@@ -579,7 +575,6 @@ func main() {
- `.RG()` - для работы с `RG`
- `.SecurityGroup()` - для работы с `Security Group`
- `.SEP()` - для работы с `SEP`
- - `.Stack()` - для работы с `Stack`
- `.StPolicy()` - для работы с `Storage Policy`
- `.Tasks()` - для работы с `Tasks`
- `.Trunk()` - для работы с `Trunk`
diff --git a/internal/constants/constants.go b/internal/constants/constants.go
index bb7bb37..4f9dee5 100644
--- a/internal/constants/constants.go
+++ b/internal/constants/constants.go
@@ -28,6 +28,7 @@ var FileName = map[string]string{
var K8sValues = []string{"labels", "taints", "annotations, additionalSANs"}
var VersionMap = map[string]string{
+ "4.5.0": "-",
"4.4.0": "-",
"4.3.0": "-",
"4.2.0": "-",
diff --git a/internal/validators/values.go b/internal/validators/values.go
index f481329..ce30864 100644
--- a/internal/validators/values.go
+++ b/internal/validators/values.go
@@ -7,7 +7,7 @@ var (
resTypesValues = []string{"compute", "vins", "k8s", "openshift", "lb", "flipgroup"}
protoValues = []string{"tcp", "udp"}
- accountCUTypeValues = []string{"CU_M", "CU_C", "CU_D", "CU_DM", "CU_S", "CU_A", "CU_NO", "CU_I", "CU_NP"}
+ accountCUTypeValues = []string{"CU_M", "CU_C", "CU_D", "CU_DM", "CU_I", "gpu_units"}
bserviceModeValues = []string{"ABSOLUTE", "RELATIVE"}
diff --git a/pkg/cloudapi/account/get_consumed_cloud_units_by_type.go b/pkg/cloudapi/account/get_consumed_cloud_units_by_type.go
index 5280f38..ec81d5c 100644
--- a/pkg/cloudapi/account/get_consumed_cloud_units_by_type.go
+++ b/pkg/cloudapi/account/get_consumed_cloud_units_by_type.go
@@ -27,11 +27,8 @@ type GetConsumedCloudUnitsByTypeRequest struct {
// - CU_C: returns number of virtual cpu cores
// - CU_D: returns consumed virtual disk storage in GB
// - CU_DM: returns consumed max virtual disk storage in GB
-// - CU_S: returns consumed primary storage (NAS) in TB
-// - CU_A: returns consumed secondary storage (Archive) in TB
-// - CU_NO: returns sent/received network transfer in operator in GB
-// - CU_NP: returns sent/received network transfer peering in GB
// - CU_I: returns number of public IPs
+// - gpu_units: return number of GPU units
func (a Account) GetConsumedCloudUnitsByType(ctx context.Context, req GetConsumedCloudUnitsByTypeRequest) (float64, error) {
err := validators.ValidateRequest(req)
if err != nil {
diff --git a/pkg/cloudapi/account/update.go b/pkg/cloudapi/account/update.go
index efbecaa..850810e 100644
--- a/pkg/cloudapi/account/update.go
+++ b/pkg/cloudapi/account/update.go
@@ -34,10 +34,6 @@ type UpdateRequest struct {
// 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"`
diff --git a/pkg/cloudapi/bservice/group_add.go b/pkg/cloudapi/bservice/group_add.go
index 38ca0e8..4fdb80f 100644
--- a/pkg/cloudapi/bservice/group_add.go
+++ b/pkg/cloudapi/bservice/group_add.go
@@ -70,8 +70,9 @@ type GroupAddRequest struct {
// Required: false
UserData string `url:"userData,omitempty" json:"userData,omitempty"`
- //Chipset "i440fx" or "Q35
- //Required: false
+ // Chipset "i440fx" or "Q35
+ // Default value : Q35
+ // Required: false
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"chipset,omitempty"`
// ID of the chosen storage policy
diff --git a/pkg/cloudapi/bservice/group_resize.go b/pkg/cloudapi/bservice/group_resize.go
index 6d4e785..84657f9 100644
--- a/pkg/cloudapi/bservice/group_resize.go
+++ b/pkg/cloudapi/bservice/group_resize.go
@@ -22,10 +22,10 @@ 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 for new computes, either i440fx or Q35 (i440fx by default)
+ // Available values : i440fx, Q35
+ // Default value : Q35
+ // Required: true
Chipset string `url:"chipset" json:"chipset" validate:"required,chipset"`
// Either delta or absolute value of computes
diff --git a/pkg/cloudapi/bservice/models.go b/pkg/cloudapi/bservice/models.go
index f6a1769..e59041b 100644
--- a/pkg/cloudapi/bservice/models.go
+++ b/pkg/cloudapi/bservice/models.go
@@ -119,8 +119,8 @@ type ItemCompute struct {
// Resource group ID
RGID uint64 `json:"rgId"`
- // StackID
- StackID uint64 `json:"stackId"`
+ // NodeID
+ NodeID uint64 `json:"node_id"`
// Status
Status string `json:"status"`
diff --git a/pkg/cloudapi/compute/filter_test.go b/pkg/cloudapi/compute/filter_test.go
index 0afb05f..12a1ff6 100644
--- a/pkg/cloudapi/compute/filter_test.go
+++ b/pkg/cloudapi/compute/filter_test.go
@@ -62,7 +62,7 @@ var computes = ListComputes{
MigrationJob: 0,
Milestones: 363500,
Name: "test",
- PinnedToStack: true,
+ PinnedToNode: true,
RAM: 4096,
ReferenceID: "c7cb19ac-af4a-4067-852f-c5572949207e",
Registered: true,
@@ -126,7 +126,7 @@ var computes = ListComputes{
RAM: 4096,
ReferenceID: "a542c449-5b1c-4f90-88c5-7bb5f8ae68ff",
Registered: true,
- PinnedToStack: true,
+ PinnedToNode: true,
ResName: "compute-48556",
RGID: 79727,
RGName: "sdk_negative_fields_test",
diff --git a/pkg/cloudapi/compute/models.go b/pkg/cloudapi/compute/models.go
index 7847772..6b1b5b5 100644
--- a/pkg/cloudapi/compute/models.go
+++ b/pkg/cloudapi/compute/models.go
@@ -476,8 +476,8 @@ type RecordCompute struct {
// List OS Users
OSUsers ListOSUser `json:"osUsers"`
- // Pinned to stack
- PinnedToStack bool `json:"pinnedToStack"`
+ // Pinned to node
+ PinnedToNode bool `json:"pinnedToNode"`
// PreferredCPU
PreferredCPU []int64 `json:"preferredCpu"`
@@ -485,6 +485,9 @@ type RecordCompute struct {
// Qemu_quest
QemuQuest QemuQuest `json:"qemu_guest"`
+ // ReadOnly indicates read-only mode state
+ ReadOnly bool `json:"read_only"`
+
// Number of RAM
RAM uint64 `json:"ram"`
@@ -1151,8 +1154,8 @@ type ItemCompute struct {
//NumaNodeId
NumaNodeId int64 `json:"numaNodeId"`
- // Pinned to stack
- PinnedToStack bool `json:"pinnedToStack"`
+ // Pinned to node
+ PinnedToNode bool `json:"pinnedToNode"`
// PreferredCPU
PreferredCPU []int64 `json:"preferredCpu"`
@@ -1166,6 +1169,9 @@ type ItemCompute struct {
// Qemu_quest
QemuQuest QemuQuest `json:"qemu_guest"`
+ // ReadOnly indicates read-only mode state
+ ReadOnly bool `json:"read_only"`
+
// Reference ID
ReferenceID string `json:"referenceId"`
@@ -1331,8 +1337,8 @@ type ItemPCIDevice struct {
// Resource group ID
RGID uint64 `json:"rgId"`
- // Stack ID
- StackID uint64 `json:"stackId"`
+ // Node ID
+ NodeID uint64 `json:"nodeId"`
// Status
Status string `json:"status"`
diff --git a/pkg/cloudapi/compute/pin_to_stack.go b/pkg/cloudapi/compute/pin_to_node.go
similarity index 74%
rename from pkg/cloudapi/compute/pin_to_stack.go
rename to pkg/cloudapi/compute/pin_to_node.go
index 42ad7a0..6152976 100644
--- a/pkg/cloudapi/compute/pin_to_stack.go
+++ b/pkg/cloudapi/compute/pin_to_node.go
@@ -8,8 +8,8 @@ import (
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
)
-// PinToStackRequest struct to pin compute to stack
-type PinToStackRequest struct {
+// PinToNodeRequest struct to pin compute to node
+type PinToNodeRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"`
@@ -20,14 +20,14 @@ type PinToStackRequest struct {
AutoStart bool `url:"autoStart" json:"autoStart"`
}
-// PinToStack pin compute to current stack
-func (c Compute) PinToStack(ctx context.Context, req PinToStackRequest) (bool, error) {
+// PinToNode pin compute to current node
+func (c Compute) PinToNode(ctx context.Context, req PinToNodeRequest) (bool, error) {
err := validators.ValidateRequest(req)
if err != nil {
return false, validators.ValidationErrors(validators.GetErrors(err))
}
- url := "/cloudapi/compute/pinToStack"
+ url := "/cloudapi/compute/pin_to_node"
res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil {
diff --git a/pkg/cloudapi/compute/redeploy.go b/pkg/cloudapi/compute/redeploy.go
index d603d88..03e4169 100644
--- a/pkg/cloudapi/compute/redeploy.go
+++ b/pkg/cloudapi/compute/redeploy.go
@@ -16,12 +16,12 @@ type RedeployRequest struct {
// Storage policy id of compute. The rules of the specified storage policy will be used.
// Required: true
- StoragePolicyID uint64 `url:"storage_policy_id" json:"storage_policy_id" validate:"required"`
+ StoragePolicyID uint64 `url:"storage_policy_id,omitempty" json:"storage_policy_id,omitempty"`
// ID of the new OS image, if image change is required
// Required: false
ImageID uint64 `url:"imageId,omitempty" json:"imageId,omitempty"`
-
+
// The OS version that will be installed on the virtual machine
// Required: false
OSVersion string `url:"os_version,omitempty" json:"os_version,omitempty"`
diff --git a/pkg/cloudapi/compute/unpin_from_stack.go b/pkg/cloudapi/compute/unpin_from_node.go
similarity index 68%
rename from pkg/cloudapi/compute/unpin_from_stack.go
rename to pkg/cloudapi/compute/unpin_from_node.go
index 0bc3453..71635a3 100644
--- a/pkg/cloudapi/compute/unpin_from_stack.go
+++ b/pkg/cloudapi/compute/unpin_from_node.go
@@ -8,21 +8,21 @@ import (
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
)
-// UnpinFromStackRequest struct for unpin from stack
-type UnpinFromStackRequest struct {
+// UnpinFromNodeRequest struct for unpin from node
+type UnpinFromNodeRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"`
}
-// UnpinFromStack unpins compute from current stack
-func (c Compute) UnpinFromStack(ctx context.Context, req UnpinFromStackRequest) (bool, error) {
+// UnpinFromNode unpins compute from current node
+func (c Compute) UnpinFromNode(ctx context.Context, req UnpinFromNodeRequest) (bool, error) {
err := validators.ValidateRequest(req)
if err != nil {
return false, validators.ValidationErrors(validators.GetErrors(err))
}
- url := "/cloudapi/compute/unpinFromStack"
+ url := "/cloudapi/compute/unpin_from_node"
res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil {
diff --git a/pkg/cloudapi/k8s/create.go b/pkg/cloudapi/k8s/create.go
index 4e3f01f..a8e9a14 100644
--- a/pkg/cloudapi/k8s/create.go
+++ b/pkg/cloudapi/k8s/create.go
@@ -169,6 +169,7 @@ type CreateRequest struct {
// Type of the emulated system, Q35 or i440fx
// Required: false
+ // Default: Q35
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
// Zone ID
diff --git a/pkg/cloudapi/k8s/worker_add.go b/pkg/cloudapi/k8s/worker_add.go
index 636c564..64f5643 100644
--- a/pkg/cloudapi/k8s/worker_add.go
+++ b/pkg/cloudapi/k8s/worker_add.go
@@ -24,6 +24,7 @@ type WorkerAddRequest struct {
// Type of the emulated system, Q35 or i440fx
// Required: false
+ // Default: Q35
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
}
diff --git a/pkg/cloudapi/k8s/workers_group_add.go b/pkg/cloudapi/k8s/workers_group_add.go
index 31be135..b59c804 100644
--- a/pkg/cloudapi/k8s/workers_group_add.go
+++ b/pkg/cloudapi/k8s/workers_group_add.go
@@ -66,6 +66,7 @@ type WorkersGroupAddRequest struct {
// Type of the emulated system, Q35 or i440fx
// Required: false
+ // Default: Q35
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
}
diff --git a/pkg/cloudapi/kvmx86/create.go b/pkg/cloudapi/kvmx86/create.go
index f1eae25..7da150b 100644
--- a/pkg/cloudapi/kvmx86/create.go
+++ b/pkg/cloudapi/kvmx86/create.go
@@ -189,6 +189,7 @@ type CreateRequest struct {
// Type of the emulated system, Q35 or i440fx
// Required: false
+ // Default: Q35
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
// Use Huge Pages to allocate RAM of the virtual machine. The system must be pre-configured by allocating Huge Pages on the physical node
diff --git a/pkg/cloudapi/kvmx86/create_blank.go b/pkg/cloudapi/kvmx86/create_blank.go
index c935765..22e3596 100644
--- a/pkg/cloudapi/kvmx86/create_blank.go
+++ b/pkg/cloudapi/kvmx86/create_blank.go
@@ -63,8 +63,27 @@ type CreateBlankRequest struct {
// Type of the emulated system, Q35 or i440fx
// Required: false
+ // Default: Q35
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
+ // Use Huge Pages to allocate RAM of the virtual machine. The system must be pre-configured by allocating Huge Pages on the physical node
+ // Required: false
+ // Default: false
+ HPBacked bool `url:"hp_backed" json:"hp_backed"`
+
+ // Run VM on dedicated CPUs. To use this feature, the system must be pre-configured by allocating CPUs on the physical node
+ // Required: false
+ // Default: false
+ CPUPin bool `url:"cpu_pin" json:"cpu_pin"`
+
+ // Rule for VM placement with NUMA affinity.
+ // Possible values - none (placement without NUMA affinity),
+ // strict (strictly with NUMA affinity, if not possible - do not start VM),
+ // loose (use NUMA affinity if possible)
+ // Required: false
+ // Default: none
+ NumaAffinity string `url:"numa_affinity,omitempty" json:"numa_affinity,omitempty" validate:"omitempty,numaAffinity"`
+
// Text description of this VM
// Required: false
Description string `url:"desc,omitempty" json:"desc,omitempty"`
diff --git a/pkg/cloudapi/pcidevice/models.go b/pkg/cloudapi/pcidevice/models.go
index 0a125b0..61c8a83 100644
--- a/pkg/cloudapi/pcidevice/models.go
+++ b/pkg/cloudapi/pcidevice/models.go
@@ -29,8 +29,8 @@ type ItemPCIDevice struct {
// Resource group ID
RGID uint64 `json:"rgId"`
- // Stack ID
- StackID uint64 `json:"stackId"`
+ // Node ID
+ NodeID uint64 `json:"nodeId"`
// Status
Status string `json:"status"`
@@ -47,4 +47,3 @@ type ListPCIDevices struct {
// Entry count
EntryCount uint64 `json:"entryCount"`
}
-
diff --git a/pkg/cloudapi/rg/create.go b/pkg/cloudapi/rg/create.go
index d98fa07..4801ab1 100644
--- a/pkg/cloudapi/rg/create.go
+++ b/pkg/cloudapi/rg/create.go
@@ -39,10 +39,6 @@ type CreateRequest struct {
// 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"`
diff --git a/pkg/cloudapi/rg/filter_test.go b/pkg/cloudapi/rg/filter_test.go
index a97dad2..0514891 100644
--- a/pkg/cloudapi/rg/filter_test.go
+++ b/pkg/cloudapi/rg/filter_test.go
@@ -34,7 +34,6 @@ var rgs = ListResourceGroups{
CUC: -1,
CUI: -1,
CUM: -1,
- CUNP: -1,
GPUUnits: -1,
},
Secret: "",
@@ -76,7 +75,6 @@ var rgs = ListResourceGroups{
CUC: -1,
CUI: -1,
CUM: -1,
- CUNP: -1,
GPUUnits: -1,
},
Secret: "",
@@ -118,7 +116,6 @@ var rgs = ListResourceGroups{
CUC: -1,
CUI: -1,
CUM: -1,
- CUNP: -1,
GPUUnits: -1,
},
Secret: "",
diff --git a/pkg/cloudapi/rg/models.go b/pkg/cloudapi/rg/models.go
index ce81b38..9313438 100644
--- a/pkg/cloudapi/rg/models.go
+++ b/pkg/cloudapi/rg/models.go
@@ -309,9 +309,6 @@ type ResourceLimits struct {
// CUM
CUM float64 `json:"CU_M"`
- // CUNP
- CUNP float64 `json:"CU_NP"`
-
// GPU units
GPUUnits float64 `json:"gpu_units"`
diff --git a/pkg/cloudapi/rg/update.go b/pkg/cloudapi/rg/update.go
index 79ab888..6d1d5bf 100644
--- a/pkg/cloudapi/rg/update.go
+++ b/pkg/cloudapi/rg/update.go
@@ -35,10 +35,6 @@ type UpdateRequest struct {
// 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"`
diff --git a/pkg/cloudapi/secgroup/security_group.go b/pkg/cloudapi/secgroup/security_group.go
index 3505ecd..2b94a64 100644
--- a/pkg/cloudapi/secgroup/security_group.go
+++ b/pkg/cloudapi/secgroup/security_group.go
@@ -7,7 +7,7 @@ type SecurityGroup struct {
client interfaces.Caller
}
-// Builder for stack endpoint
+// Builder for security policy endpoint
func New(client interfaces.Caller) *SecurityGroup {
return &SecurityGroup{
client: client,
diff --git a/pkg/cloudapi/stack.go b/pkg/cloudapi/stack.go
deleted file mode 100644
index 2beabc4..0000000
--- a/pkg/cloudapi/stack.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package cloudapi
-
-import (
- "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/stack"
-)
-
-// Accessing the Stack method group
-func (ca *CloudAPI) Stack() *stack.Stack {
- return stack.New(ca.client)
-}
diff --git a/pkg/cloudapi/stack/get.go b/pkg/cloudapi/stack/get.go
deleted file mode 100644
index d257dcc..0000000
--- a/pkg/cloudapi/stack/get.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package stack
-
-import (
- "context"
- "encoding/json"
- "net/http"
-
- "repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
-)
-
-// GetRequest struct to get info of stack
-type GetRequest struct {
- // Find by ID
- // Required: true
- StackId uint64 `url:"stackId" json:"stackId" validate:"required"`
-}
-
-// Get gets stack details by ID as an InfoStack struct
-func (i Stack) Get(ctx context.Context, req GetRequest) (*InfoStack, error) {
- res, err := i.GetRaw(ctx, req)
- if err != nil {
- return nil, err
- }
-
- info := InfoStack{}
-
- err = json.Unmarshal(res, &info)
- if err != nil {
- return nil, err
- }
-
- return &info, nil
-}
-
-// GetRaw gets stack details by ID as an array of bytes
-func (i Stack) GetRaw(ctx context.Context, req GetRequest) ([]byte, error) {
- err := validators.ValidateRequest(req)
- if err != nil {
- return nil, validators.ValidationErrors(validators.GetErrors(err))
- }
-
- url := "/cloudapi/stack/get"
-
- res, err := i.client.DecortApiCall(ctx, http.MethodPost, url, req)
- return res, err
-}
diff --git a/pkg/cloudapi/stack/ids.go b/pkg/cloudapi/stack/ids.go
deleted file mode 100644
index 0a6cc9d..0000000
--- a/pkg/cloudapi/stack/ids.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package stack
-
-// IDs gets array of StackIDs from ListStacks struct
-func (ls ListStacks) IDs() []uint64 {
- res := make([]uint64, 0, len(ls.Data))
- for _, s := range ls.Data {
- res = append(res, s.ID)
- }
- return res
-}
diff --git a/pkg/cloudapi/stack/list.go b/pkg/cloudapi/stack/list.go
deleted file mode 100644
index 987e58f..0000000
--- a/pkg/cloudapi/stack/list.go
+++ /dev/null
@@ -1,71 +0,0 @@
-package stack
-
-import (
- "context"
- "encoding/json"
- "net/http"
-
- "repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
-)
-
-// ListRequest struct to get list of stacks
-type ListRequest struct {
- // Find by ID
- // Required: false
- ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`
-
- // Find by name
- // Required: false
- Name string `url:"name,omitempty" json:"name,omitempty"`
-
- // Find by type
- // Required: false
- Type string `url:"type,omitempty" json:"type,omitempty"`
-
- // Find by status
- // Required: false
- Status string `url:"status,omitempty" json:"status,omitempty"`
-
- // Sort by one of supported fields, format +|-(field)
- // 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"`
-
- // Page size
- // Required: false
- Size uint64 `url:"size,omitempty" json:"size,omitempty"`
-}
-
-// List gets list of stacks as a ListStacks struct
-func (i Stack) List(ctx context.Context, req ListRequest) (*ListStacks, error) {
-
- res, err := i.ListRaw(ctx, req)
- if err != nil {
- return nil, err
- }
-
- list := ListStacks{}
-
- err = json.Unmarshal(res, &list)
- if err != nil {
- return nil, err
- }
-
- return &list, nil
-}
-
-// ListRaw gets list of stacks as an array of bytes
-func (i Stack) ListRaw(ctx context.Context, req ListRequest) ([]byte, error) {
-
- if err := validators.ValidateRequest(req); err != nil {
- return nil, validators.ValidationErrors(validators.GetErrors(err))
- }
-
- url := "/cloudapi/stack/list"
-
- res, err := i.client.DecortApiCall(ctx, http.MethodPost, url, req)
- return res, err
-}
diff --git a/pkg/cloudapi/stack/models.go b/pkg/cloudapi/stack/models.go
deleted file mode 100644
index 895344d..0000000
--- a/pkg/cloudapi/stack/models.go
+++ /dev/null
@@ -1,53 +0,0 @@
-package stack
-
-// Main information about stack
-type InfoStack struct {
- // CPU allocation ratio
- CPUAllocationRatio float64 `json:"cpu_allocation_ratio"`
-
- // Descr
- Descr string `json:"descr"`
-
- // Drivers
- Drivers []string `json:"drivers"`
-
- // ID
- ID uint64 `json:"id"`
-
- // Mem allocation ratio
- MemAllocationRatio float64 `json:"mem_allocation_ratio"`
-
- // Name
- Name string `json:"name"`
-
- // Status
- Status string `json:"status"`
-
- // Type
- Type string `json:"type"`
-}
-
-// Information about stack in list
-type ItemStack struct {
- // ID
- ID uint64 `json:"id"`
-
- // Name
- Name string `json:"name"`
-
- // Status
- Status string `json:"status"`
-
- // Type
- Type string `json:"type"`
-}
-
-// List of stacks
-type ListStacks struct {
-
- //List
- Data []ItemStack `json:"data"`
-
- //Entry count
- EntryCount uint64 `json:"entryCount"`
-}
diff --git a/pkg/cloudapi/stack/stack.go b/pkg/cloudapi/stack/stack.go
deleted file mode 100644
index 94c5d89..0000000
--- a/pkg/cloudapi/stack/stack.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Lists all the stack.
-package stack
-
-import "repository.basistech.ru/BASIS/decort-golang-sdk/interfaces"
-
-// Structure for creating request to stack
-type Stack struct {
- client interfaces.Caller
-}
-
-// Builder for stack endpoint
-func New(client interfaces.Caller) *Stack {
- return &Stack{
- client: client,
- }
-}
diff --git a/pkg/cloudapi/stpolicy/storage_policy.go b/pkg/cloudapi/stpolicy/storage_policy.go
index 6b6d61f..74d3ac5 100644
--- a/pkg/cloudapi/stpolicy/storage_policy.go
+++ b/pkg/cloudapi/stpolicy/storage_policy.go
@@ -7,7 +7,7 @@ type StPolicy struct {
client interfaces.Caller
}
-// Builder for stack endpoint
+// Builder for storage policy endpoint
func New(client interfaces.Caller) *StPolicy {
return &StPolicy{
client: client,
diff --git a/pkg/cloudapi/vins/models.go b/pkg/cloudapi/vins/models.go
index 9818c3a..2c48ca3 100644
--- a/pkg/cloudapi/vins/models.go
+++ b/pkg/cloudapi/vins/models.go
@@ -251,8 +251,8 @@ type RecordResources struct {
// Number of RAM
RAM uint64 `json:"ram"`
- // Stack ID
- StackID uint64 `json:"stackId"`
+ // Node ID
+ NodeID uint64 `json:"node_id"`
// UUID
UUID string `json:"uuid"`
diff --git a/pkg/cloudbroker/account/create.go b/pkg/cloudbroker/account/create.go
index a45cc3e..23551fc 100644
--- a/pkg/cloudbroker/account/create.go
+++ b/pkg/cloudbroker/account/create.go
@@ -43,10 +43,6 @@ type CreateRequest struct {
// 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"`
diff --git a/pkg/cloudbroker/account/update.go b/pkg/cloudbroker/account/update.go
index afe8843..b7e4f50 100644
--- a/pkg/cloudbroker/account/update.go
+++ b/pkg/cloudbroker/account/update.go
@@ -35,10 +35,6 @@ type UpdateRequest struct {
// 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"`
diff --git a/pkg/cloudbroker/apiaccess/models.go b/pkg/cloudbroker/apiaccess/models.go
index 4814f1e..61a1d84 100644
--- a/pkg/cloudbroker/apiaccess/models.go
+++ b/pkg/cloudbroker/apiaccess/models.go
@@ -158,7 +158,6 @@ type CloudBrokerEndpoints struct {
Machine []string `json:"machine,omitempty"`
Metering []string `json:"metering,omitempty"`
Milestones []string `json:"milestones,omitempty"`
- Node []string `json:"node,omitempty"`
Openshift []string `json:"openshift,omitempty"`
OpenshiftCI []string `json:"openshiftci,omitempty"`
Ovsnode []string `json:"ovsnode,omitempty"`
@@ -169,7 +168,7 @@ type CloudBrokerEndpoints struct {
Resmon interface{} `json:"resmon,omitempty"`
RG []string `json:"rg,omitempty"`
Sep []string `json:"sep,omitempty"`
- Stack []string `json:"stack,omitempty"`
+ Node []string `json:"node,omitempty"`
Tasks []string `json:"tasks,omitempty"`
TLock []string `json:"tlock,omitempty"`
User []string `json:"user,omitempty"`
diff --git a/pkg/cloudbroker/audit.go b/pkg/cloudbroker/audit.go
index cec4931..5b91793 100644
--- a/pkg/cloudbroker/audit.go
+++ b/pkg/cloudbroker/audit.go
@@ -4,7 +4,7 @@ import (
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/audit"
)
-// Accessing the Stack method group
+// Accessing the Audit method group
func (cb *CloudBroker) Audit() *audit.Audit {
return audit.New(cb.client)
}
diff --git a/pkg/cloudbroker/bservice/group_add.go b/pkg/cloudbroker/bservice/group_add.go
index c3e59c9..4f85c68 100644
--- a/pkg/cloudbroker/bservice/group_add.go
+++ b/pkg/cloudbroker/bservice/group_add.go
@@ -70,8 +70,9 @@ type GroupAddRequest struct {
// Required: false
UserData string `url:"userData,omitempty" json:"userData,omitempty"`
- //Chipset "i440fx" or "Q35
- //Required: false
+ // Chipset "i440fx" or "Q35
+ // Default value : Q35
+ // Required: false
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"chipset"`
// ID of the chosen storage policy
diff --git a/pkg/cloudbroker/bservice/group_resize.go b/pkg/cloudbroker/bservice/group_resize.go
index e266bd2..c7fa9ea 100644
--- a/pkg/cloudbroker/bservice/group_resize.go
+++ b/pkg/cloudbroker/bservice/group_resize.go
@@ -24,7 +24,7 @@ type GroupResizeRequest struct {
//Chipset for new computes, either i440fx or Q35 (i440fx by default)
//Available values : i440fx, Q35
- //Default value : i440fx
+ //Default value : Q35
//Required: true
Chipset string `url:"chipset" json:"chipset" validate:"required,chipset"`
diff --git a/pkg/cloudbroker/bservice/models.go b/pkg/cloudbroker/bservice/models.go
index 3790f99..49903b3 100644
--- a/pkg/cloudbroker/bservice/models.go
+++ b/pkg/cloudbroker/bservice/models.go
@@ -146,8 +146,8 @@ type ItemCompute struct {
// Resource group ID
RGID uint64 `json:"rgId"`
- // StackID
- StackID uint64 `json:"stackId"`
+ // NodeID
+ NodeID uint64 `json:"node_id"`
// Status
Status string `json:"status"`
diff --git a/pkg/cloudbroker/compute/change_read_only.go b/pkg/cloudbroker/compute/change_read_only.go
new file mode 100644
index 0000000..6fdef83
--- /dev/null
+++ b/pkg/cloudbroker/compute/change_read_only.go
@@ -0,0 +1,41 @@
+package compute
+
+import (
+ "context"
+ "net/http"
+ "strconv"
+
+ "repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
+)
+
+// ChangeReadOnlyRequest defines parameters for toggling read-only mode.
+type ChangeReadOnlyRequest struct {
+ // Compute ID
+ // Required: true
+ ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"`
+
+ // ReadOnly indicates whether the read-only mode is enabled
+ // Required: true
+ ReadOnly bool `url:"read_only" json:"read_only" validate:"required"`
+}
+
+// ChangeReadOnly toggles compute read-only mode.
+func (c Compute) ChangeReadOnly(ctx context.Context, req ChangeReadOnlyRequest) (bool, error) {
+ if err := validators.ValidateRequest(req); err != nil {
+ return false, validators.ValidationErrors(validators.GetErrors(err))
+ }
+
+ url := "/cloudbroker/compute/change_read_only"
+
+ 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
+}
diff --git a/pkg/cloudbroker/compute/filter_test.go b/pkg/cloudbroker/compute/filter_test.go
index 10a9a4f..7116ef6 100644
--- a/pkg/cloudbroker/compute/filter_test.go
+++ b/pkg/cloudbroker/compute/filter_test.go
@@ -65,7 +65,7 @@ var computes = ListComputes{
MigrationJob: 0,
Milestones: 363500,
Name: "test",
- PinnedToStack: 1,
+ PinnedToNode: 1,
RAM: 4096,
ReferenceID: "c7cb19ac-af4a-4067-852f-c5572949207e",
Registered: true,
@@ -127,7 +127,7 @@ var computes = ListComputes{
MigrationJob: 0,
Milestones: 363853,
Name: "compute_2",
- PinnedToStack: 1,
+ PinnedToNode: 1,
RAM: 4096,
ReferenceID: "a542c449-5b1c-4f90-88c5-7bb5f8ae68ff",
Registered: true,
diff --git a/pkg/cloudbroker/compute/list.go b/pkg/cloudbroker/compute/list.go
index ba1a98f..fab1eec 100644
--- a/pkg/cloudbroker/compute/list.go
+++ b/pkg/cloudbroker/compute/list.go
@@ -42,17 +42,17 @@ type ListRequest struct {
// Required: false
IPAddress string `url:"ipAddress,omitempty" json:"ipAddress,omitempty"`
- // Find by stack ID
+ // Find by node ID
// Required: false
- StackID uint64 `url:"stackId,omitempty" json:"stackId,omitempty"`
+ NodeID uint64 `url:"node_id,omitempty" json:"node_id,omitempty"`
// Find by CD image ID
// Required: false
CDImageID uint64 `url:"cdImageId,omitempty" json:"cdImageId,omitempty"`
- // Find by stack name
+ // Find by node name
// Required: false
- StackName string `url:"stackName,omitempty" json:"stackName,omitempty"`
+ NodeName string `url:"nodeName,omitempty" json:"nodeName,omitempty"`
// Find by external network name
// Required: false
diff --git a/pkg/cloudbroker/compute/migrate.go b/pkg/cloudbroker/compute/migrate.go
index 42e521e..500513e 100644
--- a/pkg/cloudbroker/compute/migrate.go
+++ b/pkg/cloudbroker/compute/migrate.go
@@ -15,9 +15,9 @@ type MigrateRequest struct {
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"`
- // Particular Stack ID to migrate this compute to
+ // Particular Node ID to migrate this compute to
// Required: false
- TargetStackID uint64 `url:"targetStackId,omitempty" json:"targetStackId,omitempty"`
+ TargetNodeID uint64 `url:"targetNodeId,omitempty" json:"targetNodeId,omitempty"`
// If live migration fails, destroy compute
// on source node and recreate on the target
@@ -30,7 +30,7 @@ type AsyncWrapperMigrateRequest struct {
SyncMode bool `url:"sync"`
}
-// Migrate migrates compute to another stack
+// Migrate migrates compute to another node
func (c Compute) Migrate(ctx context.Context, req MigrateRequest) (bool, error) {
err := validators.ValidateRequest(req)
if err != nil {
@@ -54,7 +54,7 @@ func (c Compute) Migrate(ctx context.Context, req MigrateRequest) (bool, error)
return result, nil
}
-// AsyncMigrate migrates compute to another stack in async mode
+// AsyncMigrate migrates compute to another node in async mode
func (c Compute) AsyncMigrate(ctx context.Context, req MigrateRequest) (string, error) {
err := validators.ValidateRequest(req)
if err != nil {
diff --git a/pkg/cloudbroker/compute/migrate_storage.go b/pkg/cloudbroker/compute/migrate_storage.go
index 712920f..1fb09d0 100644
--- a/pkg/cloudbroker/compute/migrate_storage.go
+++ b/pkg/cloudbroker/compute/migrate_storage.go
@@ -22,9 +22,9 @@ type MigrateStorageRequest struct {
// Required: true
PoolName string `url:"poolName" json:"poolName" validate:"required"`
- // Target stack ID
+ // Target node ID
// Required: true
- StackID uint64 `url:"stackId" json:"stackId" validate:"required"`
+ NodeID uint64 `url:"node_id" json:"node_id" validate:"required"`
// Async API call
// Required: true
@@ -32,7 +32,7 @@ type MigrateStorageRequest struct {
}
// MigrateStorage gets complex compute migration
-// Compute will be migrated to specified stack, and compute disks will
+// Compute will be migrated to specified node, and compute disks will
// be migrated to specified SEP to specified pool.
// This action can take up to 84 hours
func (c Compute) MigrateStorage(ctx context.Context, req MigrateStorageRequest) (string, error) {
diff --git a/pkg/cloudbroker/compute/models.go b/pkg/cloudbroker/compute/models.go
index fd83f21..d7395a8 100644
--- a/pkg/cloudbroker/compute/models.go
+++ b/pkg/cloudbroker/compute/models.go
@@ -804,8 +804,8 @@ type InfoCompute struct {
// Name of OS
OSVersion string `json:"os_version"`
- // Pinned to stack
- PinnedToStack int64 `json:"pinnedToStack"`
+ // Pinned to node
+ PinnedToNode int64 `json:"pinnedToNode"`
// PreferredCPU
PreferredCPU []int64 `json:"preferredCpu"`
@@ -813,6 +813,9 @@ type InfoCompute struct {
// Qemu_quest
QemuQuest QemuQuest `json:"qemu_guest"`
+ // ReadOnly indicates read-only mode state
+ ReadOnly bool `json:"read_only"`
+
// Number of RAM
RAM uint64 `json:"ram"`
@@ -837,11 +840,11 @@ type InfoCompute struct {
// SnapSets
SnapSets ListSnapshots `json:"snapSets"`
- // Stack ID
- StackID uint64 `json:"stackId"`
+ // Node ID
+ NodeID uint64 `json:"nodeId"`
- // Stack name
- StackName string `json:"stackName"`
+ // Node name
+ NodeName string `json:"nodeName"`
// Stateless SEP ID
StatelessSEPID int64 `json:"statelessSepId"`
@@ -1055,9 +1058,6 @@ type RecordCompute struct {
// Name
Name string `json:"name"`
- // Node ID
- NodeID uint64 `json:"nodeId"`
-
// Natable VINS ID
NatableVINSID uint64 `json:"natableVinsId"`
@@ -1091,8 +1091,8 @@ type RecordCompute struct {
// Name of OS
OSVersion string `json:"os_version"`
- // Pinned to stack
- PinnedToStack int64 `json:"pinnedToStack"`
+ // Pinned to node
+ PinnedToNode int64 `json:"pinnedToNode"`
// PreferredCPU
PreferredCPU []int64 `json:"preferredCpu"`
@@ -1100,6 +1100,9 @@ type RecordCompute struct {
// Qemu_quest
QemuQuest QemuQuest `json:"qemu_guest"`
+ // ReadOnly indicates read-only mode state
+ ReadOnly bool `json:"read_only"`
+
// Number of RAM
RAM uint64 `json:"ram"`
@@ -1124,11 +1127,11 @@ type RecordCompute struct {
// SnapSets
SnapSets ListSnapshots `json:"snapSets"`
- // Stack ID
- StackID uint64 `json:"stackId"`
+ // Node ID
+ NodeID uint64 `json:"node_id"`
- // Stack name
- StackName string `json:"stackName"`
+ // Node name
+ NodeName string `json:"nodeName"`
// Stateless SEP ID
StatelessSEPID int64 `json:"statelessSepId"`
@@ -1338,8 +1341,8 @@ type ItemPCIDevice struct {
// Resource group ID
RGID uint64 `json:"rgId"`
- // Stack ID
- StackID uint64 `json:"stackId"`
+ // Node ID
+ NodeID uint64 `json:"nodeId"`
// Status
Status string `json:"status"`
@@ -1441,14 +1444,14 @@ type MigrateStorageItem struct {
// Migration process log
Log []string `json:"log"`
- // Source stack ID
- SourceStackID uint64 `json:"sourceStackId"`
+ // Source node ID
+ SourceNodeID uint64 `json:"sourceNodeId"`
// Migration status
Status string `json:"status"`
- // Target stack ID
- TargetStackID uint64 `json:"targetStackId"`
+ // Target node ID
+ TargetNodeID uint64 `json:"targetNodeId"`
}
type RecordCloneStatus struct {
diff --git a/pkg/cloudbroker/compute/pin_to_stack.go b/pkg/cloudbroker/compute/pin_to_node.go
similarity index 71%
rename from pkg/cloudbroker/compute/pin_to_stack.go
rename to pkg/cloudbroker/compute/pin_to_node.go
index d3e13a6..ef55c0d 100644
--- a/pkg/cloudbroker/compute/pin_to_stack.go
+++ b/pkg/cloudbroker/compute/pin_to_node.go
@@ -8,15 +8,15 @@ import (
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
)
-// PinToStackRequest struct to pin compute to stack
-type PinToStackRequest struct {
+// PinToNodeRequest struct to pin compute to node
+type PinToNodeRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"`
- // Stack ID to pin to
+ // Node ID to pin to
// Required: false
- TargetStackID uint64 `url:"targetStackId" json:"targetStackId"`
+ TargetNodeID uint64 `url:"targetNodeId" json:"targetNodeId"`
// Try to migrate or not if compute in running states
// Required: false
@@ -28,14 +28,14 @@ type PinToStackRequest struct {
AutoStart bool `url:"autoStart" json:"autoStart"`
}
-// PinToStack pins compute to current stack
-func (c Compute) PinToStack(ctx context.Context, req PinToStackRequest) (uint64, error) {
+// PinToNode pins compute to current node
+func (c Compute) PinToNode(ctx context.Context, req PinToNodeRequest) (uint64, error) {
err := validators.ValidateRequest(req)
if err != nil {
return 0, validators.ValidationErrors(validators.GetErrors(err))
}
- url := "/cloudbroker/compute/pinToStack"
+ url := "/cloudbroker/compute/pin_to_node"
res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil {
diff --git a/pkg/cloudbroker/compute/redeploy.go b/pkg/cloudbroker/compute/redeploy.go
index 8612b56..a186f3d 100644
--- a/pkg/cloudbroker/compute/redeploy.go
+++ b/pkg/cloudbroker/compute/redeploy.go
@@ -24,7 +24,7 @@ type RedeployRequest struct {
// Storage policy id of compute. The rules of the specified storage policy will be used.
// Required: true
- StoragePolicyID uint64 `url:"storage_policy_id" json:"storage_policy_id" validate:"required"`
+ StoragePolicyID uint64 `url:"storage_policy_id,omitempty" json:"storage_policy_id,omitempty"`
// New size for the boot disk in GB, if boot disk size change is required
// Required: false
diff --git a/pkg/cloudbroker/compute/start.go b/pkg/cloudbroker/compute/start.go
index cfad942..c495428 100644
--- a/pkg/cloudbroker/compute/start.go
+++ b/pkg/cloudbroker/compute/start.go
@@ -18,9 +18,9 @@ type StartRequest struct {
// Required: false
AltBootID uint64 `url:"altBootId,omitempty" json:"altBootId,omitempty"`
- // ID of stack to start compute
+ // ID of node to start compute
// Required: false
- StackID uint64 `url:"stackId,omitempty" json:"stackId,omitempty"`
+ NodeID uint64 `url:"nodeId,omitempty" json:"nodeId,omitempty"`
}
// Start starts compute
diff --git a/pkg/cloudbroker/compute/start_migration_in.go b/pkg/cloudbroker/compute/start_migration_in.go
index 3f673f1..80cf65f 100644
--- a/pkg/cloudbroker/compute/start_migration_in.go
+++ b/pkg/cloudbroker/compute/start_migration_in.go
@@ -13,9 +13,9 @@ type StartMigrationINRequest struct {
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"`
- // ID of the stack where the compute will be staged for migration-in
+ // ID of the node where the compute will be staged for migration-in
// Required: false
- StackID uint64 `url:"stackId,omitempty" json:"stackId,omitempty"`
+ NodeID uint64 `url:"node_id,omitempty" json:"node_id,omitempty"`
}
// StartMigrationIN starts compute for external migration in
diff --git a/pkg/cloudbroker/compute/unpin_from_stack.go b/pkg/cloudbroker/compute/unpin_from_node.go
similarity index 68%
rename from pkg/cloudbroker/compute/unpin_from_stack.go
rename to pkg/cloudbroker/compute/unpin_from_node.go
index ba7b1bc..38c0d2d 100644
--- a/pkg/cloudbroker/compute/unpin_from_stack.go
+++ b/pkg/cloudbroker/compute/unpin_from_node.go
@@ -8,21 +8,21 @@ import (
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
)
-// UnpinFromStackRequest struct to unpin from stack
-type UnpinFromStackRequest struct {
+// UnpinFromNodeRequest struct to unpin from node
+type UnpinFromNodeRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"`
}
-// UnpinFromStack unpins compute from current stack
-func (c Compute) UnpinFromStack(ctx context.Context, req UnpinFromStackRequest) (bool, error) {
+// UnpinFromNode unpins compute from current node
+func (c Compute) UnpinFromNode(ctx context.Context, req UnpinFromNodeRequest) (bool, error) {
err := validators.ValidateRequest(req)
if err != nil {
return false, validators.ValidationErrors(validators.GetErrors(err))
}
- url := "/cloudbroker/compute/unpinFromStack"
+ url := "/cloudbroker/compute/unpin_from_node"
res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil {
diff --git a/pkg/cloudbroker/extnet/device_migrate.go b/pkg/cloudbroker/extnet/device_migrate.go
index a2653c9..8fa80a6 100644
--- a/pkg/cloudbroker/extnet/device_migrate.go
+++ b/pkg/cloudbroker/extnet/device_migrate.go
@@ -14,9 +14,9 @@ type DeviceMigrateRequest struct {
// Required: true
NetID uint64 `url:"net_id" json:"net_id" validate:"required"`
- // Target stack ID to migrate to
+ // Target node ID to migrate to
// Required: false
- StackID uint64 `url:"stackId,omitempty" json:"stackId,omitempty"`
+ NodeID uint64 `url:"node_id,omitempty" json:"node_id,omitempty"`
// Target device to migrate
// Required: false
diff --git a/pkg/cloudbroker/image/ids.go b/pkg/cloudbroker/image/ids.go
index 0b931bc..0d2b91d 100644
--- a/pkg/cloudbroker/image/ids.go
+++ b/pkg/cloudbroker/image/ids.go
@@ -9,15 +9,6 @@ func (li ListImages) IDs() []uint64 {
return res
}
-// IDs gets array of StackIDs from ListStacks struct
-func (ls ListStacks) IDs() []uint64 {
- res := make([]uint64, 0, len(ls.Data))
- for _, h := range ls.Data {
- res = append(res, h.ID)
- }
- return res
-}
-
// IDs gets array of HistoryIDs from ListHistory struct
func (lh ListHistory) IDs() []uint64 {
res := make([]uint64, 0, len(lh))
diff --git a/pkg/cloudbroker/image/list_stacks.go b/pkg/cloudbroker/image/list_stacks.go
deleted file mode 100644
index 0bf4b3d..0000000
--- a/pkg/cloudbroker/image/list_stacks.go
+++ /dev/null
@@ -1,65 +0,0 @@
-package image
-
-import (
- "context"
- "encoding/json"
- "net/http"
-
- "repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
-)
-
-// ListStacksRequest struct to get list of stack
-type ListStacksRequest struct {
- // Image ID
- // Required: true
- ImageID uint64 `url:"imageId" json:"imageId" validate:"required"`
-
- // Page number
- // Required: false
- Page uint64 `url:"page,omitempty" json:"page,omitempty"`
-
- // Page size
- // Required: false
- Size uint64 `url:"size,omitempty" json:"size,omitempty"`
-
- // Find by name
- // Required: false
- Name string `url:"name,omitempty" json:"name,omitempty"`
-
- // Find by status
- // Required: false
- Status string `url:"status,omitempty" json:"status,omitempty"`
-
- // Find by type
- // Required: false
- Type string `url:"type,omitempty" json:"type,omitempty"`
-
- // Sort by one of supported fields, format +|-(field)
- // Required: false
- SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"`
-}
-
-// ListStacks gets list stack by image ID
-func (i Image) ListStacks(ctx context.Context, req ListStacksRequest) (*ListStacks, error) {
-
- err := validators.ValidateRequest(req)
- if err != nil {
- return nil, validators.ValidationErrors(validators.GetErrors(err))
- }
-
- url := "/cloudbroker/image/listStacks"
-
- res, err := i.client.DecortApiCall(ctx, http.MethodPost, url, req)
- if err != nil {
- return nil, err
- }
-
- list := ListStacks{}
-
- err = json.Unmarshal(res, &list)
- if err != nil {
- return nil, err
- }
-
- return &list, nil
-}
diff --git a/pkg/cloudbroker/image/models.go b/pkg/cloudbroker/image/models.go
index 8619c09..3884513 100644
--- a/pkg/cloudbroker/image/models.go
+++ b/pkg/cloudbroker/image/models.go
@@ -329,84 +329,6 @@ func (r *GUID) UnmarshalJSON(b []byte) error {
// List history
type ListHistory []History
-// List stacks
-type ListStacks struct {
- // Data
- Data []ItemListStacks `json:"data"`
-
- // Entry count
- EntryCount uint64 `json:"entryCount"`
-}
-
-// Detailed information about image
-type ItemListStacks struct {
- // CKey
- CKey string `json:"_ckey"`
-
- // API URL
- APIURL string `json:"apiUrl"`
-
- // API key
- APIKey string `json:"apikey"`
-
- // App ID
- AppID string `json:"appId"`
-
- // CPU allocation ratio
- CPUAllocationRatio float64 `json:"cpu_allocation_ratio"`
-
- // Description
- Description string `json:"desc"`
-
- // Descr
- Descr string `json:"descr"`
-
- // Drivers
- Drivers []string `json:"drivers"`
-
- // Eco
- Eco interface{} `json:"eco"`
-
- // Error
- Error uint64 `json:"error"`
-
- // Grid ID
- GID uint64 `json:"gid"`
-
- // GID
- GUID uint64 `json:"guid"`
-
- // ID
- ID uint64 `json:"id"`
-
- // List image IDs
- Images []uint64 `json:"images"`
-
- // Login
- Login string `json:"login"`
-
- // Mem allocation ratio
- MemAllocationRatio float64 `json:"mem_allocation_ratio"`
-
- // Name
- Name string `json:"name"`
-
- // Packegas
- Packages Packages `json:"packages"`
-
- // Password
- Password string `json:"passwd"`
-
- // Reference ID
- ReferenceID string `json:"referenceId"`
-
- // Status
- Status string `json:"status"`
-
- // Type
- Type string `json:"type"`
-}
-
// Package
type Packages struct {
// LibvirtBin
diff --git a/pkg/cloudbroker/k8s/create.go b/pkg/cloudbroker/k8s/create.go
index 5c07c28..c812601 100644
--- a/pkg/cloudbroker/k8s/create.go
+++ b/pkg/cloudbroker/k8s/create.go
@@ -171,6 +171,7 @@ type CreateRequest struct {
// Type of the emulated system, Q35 or i440fx
// Required: false
+ // Default: Q35
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
// Zone ID
diff --git a/pkg/cloudbroker/k8s/worker_add.go b/pkg/cloudbroker/k8s/worker_add.go
index 3dbc2a5..597d1c3 100644
--- a/pkg/cloudbroker/k8s/worker_add.go
+++ b/pkg/cloudbroker/k8s/worker_add.go
@@ -24,6 +24,7 @@ type WorkerAddRequest struct {
// Type of the emulated system, Q35 or i440fx
// Required: false
+ // Default: Q35
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
}
diff --git a/pkg/cloudbroker/k8s/workers_group_add.go b/pkg/cloudbroker/k8s/workers_group_add.go
index 5ae6334..427d095 100644
--- a/pkg/cloudbroker/k8s/workers_group_add.go
+++ b/pkg/cloudbroker/k8s/workers_group_add.go
@@ -69,6 +69,7 @@ type WorkersGroupAddRequest struct {
// Type of the emulated system, Q35 or i440fx
// Required: false
+ // Default: Q35
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
}
diff --git a/pkg/cloudbroker/kvmx86/create.go b/pkg/cloudbroker/kvmx86/create.go
index 614cf31..450ef9e 100644
--- a/pkg/cloudbroker/kvmx86/create.go
+++ b/pkg/cloudbroker/kvmx86/create.go
@@ -160,9 +160,9 @@ type CreateRequest struct {
// Required: false
Start bool `url:"start" json:"start"`
- // Stack ID
+ // Node ID
// Required: false
- StackID uint64 `url:"stackId,omitempty" json:"stackId,omitempty"`
+ NodeID uint64 `url:"node_id,omitempty" json:"node_id,omitempty"`
// System name
// Required: false
@@ -191,6 +191,7 @@ type CreateRequest struct {
// Type of the emulated system, Q35 or i440fx
// Required: false
+ // Default: Q35
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
// Use Huge Pages to allocate RAM of the virtual machine. The system must be pre-configured by allocating Huge Pages on the physical node
diff --git a/pkg/cloudbroker/kvmx86/create_blank.go b/pkg/cloudbroker/kvmx86/create_blank.go
index 558fa26..73c49ed 100644
--- a/pkg/cloudbroker/kvmx86/create_blank.go
+++ b/pkg/cloudbroker/kvmx86/create_blank.go
@@ -67,8 +67,27 @@ type CreateBlankRequest struct {
// Type of the emulated system, Q35 or i440fx
// Required: false
+ // Default: Q35
Chipset string `url:"chipset,omitempty" json:"chipset,omitempty" validate:"omitempty,chipset"`
+ // Use Huge Pages to allocate RAM of the virtual machine. The system must be pre-configured by allocating Huge Pages on the physical node
+ // Required: false
+ // Default: false
+ HPBacked bool `url:"hp_backed" json:"hp_backed"`
+
+ // Run VM on dedicated CPUs. To use this feature, the system must be pre-configured by allocating CPUs on the physical node
+ // Required: false
+ // Default: false
+ CPUPin bool `url:"cpu_pin" json:"cpu_pin"`
+
+ // Rule for VM placement with NUMA affinity.
+ // Possible values - none (placement without NUMA affinity),
+ // strict (strictly with NUMA affinity, if not possible - do not start VM),
+ // loose (use NUMA affinity if possible)
+ // Required: false
+ // Default: none
+ NumaAffinity string `url:"numa_affinity,omitempty" json:"numa_affinity,omitempty" validate:"omitempty,numaAffinity"`
+
// Recommended isolated CPUs. Field is ignored if compute.cpupin=False or compute.pinned=False
// Required: false
PreferredCPU []int64 `url:"preferredCpu,omitempty" json:"preferredCpu,omitempty" validate:"omitempty,preferredCPU"`
diff --git a/pkg/cloudbroker/stack/get_logical_cores_count.go b/pkg/cloudbroker/node/get_logical_cores_count.go
similarity index 65%
rename from pkg/cloudbroker/stack/get_logical_cores_count.go
rename to pkg/cloudbroker/node/get_logical_cores_count.go
index c1a02ad..ff6925e 100644
--- a/pkg/cloudbroker/stack/get_logical_cores_count.go
+++ b/pkg/cloudbroker/node/get_logical_cores_count.go
@@ -1,4 +1,4 @@
-package stack
+package node
import (
"context"
@@ -8,21 +8,21 @@ import (
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
)
-// GetLogicalCoresCountRequest struct to get logical cores count by stack
+// GetLogicalCoresCountRequest struct to get logical cores count by node
type GetLogicalCoresCountRequest struct {
- // Stack ID
+ // Node ID
// Required: true
- StackId uint64 `url:"stackId" json:"stackId" validate:"required"`
+ NodeId uint64 `url:"node_id" json:"node_id" validate:"required"`
}
-// GetLogicalCoresCount get logical cores count by stack
-func (i Stack) GetLogicalCoresCount(ctx context.Context, req GetLogicalCoresCountRequest) (uint64, error) {
+// GetLogicalCoresCount get logical cores count by node
+func (i Node) GetLogicalCoresCount(ctx context.Context, req GetLogicalCoresCountRequest) (uint64, error) {
err := validators.ValidateRequest(req)
if err != nil {
return 0, validators.ValidationErrors(validators.GetErrors(err))
}
- url := "/cloudbroker/stack/getLogicalCoresCount"
+ url := "/cloudbroker/node/get_logical_cores_count"
res, err := i.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil {
diff --git a/pkg/cloudbroker/node/models.go b/pkg/cloudbroker/node/models.go
index d3761af..4af8b4b 100644
--- a/pkg/cloudbroker/node/models.go
+++ b/pkg/cloudbroker/node/models.go
@@ -53,9 +53,6 @@ type RecordNode struct {
// SriovEnabled
SriovEnabled bool `json:"sriovEnabled"`
- // StackID
- StackID uint64 `json:"stackId"`
-
// Status
Status string `json:"status"`
@@ -76,6 +73,15 @@ type RecordNode struct {
// Zone ID
ZoneID uint64 `json:"zoneId"`
+
+ // OpenvSwitch Bridges
+ OpenvSwitchBridges []string `json:"openvswitch_bridges"`
+
+ // Description
+ Description string `json:"description"`
+
+ // SDN Hypervisor Name
+ SDNHypervisorName string `json:"sdn_hypervisor_name"`
}
// Resource consumption of the node
@@ -102,7 +108,7 @@ type FreeResourcesInfo struct {
RAM float64 `json:"RAM"`
// VCPU
- VCPU uint64 `json:"vCPU"`
+ VCPU uint64 `json:"vCPUs"`
}
// Resources Info
@@ -136,6 +142,12 @@ type CpuInfo struct {
// PhysCount
PhysCount uint64 `json:"physCount"`
+
+ // Flags
+ Flags []string `json:"flags"`
+
+ // Mddel name
+ ModelName string `json:"model_name"`
}
// Main information about node
@@ -245,9 +257,6 @@ type ItemNode struct {
// SriovEnabled
SriovEnabled bool `json:"sriovEnabled"`
- // StackID
- StackID uint64 `json:"stackId"`
-
// Status
Status string `json:"status"`
@@ -265,6 +274,34 @@ type ItemNode struct {
// Zone ID
ZoneID uint64 `json:"zoneId"`
+
+ // OpenvSwitch Bridges
+ OpenvSwitchBridges []string `json:"openvswitch_bridges"`
+
+ // APIUrl
+ APIUrl string `json:"apiUrl"`
+
+ // Drivers
+ Drivers []string `json:"drivers"`
+
+ // Old Compat LVM ID
+ OldCompatLVMID uint64 `json:"old_compat_lvm_id"`
+
+ // CPU Allocation ratio
+ CPUAllocationRatio float64 `json:"cpu_allocation_ratio"`
+
+ // MemAllocationRatio
+
+ MemAllocationRatio float64 `json:"mem_allocation_ratio"`
+ // Packages
+ Packages map[string]PackageInfo `json:"packages"`
+}
+
+type PackageInfo struct {
+ // Installed size
+ InstalledSize string `json:"installed_size"`
+ // Version
+ Ver string `json:"ver"`
}
// Numa Topology Info
diff --git a/pkg/cloudbroker/node/set_cpu_allocation_ratio.go b/pkg/cloudbroker/node/set_cpu_allocation_ratio.go
new file mode 100644
index 0000000..312d59d
--- /dev/null
+++ b/pkg/cloudbroker/node/set_cpu_allocation_ratio.go
@@ -0,0 +1,36 @@
+package node
+
+import (
+ "context"
+ "net/http"
+
+ "repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
+)
+
+// SetCpuAllocationRatioRequest struct to set CPU allocation ratio
+type SetCpuAllocationRatioRequest struct {
+ // Node ID
+ // Required: true
+ NodeID uint64 `url:"node_id" json:"node_id" validate:"required"`
+
+ // Allocation ratio (zero or positive value)
+ // Required: true
+ Ratio float64 `url:"ratio" json:"ratio" validate:"required"`
+}
+
+// SetCpuAllocationRatio set CPU allocation ratio
+func (i Node) SetCpuAllocationRatio(ctx context.Context, req SetCpuAllocationRatioRequest) error {
+ err := validators.ValidateRequest(req)
+ if err != nil {
+ return validators.ValidationErrors(validators.GetErrors(err))
+ }
+
+ url := "/cloudbroker/node/set_cpu_allocation_ratio"
+
+ _, err = i.client.DecortApiCall(ctx, http.MethodPost, url, req)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/pkg/cloudbroker/node/set_mem_allocation_ratio.go b/pkg/cloudbroker/node/set_mem_allocation_ratio.go
new file mode 100644
index 0000000..38d732f
--- /dev/null
+++ b/pkg/cloudbroker/node/set_mem_allocation_ratio.go
@@ -0,0 +1,36 @@
+package node
+
+import (
+ "context"
+ "net/http"
+
+ "repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
+)
+
+// SetMemAllocationRatioRequest struct to set memory allocation ratio
+type SetMemAllocationRatioRequest struct {
+ // Node ID
+ // Required: true
+ NodeID uint64 `url:"node_id" json:"node_id" validate:"required"`
+
+ // Allocation ratio (zero or positive value)
+ // Required: true
+ Ratio float64 `url:"ratio" json:"ratio" validate:"required"`
+}
+
+// SetMemAllocationRatio set memory allocation ratio
+func (i Node) SetMemAllocationRatio(ctx context.Context, req SetMemAllocationRatioRequest) error {
+ err := validators.ValidateRequest(req)
+ if err != nil {
+ return validators.ValidationErrors(validators.GetErrors(err))
+ }
+
+ url := "/cloudbroker/node/set_mem_allocation_ratio"
+
+ _, err = i.client.DecortApiCall(ctx, http.MethodPost, url, req)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/pkg/cloudbroker/pcidevice/create.go b/pkg/cloudbroker/pcidevice/create.go
index f376d83..ff2de1c 100644
--- a/pkg/cloudbroker/pcidevice/create.go
+++ b/pkg/cloudbroker/pcidevice/create.go
@@ -3,15 +3,16 @@ package pcidevice
import (
"context"
"net/http"
- "repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
"strconv"
+
+ "repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
)
// CreateRequest struct to creating PCI device
type CreateRequest struct {
- // StackID
+ // NodeID
// Required: true
- StackID uint64 `url:"stackId" json:"stackId" validate:"required"`
+ NodeID uint64 `url:"node_id" json:"node_id" validate:"required"`
// Resource group ID
// Required: true
diff --git a/pkg/cloudbroker/pcidevice/models.go b/pkg/cloudbroker/pcidevice/models.go
index 0a125b0..61c8a83 100644
--- a/pkg/cloudbroker/pcidevice/models.go
+++ b/pkg/cloudbroker/pcidevice/models.go
@@ -29,8 +29,8 @@ type ItemPCIDevice struct {
// Resource group ID
RGID uint64 `json:"rgId"`
- // Stack ID
- StackID uint64 `json:"stackId"`
+ // Node ID
+ NodeID uint64 `json:"nodeId"`
// Status
Status string `json:"status"`
@@ -47,4 +47,3 @@ type ListPCIDevices struct {
// Entry count
EntryCount uint64 `json:"entryCount"`
}
-
diff --git a/pkg/cloudbroker/resmon/get_by_stack.go b/pkg/cloudbroker/resmon/get_by_node.go
similarity index 68%
rename from pkg/cloudbroker/resmon/get_by_stack.go
rename to pkg/cloudbroker/resmon/get_by_node.go
index 3b4321a..fff8996 100644
--- a/pkg/cloudbroker/resmon/get_by_stack.go
+++ b/pkg/cloudbroker/resmon/get_by_node.go
@@ -8,10 +8,10 @@ import (
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
)
-type GetByStackRequest struct {
- // Stack ID
+type GetByNodeRequest struct {
+ // Node ID
// Required: true
- StackID uint64 `url:"stackId" json:"stackId" validate:"required"`
+ NodeID uint64 `url:"nodeId" json:"nodeId" validate:"required"`
// Start of time period - unixtime
// Required: false
@@ -23,13 +23,13 @@ type GetByStackRequest struct {
}
// Get a grid resource monitoring for the specified time period
-func (r Resmon) GetByStack(ctx context.Context, req GetByStackRequest) (*GetByStackData, error) {
- res, err := r.GetByStackRaw(ctx, req)
+func (r Resmon) GetByNode(ctx context.Context, req GetByNodeRequest) (*GetByNodeData, error) {
+ res, err := r.GetByNodeRaw(ctx, req)
if err != nil {
return nil, err
}
- info := GetByStackData{}
+ info := GetByNodeData{}
err = json.Unmarshal(res, &info)
if err != nil {
@@ -40,13 +40,13 @@ func (r Resmon) GetByStack(ctx context.Context, req GetByStackRequest) (*GetBySt
}
// GetRaw gets information about compute as an array of bytes
-func (r Resmon) GetByStackRaw(ctx context.Context, req GetByStackRequest) ([]byte, error) {
+func (r Resmon) GetByNodeRaw(ctx context.Context, req GetByNodeRequest) ([]byte, error) {
err := validators.ValidateRequest(req)
if err != nil {
return nil, validators.ValidationErrors(validators.GetErrors(err))
}
- url := "/cloudbroker/resmon/getByStack"
+ url := "/cloudbroker/resmon/get_by_node"
res, err := r.client.DecortApiCall(ctx, http.MethodPost, url, req)
return res, err
diff --git a/pkg/cloudbroker/resmon/get_by_stacks.go b/pkg/cloudbroker/resmon/get_by_nodes.go
similarity index 72%
rename from pkg/cloudbroker/resmon/get_by_stacks.go
rename to pkg/cloudbroker/resmon/get_by_nodes.go
index aa128f6..17cb5af 100644
--- a/pkg/cloudbroker/resmon/get_by_stacks.go
+++ b/pkg/cloudbroker/resmon/get_by_nodes.go
@@ -8,7 +8,7 @@ import (
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
)
-type GetByStacksRequest struct {
+type GetByNodesRequest struct {
// Start of time period - unixtime
// Required: false
StartTime uint64 `url:"starttime,omitempty" json:"starttime,omitempty"`
@@ -19,13 +19,13 @@ type GetByStacksRequest struct {
}
// Get a grid resource monitoring for the specified time period
-func (r Resmon) GetByStacks(ctx context.Context, req GetByStacksRequest) (*GetByStackData, error) {
- res, err := r.GetByStacksRaw(ctx, req)
+func (r Resmon) GetByNodes(ctx context.Context, req GetByNodesRequest) (*GetByNodeData, error) {
+ res, err := r.GetByNodesRaw(ctx, req)
if err != nil {
return nil, err
}
- info := GetByStackData{}
+ info := GetByNodeData{}
err = json.Unmarshal(res, &info)
if err != nil {
@@ -36,13 +36,13 @@ func (r Resmon) GetByStacks(ctx context.Context, req GetByStacksRequest) (*GetBy
}
// GetRaw gets information about compute as an array of bytes
-func (r Resmon) GetByStacksRaw(ctx context.Context, req GetByStacksRequest) ([]byte, error) {
+func (r Resmon) GetByNodesRaw(ctx context.Context, req GetByNodesRequest) ([]byte, error) {
err := validators.ValidateRequest(req)
if err != nil {
return nil, validators.ValidationErrors(validators.GetErrors(err))
}
- url := "/cloudbroker/resmon/getByStacks"
+ url := "/cloudbroker/resmon/get_by_nodes"
res, err := r.client.DecortApiCall(ctx, http.MethodPost, url, req)
return res, err
diff --git a/pkg/cloudbroker/resmon/models.go b/pkg/cloudbroker/resmon/models.go
index 399518a..ec0d71c 100644
--- a/pkg/cloudbroker/resmon/models.go
+++ b/pkg/cloudbroker/resmon/models.go
@@ -12,7 +12,7 @@ type GetByComputePoint struct {
Usage ComputeUsage `json:"usage"`
Disks []ItemDisk `json:"disks"`
UID string `json:"uid"`
- StackID uint64 `json:"stackId"`
+ NodeID uint64 `json:"nodeId"`
}
type ComputeUsage struct {
@@ -46,7 +46,7 @@ type GetByGRIDPoint struct {
}
type ItemTotalByGRID struct {
- StacksCPU uint64 `json:"stacksCPU"`
+ NodesCPU uint64 `json:"nodesCPU"`
StorageCapacity uint64 `json:"storageCapacity"`
CPUPower uint64 `json:"cpuPower"`
CPUUtil uint64 `json:"cpuUtil"`
@@ -64,17 +64,17 @@ type ItemStorage struct {
UID string `json:"uid"`
}
-// GetByStackData represents an array of data points
-type GetByStackData []GetByStackPoint
+// GetByNodeData represents an array of data points
+type GetByNodeData []GetByNodePoint
-type GetByStackPoint struct {
- Usage StackUsage `json:"usage"`
- CPUInfo CPUinfoByStack `json:"cpuInfo"`
- Name string `json:"name"`
- ID uint64 `json:"id"`
+type GetByNodePoint struct {
+ Usage NodeUsage `json:"usage"`
+ CPUInfo CPUinfoByNode `json:"cpuInfo"`
+ Name string `json:"name"`
+ ID uint64 `json:"id"`
}
-type StackUsage struct {
+type NodeUsage struct {
CPUPower uint64 `json:"cpuPower"`
UsedVCPUs uint64 `json:"usedVcpus"`
PCPU uint64 `json:"pcpu"`
@@ -84,7 +84,7 @@ type StackUsage struct {
FreeMem uint64 `json:"freeMem"`
}
-type CPUinfoByStack struct {
+type CPUinfoByNode struct {
ClockSpeed uint64 `json:"clockSpeed"`
CoreCount uint64 `json:"coreCount"`
PhysCount uint64 `json:"physCount"`
diff --git a/pkg/cloudbroker/rg/create.go b/pkg/cloudbroker/rg/create.go
index f03463f..36e0f88 100644
--- a/pkg/cloudbroker/rg/create.go
+++ b/pkg/cloudbroker/rg/create.go
@@ -39,10 +39,6 @@ type CreateRequest struct {
// 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"`
diff --git a/pkg/cloudbroker/rg/filter_test.go b/pkg/cloudbroker/rg/filter_test.go
index f4b3b1f..9d22512 100644
--- a/pkg/cloudbroker/rg/filter_test.go
+++ b/pkg/cloudbroker/rg/filter_test.go
@@ -35,7 +35,6 @@ var rgs = ListRG{
CuD: -1,
CUI: -1,
CUM: -1,
- CUNP: -1,
GPUUnits: -1,
},
Secret: "",
@@ -78,7 +77,6 @@ var rgs = ListRG{
CuD: -1,
CUI: -1,
CUM: -1,
- CUNP: -1,
GPUUnits: -1,
},
Secret: "",
@@ -121,7 +119,6 @@ var rgs = ListRG{
CuD: -1,
CUI: -1,
CUM: -1,
- CUNP: -1,
GPUUnits: -1,
},
Secret: "",
diff --git a/pkg/cloudbroker/rg/models.go b/pkg/cloudbroker/rg/models.go
index 3fbe1e7..2c5c584 100644
--- a/pkg/cloudbroker/rg/models.go
+++ b/pkg/cloudbroker/rg/models.go
@@ -121,9 +121,6 @@ type ResourceLimits struct {
// CUM
CUM float64 `json:"CU_M"`
- // CUNP
- CUNP float64 `json:"CU_NP"`
-
// GPU units
GPUUnits float64 `json:"gpu_units"`
diff --git a/pkg/cloudbroker/rg/update.go b/pkg/cloudbroker/rg/update.go
index a967d7e..133725f 100644
--- a/pkg/cloudbroker/rg/update.go
+++ b/pkg/cloudbroker/rg/update.go
@@ -35,10 +35,6 @@ type UpdateRequest struct {
// 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"`
diff --git a/pkg/cloudbroker/secgroup/security_group.go b/pkg/cloudbroker/secgroup/security_group.go
index 3505ecd..520885a 100644
--- a/pkg/cloudbroker/secgroup/security_group.go
+++ b/pkg/cloudbroker/secgroup/security_group.go
@@ -7,7 +7,7 @@ type SecurityGroup struct {
client interfaces.Caller
}
-// Builder for stack endpoint
+// Builder for security group endpoint
func New(client interfaces.Caller) *SecurityGroup {
return &SecurityGroup{
client: client,
diff --git a/pkg/cloudbroker/sep/add_pool.go b/pkg/cloudbroker/sep/add_pool.go
index 5159edd..84a15f9 100644
--- a/pkg/cloudbroker/sep/add_pool.go
+++ b/pkg/cloudbroker/sep/add_pool.go
@@ -13,12 +13,13 @@ type AddPoolRequest struct {
// Required: true
SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"`
- // method Async/Sync
+ // Method Async/Sync
// Default: true
// Required: false
Sync bool `url:"sync" json:"sync"`
- // Pool structure which contains fields such as "name", "types", "accessAccountIds", "accessResGroupIds"
+ // Pool structure which contains fields such as "name", "usage_limit", "types", "system", "accessAccountIds", "accessResGroupIds". Added fields for other pool types: Des, Ovs - "uris" list of "ip, port".
+ // Dorado, Tatlin no additional fields required. Hitachi - "id", "snapshotable", "snapshot_pool_id", "minLdevId", "maxLdevId", "clone_technology". Shared - "description", "wwns", "allocate_type", "stripes", "metadata_size", "metadatatalun". Local - "description", "node_consumer", "block_disk".
// Required: true
Pool string `url:"pool" json:"pool" validate:"required"`
}
diff --git a/pkg/cloudbroker/stack.go b/pkg/cloudbroker/stack.go
deleted file mode 100644
index ef18143..0000000
--- a/pkg/cloudbroker/stack.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package cloudbroker
-
-import (
- "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/stack"
-)
-
-// Accessing the Stack method group
-func (cb *CloudBroker) Stack() *stack.Stack {
- return stack.New(cb.client)
-}
diff --git a/pkg/cloudbroker/stack/get.go b/pkg/cloudbroker/stack/get.go
deleted file mode 100644
index 31e2082..0000000
--- a/pkg/cloudbroker/stack/get.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package stack
-
-import (
- "context"
- "encoding/json"
- "net/http"
-
- "repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
-)
-
-// GetRequest struct to get list of stacks
-type GetRequest struct {
- // Find by ID
- // Required: true
- StackId uint64 `url:"stackId" json:"stackId" validate:"required"`
-}
-
-// Get gets stack details by ID as an InfoStack struct
-func (i Stack) Get(ctx context.Context, req GetRequest) (*InfoStack, error) {
- res, err := i.GetRaw(ctx, req)
- if err != nil {
- return nil, err
- }
-
- info := InfoStack{}
-
- err = json.Unmarshal(res, &info)
- if err != nil {
- return nil, err
- }
-
- return &info, nil
-}
-
-// GetRaw gets stack details by ID as an array of bytes
-func (i Stack) GetRaw(ctx context.Context, req GetRequest) ([]byte, error) {
- err := validators.ValidateRequest(req)
- if err != nil {
- return nil, validators.ValidationErrors(validators.GetErrors(err))
- }
-
- url := "/cloudbroker/stack/get"
-
- res, err := i.client.DecortApiCall(ctx, http.MethodPost, url, req)
- return res, err
-}
diff --git a/pkg/cloudbroker/stack/ids.go b/pkg/cloudbroker/stack/ids.go
deleted file mode 100644
index 0a6cc9d..0000000
--- a/pkg/cloudbroker/stack/ids.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package stack
-
-// IDs gets array of StackIDs from ListStacks struct
-func (ls ListStacks) IDs() []uint64 {
- res := make([]uint64, 0, len(ls.Data))
- for _, s := range ls.Data {
- res = append(res, s.ID)
- }
- return res
-}
diff --git a/pkg/cloudbroker/stack/list.go b/pkg/cloudbroker/stack/list.go
deleted file mode 100644
index fd06a3c..0000000
--- a/pkg/cloudbroker/stack/list.go
+++ /dev/null
@@ -1,72 +0,0 @@
-package stack
-
-import (
- "context"
- "encoding/json"
- "net/http"
-
- "repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
-)
-
-// ListRequest struct to get list of stacks
-type ListRequest struct {
- // Find by ID
- // Required: false
- ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`
-
- // Find by name
- // Required: false
- Name string `url:"name,omitempty" json:"name,omitempty"`
-
- // Find by type
- // Required: false
- Type string `url:"type,omitempty" json:"type,omitempty"`
-
- // Find by status
- // Required: false
- Status string `url:"status,omitempty" json:"status,omitempty"`
-
- // Sort by one of supported fields, format +|-(field)
- // 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"`
-
- // Page size
- // Required: false
- Size uint64 `url:"size,omitempty" json:"size,omitempty"`
-}
-
-// List gets list of stacks as a ListStacks struct
-func (i Stack) List(ctx context.Context, req ListRequest) (*ListStacks, error) {
-
- res, err := i.ListRaw(ctx, req)
- if err != nil {
- return nil, err
- }
-
- list := ListStacks{}
-
- err = json.Unmarshal(res, &list)
- if err != nil {
- return nil, err
- }
-
- return &list, nil
-}
-
-// ListRaw gets list of stacks as an array of bytes
-func (i Stack) ListRaw(ctx context.Context, req ListRequest) ([]byte, error) {
-
- err := validators.ValidateRequest(req)
- if err != nil {
- return nil, validators.ValidationErrors(validators.GetErrors(err))
- }
-
- url := "/cloudbroker/stack/list"
-
- res, err := i.client.DecortApiCall(ctx, http.MethodPost, url, req)
- return res, err
-}
diff --git a/pkg/cloudbroker/stack/models.go b/pkg/cloudbroker/stack/models.go
deleted file mode 100644
index d79decf..0000000
--- a/pkg/cloudbroker/stack/models.go
+++ /dev/null
@@ -1,180 +0,0 @@
-package stack
-
-// Main information about stack
-type InfoStack struct {
- // CKey
- Ckey string `json:"_ckey"`
-
- // Meta
- Meta []interface{} `json:"_meta"`
-
- //API URL
- APIURL string `json:"apiUrl"`
-
- //API key
- Apikey string `json:"apikey"`
-
- // App ID
- AppID string `json:"appId"`
-
- // CPU allocation ratio
- CPUAllocationRatio float64 `json:"cpu_allocation_ratio"`
-
- // Description
- Description string `json:"desc"`
-
- // Descr
- Descr string `json:"descr"`
-
- // Drivers
- Drivers []string `json:"drivers"`
-
- // Eco
- Eco interface{} `json:"eco"`
-
- // Error
- Error uint64 `json:"error"`
-
- // Grid ID
- GID uint64 `json:"gid"`
-
- // GID
- GUID uint64 `json:"guid"`
-
- // ID
- ID uint64 `json:"id"`
-
- // List image IDs
- Images []uint64 `json:"images"`
-
- // Login
- Login string `json:"login"`
-
- // Mem allocation ratio
- MemAllocationRatio float64 `json:"mem_allocation_ratio"`
-
- // Name
- Name string `json:"name"`
-
- // Packegas
- Packages Packages `json:"packages"`
-
- //Password
- Password string `json:"passwd"`
-
- // Reference ID
- ReferenceID string `json:"referenceId"`
-
- // Status
- Status string `json:"status"`
-
- // Type
- Type string `json:"type"`
-}
-
-// List of stacks
-type ListStacks struct {
- //List
- Data []InfoStack `json:"data"`
-
- //Entry count
- EntryCount uint64 `json:"entryCount"`
-}
-
-// Package
-type Packages struct {
- // LibGuestFSTools
- LibGuestFSTools LibGuestFSTools `json:"libguestfs-tools"`
-
- // LibvirtBin
- LibvirtBin LibvirtBin `json:"libvirt-bin"`
-
- // LibvirtDaemon
- LibvirtDaemon LibvirtDaemon `json:"libvirt-daemon"`
-
- // Lvm2Lockd
- Lvm2Lockd Lvm2Lockd `json:"lvm2-lockd"`
-
- // OpenvswitchCommon
- OpenvswitchCommon OpenvswitchCommon `json:"openvswitch-common"`
-
- // OpenvswitchSwitch
- OpenvswitchSwitch OpenvswitchSwitch `json:"openvswitch-switch"`
-
- // QemuSystemX86
- QemuSystemX86 QemuSystemX86 `json:"qemu-system-x86"`
-
- // Sanlock
- Sanlock Sanlock `json:"sanlock"`
-}
-
-// LibGuestFSTools
-type LibGuestFSTools struct {
- // InstalledSize
- InstalledSize string `json:"installed_size"`
-
- // Version
- Ver string `json:"ver"`
-}
-
-// LibvirtBin
-type LibvirtBin struct {
- // InstalledSize
- InstalledSize string `json:"installed_size"`
-
- // Version
- Ver string `json:"ver"`
-}
-
-type LibvirtDaemon struct {
- // InstalledSize
- InstalledSize string `json:"installed_size"`
-
- // Version
- Ver string `json:"ver"`
-}
-
-// Lvm2Lockd
-type Lvm2Lockd struct {
- // InstalledSize
- InstalledSize string `json:"installed_size"`
-
- // Version
- Ver string `json:"ver"`
-}
-
-// OpenvswitchCommon
-type OpenvswitchCommon struct {
- // InstalledSize
- InstalledSize string `json:"installed_size"`
-
- // Version
- Ver string `json:"ver"`
-}
-
-// OpenvswitchSwitch
-type OpenvswitchSwitch struct {
- // InstalledSize
- InstalledSize string `json:"installed_size"`
-
- // Version
- Ver string `json:"ver"`
-}
-
-// QemuSystemX86
-type QemuSystemX86 struct {
- // InstalledSize
- InstalledSize string `json:"installed_size"`
-
- // Version
- Ver string `json:"ver"`
-}
-
-// Sanlock
-type Sanlock struct {
- // InstalledSize
- InstalledSize string `json:"installed_size"`
-
- // Version
- Ver string `json:"ver"`
-}
diff --git a/pkg/cloudbroker/stack/set_cpu_allocation_ratio.go b/pkg/cloudbroker/stack/set_cpu_allocation_ratio.go
deleted file mode 100644
index e9d06f9..0000000
--- a/pkg/cloudbroker/stack/set_cpu_allocation_ratio.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package stack
-
-import (
- "context"
- "encoding/json"
- "net/http"
-
- "repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
-)
-
-// SetCpuAllocationRatioRequest struct to set CPU allocation ratio
-type SetCpuAllocationRatioRequest struct {
- // Stack ID
- // Required: true
- StackId uint64 `url:"stackId" json:"stackId" validate:"required"`
-
- // Allocation ratio (zero or positive value)
- // Required: true
- Ratio float64 `url:"ratio" json:"ratio" validate:"required"`
-}
-
-// SetCpuAllocationRatio set CPU allocation ratio
-func (i Stack) SetCpuAllocationRatio(ctx context.Context, req SetCpuAllocationRatioRequest) (*InfoStack, error) {
- err := validators.ValidateRequest(req)
- if err != nil {
- return nil, validators.ValidationErrors(validators.GetErrors(err))
- }
-
- url := "/cloudbroker/stack/setCpuAllocationRatio"
-
- res, err := i.client.DecortApiCall(ctx, http.MethodPost, url, req)
- if err != nil {
- return nil, err
- }
-
- info := InfoStack{}
-
- err = json.Unmarshal(res, &info)
- if err != nil {
- return nil, err
- }
-
- return &info, nil
-}
diff --git a/pkg/cloudbroker/stack/set_mem_allocation_ratio.go b/pkg/cloudbroker/stack/set_mem_allocation_ratio.go
deleted file mode 100644
index d81c231..0000000
--- a/pkg/cloudbroker/stack/set_mem_allocation_ratio.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package stack
-
-import (
- "context"
- "encoding/json"
- "net/http"
-
- "repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
-)
-
-// SetMemAllocationRatioRequest struct to set memory allocation ratio
-type SetMemAllocationRatioRequest struct {
- // Stack ID
- // Required: true
- StackId uint64 `url:"stackId" json:"stackId" validate:"required"`
-
- // Allocation ratio (zero or positive value)
- // Required: true
- Ratio float64 `url:"ratio" json:"ratio" validate:"required"`
-}
-
-// SetMemAllocationRatio set memory allocation ratio
-func (i Stack) SetMemAllocationRatio(ctx context.Context, req SetMemAllocationRatioRequest) (*InfoStack, error) {
- err := validators.ValidateRequest(req)
- if err != nil {
- return nil, validators.ValidationErrors(validators.GetErrors(err))
- }
-
- url := "/cloudbroker/stack/setMemAllocationRatio"
-
- res, err := i.client.DecortApiCall(ctx, http.MethodPost, url, req)
- if err != nil {
- return nil, err
- }
-
- info := InfoStack{}
-
- err = json.Unmarshal(res, &info)
- if err != nil {
- return nil, err
- }
-
- return &info, nil
-}
diff --git a/pkg/cloudbroker/stack/stack.go b/pkg/cloudbroker/stack/stack.go
deleted file mode 100644
index a330f68..0000000
--- a/pkg/cloudbroker/stack/stack.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package stack
-
-import "repository.basistech.ru/BASIS/decort-golang-sdk/interfaces"
-
-// Structure for creating request to stack
-type Stack struct {
- client interfaces.Caller
-}
-
-// Builder for stack endpoint
-func New(client interfaces.Caller) *Stack {
- return &Stack{
- client: client,
- }
-}
diff --git a/pkg/cloudbroker/stpolicy/storage_policy.go b/pkg/cloudbroker/stpolicy/storage_policy.go
index 6b6d61f..74d3ac5 100644
--- a/pkg/cloudbroker/stpolicy/storage_policy.go
+++ b/pkg/cloudbroker/stpolicy/storage_policy.go
@@ -7,7 +7,7 @@ type StPolicy struct {
client interfaces.Caller
}
-// Builder for stack endpoint
+// Builder for storage policy endpoint
func New(client interfaces.Caller) *StPolicy {
return &StPolicy{
client: client,
diff --git a/pkg/cloudbroker/user/models.go b/pkg/cloudbroker/user/models.go
index 1c2cb47..b902362 100644
--- a/pkg/cloudbroker/user/models.go
+++ b/pkg/cloudbroker/user/models.go
@@ -237,7 +237,6 @@ type CloudBrokerEndpoints struct {
Machine []string `json:"machine,omitempty"`
Metering []string `json:"metering,omitempty"`
Milestones []string `json:"milestones,omitempty"`
- Node []string `json:"node,omitempty"`
Openshift []string `json:"openshift,omitempty"`
OpenshiftCI []string `json:"openshiftci,omitempty"`
Ovsnode []string `json:"ovsnode,omitempty"`
@@ -248,7 +247,7 @@ type CloudBrokerEndpoints struct {
Resmon []string `json:"resmon,omitempty"`
RG []string `json:"rg,omitempty"`
Sep []string `json:"sep,omitempty"`
- Stack []string `json:"stack,omitempty"`
+ Node []string `json:"node,omitempty"`
Tasks []string `json:"tasks,omitempty"`
TLock []string `json:"tlock,omitempty"`
User []string `json:"user,omitempty"`
diff --git a/pkg/cloudbroker/vins/models.go b/pkg/cloudbroker/vins/models.go
index 8238986..c261fa6 100644
--- a/pkg/cloudbroker/vins/models.go
+++ b/pkg/cloudbroker/vins/models.go
@@ -74,8 +74,8 @@ type Resources struct {
// Number of RAM
RAM uint64 `json:"ram"`
- // Stack ID
- StackID uint64 `json:"stackId"`
+ // Node ID
+ NodeID uint64 `json:"node_id"`
// UUID
UUID string `json:"uuid"`
diff --git a/tests/platform_upgrade/README.md b/tests/platform_upgrade/README.md
index c3d425e..6154d2e 100644
--- a/tests/platform_upgrade/README.md
+++ b/tests/platform_upgrade/README.md
@@ -77,7 +77,7 @@ FAIL
Пример вывода:
```go
=== RUN TestRequestsCloudbroker
- utils_requests.go:125: Path /cloudbroker/image/updateNodes has following errors: [Field enabledStacks has different type parameters on the platform and in golang structure]
+ utils_requests.go:125: Path /cloudbroker/image/updateNodes has following errors: [Field enabledNodes has different type parameters on the platform and in golang structure]
utils_requests.go:125: Path /cloudbroker/lb/listDeleted has following errors: [Platform has field accountId that golang structure doesn't]
utils_requests.go:125: Path /cloudbroker/k8ci/listDeleted has following errors: [Platform has field k8cId that golang structure doesn't]
<...>
@@ -108,12 +108,12 @@ FAIL
/cloudbroker/account/listVMs
/cloudapi/user/brief
/cloudapi/user/search
- /cloudbroker/stack/setMemAllocationRatio
+ /cloudbroker/node/setMemAllocationRatio
/cloudbroker/image/computeciUnset
/cloudbroker/image/uploadImageFile
/cloudapi/account/getStats
/cloudapi/disks/fromPlatformDisk
- /cloudbroker/stack/getLogicalCoresCount
+ /cloudbroker/node/getLogicalCoresCount
/cloudapi/lb/stop
/cloudapi/account/listVMs
/cloudapi/user/setData
@@ -122,7 +122,7 @@ FAIL
/cloudapi/user/getAudit
/cloudbroker/account/listCS
/cloudapi/account/listCS
- /cloudbroker/stack/setCpuAllocationRatio
+ /cloudbroker/node/setCpuAllocationRatio
/cloudbroker/grid/setPasswordPolicy
/cloudapi/user/apiList
/cloudbroker/disks/fromPlatformDisk
diff --git a/tests/platform_upgrade/cloud_test.go b/tests/platform_upgrade/cloud_test.go
index d32f776..3ec841d 100644
--- a/tests/platform_upgrade/cloud_test.go
+++ b/tests/platform_upgrade/cloud_test.go
@@ -19,7 +19,6 @@ import (
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/rg"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/secgroup"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/sep"
- "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/stack"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/stpolicy"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/tasks"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/trunk"
@@ -28,11 +27,11 @@ import (
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/acsgroups"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/adrspools"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/defsecpolicies"
- "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/segments"
- "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/secpolicies"
- "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/secpolicies/rule"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/logicalports"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/routers"
+ "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/secpolicies"
+ "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/secpolicies/rule"
+ "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/segments"
account_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/account"
audit_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/audit"
@@ -51,7 +50,6 @@ import (
rg_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/rg"
secgroup_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/secgroup"
sep_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/sep"
- stack_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/stack"
stpolicy_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/stpolicy"
tasks_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/tasks"
trunk_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/trunk"
@@ -309,14 +307,6 @@ func TestGetListCloudAPI(t *testing.T) {
}
getResult("SEP list", bytes, sep.ListAvailableSEP{}, t)
- // Stack
- // List
- bytes, err = client.CloudAPI().Stack().ListRaw(context.Background(), stack.ListRequest{})
- if err != nil {
- t.Error(err)
- }
- getResult("Stack list", bytes, stack.ListStacks{}, t)
-
// Storage policy
// List
bytes, err = client.CloudAPI().StPolicy().ListRaw(context.Background(), stpolicy.ListRequest{})
@@ -383,7 +373,7 @@ func TestGetListCloudAPI(t *testing.T) {
if err != nil {
t.Error(err)
}
- getResult("Trunk list", bytes, tasks.ListTasks{}, t)
+ getResult("Trunk list", bytes, trunk.ListTrunks{}, t)
// Get
listTrunk, _ := client.CloudAPI().Trunk().List(context.Background(), trunk.ListRequest{})
if len(listTrunk.Data) > 0 {
@@ -423,7 +413,7 @@ func TestGetListCloudAPI(t *testing.T) {
if err != nil {
t.Error(err)
}
- getResult("Zone list", bytes, vins.ListVINS{}, t)
+ getResult("Zone list", bytes, zone.ListZones{}, t)
// Get
ListZones, _ := client.CloudAPI().Zone().List(context.Background(), zone.ListRequest{})
if len(ListZones.Data) > 0 {
@@ -783,26 +773,6 @@ func TestGetListCloudbroker(t *testing.T) {
}
getResult("SEP and pools list", bytes, sep_cb.ListAvailableSEP{}, t)
- // Stack
- // List
- bytes, err = client.CloudBroker().Stack().ListRaw(context.Background(), stack_cb.ListRequest{})
- if err != nil {
- t.Error(err)
- }
- getResult("Stack list", bytes, stack_cb.ListStacks{}, t)
- // Get
- listStack, _ := client.CloudBroker().Stack().List(context.Background(), stack_cb.ListRequest{})
- if len(listStack.Data) > 0 {
- id := listStack.Data[0].ID
- bytes, err = client.CloudBroker().Stack().GetRaw(context.Background(), stack_cb.GetRequest{StackId: id})
- if err != nil {
- t.Error(err)
- }
- getResult("Stack get", bytes, stack_cb.InfoStack{}, t)
- } else {
- t.Errorf("Can not test Stack get because Stack list is empty")
- }
-
// Storage policy
// List
bytes, err = client.CloudBroker().StPolicy().ListRaw(context.Background(), stpolicy_cb.ListRequest{})
diff --git a/tests/platform_upgrade/request_map.go b/tests/platform_upgrade/request_map.go
index 57fbe7c..aafd93d 100644
--- a/tests/platform_upgrade/request_map.go
+++ b/tests/platform_upgrade/request_map.go
@@ -20,7 +20,6 @@ import (
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/rg"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/secgroup"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/sep"
- "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/stack"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/stpolicy"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/tasks"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/trunk"
@@ -31,13 +30,13 @@ import (
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/acsgroups"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/adrspools"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/defsecpolicies"
- "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/segments"
- "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/secpolicies"
- "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/secpolicies/rule"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/logicalports"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/routers"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/routers/gwport"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/routers/policies"
+ "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/secpolicies"
+ "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/secpolicies/rule"
+ "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/segments"
account_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/account"
apiaccess_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/apiaccess"
@@ -61,7 +60,6 @@ import (
rg_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/rg"
secgroup_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/secgroup"
sep_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/sep"
- stack_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/stack"
stpolicy_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/stpolicy"
tasks_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/tasks"
trunk_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/trunk"
@@ -72,8 +70,8 @@ import (
zone_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/zone"
extnet_sdn "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/extnet"
- "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/netobjgroups"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/flips"
+ "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/sdn/netobjgroups"
)
type EmptyStruct struct{}
@@ -196,7 +194,7 @@ func getRequestsMapCloudAPI() map[string]interface{} {
"/restmachine/cloudapi/compute/pfwDel": compute.PFWDelRequest{},
"/restmachine/cloudapi/compute/pfwList": compute.PFWListRequest{},
"/restmachine/cloudapi/compute/pause": compute.PauseRequest{},
- "/restmachine/cloudapi/compute/pinToStack": compute.PinToStackRequest{},
+ "/restmachine/cloudapi/compute/pinToNode": compute.PinToNodeRequest{},
"/restmachine/cloudapi/compute/powerCycle": compute.PowerCycleRequest{},
"/restmachine/cloudapi/compute/reboot": compute.RebootRequest{},
"/restmachine/cloudapi/compute/redeploy": compute.RedeployRequest{},
@@ -214,7 +212,7 @@ func getRequestsMapCloudAPI() map[string]interface{} {
"/restmachine/cloudapi/compute/stop": compute.StopRequest{},
"/restmachine/cloudapi/compute/tagAdd": compute.TagAddRequest{},
"/restmachine/cloudapi/compute/tagRemove": compute.TagRemoveRequest{},
- "/restmachine/cloudapi/compute/unpinFromStack": compute.UnpinFromStackRequest{},
+ "/restmachine/cloudapi/compute/unpinFromNode": compute.UnpinFromNodeRequest{},
"/restmachine/cloudapi/compute/update": compute.UpdateRequest{},
"/restmachine/cloudapi/compute/userGrant": compute.UserGrantRequest{},
"/restmachine/cloudapi/compute/userList": compute.UserListRequest{},
@@ -413,9 +411,7 @@ func getRequestsMapCloudAPI() map[string]interface{} {
// sep
"/restmachine/cloudapi/sep/listAvailableSepAndPools": sep.ListAvailableSEPAndPoolsRequest{},
- // stack, tasks
- "/restmachine/cloudapi/stack/get": stack.GetRequest{},
- "/restmachine/cloudapi/stack/list": stack.ListRequest{},
+ // tasks
"/restmachine/cloudapi/tasks/get": tasks.GetRequest{},
"/restmachine/cloudapi/tasks/list": tasks.ListRequest{},
@@ -617,7 +613,7 @@ func getRequestsMapCloudbroker() map[string]interface{} {
"/restmachine/cloudbroker/compute/pfwDel": compute_cb.PFWDelRequest{},
"/restmachine/cloudbroker/compute/pfwList": compute_cb.PFWListRequest{},
"/restmachine/cloudbroker/compute/pause": compute_cb.PauseRequest{},
- "/restmachine/cloudbroker/compute/pinToStack": compute_cb.PinToStackRequest{},
+ "/restmachine/cloudbroker/compute/pin_to_node": compute_cb.PinToNodeRequest{},
"/restmachine/cloudbroker/compute/powerCycle": compute_cb.PowerCycleRequest{},
"/restmachine/cloudbroker/compute/raiseDown": EmptyStruct{},
"/restmachine/cloudbroker/compute/reboot": compute_cb.RebootRequest{},
@@ -639,7 +635,7 @@ func getRequestsMapCloudbroker() map[string]interface{} {
"/restmachine/cloudbroker/compute/stop_migration_in": compute_cb.StopMigrationINRequest{},
"/restmachine/cloudbroker/compute/tagAdd": compute_cb.TagAddRequest{},
"/restmachine/cloudbroker/compute/tagRemove": compute_cb.TagRemoveRequest{},
- "/restmachine/cloudbroker/compute/unpinFromStack": compute_cb.UnpinFromStackRequest{},
+ "/restmachine/cloudbroker/compute/unpin_from_node": compute_cb.UnpinFromNodeRequest{},
"/restmachine/cloudbroker/compute/update": compute_cb.UpdateRequest{},
"/restmachine/cloudbroker/compute/userGrant": compute_cb.UserGrantRequest{},
"/restmachine/cloudbroker/compute/userList": compute_cb.UserListRequest{},
@@ -653,6 +649,7 @@ func getRequestsMapCloudbroker() map[string]interface{} {
"/restmachine/cloudbroker/compute/guest_agent_execute": compute_cb.GuestAgentExecuteRequest{},
"/restmachine/cloudbroker/compute/guest_agent_feature_get": compute_cb.GuestAgentFeatureGetRequest{},
"/restmachine/cloudbroker/compute/guest_agent_feature_update": compute_cb.GuestAgentFeatureUpdateRequest{},
+ "/restmachine/cloudbroker/compute/change_read_only": compute_cb.ChangeReadOnlyRequest{},
// disks
"/restmachine/cloudbroker/disks/change_disk_storage_policy": disks_cb.ChangeDiskStoragePolicyRequest{},
@@ -784,7 +781,6 @@ func getRequestsMapCloudbroker() map[string]interface{} {
"/restmachine/cloudbroker/image/grantAccess": image_cb.GrantAccessRequest{},
"/restmachine/cloudbroker/image/link": image_cb.LinkRequest{},
"/restmachine/cloudbroker/image/list": image_cb.ListRequest{},
- "/restmachine/cloudbroker/image/listStacks": image_cb.ListStacksRequest{},
"/restmachine/cloudbroker/image/rename": image_cb.RenameRequest{},
"/restmachine/cloudbroker/image/revokeAccess": image_cb.RevokeAccessRequest{},
"/restmachine/cloudbroker/image/share": image_cb.ShareRequest{},
@@ -863,24 +859,27 @@ func getRequestsMapCloudbroker() map[string]interface{} {
"/restmachine/cloudbroker/lb/updateSysctlParams": lb_cb.UpdateSysctParamsRequest{},
// node
- "/restmachine/cloudbroker/node/add_ssh_identity": node_cb.AddSSHIdentityRequest{},
- "/restmachine/cloudbroker/node/applyIpmiAction": node_cb.ApplyIpmiActionRequest{},
- "/restmachine/cloudbroker/node/consumption": node_cb.ConsumptionRequest{},
- "/restmachine/cloudbroker/node/decommission": node_cb.DecommissionRequest{},
- "/restmachine/cloudbroker/node/enable": node_cb.EnableRequest{},
- "/restmachine/cloudbroker/node/enableNodes": node_cb.EnableNodesRequest{},
- "/restmachine/cloudbroker/node/get": node_cb.GetRequest{},
- "/restmachine/cloudbroker/node/get_ssh_identity": node_cb.GetSSHIdentityRequest{},
- "/restmachine/cloudbroker/node/list": node_cb.ListRequest{},
- "/restmachine/cloudbroker/node/maintenance": node_cb.MaintenanceRequest{},
- "/restmachine/cloudbroker/node/restrict": node_cb.RestrictRequest{},
- "/restmachine/cloudbroker/node/setCoreIsolation": node_cb.SetCoreIsolationRequest{},
- "/restmachine/cloudbroker/node/setHugePages": node_cb.SetHugePagesRequest{},
- "/restmachine/cloudbroker/node/setsriovstatus": node_cb.SetSRIOVStatusRequest{},
- "/restmachine/cloudbroker/node/setVFsNumber": node_cb.SetVFsNumberRequest{},
- "/restmachine/cloudbroker/node/update": node_cb.UpdateRequest{},
- "/restmachine/cloudbroker/node/update_description": node_cb.UpdateDescriptionRequest{},
- "/restmachine/cloudbroker/node/setVFsParams": node_cb.VFParam{},
+ "/restmachine/cloudbroker/node/add_ssh_identity": node_cb.AddSSHIdentityRequest{},
+ "/restmachine/cloudbroker/node/applyIpmiAction": node_cb.ApplyIpmiActionRequest{},
+ "/restmachine/cloudbroker/node/consumption": node_cb.ConsumptionRequest{},
+ "/restmachine/cloudbroker/node/decommission": node_cb.DecommissionRequest{},
+ "/restmachine/cloudbroker/node/enable": node_cb.EnableRequest{},
+ "/restmachine/cloudbroker/node/enableNodes": node_cb.EnableNodesRequest{},
+ "/restmachine/cloudbroker/node/get": node_cb.GetRequest{},
+ "/restmachine/cloudbroker/node/get_ssh_identity": node_cb.GetSSHIdentityRequest{},
+ "/restmachine/cloudbroker/node/list": node_cb.ListRequest{},
+ "/restmachine/cloudbroker/node/maintenance": node_cb.MaintenanceRequest{},
+ "/restmachine/cloudbroker/node/restrict": node_cb.RestrictRequest{},
+ "/restmachine/cloudbroker/node/setCoreIsolation": node_cb.SetCoreIsolationRequest{},
+ "/restmachine/cloudbroker/node/setHugePages": node_cb.SetHugePagesRequest{},
+ "/restmachine/cloudbroker/node/setsriovstatus": node_cb.SetSRIOVStatusRequest{},
+ "/restmachine/cloudbroker/node/setVFsNumber": node_cb.SetVFsNumberRequest{},
+ "/restmachine/cloudbroker/node/update": node_cb.UpdateRequest{},
+ "/restmachine/cloudbroker/node/update_description": node_cb.UpdateDescriptionRequest{},
+ "/restmachine/cloudbroker/node/setVFsParams": node_cb.VFParam{},
+ "/restmachine/cloudbroker/node/get_logical_cores_count": node_cb.GetLogicalCoresCountRequest{},
+ "/restmachine/cloudbroker/node/set_cpu_allocation_ratio": node_cb.SetCpuAllocationRatioRequest{},
+ "/restmachine/cloudbroker/node/set_mem_allocation_ratio": node_cb.SetMemAllocationRatioRequest{},
// pcidevice
"/restmachine/cloudbroker/pcidevice/create": pcidevice_cb.CreateRequest{},
@@ -978,13 +977,6 @@ func getRequestsMapCloudbroker() map[string]interface{} {
"/restmachine/cloudbroker/sep/listAvailableSepAndPools": sep_cb.ListAvailableSEPAndPoolsRequest{},
"/restmachine/cloudbroker/sep/sharedLockStart": sep_cb.SharedLockStartRequest{},
- // stack
- "/restmachine/cloudbroker/stack/get": stack_cb.GetRequest{},
- "/restmachine/cloudbroker/stack/getLogicalCoresCount": stack_cb.GetLogicalCoresCountRequest{},
- "/restmachine/cloudbroker/stack/list": stack_cb.ListRequest{},
- "/restmachine/cloudbroker/stack/setCpuAllocationRatio": stack_cb.SetCpuAllocationRatioRequest{},
- "/restmachine/cloudbroker/stack/setMemAllocationRatio": stack_cb.SetMemAllocationRatioRequest{},
-
// storage_policy
"/restmachine/cloudbroker/storage_policy/get": stpolicy_cb.GetRequest{},
"/restmachine/cloudbroker/storage_policy/list": stpolicy_cb.ListRequest{},