This commit is contained in:
2024-10-02 12:14:31 +03:00
parent a25a3c2e5c
commit 000c1b1704
39 changed files with 110 additions and 135 deletions

View File

@@ -1,34 +1,10 @@
## Version 1.0.0 ## Version 1.0.1
### Feature ### Feature
#### cluster:
- Add endpoint List
- Add endpoint ListVNetworks
#### extstorage:
- Add endpoint List
#### folder
- Add endpoint List
#### image:
- Add endpoint List
#### node
- Add endpoint List
#### respool:
- Add endpoint List
#### template:
- Add endpoint List
- Add endpoint Get
#### vm: #### vm:
- Add endpoint List - Changed RAMHotplugEnabled default value
- Add enpdoint Get
- Add endpoint Create ### Fix
- Add endpoint GetGetDisks
- Add endpoint PowerOff - Сhanged package name from dynamix-standart-go-sdk to dynamix-standard-go-sdk
- Add endpoint PowerOn

View File

@@ -1,10 +1,10 @@
# Dynamix standart SDK # Dynamix standard SDK
Dynamix standart SDK - это библиотека, написанная на языке GO, позволяющая взаимодействовать с API облачной платформы **Vcontrol**. Библиотека содержит в себе структуры и методы, необходимые для отправки запросов. Dynamix standart SDK имеет встроенный http-клиент и поддерживает разные способы авторизации на платформе. Библиотека так же содержит в себе модели ответов от платформы. Dynamix standard SDK - это библиотека, написанная на языке GO, позволяющая взаимодействовать с API облачной платформы **Vcontrol**. Библиотека содержит в себе структуры и методы, необходимые для отправки запросов. Dynamix standard SDK имеет встроенный http-клиент и поддерживает разные способы авторизации на платформе. Библиотека так же содержит в себе модели ответов от платформы.
## Оглавление ## Оглавление
- [Dynamix standart SDK](#dynamix-standart-sdk) - [Dynamix standard SDK](#dynamix-standard-sdk)
- [Оглавление](#оглавление) - [Оглавление](#оглавление)
- [Установка](#установка) - [Установка](#установка)
- [Список API](#список-api) - [Список API](#список-api)
@@ -30,7 +30,7 @@ Dynamix standart SDK - это библиотека, написанная на я
Выполните команду в терминале: Выполните команду в терминале:
```bash ```bash
go get -u repository.basistech.ru/BASIS/dynamix-standart-go-sdk go get -u repository.basistech.ru/BASIS/dynamix-standard-go-sdk
``` ```
## Список API ## Список API
@@ -80,7 +80,7 @@ go get -u repository.basistech.ru/BASIS/dynamix-standart-go-sdk
```go ```go
import ( import (
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/config" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/config"
) )
func main(){ func main(){
@@ -105,7 +105,7 @@ cfg.SetTimeout(5 * time.Minute)
```go ```go
import ( import (
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/config" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/config"
) )
func main() { func main() {
@@ -140,7 +140,7 @@ sslSkipVerify: false
### Создание клиента ### Создание клиента
Создание клиента происходит с помощью функции-строителя `New` из основного пакета `dynamix-standart-go-sdk`, для избежания проблем с именами, пакету можно присвоить алиас `vcontrol`. Функция принимает конфигурацию, возвращает структуру `VControlClient`, с помощью которой можно взаимодействовать с платформой. Создание клиента происходит с помощью функции-строителя `New` из основного пакета `dynamix-standard-go-sdk`, для избежания проблем с именами, пакету можно присвоить алиас `vcontrol`. Функция принимает конфигурацию, возвращает структуру `VControlClient`, с помощью которой можно взаимодействовать с платформой.
### Пример ### Пример
@@ -148,8 +148,8 @@ sslSkipVerify: false
package main package main
import ( import (
vcontrol "repository.basistech.ru/BASIS/dynamix-standart-go-sdk" vcontrol "repository.basistech.ru/BASIS/dynamix-standard-go-sdk"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/config" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/config"
) )
func main() { func main() {
@@ -265,13 +265,12 @@ type ListImageRequest struct {
package main package main
import ( import (
vcontrol "repository.basistech.ru/BASIS/dynamix-standart-go-sdk" vcontrol "repository.basistech.ru/BASIS/dynamix-standard-go-sdk"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/config" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/config"
vm "repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/vm/requests" vm "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/vm/requests"
) )
func main() { func main() {
// Настройка конфигурации
// Настройка конфигурации // Настройка конфигурации
cfg := config.Config{ cfg := config.Config{
Username: "<USERNAME>", Username: "<USERNAME>",
@@ -338,9 +337,9 @@ import (
"log" "log"
"time" "time"
vcontrol "repository.basistech.ru/BASIS/dynamix-standart-go-sdk" vcontrol "repository.basistech.ru/BASIS/dynamix-standard-go-sdk"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/config" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/config"
vm "repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/vm/requests" vm "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/vm/requests"
) )
func main() { func main() {
@@ -390,9 +389,9 @@ import (
"log" "log"
"time" "time"
vcontrol "repository.basistech.ru/BASIS/dynamix-standart-go-sdk" vcontrol "repository.basistech.ru/BASIS/dynamix-standard-go-sdk"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/config" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/config"
vm "repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/vm/requests" vm "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/vm/requests"
) )
func main() { func main() {

View File

@@ -13,9 +13,9 @@ import (
"time" "time"
"github.com/google/go-querystring/query" "github.com/google/go-querystring/query"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/config" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/config"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/constants" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/constants"
api "repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg" api "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg"
) )
// VControlClient is HTTP-client for platform // VControlClient is HTTP-client for platform

View File

@@ -6,7 +6,7 @@ import (
"time" "time"
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/validators" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/validators"
) )
// Client configuration // Client configuration

2
go.mod
View File

@@ -1,4 +1,4 @@
module repository.basistech.ru/BASIS/dynamix-standart-go-sdk module repository.basistech.ru/BASIS/dynamix-standard-go-sdk
go 1.20 go 1.20

View File

@@ -4,7 +4,7 @@ import (
"errors" "errors"
"github.com/go-playground/validator/v10" "github.com/go-playground/validator/v10"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/multierror" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/multierror"
) )
func ValidateRequest(req interface{}) error { func ValidateRequest(req interface{}) error {

View File

@@ -1,6 +1,6 @@
package api package api
import "repository.basistech.ru/BASIS/dynamix-standart-go-sdk/interfaces" import "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/interfaces"
type API struct { type API struct {
client interfaces.Caller client interfaces.Caller

View File

@@ -1,7 +1,7 @@
package api package api
import ( import (
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/cluster" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/cluster"
) )
// Accessing the Cluster method group // Accessing the Cluster method group

View File

@@ -1,6 +1,6 @@
package cluster package cluster
import "repository.basistech.ru/BASIS/dynamix-standart-go-sdk/interfaces" import "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/interfaces"
// Structure for creating request to cluster // Structure for creating request to cluster
type Cluster struct { type Cluster struct {

View File

@@ -5,10 +5,10 @@ import (
"encoding/json" "encoding/json"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/constants" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/constants"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/validators" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/validators"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/cluster/models" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/cluster/models"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/cluster/requests" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/cluster/requests"
) )
// List gets a list of all clusters // List gets a list of all clusters

View File

@@ -6,10 +6,10 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/constants" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/constants"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/validators" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/validators"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/cluster/models" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/cluster/models"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/cluster/requests" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/cluster/requests"
) )
// ListVNetworks Returns a list of v_networks for a specific cluster // ListVNetworks Returns a list of v_networks for a specific cluster

View File

@@ -1,7 +1,7 @@
package api package api
import ( import (
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/extstorage" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/extstorage"
) )
// Accessing the ExtStorage method group // Accessing the ExtStorage method group

View File

@@ -1,6 +1,6 @@
package extstorage package extstorage
import "repository.basistech.ru/BASIS/dynamix-standart-go-sdk/interfaces" import "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/interfaces"
// Structure for creating request to external storage // Structure for creating request to external storage
type ExtStorage struct { type ExtStorage struct {

View File

@@ -5,10 +5,10 @@ import (
"encoding/json" "encoding/json"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/constants" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/constants"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/validators" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/validators"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/extstorage/models" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/extstorage/models"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/extstorage/requests" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/extstorage/requests"
) )
// List gets a list of all storages. // List gets a list of all storages.

View File

@@ -1,6 +1,6 @@
package api package api
import "repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/folder" import "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/folder"
// Accessing the folders pool method group // Accessing the folders pool method group
func (ca *API) Folder() *folder.Folder { func (ca *API) Folder() *folder.Folder {

View File

@@ -1,7 +1,7 @@
package folder package folder
import ( import (
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/interfaces" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/interfaces"
) )
// Structure for creating request to folders // Structure for creating request to folders

View File

@@ -5,10 +5,10 @@ import (
"encoding/json" "encoding/json"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/constants" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/constants"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/validators" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/validators"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/folder/models" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/folder/models"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/folder/requests" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/folder/requests"
) )
// List gets a list of all folder // List gets a list of all folder

View File

@@ -1,7 +1,7 @@
package api package api
import ( import (
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/image" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/image"
) )
// Accessing the images method group // Accessing the images method group

View File

@@ -1,7 +1,7 @@
package image package image
import ( import (
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/interfaces" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/interfaces"
) )
// Structure for creating request to images // Structure for creating request to images

View File

@@ -5,10 +5,10 @@ import (
"encoding/json" "encoding/json"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/constants" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/constants"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/validators" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/validators"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/image/models" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/image/models"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/image/requests" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/image/requests"
) )
// List gets a list of all images. // List gets a list of all images.

View File

@@ -1,7 +1,7 @@
package api package api
import ( import (
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/node" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/node"
) )
// Accessing the images method group // Accessing the images method group

View File

@@ -5,10 +5,10 @@ import (
"encoding/json" "encoding/json"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/constants" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/constants"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/validators" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/validators"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/node/models" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/node/models"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/node/requests" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/node/requests"
) )
// Returns a list of nodes for a specific node // Returns a list of nodes for a specific node

View File

@@ -1,7 +1,7 @@
package node package node
import ( import (
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/interfaces" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/interfaces"
) )
// Structure for creating request to images // Structure for creating request to images

View File

@@ -1,7 +1,7 @@
package api package api
import ( import (
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/respool" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/respool"
) )
// Accessing the Resource pool method group // Accessing the Resource pool method group

View File

@@ -5,10 +5,10 @@ import (
"encoding/json" "encoding/json"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/constants" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/constants"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/validators" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/validators"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/respool/models" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/respool/models"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/respool/requests" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/respool/requests"
) )
// List gets a list of all resource pools // List gets a list of all resource pools

View File

@@ -1,7 +1,7 @@
package respool package respool
import ( import (
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/interfaces" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/interfaces"
) )
// Structure for creating request to resource pools // Structure for creating request to resource pools

View File

@@ -1,6 +1,6 @@
package api package api
import "repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/template" import "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/template"
// Accessing the Template method group // Accessing the Template method group
func (ca *API) Template() *template.Template { func (ca *API) Template() *template.Template {

View File

@@ -6,10 +6,10 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/constants" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/constants"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/validators" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/validators"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/template/models" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/template/models"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/template/requests" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/template/requests"
) )
// Get return information about specified template // Get return information about specified template

View File

@@ -5,10 +5,10 @@ import (
"encoding/json" "encoding/json"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/constants" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/constants"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/validators" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/validators"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/template/models" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/template/models"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/template/requests" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/template/requests"
) )
// List gets a list of all templates the user has access to a ListAccounts struct // List gets a list of all templates the user has access to a ListAccounts struct

View File

@@ -1,7 +1,7 @@
package template package template
import ( import (
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/interfaces" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/interfaces"
) )
// Structure for creating request to template // Structure for creating request to template

View File

@@ -1,6 +1,6 @@
package api package api
import "repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/vm" import "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/vm"
// Accessing the VM method group // Accessing the VM method group
func (ca *API) VM() *vm.VM { func (ca *API) VM() *vm.VM {

View File

@@ -5,10 +5,10 @@ import (
"encoding/json" "encoding/json"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/constants" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/constants"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/validators" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/validators"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/vm/models" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/vm/models"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/vm/requests" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/vm/requests"
) )
type wrapperCreateVMRequest struct { type wrapperCreateVMRequest struct {

View File

@@ -6,10 +6,10 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/constants" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/constants"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/validators" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/validators"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/vm/models" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/vm/models"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/vm/requests" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/vm/requests"
) )
// Get return information about specified VM // Get return information about specified VM

View File

@@ -6,10 +6,10 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/constants" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/constants"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/validators" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/validators"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/vm/models" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/vm/models"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/vm/requests" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/vm/requests"
) )
// GetDisks return information about disks of the specified VM // GetDisks return information about disks of the specified VM

View File

@@ -5,10 +5,10 @@ import (
"encoding/json" "encoding/json"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/constants" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/constants"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/validators" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/validators"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/vm/models" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/vm/models"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/vm/requests" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/vm/requests"
) )
// List gets a list of all vms the user has access to a ListAccounts struct // List gets a list of all vms the user has access to a ListAccounts struct

View File

@@ -6,11 +6,11 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/constants" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/constants"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/validators" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/validators"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/vm/common" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/vm/common"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/vm/models" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/vm/models"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/vm/requests" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/vm/requests"
) )
// PowerOff Power off vm // PowerOff Power off vm

View File

@@ -6,11 +6,11 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/constants" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/constants"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/internal/validators" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/internal/validators"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/vm/common" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/vm/common"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/vm/models" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/vm/models"
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/pkg/vm/requests" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/pkg/vm/requests"
) )
// Enable vm // Enable vm

View File

@@ -98,7 +98,7 @@ type ListVMRequest struct {
// Set memory hotplugging mode for the specified VM. // Set memory hotplugging mode for the specified VM.
// Required: false // Required: false
RAMHotplugEnabled bool `url:"ram_hotplug_enabled" json:"ram_hotplug_enabled"` RAMHotplugEnabled bool `url:"ram_hotplug_enabled,omitempty" json:"ram_hotplug_enabled,omitempty"`
// Set memory guarantee size as a percentage of VM RAM. // Set memory guarantee size as a percentage of VM RAM.
// Required: false // Required: false

View File

@@ -1,7 +1,7 @@
package vm package vm
import ( import (
"repository.basistech.ru/BASIS/dynamix-standart-go-sdk/interfaces" "repository.basistech.ru/BASIS/dynamix-standard-go-sdk/interfaces"
) )
// Structure for creating request to vm // Structure for creating request to vm