v1.2.0
This commit is contained in:
@@ -11,95 +11,95 @@ import (
|
||||
type CreateRequest struct {
|
||||
// Name of Kubernetes cluster
|
||||
// Required: true
|
||||
Name string `url:"name"`
|
||||
Name string `url:"name" json:"name"`
|
||||
|
||||
// Resource Group ID for cluster placement
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
|
||||
// ID of Kubernetes catalog item (k8sci) for cluster
|
||||
// Required: true
|
||||
K8SCIID uint64 `url:"k8ciId"`
|
||||
K8SCIID uint64 `url:"k8ciId" json:"k8ciId"`
|
||||
|
||||
// Name for first worker group created with cluster
|
||||
// Required: true
|
||||
WorkerGroupName string `url:"workerGroupName"`
|
||||
WorkerGroupName string `url:"workerGroupName" json:"workerGroupName"`
|
||||
|
||||
// ID of SEP to create boot disks for master nodes. Uses images SEP ID if not set
|
||||
// Required: false
|
||||
MasterSEPID uint64 `url:"masterSepId,omitempty"`
|
||||
MasterSEPID uint64 `url:"masterSepId,omitempty" json:"masterSepId,omitempty"`
|
||||
|
||||
// Pool to use if master SEP ID is set, can be also empty if needed to be chosen by system
|
||||
// Required: false
|
||||
MasterSEPPool string `url:"masterSepPool,omitempty"`
|
||||
MasterSEPPool string `url:"masterSepPool,omitempty" json:"masterSepPool,omitempty"`
|
||||
|
||||
// ID of SEP to create boot disks for default worker nodes group. Uses images SEP ID if not set
|
||||
// Required: false
|
||||
WorkerSEPID uint64 `url:"workerSepId,omitempty"`
|
||||
WorkerSEPID uint64 `url:"workerSepId,omitempty" json:"workerSepId,omitempty"`
|
||||
|
||||
// Pool to use if worker SEP ID is set, can be also empty if needed to be chosen by system
|
||||
// Required: false
|
||||
WorkerSEPPool string `url:"workerSepPool,omitempty"`
|
||||
WorkerSEPPool string `url:"workerSepPool,omitempty" json:"workerSepPool,omitempty"`
|
||||
|
||||
// List of strings with labels for default worker group
|
||||
// i.e: ["label1=value1", "label2=value2"]
|
||||
// Required: false
|
||||
Labels []string `url:"labels,omitempty"`
|
||||
Labels []string `url:"labels,omitempty" json:"labels,omitempty"`
|
||||
|
||||
// List of strings with taints for default worker group
|
||||
// i.e: ["key1=value1:NoSchedule", "key2=value2:NoExecute"]
|
||||
// Required: false
|
||||
Taints []string `url:"taints,omitempty"`
|
||||
Taints []string `url:"taints,omitempty" json:"taints,omitempty"`
|
||||
|
||||
// List of strings with annotations for worker group
|
||||
// i.e: ["key1=value1", "key2=value2"]
|
||||
// Required: false
|
||||
Annotations []string `url:"annotations,omitempty"`
|
||||
Annotations []string `url:"annotations,omitempty" json:"annotations,omitempty"`
|
||||
|
||||
// Number of master nodes to create
|
||||
// Required: false
|
||||
MasterNum uint `url:"masterNum,omitempty"`
|
||||
MasterNum uint `url:"masterNum,omitempty" json:"masterNum,omitempty"`
|
||||
|
||||
// Master node CPU count
|
||||
// Required: false
|
||||
MasterCPU uint `url:"masterCpu,omitempty"`
|
||||
MasterCPU uint `url:"masterCpu,omitempty" json:"masterCpu,omitempty"`
|
||||
|
||||
// Master node RAM volume in MB
|
||||
// Required: false
|
||||
MasterRAM uint `url:"masterRam,omitempty"`
|
||||
MasterRAM uint `url:"masterRam,omitempty" json:"masterRam,omitempty"`
|
||||
|
||||
// Master node boot disk size in GB If 0 is specified, size is defined by the OS image size
|
||||
// Required: false
|
||||
MasterDisk uint `url:"masterDisk,omitempty"`
|
||||
MasterDisk uint `url:"masterDisk,omitempty" json:"masterDisk,omitempty"`
|
||||
|
||||
// Number of worker nodes to create in default worker group
|
||||
// Required: false
|
||||
WorkerNum uint `url:"workerNum,omitempty"`
|
||||
WorkerNum uint `url:"workerNum,omitempty" json:"workerNum,omitempty"`
|
||||
|
||||
// Worker node CPU count
|
||||
// Required: false
|
||||
WorkerCPU uint `url:"workerCpu,omitempty"`
|
||||
WorkerCPU uint `url:"workerCpu,omitempty" json:"workerCpu,omitempty"`
|
||||
|
||||
// Worker node RAM volume in MB
|
||||
// Required: false
|
||||
WorkerRAM uint `url:"workerRam,omitempty"`
|
||||
WorkerRAM uint `url:"workerRam,omitempty" json:"workerRam,omitempty"`
|
||||
|
||||
// Worker node boot disk size in GB. If 0 is specified, size is defined by the OS image size
|
||||
// Required: false
|
||||
WorkerDisk uint `url:"workerDisk,omitempty"`
|
||||
WorkerDisk uint `url:"workerDisk,omitempty" json:"workerDisk,omitempty"`
|
||||
|
||||
// ID of the external network to connect load balancer and cluster ViNS. If 0 is specified, external network selects automatically to
|
||||
// Required: false
|
||||
ExtNetID uint64 `url:"extnetId,omitempty"`
|
||||
ExtNetID uint64 `url:"extnetId,omitempty" json:"extnetId,omitempty"`
|
||||
|
||||
// Create Kubernetes cluster with masters nodes behind load balancer if true.
|
||||
// Otherwise give all cluster nodes direct external addresses from selected ExtNet
|
||||
// Required: false
|
||||
WithLB bool `url:"withLB,omitempty"`
|
||||
WithLB bool `url:"withLB,omitempty" json:"withLB,omitempty"`
|
||||
|
||||
// Text description of this Kubernetes cluster
|
||||
// Required: false
|
||||
Description string `url:"desc, omitempty"`
|
||||
Description string `url:"desc,omitempty" json:"desc,omitempty"`
|
||||
}
|
||||
|
||||
func (krq CreateRequest) validate() error {
|
||||
|
||||
@@ -11,12 +11,12 @@ import (
|
||||
type DeleteRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
|
||||
// True if cluster is destroyed permanently.
|
||||
// Otherwise it can be restored from Recycle Bin
|
||||
// Required: true
|
||||
Permanently bool `url:"permanently"`
|
||||
Permanently bool `url:"permanently" json:"permanently"`
|
||||
}
|
||||
|
||||
func (krq DeleteRequest) validate() error {
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
type DeleteMasterFromGroupRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
|
||||
// ID of the masters compute group
|
||||
// Required: true
|
||||
MasterGroupID uint64 `url:"masterGroupId"`
|
||||
MasterGroupID uint64 `url:"masterGroupId" json:"masterGroupId"`
|
||||
|
||||
// List of Compute IDs of master nodes to delete
|
||||
// Required: true
|
||||
MasterIDs []string `url:"masterIds"`
|
||||
MasterIDs []string `url:"masterIds" json:"masterIds"`
|
||||
}
|
||||
|
||||
func (krq DeleteMasterFromGroupRequest) validate() error {
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
type DeleteWorkerFromGroupRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
|
||||
// ID of the workers compute group
|
||||
// Required: true
|
||||
WorkersGroupID uint64 `url:"workersGroupId"`
|
||||
WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId"`
|
||||
|
||||
// Compute ID of worker node to delete
|
||||
// Required: true
|
||||
WorkerID uint64 `url:"workerId"`
|
||||
WorkerID uint64 `url:"workerId" json:"workerId"`
|
||||
}
|
||||
|
||||
func (krq DeleteWorkerFromGroupRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type DisabelEnableRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
}
|
||||
|
||||
func (krq DisabelEnableRequest) validate() error {
|
||||
|
||||
@@ -11,16 +11,16 @@ import (
|
||||
type FindGroupByLabelRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
|
||||
// List of labels to search
|
||||
// Required: true
|
||||
Labels []string `url:"labels"`
|
||||
Labels []string `url:"labels" json:"labels"`
|
||||
|
||||
// If true and more than one label provided, select only groups that have all provided labels.
|
||||
// If false - groups that have at least one label
|
||||
// Required: true
|
||||
Strict bool `url:"strict"`
|
||||
Strict bool `url:"strict" json:"strict"`
|
||||
}
|
||||
|
||||
func (krq FindGroupByLabelRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type GetRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
}
|
||||
|
||||
func (krq GetRequest) validate() error {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
type GetConfigRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
}
|
||||
|
||||
func (krq GetConfigRequest) validate() error {
|
||||
|
||||
@@ -10,11 +10,11 @@ import (
|
||||
type GetNodeAnnotationsRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
|
||||
// Node ID
|
||||
// Required: true
|
||||
NodeID uint64 `url:"nodeId"`
|
||||
NodeID uint64 `url:"nodeId" json:"nodeId"`
|
||||
}
|
||||
|
||||
func (krq GetNodeAnnotationsRequest) validate() error {
|
||||
|
||||
@@ -10,11 +10,11 @@ import (
|
||||
type GetNodeLabelsRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
|
||||
// Node ID
|
||||
// Required: false
|
||||
NodeID uint64 `url:"nodeId"`
|
||||
NodeID uint64 `url:"nodeId" json:"nodeId"`
|
||||
}
|
||||
|
||||
func (krq GetNodeLabelsRequest) validate() error {
|
||||
|
||||
@@ -10,11 +10,11 @@ import (
|
||||
type GetNodeTaintsRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
|
||||
// Node ID
|
||||
// Required: false
|
||||
NodeID uint64 `url:"nodeId"`
|
||||
NodeID uint64 `url:"nodeId" json:"nodeId"`
|
||||
}
|
||||
|
||||
func (krq GetNodeTaintsRequest) validate() error {
|
||||
|
||||
@@ -10,15 +10,15 @@ import (
|
||||
type ListRequest struct {
|
||||
// Include deleted clusters in result
|
||||
// Required: false
|
||||
IncludeDeleted bool `url:"includedeleted,omitempty"`
|
||||
IncludeDeleted bool `url:"includedeleted,omitempty" json:"includedeleted,omitempty"`
|
||||
|
||||
// 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 kubernetes clusters the user has access to
|
||||
|
||||
@@ -10,11 +10,11 @@ import (
|
||||
type ListDeletedRequest 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"`
|
||||
}
|
||||
|
||||
// ListDeleted gets all deleted kubernetes clusters the user has access to
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type RestoreRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
}
|
||||
|
||||
func (krq RestoreRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type StartRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
}
|
||||
|
||||
func (krq StartRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type StopRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
}
|
||||
|
||||
func (krq StopRequest) validate() error {
|
||||
|
||||
@@ -11,17 +11,17 @@ import (
|
||||
type UpdateRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
|
||||
// New name to set.
|
||||
// If empty string is passed, name is not updated
|
||||
// Required: false
|
||||
Name string `url:"name,omitempty"`
|
||||
Name string `url:"name,omitempty" json:"name,omitempty"`
|
||||
|
||||
// New description to set.
|
||||
// If empty string is passed, description is not updated
|
||||
// Required: false
|
||||
Description string `url:"desc,omitempty"`
|
||||
Description string `url:"desc,omitempty" json:"desc,omitempty"`
|
||||
}
|
||||
|
||||
func (krq UpdateRequest) validate() error {
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
type WorkerAddRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
|
||||
// ID of the workers compute group
|
||||
// Required: true
|
||||
WorkersGroupID uint64 `url:"workersGroupId"`
|
||||
WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId"`
|
||||
|
||||
// How many worker nodes to add
|
||||
// Required: true
|
||||
Num uint64 `url:"num"`
|
||||
Num uint64 `url:"num" json:"num"`
|
||||
}
|
||||
|
||||
func (krq WorkerAddRequest) validate() error {
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
type WorkerResetRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
|
||||
// ID of the workers compute group
|
||||
// Required: true
|
||||
WorkersGroupID uint64 `url:"workersGroupId"`
|
||||
WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId"`
|
||||
|
||||
// Compute ID of worker node to reset
|
||||
// Required: true
|
||||
WorkerID uint64 `url:"workerId"`
|
||||
WorkerID uint64 `url:"workerId" json:"workerId"`
|
||||
}
|
||||
|
||||
func (krq WorkerResetRequest) validate() error {
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
type WorkerRestartRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
|
||||
// ID of the workers compute group
|
||||
// Required: true
|
||||
WorkersGroupID uint64 `url:"workersGroupId"`
|
||||
WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId"`
|
||||
|
||||
// Compute ID of worker node to restart
|
||||
// Required: true
|
||||
WorkerID uint64 `url:"workerId"`
|
||||
WorkerID uint64 `url:"workerId" json:"workerId"`
|
||||
}
|
||||
|
||||
func (krq WorkerRestartRequest) validate() error {
|
||||
|
||||
@@ -11,50 +11,50 @@ import (
|
||||
type WorkersGroupAddRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
|
||||
// Worker group name
|
||||
// Required: true
|
||||
Name string `url:"name"`
|
||||
Name string `url:"name" json:"name"`
|
||||
|
||||
// ID of SEP to create boot disks for default worker nodes group. Uses images SEP ID if not set
|
||||
// Required: false
|
||||
WorkerSEPID uint64 `url:"workerSepId,omitempty"`
|
||||
WorkerSEPID uint64 `url:"workerSepId,omitempty" json:"workerSepId,omitempty"`
|
||||
|
||||
// Pool to use if worker SEP ID is set, can be also empty if needed to be chosen by system
|
||||
// Required: false
|
||||
WorkerSEPPool string `url:"workerSepPool,omitempty"`
|
||||
WorkerSEPPool string `url:"workerSepPool,omitempty" json:"workerSepPool,omitempty"`
|
||||
|
||||
// List of strings with labels for worker group
|
||||
// i.e: ["label1=value1", "label2=value2"]
|
||||
// Required: false
|
||||
Labels []string `url:"labels,omitempty"`
|
||||
Labels []string `url:"labels,omitempty" json:"labels,omitempty"`
|
||||
|
||||
// List of strings with taints for worker group
|
||||
// i.e: ["key1=value1:NoSchedule", "key2=value2:NoExecute"]
|
||||
// Required: false
|
||||
Taints []string `url:"taints,omitempty"`
|
||||
Taints []string `url:"taints,omitempty" json:"taints,omitempty"`
|
||||
|
||||
// List of strings with annotations for worker group
|
||||
// i.e: ["key1=value1", "key2=value2"]
|
||||
// Required: false
|
||||
Annotations []string `url:"annotations,omitempty"`
|
||||
Annotations []string `url:"annotations,omitempty" json:"annotations,omitempty"`
|
||||
|
||||
// Number of worker nodes to create
|
||||
// Required: false
|
||||
WorkerNum uint64 `url:"workerNum,omitempty"`
|
||||
WorkerNum uint64 `url:"workerNum,omitempty" json:"workerNum,omitempty"`
|
||||
|
||||
// Worker node CPU count
|
||||
// Required: false
|
||||
WorkerCPU uint64 `url:"workerCpu,omitempty"`
|
||||
WorkerCPU uint64 `url:"workerCpu,omitempty" json:"workerCpu,omitempty"`
|
||||
|
||||
// Worker node RAM volume in MB
|
||||
// Required: false
|
||||
WorkerRAM uint64 `url:"workerRam,omitempty"`
|
||||
WorkerRAM uint64 `url:"workerRam,omitempty" json:"workerRam,omitempty"`
|
||||
|
||||
// Worker node boot disk size in GB If 0 is specified, size is defined by the OS image size
|
||||
// Required: false
|
||||
WorkerDisk uint64 `url:"workerDisk,omitempty"`
|
||||
WorkerDisk uint64 `url:"workerDisk,omitempty" json:"workerDisk,omitempty"`
|
||||
}
|
||||
|
||||
func (krq WorkersGroupAddRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type WorkersGroupDeleteRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
|
||||
// Worker group ID
|
||||
// Required: true
|
||||
WorkersGroupID uint64 `url:"workersGroupId"`
|
||||
WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId"`
|
||||
}
|
||||
|
||||
func (krq WorkersGroupDeleteRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type WorkersGroupGetByNameRequest struct {
|
||||
// Kubernetes cluster ID
|
||||
// Required: true
|
||||
K8SID uint64 `url:"k8sId"`
|
||||
K8SID uint64 `url:"k8sId" json:"k8sId"`
|
||||
|
||||
// Worker group name
|
||||
// Required: true
|
||||
GroupName string `url:"groupName"`
|
||||
GroupName string `url:"groupName" json:"groupName"`
|
||||
}
|
||||
|
||||
func (krq WorkersGroupGetByNameRequest) validate() error {
|
||||
|
||||
Reference in New Issue
Block a user