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

@@ -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 {