v1.2.0
This commit is contained in:
@@ -11,19 +11,19 @@ import (
|
||||
type CreateRequest struct {
|
||||
// Name of the service
|
||||
// Required: true
|
||||
Name string `url:"name"`
|
||||
Name string `url:"name" json:"name"`
|
||||
|
||||
// ID of the Resource Group where this service will be placed
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
|
||||
// Name of the user to deploy SSH key for. Pass empty string if no SSH key deployment is required
|
||||
// Required: false
|
||||
SSHUser string `url:"sshUser,omitempty"`
|
||||
SSHUser string `url:"sshUser,omitempty" json:"sshUser,omitempty"`
|
||||
|
||||
// SSH key to deploy for the specified user. Same key will be deployed to all computes of the service
|
||||
// Required: false
|
||||
SSHKey string `url:"sshKey,omitempty"`
|
||||
SSHKey string `url:"sshKey,omitempty" json:"sshKey,omitempty"`
|
||||
}
|
||||
|
||||
func (bsrq CreateRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type DeleteRequest struct {
|
||||
// ID of the BasicService to be delete
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
|
||||
// If set to False, Basic service will be deleted to recycle bin. Otherwise destroyed immediately
|
||||
// Required: true
|
||||
Permanently bool `url:"permanently,omitempty"`
|
||||
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
|
||||
}
|
||||
|
||||
func (bsrq DeleteRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type DisableRequest struct {
|
||||
// ID of the service to disable
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
}
|
||||
|
||||
func (bsrq DisableRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type EnableRequest struct {
|
||||
// ID of the service to enable
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
}
|
||||
|
||||
func (bsrq EnableRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type GetRequest struct {
|
||||
// ID of the service to query information
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
}
|
||||
|
||||
func (bsrq GetRequest) validate() error {
|
||||
|
||||
@@ -11,62 +11,62 @@ import (
|
||||
type GroupAddRequest struct {
|
||||
// ID of the Basic Service to add a group to
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
|
||||
// Name of the Compute Group to add
|
||||
// Required: true
|
||||
Name string `url:"name"`
|
||||
Name string `url:"name" json:"name"`
|
||||
|
||||
// Computes number. Defines how many computes must be there in the group
|
||||
// Required: true
|
||||
Count uint64 `url:"count"`
|
||||
Count uint64 `url:"count" json:"count"`
|
||||
|
||||
// Compute CPU number. All computes in the group have the same CPU count
|
||||
// Required: true
|
||||
CPU uint64 `url:"cpu"`
|
||||
CPU uint64 `url:"cpu" json:"cpu"`
|
||||
|
||||
// Compute RAM volume in MB. All computes in the group have the same RAM volume
|
||||
// Required: true
|
||||
RAM uint64 `url:"ram"`
|
||||
RAM uint64 `url:"ram" json:"ram"`
|
||||
|
||||
// Compute boot disk size in GB
|
||||
// Required: true
|
||||
Disk uint64 `url:"disk"`
|
||||
Disk uint64 `url:"disk" json:"disk"`
|
||||
|
||||
// OS image ID to create computes from
|
||||
// Required: true
|
||||
ImageID uint64 `url:"imageId"`
|
||||
ImageID uint64 `url:"imageId" json:"imageId"`
|
||||
|
||||
// Compute driver
|
||||
// should be one of:
|
||||
// - KVM_X86
|
||||
// - KVM_PPC
|
||||
// Required: true
|
||||
Driver string `url:"driver"`
|
||||
Driver string `url:"driver" json:"driver"`
|
||||
|
||||
// Storage endpoint provider ID
|
||||
// Required: false
|
||||
SEPID uint64 `url:"sepId,omitempty"`
|
||||
SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"`
|
||||
|
||||
// Pool to use if sepId is set, can be also empty if needed to be chosen by system
|
||||
// Required: false
|
||||
SEPPool string `url:"sepPool,omitempty"`
|
||||
SEPPool string `url:"sepPool,omitempty" json:"sepPool,omitempty"`
|
||||
|
||||
// Group role tag. Can be empty string, does not have to be unique
|
||||
// Required: false
|
||||
Role string `url:"role,omitempty"`
|
||||
Role string `url:"role,omitempty" json:"role,omitempty"`
|
||||
|
||||
// List of ViNSes to connect computes to
|
||||
// Required: false
|
||||
VINSes []uint64 `url:"vinses,omitempty"`
|
||||
VINSes []uint64 `url:"vinses,omitempty" json:"vinses,omitempty"`
|
||||
|
||||
// List of external networks to connect computes to
|
||||
// Required: false
|
||||
ExtNets []uint64 `url:"extnets,omitempty"`
|
||||
ExtNets []uint64 `url:"extnets,omitempty" json:"extnets,omitempty"`
|
||||
|
||||
// Time of Compute Group readiness
|
||||
// Required: false
|
||||
TimeoutStart uint64 `url:"timeoutStart"`
|
||||
TimeoutStart uint64 `url:"timeoutStart" json:"timeoutStart"`
|
||||
}
|
||||
|
||||
func (bsrq GroupAddRequest) validate() error {
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
type GroupComputeRemoveRequest struct {
|
||||
// ID of the Basic Service
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
|
||||
// ID of the Compute GROUP
|
||||
// Required: true
|
||||
CompGroupID uint64 `url:"compgroupId"`
|
||||
CompGroupID uint64 `url:"compgroupId" json:"compgroupId"`
|
||||
|
||||
// ID of the Compute
|
||||
// Required: true
|
||||
ComputeID uint64 `url:"computeId"`
|
||||
ComputeID uint64 `url:"computeId" json:"computeId"`
|
||||
}
|
||||
|
||||
func (bsrq GroupComputeRemoveRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type GroupGetRequest struct {
|
||||
// ID of the Basic Service of Compute Group
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
|
||||
// ID of the Compute Group
|
||||
// Required: true
|
||||
CompGroupID uint64 `url:"compgroupId"`
|
||||
CompGroupID uint64 `url:"compgroupId" json:"compgroupId"`
|
||||
}
|
||||
|
||||
func (bsrq GroupGetRequest) validate() error {
|
||||
|
||||
@@ -12,15 +12,15 @@ import (
|
||||
type GroupParentAddRequest struct {
|
||||
// ID of the Basic Service of Compute Group
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
|
||||
// ID of the Compute Group
|
||||
// Required: true
|
||||
CompGroupID uint64 `url:"compgroupId"`
|
||||
CompGroupID uint64 `url:"compgroupId" json:"compgroupId"`
|
||||
|
||||
// ID of the parent Compute Group to register with the current Compute Group
|
||||
// Required: true
|
||||
ParentID uint64 `url:"parentId"`
|
||||
ParentID uint64 `url:"parentId" json:"parentId"`
|
||||
}
|
||||
|
||||
func (bsrq GroupParentAddRequest) validate() error {
|
||||
|
||||
@@ -12,16 +12,16 @@ import (
|
||||
type GroupParentRemoveRequest struct {
|
||||
// ID of the Basic Service of Compute Group
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
|
||||
// ID of the Compute Group
|
||||
// Required: true
|
||||
CompGroupID uint64 `url:"compgroupId"`
|
||||
CompGroupID uint64 `url:"compgroupId" json:"compgroupId"`
|
||||
|
||||
// ID of the parent Compute Group
|
||||
// to remove from the current Compute Group
|
||||
// Required: true
|
||||
ParentID uint64 `url:"parentId"`
|
||||
ParentID uint64 `url:"parentId" json:"parentId"`
|
||||
}
|
||||
|
||||
func (bsrq GroupParentRemoveRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type GroupRemoveRequest struct {
|
||||
// ID of the Basic Service of Compute Group
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
|
||||
// ID of the Compute Group
|
||||
// Required: true
|
||||
CompGroupID uint64 `url:"compgroupId"`
|
||||
CompGroupID uint64 `url:"compgroupId" json:"compgroupId"`
|
||||
}
|
||||
|
||||
func (bsrq GroupRemoveRequest) validate() error {
|
||||
|
||||
@@ -13,22 +13,22 @@ import (
|
||||
type GroupResizeRequest struct {
|
||||
// ID of the Basic Service of Compute Group
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
|
||||
// ID of the Compute Group to resize
|
||||
// Required: true
|
||||
CompGroupID uint64 `url:"compgroupId"`
|
||||
CompGroupID uint64 `url:"compgroupId" json:"compgroupId"`
|
||||
|
||||
// Either delta or absolute value of computes
|
||||
// Required: true
|
||||
Count int64 `url:"count"`
|
||||
Count int64 `url:"count" json:"count"`
|
||||
|
||||
// Either delta or absolute value of computes
|
||||
// Should be one of:
|
||||
// - ABSOLUTE
|
||||
// - RELATIVE
|
||||
// Required: true
|
||||
Mode string `url:"mode"`
|
||||
Mode string `url:"mode" json:"mode"`
|
||||
}
|
||||
|
||||
func (bsrq GroupResizeRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type GroupStartRequest struct {
|
||||
// ID of the Basic Service of Compute Group
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
|
||||
// ID of the Compute Group to start
|
||||
// Required: true
|
||||
CompGroupID uint64 `url:"compgroupId"`
|
||||
CompGroupID uint64 `url:"compgroupId" json:"compgroupId"`
|
||||
}
|
||||
|
||||
func (bsrq GroupStartRequest) validate() error {
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
type GroupStopRequest struct {
|
||||
// ID of the Basic Service of Compute Group
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
|
||||
// ID of the Compute Group to stop
|
||||
// Required: true
|
||||
CompGroupID uint64 `url:"compgroupId"`
|
||||
CompGroupID uint64 `url:"compgroupId" json:"compgroupId"`
|
||||
|
||||
// Force stop Compute Group
|
||||
// Required: true
|
||||
Force bool `url:"force,omitempty"`
|
||||
Force bool `url:"force,omitempty" json:"force,omitempty"`
|
||||
}
|
||||
|
||||
func (bsrq GroupStopRequest) validate() error {
|
||||
|
||||
@@ -11,35 +11,35 @@ import (
|
||||
type GroupUpdateRequest struct {
|
||||
// ID of the Basic Service of Compute Group
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
|
||||
// ID of the Compute Group
|
||||
// Required: true
|
||||
CompGroupID uint64 `url:"compgroupId"`
|
||||
CompGroupID uint64 `url:"compgroupId" json:"compgroupId"`
|
||||
|
||||
// Specify non-empty string to update Compute Group name
|
||||
// Required: false
|
||||
Name string `url:"name,omitempty"`
|
||||
Name string `url:"name,omitempty" json:"name,omitempty"`
|
||||
|
||||
// Specify non-empty string to update group role
|
||||
// Required: false
|
||||
Role string `url:"role,omitempty"`
|
||||
Role string `url:"role,omitempty" json:"role,omitempty"`
|
||||
|
||||
// Specify positive value to set new compute CPU count
|
||||
// Required: false
|
||||
CPU uint64 `url:"cpu,omitempty"`
|
||||
CPU uint64 `url:"cpu,omitempty" json:"cpu,omitempty"`
|
||||
|
||||
// Specify positive value to set new compute RAM volume in MB
|
||||
// Required: false
|
||||
RAM uint64 `url:"ram,omitempty"`
|
||||
RAM uint64 `url:"ram,omitempty" json:"ram,omitempty"`
|
||||
|
||||
// Specify new compute boot disk size in GB
|
||||
// Required: false
|
||||
Disk uint64 `url:"disk,omitempty"`
|
||||
Disk uint64 `url:"disk,omitempty" json:"disk,omitempty"`
|
||||
|
||||
// Force resize Compute Group
|
||||
// Required: false
|
||||
Force bool `url:"force,omitempty"`
|
||||
Force bool `url:"force,omitempty" json:"force,omitempty"`
|
||||
}
|
||||
|
||||
func (bsrq GroupUpdateRequest) validate() error {
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
type GroupUpdateExtNetRequest struct {
|
||||
// ID of the Basic Service of Compute Group
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
|
||||
// ID of the Compute Group
|
||||
// Required: true
|
||||
CompGroupID uint64 `url:"compgroupId"`
|
||||
CompGroupID uint64 `url:"compgroupId" json:"compgroupId"`
|
||||
|
||||
// List of Extnets to connect computes
|
||||
// Required: false
|
||||
ExtNets []uint64 `url:"extnets,omitempty"`
|
||||
ExtNets []uint64 `url:"extnets,omitempty" json:"extnets,omitempty"`
|
||||
}
|
||||
|
||||
func (bsrq GroupUpdateExtNetRequest) validate() error {
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
type GroupUpdateVINSRequest struct {
|
||||
// ID of the Basic Service of Compute Group
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
|
||||
// ID of the Compute Group
|
||||
// Required: true
|
||||
CompGroupID uint64 `url:"compgroupId"`
|
||||
CompGroupID uint64 `url:"compgroupId" json:"compgroupId"`
|
||||
|
||||
// List of ViNSes to connect computes
|
||||
// Required: false
|
||||
VINSes []uint64 `url:"vinses,omitempty"`
|
||||
VINSes []uint64 `url:"vinses,omitempty" json:"vinses,omitempty"`
|
||||
}
|
||||
|
||||
func (bsrq GroupUpdateVINSRequest) validate() error {
|
||||
|
||||
@@ -10,19 +10,19 @@ import (
|
||||
type ListRequest struct {
|
||||
// ID of the account to query for BasicService instances
|
||||
// Required: false
|
||||
AccountID uint64 `url:"accountId,omitempty"`
|
||||
AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
|
||||
|
||||
// ID of the resource group to query for BasicService instances
|
||||
// Required: false
|
||||
RGID uint64 `url:"rgId,omitempty"`
|
||||
RGID uint64 `url:"rgId,omitempty" json:"rgId,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 BasicService instances associated with the specified Resource Group
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type RestoreRequest struct {
|
||||
// ID of the BasicService to be restored
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
}
|
||||
|
||||
func (bsrq RestoreRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type SnapshotCreateRequest struct {
|
||||
// ID of the Basic Service
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
|
||||
// Label of the snapshot
|
||||
// Required: true
|
||||
Label string `url:"label"`
|
||||
Label string `url:"label" json:"label"`
|
||||
}
|
||||
|
||||
func (bsrq SnapshotCreateRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type SnapshotDeleteRequest struct {
|
||||
// ID of the Basic Service
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
|
||||
// Label of the snapshot
|
||||
// Required: true
|
||||
Label string `url:"label"`
|
||||
Label string `url:"label" json:"label"`
|
||||
}
|
||||
|
||||
func (bsrq SnapshotDeleteRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type SnapshotListRequest struct {
|
||||
// ID of the Basic Service
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
}
|
||||
|
||||
func (bsrq SnapshotListRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type SnapshotRollbackRequest struct {
|
||||
// ID of the Basic Service
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
|
||||
// Label of the snapshot
|
||||
// Required: true
|
||||
Label string `url:"label"`
|
||||
Label string `url:"label" json:"label"`
|
||||
}
|
||||
|
||||
func (bsrq SnapshotRollbackRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type StartRequest struct {
|
||||
// ID of the service to start
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
}
|
||||
|
||||
func (bsrq StartRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type StopRequest struct {
|
||||
// ID of the service to stop
|
||||
// Required: true
|
||||
ServiceID uint64 `url:"serviceId"`
|
||||
ServiceID uint64 `url:"serviceId" json:"serviceId"`
|
||||
}
|
||||
|
||||
func (bsrq StopRequest) validate() error {
|
||||
|
||||
Reference in New Issue
Block a user