This commit is contained in:
stSolo
2023-03-01 19:05:53 +03:00
parent de12bc2acc
commit 42800ac4fe
573 changed files with 2077 additions and 1844 deletions

View File

@@ -10,11 +10,11 @@ import (
type AffinityGroupCheckStartRequest struct {
// ID of the resource group
// Required: true
RGID uint64 `url:"rgId"`
RGID uint64 `url:"rgId" json:"rgId"`
// Affinity group label
// Required: true
AffinityLabel string `url:"affinityLabel"`
AffinityLabel string `url:"affinityLabel" json:"affinityLabel"`
}
func (crq AffinityGroupCheckStartRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type AffinityLabelRemoveRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq AffinityLabelRemoveRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type AffinityLabelSetRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Affinity group label
// Required: true
AffinityLabel string `url:"affinityLabel"`
AffinityLabel string `url:"affinityLabel" json:"affinityLabel"`
}
func (crq AffinityLabelSetRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type AffinityRelationsRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq AffinityRelationsRequest) validate() error {

View File

@@ -13,18 +13,18 @@ import (
type AffinityRuleAddRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Compute or node, for whom rule applies
// Required: true
Topology string `url:"topology"`
Topology string `url:"topology" json:"topology"`
// The degree of 'strictness' of this rule
// Should be one of:
// - RECOMMENDED
// - REQUIRED
// Required: true
Policy string `url:"policy"`
Policy string `url:"policy" json:"policy"`
// The comparison mode is 'value', recorded by the specified 'key'
// Should be one of:
@@ -32,15 +32,15 @@ type AffinityRuleAddRequest struct {
// - EN
// - ANY
// Required: true
Mode string `url:"mode"`
Mode string `url:"mode" json:"mode"`
// Key that are taken into account when analyzing this rule will be identified
// Required: true
Key string `url:"key"`
Key string `url:"key" json:"key"`
// Value that must match the key to be taken into account when analyzing this rule
// Required: true
Value string `url:"value"`
Value string `url:"value" json:"value"`
}
func (crq AffinityRuleAddRequest) validate() error {

View File

@@ -13,18 +13,18 @@ import (
type AffinityRuleRemoveRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Compute or node, for whom rule applies
// Required: true
Topology string `url:"topology"`
Topology string `url:"topology" json:"topology"`
// The degree of 'strictness' of this rule
// Should be one of:
// - RECOMMENDED
// - REQUIRED
// Required: true
Policy string `url:"policy"`
Policy string `url:"policy" json:"policy"`
// The comparison mode is 'value', recorded by the specified 'key'
// Should be one of:
@@ -32,15 +32,15 @@ type AffinityRuleRemoveRequest struct {
// - EN
// - ANY
// Required: true
Mode string `url:"mode"`
Mode string `url:"mode" json:"mode"`
// Key that are taken into account when analyzing this rule will be identified
// Required: true
Key string `url:"key"`
Key string `url:"key" json:"key"`
// Value that must match the key to be taken into account when analyzing this rule
// Required: true
Value string `url:"value"`
Value string `url:"value" json:"value"`
}
func (crq AffinityRuleRemoveRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type AffinityRulesClearRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq AffinityRulesClearRequest) validate() error {

View File

@@ -13,18 +13,18 @@ import (
type AntiAffinityRuleAddRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Compute or node, for whom rule applies
// Required: true
Topology string `url:"topology"`
Topology string `url:"topology" json:"topology"`
// The degree of 'strictness' of this rule
// Should be one of:
// - RECOMMENDED
// - REQUIRED
// Required: true
Policy string `url:"policy"`
Policy string `url:"policy" json:"policy"`
// The comparison mode is 'value', recorded by the specified 'key'
// Should be one of:
@@ -32,15 +32,15 @@ type AntiAffinityRuleAddRequest struct {
// - EN
// - ANY
// Required: true
Mode string `url:"mode"`
Mode string `url:"mode" json:"mode"`
// Key that are taken into account when analyzing this rule will be identified
// Required: true
Key string `url:"key"`
Key string `url:"key" json:"key"`
// Value that must match the key to be taken into account when analyzing this rule
// Required: true
Value string `url:"value"`
Value string `url:"value" json:"value"`
}
func (crq AntiAffinityRuleAddRequest) validate() error {

View File

@@ -13,18 +13,18 @@ import (
type AntiAffinityRuleRemoveRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Compute or node, for whom rule applies
// Required: true
Topology string `url:"topology"`
Topology string `url:"topology" json:"topology"`
// The degree of 'strictness' of this rule
// Should be one of:
// - RECOMMENDED
// - REQUIRED
// Required: true
Policy string `url:"policy"`
Policy string `url:"policy" json:"policy"`
// The comparison mode is 'value', recorded by the specified 'key'
// Should be one of:
@@ -32,15 +32,15 @@ type AntiAffinityRuleRemoveRequest struct {
// - EN
// - ANY
// Required: true
Mode string `url:"mode"`
Mode string `url:"mode" json:"mode"`
// Key that are taken into account when analyzing this rule will be identified
// Required: true
Key string `url:"key"`
Key string `url:"key" json:"key"`
// Value that must match the key to be taken into account when analyzing this rule
// Required: true
Value string `url:"value"`
Value string `url:"value" json:"value"`
}
func (crq AntiAffinityRuleRemoveRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type AntiAffinityRulesClearRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq AntiAffinityRulesClearRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type AttachGPURequest struct {
// Identifier compute
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Identifier vGPU
// Required: true
VGPUID uint64 `url:"vgpuId"`
VGPUID uint64 `url:"vgpuId" json:"vgpuId"`
}
func (crq AttachGPURequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type AttachPCIDeviceRequest struct {
// Identifier compute
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// PCI device ID
// Required: true
DeviceID uint64 `url:"deviceId"`
DeviceID uint64 `url:"deviceId" json:"deviceId"`
}
func (crq AttachPCIDeviceRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type AuditsRequest struct {
// ID of the compute
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq AuditsRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type CDEjectRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq CDEjectRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type CDInsertRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// ID of CD-ROM image
// Required: true
CDROMID uint64 `url:"cdromId"`
CDROMID uint64 `url:"cdromId" json:"cdromId"`
}
func (crq CDInsertRequest) validate() error {

View File

@@ -11,19 +11,19 @@ import (
type CloneRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Name of the clone
// Required: true
Name string `url:"name"`
Name string `url:"name" json:"name"`
// Timestamp of the parent's snapshot to create clone from
// Required: false
SnapshotTimestamp uint64 `url:"snapshotTimestamp"`
SnapshotTimestamp uint64 `url:"snapshotTimestamp" json:"snapshotTimestamp"`
// Name of the parent's snapshot to create clone from
// Required: false
SnapshotName string `url:"snapshotName"`
SnapshotName string `url:"snapshotName" json:"snapshotName"`
}
func (crq CloneRequest) validate() error {

View File

@@ -12,11 +12,11 @@ import (
type CreateTemplateRequest struct {
// ID of the compute to create template from
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Name to assign to the template being created
// Required: true
Name string `url:"name"`
Name string `url:"name" json:"name"`
// Async API call
// For async call use CreateTemplateAsync

View File

@@ -11,15 +11,15 @@ import (
type DeleteRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Delete permanently
// Required: false
Permanently bool `url:"permanently,omitempty"`
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
// Set True if you want to detach data disks (if any) from the compute before its deletion
// Required: false
DetachDisks bool `url:"detachDisks,omitempty"`
DetachDisks bool `url:"detachDisks,omitempty" json:"detachDisks,omitempty"`
}
func (crq DeleteRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type DetachGPURequest struct {
// Identifier compute
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Identifier virtual GPU
// Required: false
VGPUID int64 `url:"vgpuId,omitempty"`
VGPUID int64 `url:"vgpuId,omitempty" json:"vgpuId,omitempty"`
}
func (crq DetachGPURequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type DetachPCIDeviceRequest struct {
// Identifier compute
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Pci device ID
// Required: true
DeviceID uint64 `url:"deviceId"`
DeviceID uint64 `url:"deviceId" json:"deviceId"`
}
func (crq DetachPCIDeviceRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type DisableRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq DisableRequest) validate() error {

View File

@@ -11,40 +11,40 @@ import (
type DiskAddRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Name for disk
// Required: true
DiskName string `url:"diskName"`
DiskName string `url:"diskName" json:"diskName"`
// Disk size in GB
// Required: true
Size uint64 `url:"size"`
Size uint64 `url:"size" json:"size"`
// Type of the disk
// Should be one of:
// - D
// - B
// Required: false
DiskType string `url:"diskType,omitempty"`
DiskType string `url:"diskType,omitempty" json:"diskType,omitempty"`
// Storage endpoint provider ID
// By default the same with boot disk
// Required: false
SepID uint64 `url:"sepId,omitempty"`
SepID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"`
// Pool name
// By default will be chosen automatically
// Required: false
Pool string `url:"pool,omitempty"`
Pool string `url:"pool,omitempty" json:"pool,omitempty"`
// Optional description
// Required: false
Description string `url:"desc,omitempty"`
Description string `url:"desc,omitempty" json:"desc,omitempty"`
// Specify image id for create disk from template
// Required: false
ImageID uint64 `url:"imageId,omitempty"`
ImageID uint64 `url:"imageId,omitempty" json:"imageId,omitempty"`
}
func (crq DiskAddRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type DiskAttachRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// ID of the disk to attach
// Required: true
DiskID uint64 `url:"diskId"`
DiskID uint64 `url:"diskId" json:"diskId"`
}
func (crq DiskAttachRequest) validate() error {

View File

@@ -11,15 +11,15 @@ import (
type DiskDelRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// ID of disk instance
// Required: true
DiskID uint64 `url:"diskId"`
DiskID uint64 `url:"diskId" json:"diskId"`
// False if disk is to be deleted to recycle bin
// Required: true
Permanently bool `url:"permanently"`
Permanently bool `url:"permanently" json:"permanently"`
}
func (crq DiskDelRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type DiskDetachRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// ID of the disk to detach
// Required: true
DiskID uint64 `url:"diskId"`
DiskID uint64 `url:"diskId" json:"diskId"`
}
func (crq DiskDetachRequest) validate() error {

View File

@@ -11,15 +11,15 @@ import (
type DiskQOSRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// ID of the disk to apply limits
// Required: true
DiskID uint64 `url:"diskId"`
DiskID uint64 `url:"diskId" json:"diskId"`
// Limit IO for a certain disk total and read/write options are not allowed to be combined
// Required: true
Limits string `url:"limits"`
Limits string `url:"limits" json:"limits"`
}
func (crq DiskQOSRequest) validate() error {

View File

@@ -11,15 +11,15 @@ import (
type DiskResizeRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// ID of the disk to resize
// Required: true
DiskID uint64 `url:"diskId"`
DiskID uint64 `url:"diskId" json:"diskId"`
// New disk size
// Required: true
Size uint64 `url:"size"`
Size uint64 `url:"size" json:"size"`
}
func (crq DiskResizeRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type EnableRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq EnableRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type GetRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq GetRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type GetAuditsRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq GetAuditsRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type GetConsoleURLRequest struct {
// ID of compute instance to get console for
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq GetConsoleURLRequest) validate() error {

View File

@@ -10,11 +10,11 @@ import (
type GetLogRequest struct {
// ID of compute instance to get log for
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Path to log file
// Required: true
Path string `url:"path"`
Path string `url:"path" json:"path"`
}
func (crq GetLogRequest) validate() error {

View File

@@ -10,15 +10,15 @@ import (
type ListRequest struct {
// Include deleted computes
// 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 of the available computes.

View File

@@ -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 list all deleted computes

View File

@@ -11,7 +11,7 @@ import (
type ListPCIDeviceRequest struct {
// Identifier compute
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq ListPCIDeviceRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type ListVGPURequest struct {
// Identifier compute
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq ListVGPURequest) validate() error {

View File

@@ -11,26 +11,26 @@ import (
type MoveToRGRequest struct {
// ID of the compute instance to move
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// ID of the target resource group
// Required: true
RGID uint64 `url:"rgId"`
RGID uint64 `url:"rgId" json:"rgId"`
// New name for the compute upon successful move,
// if name change required.
// Pass empty string if no name change necessary
// Required: false
Name string `url:"name,omitempty"`
Name string `url:"name,omitempty" json:"name,omitempty"`
// Should the compute be restarted upon successful move
// Required: false
Autostart bool `url:"autostart,omitempty"`
Autostart bool `url:"autostart,omitempty" json:"autostart,omitempty"`
// By default moving compute in a running state is not allowed.
// Set this flag to True to force stop running compute instance prior to move.
// Required: false
ForceStop bool `url:"forceStop,omitempty"`
ForceStop bool `url:"forceStop,omitempty" json:"forceStop,omitempty"`
}
func (crq MoveToRGRequest) validate() error {

View File

@@ -13,23 +13,23 @@ import (
type NetAttachRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Network type
// 'EXTNET' for connect to external network directly
// and 'VINS' for connect to ViNS
// Required: true
NetType string `url:"netType"`
NetType string `url:"netType" json:"netType"`
// Network ID for connect to
// For EXTNET - external network ID
// For VINS - VINS ID
// Required: true
NetID uint64 `url:"netId"`
NetID uint64 `url:"netId" json:"netId"`
// Directly required IP address for new network interface
// Required: true
IPAddr string `url:"ipAddr,omitempty"`
IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"`
}
func (crq NetAttachRequest) validate() error {

View File

@@ -11,15 +11,15 @@ import (
type NetDetachRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// IP of the network interface
// Required: false
IPAddr string `url:"ipAddr,omitempty"`
IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"`
// MAC of the network interface
// Required: false
MAC string `url:"mac,omitempty"`
MAC string `url:"mac,omitempty" json:"mac,omitempty"`
}
func (crq NetDetachRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type PauseRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq PauseRequest) validate() error {

View File

@@ -13,24 +13,24 @@ import (
type PFWAddRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// External start port number for the rule
// Required: true
PublicPortStart uint64 `url:"publicPortStart"`
PublicPortStart uint64 `url:"publicPortStart" json:"publicPortStart"`
// End port number (inclusive) for the ranged rule
// Required: false
PublicPortEnd uint64 `url:"publicPortEnd,omitempty"`
PublicPortEnd uint64 `url:"publicPortEnd,omitempty" json:"publicPortEnd,omitempty"`
// Internal base port number
// Required: true
LocalBasePort uint64 `url:"localBasePort"`
LocalBasePort uint64 `url:"localBasePort" json:"localBasePort"`
// Network protocol
// either "tcp" or "udp"
// Required: true
Proto string `url:"proto"`
Proto string `url:"proto" json:"proto"`
}
func (crq PFWAddRequest) validate() error {

View File

@@ -11,28 +11,28 @@ import (
type PFWDelRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// ID of the rule to delete. If specified, all other arguments will be ignored
// Required: false
PFWID uint64 `url:"ruleId,omitempty"`
PFWID uint64 `url:"ruleId,omitempty" json:"ruleId,omitempty"`
// External start port number for the rule
// Required: false
PublicPortStart uint64 `url:"publicPortStart,omitempty"`
PublicPortStart uint64 `url:"publicPortStart,omitempty" json:"publicPortStart,omitempty"`
// End port number (inclusive) for the ranged rule
// Required: false
PublicPortEnd uint64 `url:"publicPortEnd,omitempty"`
PublicPortEnd uint64 `url:"publicPortEnd,omitempty" json:"publicPortEnd,omitempty"`
// Internal base port number
// Required: false
LocalBasePort uint64 `url:"localBasePort,omitempty"`
LocalBasePort uint64 `url:"localBasePort,omitempty" json:"localBasePort,omitempty"`
// Network protocol
// either "tcp" or "udp"
// Required: false
Proto string `url:"proto,omitempty"`
Proto string `url:"proto,omitempty" json:"proto,omitempty"`
}
func (crq PFWDelRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type PFWListRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq PFWListRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type PinToStackRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq PinToStackRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type PowerCycleRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq PowerCycleRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type RebootRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq RebootRequest) validate() error {

View File

@@ -11,28 +11,28 @@ import (
type RedeployRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// ID of the new OS image, if image change is required
// Required: false
ImageID uint64 `url:"imageId,omitempty"`
ImageID uint64 `url:"imageId,omitempty" json:"imageId,omitempty"`
// new size for the boot disk in GB, if boot disk size change is required
// Required: false
DiskSize uint64 `url:"diskSize,omitempty"`
DiskSize uint64 `url:"diskSize,omitempty" json:"diskSize,omitempty"`
// How to handle data disks connected to this compute instance,
// KEEP, DETACH, DESTROY
// Required: false
DataDisks string `url:"dataDisks,omitempty"`
DataDisks string `url:"dataDisks,omitempty" json:"dataDisks,omitempty"`
// Should the compute be restarted upon successful redeploy
// Required: false
AutoStart bool `url:"autoStart,omitempty"`
AutoStart bool `url:"autoStart,omitempty" json:"autoStart,omitempty"`
// Set this flag to True to force stop running compute instance and redeploy next
// Required: false
ForceStop bool `url:"forceStop,omitempty"`
ForceStop bool `url:"forceStop,omitempty" json:"forceStop,omitempty"`
}
func (crq RedeployRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type ResetRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq ResetRequest) validate() error {

View File

@@ -11,21 +11,21 @@ import (
type ResizeRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// New CPU count.
// Pass 0 if no change to CPU count is required
// Required: false
Force bool `url:"force,omitempty"`
Force bool `url:"force,omitempty" json:"force,omitempty"`
// New RAM volume in MB.
// Pass 0 if no change to RAM volume is required
// Required: false
CPU uint64 `url:"cpu,omitempty"`
CPU uint64 `url:"cpu,omitempty" json:"cpu,omitempty"`
// Force compute resize
// Required: false
RAM uint64 `url:"ram,omitempty"`
RAM uint64 `url:"ram,omitempty" json:"ram,omitempty"`
}
func (crq ResizeRequest) validate() error {

View File

@@ -10,7 +10,7 @@ import (
type RestoreRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq RestoreRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type ResumeRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq ResumeRequest) validate() error {

View File

@@ -11,12 +11,12 @@ import (
type SnapshotCreateRequest struct {
// ID of the compute instance to create snapshot for
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Text label for snapshot.
// Must be unique among this compute snapshots
// Required: true
Label string `url:"label"`
Label string `url:"label" json:"label"`
}
func (crq SnapshotCreateRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type SnapshotDeleteRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Text label of snapshot to delete
// Required: true
Label string `url:"label"`
Label string `url:"label" json:"label"`
}
func (crq SnapshotDeleteRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type SnapshotListRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq SnapshotListRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type SnapshotRollbackRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Text label of snapshot to rollback
// Required: true
Label string `url:"label"`
Label string `url:"label" json:"label"`
}
func (crq SnapshotRollbackRequest) validate() error {

View File

@@ -11,12 +11,12 @@ import (
type SnapshotUsageRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Specify to show usage exact for this snapshot.
// Leave empty for get usage for all compute snapshots
// Required: false
Label string `url:"label,omitempty"`
Label string `url:"label,omitempty" json:"label,omitempty"`
}
func (crq SnapshotUsageRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type StartRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// ID of CD-ROM live image to boot
// Required: false
AltBootID uint64 `url:"altBootId,omitempty"`
AltBootID uint64 `url:"altBootId,omitempty" json:"altBootId,omitempty"`
}
func (crq StartRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type StopRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Force stop compute
// Required: false
Force bool `url:"force,omitempty"`
Force bool `url:"force,omitempty" json:"force,omitempty"`
}
func (crq StopRequest) validate() error {

View File

@@ -11,15 +11,15 @@ import (
type TagAddRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Tag key
// Required: true
Key string `url:"key"`
Key string `url:"key" json:"key"`
// Tag value
// Required: true
Value string `url:"value"`
Value string `url:"value" json:"value"`
}
func (crq TagAddRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type TagRemoveRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Tag key
// Required: true
Key string `url:"key"`
Key string `url:"key" json:"key"`
}
func (crq TagRemoveRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type UnpinFromStackRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq UnpinFromStackRequest) validate() error {

View File

@@ -11,15 +11,15 @@ import (
type UpdateRequest struct {
// ID of the compute
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// New name
// Required: false
Name string `url:"name,omitempty"`
Name string `url:"name,omitempty" json:"name,omitempty"`
// New description
// Required: false
Description string `url:"desc,omitempty"`
Description string `url:"desc,omitempty" json:"desc,omitempty"`
}
func (crq UpdateRequest) validate() error {

View File

@@ -13,11 +13,11 @@ import (
type UserGrantRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Name of the user to add
// Required: true
Username string `url:"userName"`
Username string `url:"userName" json:"userName"`
// Access type
// Should be one of:
@@ -25,7 +25,7 @@ type UserGrantRequest struct {
// - 'RCX' for Write
// - 'ARCXDU' for Admin
// Required: true
AccessType string `url:"accesstype"`
AccessType string `url:"accesstype" json:"accesstype"`
}
func (crq UserGrantRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type UserListRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq UserListRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type UserRevokeRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Name of the user to remove
// Required: true
Username string `url:"userName"`
Username string `url:"userName" json:"userName"`
}
func (crq UserRevokeRequest) validate() error {

View File

@@ -13,11 +13,11 @@ import (
type UserUpdateRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Name of the user to update
// Required: true
Username string `url:"userName"`
Username string `url:"userName" json:"userName"`
// Access type
// Should be one of:
@@ -25,7 +25,7 @@ type UserUpdateRequest struct {
// - 'RCX' for Write
// - 'ARCXDU' for Admin
// Required: true
AccessType string `url:"accesstype"`
AccessType string `url:"accesstype" json:"accesstype"`
}
func (crq UserUpdateRequest) validate() error {