v1.2.0
This commit is contained in:
@@ -11,15 +11,15 @@ import (
|
||||
type AddRequest struct {
|
||||
// Grid (platform) ID
|
||||
// Required: true
|
||||
GID uint64 `url:"gid"`
|
||||
GID uint64 `url:"gid" json:"gid"`
|
||||
|
||||
// Name of the location
|
||||
// Required: true
|
||||
Name string `url:"name"`
|
||||
Name string `url:"name" json:"name"`
|
||||
|
||||
// Location code typicly used in dns names
|
||||
// Required: true
|
||||
LocationCode string `url:"locationcode"`
|
||||
LocationCode string `url:"locationcode" json:"locationcode"`
|
||||
}
|
||||
|
||||
func (grq AddRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type ChangeSettingsRequest struct {
|
||||
// Grid (platform) ID
|
||||
// Required: true
|
||||
GID uint64 `url:"id"`
|
||||
GID uint64 `url:"id" json:"id"`
|
||||
|
||||
// Json data of the new settings will override old data
|
||||
// Required: true
|
||||
Settings string `url:"settings"`
|
||||
Settings string `url:"settings" json:"settings"`
|
||||
}
|
||||
|
||||
func (grq ChangeSettingsRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type CheckVMsRequest struct {
|
||||
// Grid (platform) ID
|
||||
// Required: true
|
||||
GID uint64 `url:"gid"`
|
||||
GID uint64 `url:"gid" json:"gid"`
|
||||
}
|
||||
|
||||
func (grq CheckVMsRequest) validate() error {
|
||||
|
||||
@@ -10,35 +10,35 @@ import (
|
||||
type CreateSystemSpaceRequest struct {
|
||||
// Grid (platform) ID
|
||||
// Required: true
|
||||
GID uint64 `url:"id"`
|
||||
GID uint64 `url:"id" json:"id"`
|
||||
|
||||
// Name of the account/cloudspace to be created for the system
|
||||
// Required: true
|
||||
Name string `url:"name"`
|
||||
Name string `url:"name" json:"name"`
|
||||
|
||||
// ID of the specific image
|
||||
// Required: true
|
||||
ImageID uint64 `url:"imageId"`
|
||||
ImageID uint64 `url:"imageId" json:"imageId"`
|
||||
|
||||
// Size of base volume
|
||||
// Required: true
|
||||
BootSize uint64 `url:"bootsize"`
|
||||
BootSize uint64 `url:"bootsize" json:"bootsize"`
|
||||
|
||||
// Data disk size in gigabytes
|
||||
// Required: true
|
||||
DataDiskSize uint64 `url:"dataDiskSize"`
|
||||
DataDiskSize uint64 `url:"dataDiskSize" json:"dataDiskSize"`
|
||||
|
||||
// ID of the specific size
|
||||
// Required: false
|
||||
SizeID uint64 `url:"sizeId,omitempty"`
|
||||
SizeID uint64 `url:"sizeId,omitempty" json:"sizeId,omitempty"`
|
||||
|
||||
// Number of vcpus to provide
|
||||
// Required: false
|
||||
VCPUS uint64 `url:"vcpus,omitempty"`
|
||||
VCPUS uint64 `url:"vcpus,omitempty" json:"vcpus,omitempty"`
|
||||
|
||||
// Amount of memory to provide
|
||||
// Required: false
|
||||
Memory uint64 `url:"memory,omitempty"`
|
||||
Memory uint64 `url:"memory,omitempty" json:"memory,omitempty"`
|
||||
}
|
||||
|
||||
func (grq CreateSystemSpaceRequest) validate() error {
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
type ExecuteMaintenanceScriptRequest struct {
|
||||
// Grid (platform) ID
|
||||
// Required: true
|
||||
GID string `url:"gid"`
|
||||
GID string `url:"gid" json:"gid"`
|
||||
|
||||
// Type of nodes you want to apply the action on
|
||||
// Required: true
|
||||
NodesType string `url:"nodestype"`
|
||||
NodesType string `url:"nodestype" json:"nodestype"`
|
||||
|
||||
// The script you want to run
|
||||
// Required: true
|
||||
Script string `url:"script"`
|
||||
Script string `url:"script" json:"script"`
|
||||
}
|
||||
|
||||
func (grq ExecuteMaintenanceScriptRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type GetRequest struct {
|
||||
// Grid (platform) ID
|
||||
// Required: true
|
||||
GID uint64 `url:"gridId"`
|
||||
GID uint64 `url:"gridId" json:"gridId"`
|
||||
}
|
||||
|
||||
func (grq GetRequest) validate() error {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
type GetBackupRequest struct {
|
||||
// Grid (platform) ID
|
||||
// Required: true
|
||||
GID uint64 `url:"gid"`
|
||||
GID uint64 `url:"gid" json:"gid"`
|
||||
}
|
||||
|
||||
func (grq GetBackupRequest) validate() error {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
type GetDiagnosisRequest struct {
|
||||
// Grid (platform) ID
|
||||
// Required: true
|
||||
GID uint64 `url:"gid"`
|
||||
GID uint64 `url:"gid" json:"gid"`
|
||||
}
|
||||
|
||||
func (grq GetDiagnosisRequest) validate() error {
|
||||
|
||||
@@ -10,11 +10,11 @@ import (
|
||||
type ListRequest struct {
|
||||
// Page number
|
||||
// Required: false
|
||||
Page uint64 `url:"page,omitempty"`
|
||||
Page uint64 `url:"page,omitempty" json:"page,omitempty"`
|
||||
|
||||
// Page size
|
||||
// Required: false
|
||||
Size uint64 `url:"size,omitempty"`
|
||||
Size uint64 `url:"size,omitempty" json:"size,omitempty"`
|
||||
}
|
||||
|
||||
// List gets list all locations
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type PurgeLogsRequest struct {
|
||||
// Grid (platform) ID
|
||||
// Required: true
|
||||
GID uint64 `url:"gid"`
|
||||
GID uint64 `url:"gid" json:"gid"`
|
||||
|
||||
// Age of the records to remove, e.g. -1h for records older than 1 hour, -1w - one week, etc
|
||||
// Required: true
|
||||
Age string `url:"age"`
|
||||
Age string `url:"age" json:"age"`
|
||||
}
|
||||
|
||||
func (grq PurgeLogsRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type RenameRequest struct {
|
||||
// Grid (platform) ID
|
||||
// Required: true
|
||||
GID uint64 `url:"gid"`
|
||||
GID uint64 `url:"gid" json:"gid"`
|
||||
|
||||
// New name
|
||||
// Required: true
|
||||
Name string `url:"Name"`
|
||||
Name string `url:"Name" json:"Name"`
|
||||
}
|
||||
|
||||
func (grq RenameRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type ServicesRestartRequest struct {
|
||||
// Grid (platform) ID
|
||||
// Required: true
|
||||
GID uint64 `url:"gid"`
|
||||
GID uint64 `url:"gid" json:"gid"`
|
||||
|
||||
// Node ID
|
||||
// Required: true
|
||||
NID uint64 `url:"nid"`
|
||||
NID uint64 `url:"nid" json:"nid"`
|
||||
}
|
||||
|
||||
func (grq ServicesRestartRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type SetCPUAllocationRatioRequest struct {
|
||||
// Grid (platform) ID
|
||||
// Required: true
|
||||
GID uint64 `url:"gridId"`
|
||||
GID uint64 `url:"gridId" json:"gridId"`
|
||||
|
||||
// Allocation ratio
|
||||
// Required: true
|
||||
Ratio float64 `url:"ratio"`
|
||||
Ratio float64 `url:"ratio" json:"ratio"`
|
||||
}
|
||||
|
||||
func (grq SetCPUAllocationRatioRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type SetMemAllocationRatioRequest struct {
|
||||
// Grid (platform) ID
|
||||
// Required: true
|
||||
GID uint64 `url:"gridId"`
|
||||
GID uint64 `url:"gridId" json:"gridId"`
|
||||
|
||||
// Allocation ratio
|
||||
// Required: true
|
||||
Ratio float64 `url:"ratio"`
|
||||
Ratio float64 `url:"ratio" json:"ratio"`
|
||||
}
|
||||
|
||||
func (grq SetMemAllocationRatioRequest) validate() error {
|
||||
|
||||
Reference in New Issue
Block a user