Documentation
¶
Overview ¶
Operator actions for handling interventions on a grid
Index ¶
- type AddRequest
- type ChangeSettingsRequest
- type CheckVMsRequest
- type CreateSystemSpaceRequest
- type DiskUsage
- type ExecuteMaintenanceScriptRequest
- type GetBackupRequest
- type GetDiagnosisRequest
- type GetRequest
- type Grid
- func (g Grid) Add(ctx context.Context, req AddRequest) (bool, error)
- func (g Grid) ChangeSettings(ctx context.Context, req ChangeSettingsRequest) (bool, error)
- func (g Grid) CheckVMs(ctx context.Context, req CheckVMsRequest) (bool, error)
- func (g Grid) CreateSystemSpace(ctx context.Context, req CreateSystemSpaceRequest) (string, error)
- func (g Grid) ExecuteMaintenanceScript(ctx context.Context, req ExecuteMaintenanceScriptRequest) (bool, error)
- func (g Grid) Get(ctx context.Context, req GetRequest) (*RecordGrid, error)
- func (g Grid) GetBackup(ctx context.Context, req GetBackupRequest) (string, error)
- func (g Grid) GetBackupGET(ctx context.Context, req GetBackupRequest) (string, error)
- func (g Grid) GetDiagnosis(ctx context.Context, req GetDiagnosisRequest) (string, error)
- func (g Grid) GetDiagnosisGET(ctx context.Context, req GetDiagnosisRequest) (string, error)
- func (g Grid) List(ctx context.Context, req ListRequest) (ListGrids, error)
- func (g Grid) ListEmails(ctx context.Context) ([]string, error)
- func (g Grid) PurgeLogs(ctx context.Context, req PurgeLogsRequest) (bool, error)
- func (g Grid) Rename(ctx context.Context, req RenameRequest) (bool, error)
- func (g Grid) ServicesRestart(ctx context.Context, req ServicesRestartRequest) (bool, error)
- func (g Grid) SetCPUAllocationRatio(ctx context.Context, req SetCPUAllocationRatioRequest) (bool, error)
- func (g Grid) SetMemAllocationRatio(ctx context.Context, req SetMemAllocationRatioRequest) (bool, error)
- func (g Grid) Status(ctx context.Context) (bool, error)
- func (g Grid) StatusGET(ctx context.Context) (bool, error)
- type ListGrids
- type ListRequest
- type PurgeLogsRequest
- type RecordGrid
- type RecordResource
- type RenameRequest
- type Resources
- type ServicesRestartRequest
- type SetCPUAllocationRatioRequest
- type SetMemAllocationRatioRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddRequest ¶
type AddRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gid" json:"gid"`
// Name of the location
// Required: true
Name string `url:"name" json:"name"`
// Location code typicly used in dns names
// Required: true
LocationCode string `url:"locationcode" json:"locationcode"`
}
Request struct for location code
type ChangeSettingsRequest ¶
type ChangeSettingsRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"id" json:"id"`
// Json data of the new settings will override old data
// Required: true
Settings string `url:"settings" json:"settings"`
}
Request struct for change grid settings
type CheckVMsRequest ¶
type CheckVMsRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gid" json:"gid"`
}
Request struct for check virtual machine
type CreateSystemSpaceRequest ¶
type CreateSystemSpaceRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"id" json:"id"`
// Name of the account/cloudspace to be created for the system
// Required: true
Name string `url:"name" json:"name"`
// ID of the specific image
// Required: true
ImageID uint64 `url:"imageId" json:"imageId"`
// Size of base volume
// Required: true
BootSize uint64 `url:"bootsize" json:"bootsize"`
// Data disk size in gigabytes
// Required: true
DataDiskSize uint64 `url:"dataDiskSize" json:"dataDiskSize"`
// ID of the specific size
// Required: false
SizeID uint64 `url:"sizeId,omitempty" json:"sizeId,omitempty"`
// Number of vcpus to provide
// Required: false
VCPUS uint64 `url:"vcpus,omitempty" json:"vcpus,omitempty"`
// Amount of memory to provide
// Required: false
Memory uint64 `url:"memory,omitempty" json:"memory,omitempty"`
}
Request struct for create system space
type DiskUsage ¶ added in v1.1.0
type DiskUsage struct {
// Disk size
DiskSize float64 `json:"disksize"`
// Disk size max
DiskSizeMax float64 `json:"disksizemax"`
}
Disk usage
type ExecuteMaintenanceScriptRequest ¶
type ExecuteMaintenanceScriptRequest struct {
// Grid (platform) ID
// Required: true
GID string `url:"gid" json:"gid"`
// Type of nodes you want to apply the action on
// Required: true
NodesType string `url:"nodestype" json:"nodestype"`
// The script you want to run
// Required: true
Script string `url:"script" json:"script"`
}
Request struct for execute script
type GetBackupRequest ¶
type GetBackupRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gid" json:"gid"`
}
Request struct for get backup
type GetDiagnosisRequest ¶
type GetDiagnosisRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gid" json:"gid"`
}
Request struct for get platform snapshot with additional diagnosis
type GetRequest ¶
type GetRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gridId" json:"gridId"`
}
Request struct for get grid details
type Grid ¶
type Grid struct {
// contains filtered or unexported fields
}
Structure for creating request to grid
func (Grid) ChangeSettings ¶
ChangeSettings changes grid settings
func (Grid) CreateSystemSpace ¶
CreateSystemSpace creates system space
func (Grid) ExecuteMaintenanceScript ¶
func (g Grid) ExecuteMaintenanceScript(ctx context.Context, req ExecuteMaintenanceScriptRequest) (bool, error)
ExecuteMaintenanceScript executes maintenance script
func (Grid) Get ¶
func (g Grid) Get(ctx context.Context, req GetRequest) (*RecordGrid, error)
Get gets information about grid by ID
func (Grid) GetBackupGET ¶
GetBackupGET gets platform backup
func (Grid) GetDiagnosis ¶
GetDiagnosis get platform snapshot with additional diagnosis info like a logs, etc
func (Grid) GetDiagnosisGET ¶
GetDiagnosisGET get platform snapshot with additional diagnosis info like a logs, etc
func (Grid) ListEmails ¶
ListEmails returns list of email addresses of users
func (Grid) PurgeLogs ¶
PurgeLogs clear Log and ECO records that are older than the specified age. By default, records older than one week are removed
func (Grid) ServicesRestart ¶
ServicesRestart restarts decort services on the node
func (Grid) SetCPUAllocationRatio ¶
func (g Grid) SetCPUAllocationRatio(ctx context.Context, req SetCPUAllocationRatioRequest) (bool, error)
SetCPUAllocationRatio sets CPU allocation ratio
func (Grid) SetMemAllocationRatio ¶
func (g Grid) SetMemAllocationRatio(ctx context.Context, req SetMemAllocationRatioRequest) (bool, error)
SetMemAllocationRatio sets memory allocation ratio
type ListRequest ¶
type ListRequest struct {
// Page number
// Required: false
Page uint64 `url:"page,omitempty" json:"page,omitempty"`
// Page size
// Required: false
Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}
Request struct for get list locations
type PurgeLogsRequest ¶
type PurgeLogsRequest struct {
// Grid (platform) ID
// Required: true
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" json:"age"`
}
Request struct for purge logs
type RecordGrid ¶
type RecordGrid struct {
// Resource information
Resources Resources `json:"Resources"`
// Flag
Flag string `json:"flag"`
// Grid ID
GID uint64 `json:"gid"`
// GUID
GUID uint64 `json:"guid"`
// ID
ID uint64 `json:"id"`
// Location code
LocationCode string `json:"locationCode"`
// Name
Name string `json:"name"`
}
Detailed information about grid
type RecordResource ¶
type RecordResource struct {
// Number of CPU
CPU uint64 `json:"cpu"`
// Disk size
DiskSize uint64 `json:"disksize"`
// Disk size max
DiskSizeMax int64 `json:"disksizemax"`
// External IPs
ExtIPs uint64 `json:"extips"`
// External traffic
ExtTraffic uint64 `json:"exttraffic"`
// Number of GPU
GPU uint64 `json:"gpu"`
// Number of RAM
RAM uint64 `json:"ram"`
// SEPs
SEPs map[string]map[string]DiskUsage `json:"seps"`
}
Resource details
type RenameRequest ¶
type RenameRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gid" json:"gid"`
// New name
// Required: true
Name string `url:"Name" json:"Name"`
}
Request struct for rename grid
type Resources ¶
type Resources struct {
// Current resources
Current RecordResource `json:"Current"`
// Reserved resources
Reserved RecordResource `json:"Reserved"`
}
Resource information
type ServicesRestartRequest ¶
type ServicesRestartRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gid" json:"gid"`
// Node ID
// Required: true
NID uint64 `url:"nid" json:"nid"`
}
Request struct for restart services
type SetCPUAllocationRatioRequest ¶
type SetCPUAllocationRatioRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gridId" json:"gridId"`
// Allocation ratio
// Required: true
Ratio float64 `url:"ratio" json:"ratio"`
}
Request struct for set allocation
type SetMemAllocationRatioRequest ¶
type SetMemAllocationRatioRequest struct {
// Grid (platform) ID
// Required: true
GID uint64 `url:"gridId" json:"gridId"`
// Allocation ratio
// Required: true
Ratio float64 `url:"ratio" json:"ratio"`
}
Request struct for set memory allocation