v1.2.0
This commit is contained in:
@@ -13,22 +13,22 @@ import (
|
||||
type AccessGrantRequest struct {
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
|
||||
// User or group name to grant access
|
||||
// Required: true
|
||||
User string `url:"user"`
|
||||
User string `url:"user" json:"user"`
|
||||
|
||||
// Access rights to set, one of:
|
||||
// - "R"
|
||||
// - "RCX"
|
||||
// - "ARCXDU"
|
||||
// Required: true
|
||||
Right string `url:"right"`
|
||||
Right string `url:"right" json:"right"`
|
||||
|
||||
// Reason for action
|
||||
// Required: false
|
||||
Reason string `url:"reason,omitempty"`
|
||||
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
func (rgrq AccessGrantRequest) validate() error {
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
type AccessRevokeRequest struct {
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
|
||||
// User or group name to revoke access
|
||||
// Required: true
|
||||
User string `url:"user"`
|
||||
User string `url:"user" json:"user"`
|
||||
|
||||
// Reason for action
|
||||
// Required: false
|
||||
Reason string `url:"reason,omitempty"`
|
||||
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
func (rgrq AccessRevokeRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type AffinityGroupComputesRequest struct {
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
|
||||
// Affinity group label
|
||||
// Required: true
|
||||
AffinityGroup string `url:"affinityGroup"`
|
||||
AffinityGroup string `url:"affinityGroup" json:"affinityGroup"`
|
||||
}
|
||||
|
||||
func (rgrq AffinityGroupComputesRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type AffinityGroupsGetRequest struct {
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
|
||||
// Label affinity group
|
||||
// Required: true
|
||||
AffinityGroup string `url:"affinityGroup"`
|
||||
AffinityGroup string `url:"affinityGroup" json:"affinityGroup"`
|
||||
}
|
||||
|
||||
func (rgrq AffinityGroupsGetRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type AffinityGroupsListRequest struct {
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
}
|
||||
|
||||
func (rgrq AffinityGroupsListRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type AuditsRequest struct {
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
}
|
||||
|
||||
func (rgrq AuditsRequest) validate() error {
|
||||
|
||||
@@ -11,40 +11,40 @@ import (
|
||||
type CreateRequest struct {
|
||||
// Account, which will own this resource group
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
|
||||
// Grid ID
|
||||
// Required: true
|
||||
GID uint64 `url:"gid"`
|
||||
GID uint64 `url:"gid" json:"gid"`
|
||||
|
||||
// Name of this resource group. Must be unique within the account
|
||||
// Required: true
|
||||
Name string `url:"name"`
|
||||
Name string `url:"name" json:"name"`
|
||||
|
||||
// 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 virtual disks 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"`
|
||||
|
||||
// Username - owner of this resource group.
|
||||
// Leave blank to set current user as owner
|
||||
// Required: false
|
||||
Owner string `url:"owner,omitempty"`
|
||||
Owner string `url:"owner,omitempty" json:"owner,omitempty"`
|
||||
|
||||
// Type of the default network for this resource group.
|
||||
// virtual machines created in this resource group will be by default connected to this network.
|
||||
@@ -53,31 +53,31 @@ type CreateRequest struct {
|
||||
// - PUBLIC
|
||||
// - NONE
|
||||
// Required: false
|
||||
DefNet string `url:"def_net,omitempty"`
|
||||
DefNet string `url:"def_net,omitempty" json:"def_net,omitempty"`
|
||||
|
||||
// Private network IP CIDR if default network PRIVATE
|
||||
// Required: false
|
||||
IPCIDR string `url:"ipcidr,omitempty"`
|
||||
IPCIDR string `url:"ipcidr,omitempty" json:"ipcidr,omitempty"`
|
||||
|
||||
// Text description of this resource group
|
||||
// Required: false
|
||||
Description string `url:"desc,omitempty"`
|
||||
Description string `url:"desc,omitempty" json:"desc,omitempty"`
|
||||
|
||||
// Reason for action
|
||||
// Required: false
|
||||
Reason string `url:"reason,omitempty"`
|
||||
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
|
||||
|
||||
// External network ID
|
||||
// Required: false
|
||||
ExtNetID uint64 `url:"extNetId,omitempty"`
|
||||
ExtNetID uint64 `url:"extNetId,omitempty" json:"extNetId,omitempty"`
|
||||
|
||||
// External IP address
|
||||
// Required: false
|
||||
ExtIP string `url:"extIp,omitempty"`
|
||||
ExtIP string `url:"extIp,omitempty" json:"extIp,omitempty"`
|
||||
|
||||
// Register computes in registration system
|
||||
// Required: false
|
||||
RegisterComputes bool `url:"registerComputes,omitempty"`
|
||||
RegisterComputes bool `url:"registerComputes,omitempty" json:"registerComputes,omitempty"`
|
||||
}
|
||||
|
||||
func (rgrq CreateRequest) validate() error {
|
||||
|
||||
@@ -11,20 +11,20 @@ import (
|
||||
type DeleteRequest struct {
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
|
||||
// Set to True if you want force delete non-empty resource group
|
||||
// Required: false
|
||||
Force bool `url:"force,omitempty"`
|
||||
Force bool `url:"force,omitempty" json:"force,omitempty"`
|
||||
|
||||
// Set to True if you want to destroy resource group and all linked resources, if any, immediately.
|
||||
// Otherwise, they will be placed into recycle bin and could be restored later within recycle bin's purge period
|
||||
// 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 (rgrq DeleteRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type DisableRequest struct {
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
|
||||
// Reason for action
|
||||
// Required: false
|
||||
Reason string `url:"reason,omitempty"`
|
||||
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
func (rgrq DisableRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type EnableRequest struct {
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
|
||||
// Reason for action
|
||||
// Required: false
|
||||
Reason string `url:"reason,omitempty"`
|
||||
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
func (rgrq EnableRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type GetRequest struct {
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
|
||||
// Reason for action
|
||||
// Required: false
|
||||
Reason string `url:"reason,omitempty"`
|
||||
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
func (rgrq GetRequest) validate() error {
|
||||
|
||||
@@ -10,15 +10,15 @@ import (
|
||||
type ListRequest struct {
|
||||
// Included deleted resource groups
|
||||
// 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 all resource groups the user has access to
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type ListComputesRequest struct {
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
|
||||
// Reason for action
|
||||
// Required: false
|
||||
Reason string `url:"reason,omitempty"`
|
||||
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
func (rgrq ListComputesRequest) validate() error {
|
||||
|
||||
@@ -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 resource groups the user has access to
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type ListLBRequest struct {
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
}
|
||||
|
||||
func (rgrq ListLBRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type ListPFWRequest struct {
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
}
|
||||
|
||||
func (rgrq ListPFWRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type ListVINSRequest struct {
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
|
||||
// Reason for action
|
||||
// Required: false
|
||||
Reason string `url:"reason,omitempty"`
|
||||
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
func (rgrq ListVINSRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type RestoreRequest struct {
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
|
||||
// Reason for action
|
||||
// Required: false
|
||||
Reason string `url:"reason,omitempty"`
|
||||
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
func (rgrq RestoreRequest) validate() error {
|
||||
|
||||
@@ -13,22 +13,22 @@ import (
|
||||
type SetDefNetRequest struct {
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
|
||||
// Network type
|
||||
// Should be one of:
|
||||
// - "PUBLIC"
|
||||
// - "PRIVATE"
|
||||
// Required: true
|
||||
NetType string `url:"netType"`
|
||||
NetType string `url:"netType" json:"netType"`
|
||||
|
||||
// Network ID
|
||||
// Required: false
|
||||
NetID uint64 `url:"netId"`
|
||||
NetID uint64 `url:"netId" json:"netId"`
|
||||
|
||||
// Reason for action
|
||||
// Required: false
|
||||
Reason string `url:"reason,omitempty"`
|
||||
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
func (rgrq SetDefNetRequest) validate() error {
|
||||
|
||||
@@ -11,43 +11,43 @@ import (
|
||||
type UpdateRequest struct {
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
|
||||
// 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"`
|
||||
|
||||
// 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 virtual disks 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"`
|
||||
|
||||
// Register computes in registration system
|
||||
// Required: false
|
||||
RegisterComputes bool `url:"registerComputes,omitempty"`
|
||||
RegisterComputes bool `url:"registerComputes,omitempty" json:"registerComputes,omitempty"`
|
||||
|
||||
// Reason for action
|
||||
// Required: false
|
||||
Reason string `url:"reason,omitempty"`
|
||||
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
func (rgrq UpdateRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type UsageRequest struct {
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId"`
|
||||
RGID uint64 `url:"rgId" json:"rgId"`
|
||||
|
||||
// Reason for action
|
||||
// Required: false
|
||||
Reason string `url:"reason,omitempty"`
|
||||
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
|
||||
}
|
||||
|
||||
func (rgrq UsageRequest) validate() error {
|
||||
|
||||
Reference in New Issue
Block a user