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

@@ -13,18 +13,18 @@ import (
type AddUserRequest struct {
// ID of account to add to
// Required: true
AccountID uint64 `url:"accountId"`
AccountID uint64 `url:"accountId" json:"accountId"`
// Name of the user to be given rights
// Required: true
UserName string `url:"username"`
UserName string `url:"username" json:"username"`
// Account permission types:
// - 'R' for read only access
// - 'RCX' for Write
// - 'ARCXDU' for Admin
// Required: true
AccessType string `url:"accesstype"`
AccessType string `url:"accesstype" json:"accesstype"`
}
func (arq AddUserRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type AuditsRequest struct {
// ID of the account
// Required: true
AccountID uint64 `url:"accountId"`
AccountID uint64 `url:"accountId" json:"accountId"`
}
func (arq AuditsRequest) validate() error {

View File

@@ -11,48 +11,48 @@ import (
type CreateRequest struct {
// Display name
// Required: true
Name string `url:"name"`
Name string `url:"name" json:"name"`
// Name of the account
// Required: true
Username string `url:"username"`
Username string `url:"username" json:"username"`
// Email
// Required: false
EmailAddress string `url:"emailaddress,omitempty"`
EmailAddress string `url:"emailaddress,omitempty" json:"emailaddress,omitempty"`
// Max size of memory in MB
// Required: false
MaxMemoryCapacity int64 `url:"maxMemoryCapacity,omitempty"`
MaxMemoryCapacity int64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"`
// Max size of aggregated vdisks in GB
// Required: false
MaxVDiskCapacity int64 `url:"maxVDiskCapacity,omitempty"`
MaxVDiskCapacity int64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"`
// Max number of CPU cores
// Required: false
MaxCPUCapacity int64 `url:"maxCPUCapacity,omitempty"`
MaxCPUCapacity int64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"`
// Max sent/received network transfer peering
// Required: false
MaxNetworkPeerTransfer int64 `url:"maxNetworkPeerTransfer,omitempty"`
MaxNetworkPeerTransfer int64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"`
// Max number of assigned public IPs
// Required: false
MaxNumPublicIP int64 `url:"maxNumPublicIP,omitempty"`
MaxNumPublicIP int64 `url:"maxNumPublicIP,omitempty" json:"maxNumPublicIP,omitempty"`
// If true send emails when a user is granted access to resources
// Required: false
SendAccessEmails bool `url:"sendAccessEmails,omitempty"`
SendAccessEmails bool `url:"sendAccessEmails,omitempty" json:"sendAccessEmails,omitempty"`
// Limit (positive) or disable (0) GPU resources
// Required: false
GPUUnits int64 `url:"gpu_units,omitempty"`
GPUUnits int64 `url:"gpu_units,omitempty" json:"gpu_units,omitempty"`
// List of strings with pools
// i.e.: ["sep1_poolName1", "sep2_poolName2", etc]
// Required: false
UniqPools []string `url:"uniqPools,omitempty"`
UniqPools []string `url:"uniqPools,omitempty" json:"uniqPools,omitempty"`
}
func (arq CreateRequest) validate() error {

View File

@@ -10,15 +10,15 @@ import (
type DeleteRequest struct {
// ID of account to delete
// Required: true
AccountID uint64 `url:"accountId"`
AccountID uint64 `url:"accountId" json:"accountId"`
// Reason to delete
// Required: true
Reason string `url:"reason"`
Reason string `url:"reason" json:"reason"`
// Whether to completely delete the account
// Required: false
Permanently bool `url:"permanently,omitempty"`
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
}
func (arq DeleteRequest) validate() error {

View File

@@ -10,15 +10,15 @@ import (
type DeleteAccountsRequest struct {
// IDs of accounts
// Required: true
AccountsIDs []uint64 `url:"accountIds"`
AccountsIDs []uint64 `url:"accountIds" json:"accountIds"`
// Reason for deletion
// Required: true
Reason string `url:"reason"`
Reason string `url:"reason" json:"reason"`
// Whether to completely destroy accounts or not
// Required: false
Permanently bool `url:"permanently,omitempty"`
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
}
func (arq DeleteAccountsRequest) validate() error {

View File

@@ -11,15 +11,15 @@ import (
type DeleteUserRequest struct {
// ID of the account
// Required: true
AccountID uint64 `url:"accountId"`
AccountID uint64 `url:"accountId" json:"accountId"`
// ID or emailaddress of the user to remove
// Required: true
UserName string `url:"username"`
UserName string `url:"username" json:"username"`
// Recursively revoke access rights from owned cloudspaces and vmachines
// Required: false
RecursiveDelete bool `url:"recursivedelete,omitempty"`
RecursiveDelete bool `url:"recursivedelete,omitempty" json:"recursivedelete,omitempty"`
}
func (arq DeleteUserRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type DisableRequest struct {
// ID of account
// Required: true
AccountID uint64 `url:"accountId"`
AccountID uint64 `url:"accountId" json:"accountId"`
// Reason to disable
// Required: true
Reason string `url:"reason"`
Reason string `url:"reason" json:"reason"`
}
func (arq DisableRequest) validate() error {

View File

@@ -10,7 +10,7 @@ import (
type DisableAccountsRequest struct {
// IDs of accounts
// Required: true
AccountIDs []uint64 `url:"accountIds,omitempty"`
AccountIDs []uint64 `url:"accountIds,omitempty" json:"accountIds,omitempty"`
}
func (arq DisableAccountsRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type EnableRequest struct {
// ID of account
// Required: true
AccountID uint64 `url:"accountId"`
AccountID uint64 `url:"accountId" json:"accountId"`
// Reason to enable
// Required: true
Reason string `url:"reason"`
Reason string `url:"reason" json:"reason"`
}
func (arq EnableRequest) validate() error {

View File

@@ -10,7 +10,7 @@ import (
type EnableAccountsRequest struct {
// IDs od accounts
// Required: true
AccountIDs []uint64 `url:"accountIds"`
AccountIDs []uint64 `url:"accountIds" json:"accountIds"`
}
func (arq EnableAccountsRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type GetRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId"`
AccountID uint64 `url:"accountId" json:"accountId"`
}
func (arq GetRequest) validate() error {

View File

@@ -10,11 +10,11 @@ import (
type ListRequest struct {
// Page number
// Required: false
Page uint64 `url:"page"`
Page uint64 `url:"page" json:"page"`
// Page size
// Required: false
Size uint64 `url:"size"`
Size uint64 `url:"size" json:"size"`
}
// List gets list all accounts the user has access to

View File

@@ -11,7 +11,7 @@ import (
type ListComputesRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId"`
AccountID uint64 `url:"accountId" json:"accountId"`
}
func (arq ListComputesRequest) validate() error {

View File

@@ -10,11 +10,11 @@ import (
type ListDeletedRequest struct {
// Page number
// Required: false
Page uint64 `url:"page"`
Page uint64 `url:"page" json:"page"`
// Page size
// Required: false
Size uint64 `url:"size"`
Size uint64 `url:"size" json:"size"`
}
// ListDeleted gets list all deleted accounts the user has access to

View File

@@ -11,7 +11,7 @@ import (
type ListDisksRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId"`
AccountID uint64 `url:"accountId" json:"accountId"`
}
func (arq ListDisksRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type ListFLIPGroupsRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId"`
AccountID uint64 `url:"accountId" json:"accountId"`
}
func (arq ListFLIPGroupsRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type ListRGRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId"`
AccountID uint64 `url:"accountId" json:"accountId"`
}
func (arq ListRGRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type ListVINSRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId"`
AccountID uint64 `url:"accountId" json:"accountId"`
}
func (arq ListVINSRequest) validate() error {

View File

@@ -10,11 +10,11 @@ import (
type RestoreRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId"`
AccountID uint64 `url:"accountId" json:"accountId"`
// Reason to restore
// Required: true
Reason string `url:"reason"`
Reason string `url:"reason" json:"reason"`
}
func (arq RestoreRequest) validate() error {

View File

@@ -11,52 +11,52 @@ import (
type UpdateRequest struct {
// ID of account
// Required: true
AccountID uint64 `url:"accountId"`
AccountID uint64 `url:"accountId" json:"accountId"`
// Display name
// Required: true
Name string `url:"name"`
Name string `url:"name" json:"name"`
// Name of the account
// Required: true
Username string `url:"username"`
Username string `url:"username" json:"username"`
// Email
// Required: false
EmailAddress string `url:"emailaddress,omitempty"`
EmailAddress string `url:"emailaddress,omitempty" json:"emailaddress,omitempty"`
// Max size of memory in MB
// Required: false
MaxMemoryCapacity uint64 `url:"maxMemoryCapacity,omitempty"`
MaxMemoryCapacity uint64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"`
// Max size of aggregated vdisks in GB
// Required: false
MaxVDiskCapacity uint64 `url:"maxVDiskCapacity,omitempty"`
MaxVDiskCapacity uint64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"`
// Max number of CPU cores
// Required: false
MaxCPUCapacity uint64 `url:"maxCPUCapacity,omitempty"`
MaxCPUCapacity uint64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"`
// Max sent/received network transfer peering
// Required: false
MaxNetworkPeerTransfer uint64 `url:"maxNetworkPeerTransfer,omitempty"`
MaxNetworkPeerTransfer uint64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"`
// Max number of assigned public IPs
// Required: false
MaxNumPublicIP uint64 `url:"maxNumPublicIP,omitempty"`
MaxNumPublicIP uint64 `url:"maxNumPublicIP,omitempty" json:"maxNumPublicIP,omitempty"`
// If true send emails when a user is granted access to resources
// Required: false
SendAccessEmails bool `url:"sendAccessEmails,omitempty"`
SendAccessEmails bool `url:"sendAccessEmails,omitempty" json:"sendAccessEmails,omitempty"`
// Limit (positive) or disable (0) GPU resources
// Required: false
GPUUnits uint64 `url:"gpu_units,omitempty"`
GPUUnits uint64 `url:"gpu_units,omitempty" json:"gpu_units,omitempty"`
// List of strings with pools
// i.e.: ["sep1_poolName1", "sep2_poolName2", etc]
// Required: false
UniqPools []string `url:"uniqPools,omitempty"`
UniqPools []string `url:"uniqPools,omitempty" json:"uniqPools,omitempty"`
}
func (arq UpdateRequest) validate() error {

View File

@@ -13,7 +13,7 @@ import (
type UpdateResourceTypesRequest struct {
// ID of account
// Required: true
AccountID uint64 `url:"accountId"`
AccountID uint64 `url:"accountId" json:"accountId"`
// Resource types available to create in this account
// Each element in a resource type slice must be one of:
@@ -24,7 +24,7 @@ type UpdateResourceTypesRequest struct {
// - lb
// - flipgroup
// Required: true
ResTypes []string `url:"resourceTypes"`
ResTypes []string `url:"resourceTypes" json:"resourceTypes"`
}
func (arq UpdateResourceTypesRequest) validate() error {

View File

@@ -11,18 +11,18 @@ import (
type UpdateUserRequest struct {
// ID of the account
// Required: true
AccountID uint64 `url:"accountId"`
AccountID uint64 `url:"accountId" json:"accountId"`
// Userid/Email for registered users or emailaddress for unregistered users
// Required: true
UserID string `url:"userId"`
UserID string `url:"userId" json:"userId"`
// Account permission types:
// - 'R' for read only access
// - 'RCX' for Write
// - 'ARCXDU' for Admin
// Required: true
AccessType string `url:"accesstype"`
AccessType string `url:"accesstype" json:"accesstype"`
}
func (arq UpdateUserRequest) validate() error {

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 {
// IDs of the compute instances
// Required: true
ComputeIDs []uint64 `url:"computeIds"`
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
}
func (crq AffinityLabelRemoveRequest) validate() error {

View File

@@ -10,11 +10,11 @@ import (
// Request struct for set affinity label for compute
type AffinityLabelSetRequest struct {
// IDs of the compute instances
ComputeIDs []uint64 `url:"computeIds"`
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Affinity group label
// Required: true
AffinityLabel string `url:"affinityLabel"`
AffinityLabel string `url:"affinityLabel" json:"affinityLabel"`
}
func (crq AffinityLabelSetRequest) validate() error {

View File

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

View File

@@ -13,20 +13,20 @@ import (
type AffinityRuleAddRequest struct {
// IDs of the compute instances
// Required: true
ComputeIDs []uint64 `url:"computeIds"`
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Should be one of:
// - node
// - compute
// 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:
@@ -34,15 +34,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 {
// IDs of the compute instances
// Required: true
ComputeIDs []uint64 `url:"computeIds"`
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// 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 {
// IDs of the compute instances
// Required: true
ComputeIDs []uint64 `url:"computeIds"`
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
}
func (crq AffinityRulesClearRequest) validate() error {

View File

@@ -13,18 +13,18 @@ import (
type AntiAffinityRuleAddRequest struct {
// IDs of the compute instances
// Required: true
ComputeIDs []uint64 `url:"computeIds"`
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// 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

@@ -11,7 +11,7 @@ import (
type AntiAffinityRulesClearRequest struct {
// IDs of the compute instances
// Required: true
ComputeIDs []uint64 `url:"computeIds"`
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
}
func (crq AntiAffinityRulesClearRequest) validate() error {

View File

@@ -13,18 +13,18 @@ import (
type AntiAffinityRuleRemoveRequest struct {
// IDs of the compute instances
// Required: true
ComputeIDs []uint64 `url:"computeIds"`
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// 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,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 BootOrderGetRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq BootOrderGetRequest) validate() error {

View File

@@ -13,7 +13,7 @@ import (
type BootOrderSetRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// List of boot devices
// Should be one of:
@@ -21,7 +21,7 @@ type BootOrderSetRequest struct {
// - network
// - hd
// Required: true
Order []string `url:"order"`
Order []string `url:"order" json:"order"`
}
func (crq BootOrderSetRequest) validate() error {

View File

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

View File

@@ -10,15 +10,15 @@ 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"`
// Reason to insert
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq CDInsertRequest) validate() error {

View File

@@ -11,23 +11,23 @@ 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"`
// Reason to clone
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq CloneRequest) validate() error {

View File

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

View File

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

View File

@@ -12,15 +12,15 @@ 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"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
// Async API call
// For async call use CreateTemplateAsync

View File

@@ -11,19 +11,19 @@ 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"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,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,11 +11,11 @@ import (
type DisableRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
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,15 +11,15 @@ 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"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq DiskAttachRequest) validate() error {

View File

@@ -11,19 +11,19 @@ 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"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq DiskDelRequest) validate() error {

View File

@@ -11,15 +11,15 @@ 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"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
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,19 +11,19 @@ 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"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq DiskResizeRequest) validate() error {

View File

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

View File

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

View File

@@ -11,11 +11,11 @@ import (
type GetAuditsRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Reason to action
// Required: true
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
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,11 +11,11 @@ import (
type ListGPURequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Also list destroyed
// Required: false
ListDestroyed bool `url:"list_destroyed,omitempty"`
ListDestroyed bool `url:"list_destroyed,omitempty" json:"list_destroyed,omitempty"`
}
func (crq ListGPURequest) validate() error {

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,15 +11,15 @@ import (
type MassDeleteRequest struct {
// IDs of compute instances to delete
// Required: true
ComputeIDs []uint64 `url:"computeIds"`
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Delete computes permanently
// Required: false
Permanently bool `url:"permanently,omitempty"`
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq MassDeleteRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type MassRebootRequest struct {
// IDs of compute instances to reboot
// Required: true
ComputeIDs []uint64 `url:"computeIds"`
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq MassRebootRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type MassRepairBootFSRequest struct {
// IDs of compute instances which boot file systems will be repaired
// Required: true
ComputeIDs []uint64 `url:"computeIds"`
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq MassRepairBootFSRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type MassStartRequest struct {
// IDs of compute instances to start
// Required: true
ComputeIDs []uint64 `url:"computeIds"`
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq MassStartRequest) validate() error {

View File

@@ -11,15 +11,15 @@ import (
type MassStopRequest struct {
// IDs of compute instances to stop
// Required: true
ComputeIDs []uint64 `url:"computeIds"`
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Force stop compute
// Required: false
Force bool `url:"force,omitempty"`
Force bool `url:"force,omitempty" json:"force,omitempty"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq MassStopRequest) validate() error {

View File

@@ -11,20 +11,20 @@ import (
type MigrateRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Particular Stack ID to migrate this compute to
// Required: false
TargetStackID uint64 `url:"targetStackId,omitempty"`
TargetStackID uint64 `url:"targetStackId,omitempty" json:"targetStackId,omitempty"`
// If live migration fails, destroy compute
// on source node and recreate on the target
// Required: false
Force bool `url:"force,omitempty"`
Force bool `url:"force,omitempty" json:"force,omitempty"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq MigrateRequest) validate() error {

View File

@@ -11,23 +11,23 @@ import (
type MigrateStorageRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// SEP ID to migrate disks
// Required: true
SEPID uint64 `url:"sepId"`
SEPID uint64 `url:"sepId" json:"sepId"`
// SEP pool name to migrate disks
// Required: true
PoolName string `url:"poolName"`
PoolName string `url:"poolName" json:"poolName"`
// Target stack ID
// Required: true
StackID uint64 `url:"stackId"`
StackID uint64 `url:"stackId" json:"stackId"`
// Async API call
// Required: true
Sync bool `url:"sync"`
Sync bool `url:"sync" json:"sync"`
}
func (crq MigrateStorageRequest) validate() error {

View File

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

View File

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

View File

@@ -11,7 +11,7 @@ import (
type MigrateStorageInfoRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
}
func (crq MigrateStorageInfoRequest) 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,27 +13,27 @@ 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"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq NetAttachRequest) validate() error {

View File

@@ -11,19 +11,19 @@ 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"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq NetDetachRequest) validate() error {

View File

@@ -13,30 +13,30 @@ import (
type NetQOSRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Network ID
// Required: true
NetID uint64 `url:"netId"`
NetID uint64 `url:"netId" json:"netId"`
// Network type
// Should be one of:
// - VINS
// - EXTNET
// Required: true
NetType string `url:"netType"`
NetType string `url:"netType" json:"netType"`
// Internal traffic, kbit
// Required: false
IngressRate uint64 `url:"ingress_rate,omitempty"`
IngressRate uint64 `url:"ingress_rate,omitempty" json:"ingress_rate,omitempty"`
// Internal traffic burst, kbit
// Required: false
IngressBurst uint64 `url:"ingress_burst,omitempty"`
IngressBurst uint64 `url:"ingress_burst,omitempty" json:"ingress_burst,omitempty"`
// External traffic rate, kbit
// Required: false
EgressRate uint64 `url:"egress_rate,omitempty"`
EgressRate uint64 `url:"egress_rate,omitempty" json:"egress_rate,omitempty"`
}
func (crq NetQOSRequest) validate() error {

View File

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

View File

@@ -13,30 +13,30 @@ 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
// Should be one of:
// - tcp
// - udp
// Required: true
Proto string `url:"proto"`
Proto string `url:"proto" json:"proto"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq PFWAddRequest) validate() error {

View File

@@ -11,34 +11,34 @@ 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
RuleID uint64 `url:"ruleId,omitempty"`
RuleID 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
// Should be one of:
// - tcp
// - udp
// Required: false
Proto string `url:"proto,omitempty"`
Proto string `url:"proto,omitempty" json:"proto,omitempty"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq PFWDelRequest) validate() error {

View File

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

View File

@@ -11,15 +11,15 @@ import (
type PinToStackRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Stack ID to pin to
// Required: true
TargetStackID uint64 `url:"targetStackId"`
TargetStackID uint64 `url:"targetStackId" json:"targetStackId"`
// Try to migrate or not if compute in running states
// Required: false
Force bool `url:"force"`
Force bool `url:"force" json:"force"`
}
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,11 +11,11 @@ import (
type RebootRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq RebootRequest) validate() error {

View File

@@ -11,15 +11,15 @@ 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
// Should be one of:
@@ -27,19 +27,19 @@ type RedeployRequest struct {
// - 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"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq RedeployRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type RegistrationRequest struct {
// ID of the Compute
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Unique compute registration key
// Required: true
RegistrationKey string `url:"registrationKey"`
RegistrationKey string `url:"registrationKey" json:"registrationKey"`
}
func (crq RegistrationRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type RepairBootFSRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq RepairBootFSRequest) validate() error {

View File

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

View File

@@ -11,25 +11,25 @@ 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"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq ResizeRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type RestoreRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq RestoreRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type ResumeRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
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,11 +11,11 @@ import (
type SnapshotEvictDiskRequest struct {
// ID of the compute instance
// Required: true
ComputeID uint64 `url:"computeId"`
ComputeID uint64 `url:"computeId" json:"computeId"`
// ID of the disk instance
// Required: true
DiskID uint64 `url:"diskId"`
DiskID uint64 `url:"diskId" json:"diskId"`
}
func (crq SnapshotEvictDiskRequest) 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,19 +11,19 @@ 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"`
// ID of stack to start compute
// Required: false
StackID uint64 `url:"stackId,omitempty"`
StackID uint64 `url:"stackId,omitempty" json:"stackId,omitempty"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq StartRequest) validate() error {

View File

@@ -11,15 +11,15 @@ 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"`
// Reason for action
// Required: false
Reason string `url:"reason,omitempty"`
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
func (crq StopRequest) validate() error {

View File

@@ -11,15 +11,15 @@ import (
type TagAddRequest struct {
// IDs of the compute instances
// Required: true
ComputeIDs []uint64 `url:"computeIds"`
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// 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 {
// IDs of the compute instances
// Required: true
ComputeIDs []uint64 `url:"computeIds"`
ComputeIDs []uint64 `url:"computeIds" json:"computeIds"`
// Tag key
// Required: true
Key string `url:"key"`
Key string `url:"key" json:"key"`
}
func (crq TagRemoveRequest) validate() error {

Some files were not shown because too many files have changed in this diff Show More