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,7 +11,7 @@ import (
type AuditsRequest struct {
// ID of the VINS
// Required: true
VINSID uint64 `url:"vinsId"`
VINSID uint64 `url:"vinsId" json:"vinsId"`
}
func (vrq AuditsRequest) validate() error {

View File

@@ -11,27 +11,27 @@ import (
type CreateInAccountRequest struct {
// VINS name
// Required: true
Name string `url:"name"`
Name string `url:"name" json:"name"`
// ID of account
// Required: true
AccountID uint64 `url:"accountId"`
AccountID uint64 `url:"accountId" json:"accountId"`
// Grid ID
// Required: false
GID uint64 `url:"gid,omitempty"`
GID uint64 `url:"gid,omitempty" json:"gid,omitempty"`
// Private network IP CIDR
// Required: false
IPCIDR string `url:"ipcidr,omitempty"`
IPCIDR string `url:"ipcidr,omitempty" json:"ipcidr,omitempty"`
// Description
// Required: false
Description string `url:"desc,omitempty"`
Description string `url:"desc,omitempty" json:"desc,omitempty"`
// Number of pre created reservations
// Required: false
PreReservationsNum uint64 `url:"preReservationsNum,omitempty"`
PreReservationsNum uint64 `url:"preReservationsNum,omitempty" json:"preReservationsNum,omitempty"`
}
func (vrq CreateInAccountRequest) validate() error {

View File

@@ -11,31 +11,31 @@ import (
type CreateInRGRequest struct {
// VINS name
// Required: true
Name string `url:"name"`
Name string `url:"name" json:"name"`
// Resource group ID
// Required: true
RGID uint64 `url:"rgId"`
RGID uint64 `url:"rgId" json:"rgId"`
// Private network IP CIDR
// Required: false
IPCIDR string `url:"ipcidr,omitempty"`
IPCIDR string `url:"ipcidr,omitempty" json:"ipcidr,omitempty"`
// External network ID
// Required: false
ExtNetID uint64 `url:"extNetId,omitempty"`
ExtNetID uint64 `url:"extNetId,omitempty" json:"extNetId,omitempty"`
// External IP, related only for extNetId >= 0
// Required: false
ExtIP string `url:"extIp,omitempty"`
ExtIP string `url:"extIp,omitempty" json:"extIp,omitempty"`
// Description
// Required: false
Description string `url:"desc,omitempty"`
Description string `url:"desc,omitempty" json:"desc,omitempty"`
// Number of pre created reservations
// Required: false
PreReservationsNum uint `url:"preReservationsNum,omitempty"`
PreReservationsNum uint `url:"preReservationsNum,omitempty" json:"preReservationsNum,omitempty"`
}
func (vrq CreateInRGRequest) validate() error {

View File

@@ -11,19 +11,19 @@ import (
type DeleteRequest struct {
// VINS ID
// Required: true
VINSID uint64 `url:"vinsId"`
VINSID uint64 `url:"vinsId" json:"vinsId"`
// Set to True if you want force delete non-empty VINS.
// Primarily, VINS is considered non-empty if it has virtual machines connected to it,
// and force flag will detach them from the VINS being deleted.
// Otherwise method will return an error
// Required: false
Force bool `url:"force,omitempty"`
Force bool `url:"force,omitempty" json:"force,omitempty"`
// Set to True if you want to destroy VINS and all linked resources, if any, immediately.
// Otherwise, they will be placed into recycle bin and could be restored later within the recycle bin's purge period
// Required: false
Permanently bool `url:"permanently,omitempty"`
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
}
func (vrq DeleteRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type DisableEnableRequest struct {
// VINS ID
// Required: true
VINSID uint64 `url:"vinsId"`
VINSID uint64 `url:"vinsId" json:"vinsId"`
}
func (vrq DisableEnableRequest) validate() error {

View File

@@ -11,15 +11,15 @@ import (
type ExtNetConnectRequest struct {
// VINS ID
// Required: true
VINSID uint64 `url:"vinsId"`
VINSID uint64 `url:"vinsId" json:"vinsId"`
// External network ID
// Required: false
NetID uint64 `url:"netId,omitempty"`
NetID uint64 `url:"netId,omitempty" json:"netId,omitempty"`
// Directly set IP address
// Required: false
IP string `url:"ip,omitempty"`
IP string `url:"ip,omitempty" json:"ip,omitempty"`
}
func (vrq ExtNetConnectRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type ExtNetDisconnectRequest struct {
// VINS ID
// Required: true
VINSID uint64 `url:"vinsId"`
VINSID uint64 `url:"vinsId" json:"vinsId"`
}
func (vrq ExtNetDisconnectRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type ExtNetListRequest struct {
// VINS ID
// Required: true
VINSID uint64 `url:"vinsId"`
VINSID uint64 `url:"vinsId" json:"vinsId"`
}
func (vrq ExtNetListRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type GetRequest struct {
// VINS ID
// Required: true
VINSID uint64 `url:"vinsId"`
VINSID uint64 `url:"vinsId" json:"vinsId"`
}
func (vrq GetRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type IPListRequest struct {
// VINS ID
// Required: true
VINSID uint64 `url:"vinsId"`
VINSID uint64 `url:"vinsId" json:"vinsId"`
}
func (vrq IPListRequest) validate() error {

View File

@@ -11,15 +11,15 @@ import (
type IPReleaseRequest struct {
// VINS ID
// Required: true
VINSID uint64 `url:"vinsId"`
VINSID uint64 `url:"vinsId" json:"vinsId"`
// IP address
// Required: false
IPAddr string `url:"ipAddr,omitempty"`
IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"`
// MAC address
// Required: false
MAC string `url:"mac,omitempty"`
MAC string `url:"mac,omitempty" json:"mac,omitempty"`
}
func (vrq IPReleaseRequest) validate() error {

View File

@@ -12,7 +12,7 @@ import (
type IPReserveRequest struct {
// VINS ID
// Required: true
VINSID uint64 `url:"vinsId"`
VINSID uint64 `url:"vinsId" json:"vinsId"`
// Type of the reservation
// Should be one of:
@@ -20,23 +20,23 @@ type IPReserveRequest struct {
// - VIP
// - EXCLUDE
// Required: true
Type string `url:"type"`
Type string `url:"type" json:"type"`
// IP address to use. Non-empty string is required for type "EXCLUDE".
// Ignored for types "DHCP" and "VIP".
// Required: false
IPAddr string `url:"ipAddr,omitempty"`
IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"`
// MAC address to associate with IP reservation.
// Ignored for type "EXCLUDE",
// non-empty string is required for "DHCP" and "VIP"
// Required: false
MAC string `url:"mac,omitempty"`
MAC string `url:"mac,omitempty" json:"mac,omitempty"`
// ID of the compute, associated with this reservation of type "DHCP".
// Ignored for other types
// Required: false
ComputeID uint64 `url:"computeId,omitempty"`
ComputeID uint64 `url:"computeId,omitempty" json:"computeId,omitempty"`
}
func (vrq IPReserveRequest) validate() error {

View File

@@ -10,15 +10,15 @@ import (
type ListRequest struct {
// Include deleted
// 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 VINSes available for current user

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 of deleted VINSes available for current user

View File

@@ -11,30 +11,30 @@ import (
type NATRuleAddRequest struct {
// VINS ID
// Required: true
VINSID uint64 `url:"vinsId"`
VINSID uint64 `url:"vinsId" json:"vinsId"`
// Internal IP address to apply this rule to
// Required: true
IntIP string `url:"intIp "`
IntIP string `url:"intIp" json:"intIp"`
// Internal IP port number to use for this rule
// Required: true
IntPort uint `url:"intPort"`
IntPort uint `url:"intPort" json:"intPort"`
// External IP start port to use for this rule
// Required: true
ExtPortStart uint `url:"extPortStart"`
ExtPortStart uint `url:"extPortStart" json:"extPortStart"`
// External IP end port to use for this rule
// Required: false
ExtPortEnd uint `url:"extPortEnd,omitempty"`
ExtPortEnd uint `url:"extPortEnd,omitempty" json:"extPortEnd,omitempty"`
// IP protocol type
// Should be one of:
// - "tcp"
// - "udp"
// Required: false
Proto string `url:"proto,omitempty"`
Proto string `url:"proto,omitempty" json:"proto,omitempty"`
}
func (vrq NATRuleAddRequest) validate() error {

View File

@@ -11,12 +11,12 @@ import (
type NATRuleDelRequest struct {
// VINS ID
// Required: true
VINSID uint64 `url:"vinsId"`
VINSID uint64 `url:"vinsId" json:"vinsId"`
// ID of the rule to delete.
// Pass -1 to clear all rules at once
// Required: true
RuleID uint64 `url:"ruleId"`
RuleID uint64 `url:"ruleId" json:"ruleId"`
}
func (vrq NATRuleDelRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type NATRuleListRequest struct {
// VINS ID
// Required: true
VINSID uint64 `url:"vinsId"`
VINSID uint64 `url:"vinsId" json:"vinsId"`
}
func (vrq NATRuleListRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type RestoreRequest struct {
// VINS ID
// Required: true
VINSID uint64 `url:"vinsId"`
VINSID uint64 `url:"vinsId" json:"vinsId"`
}
func (vrq RestoreRequest) validate() error {

View File

@@ -10,19 +10,19 @@ import (
type SearchRequest struct {
// ID of the account to search for the ViNSes
// Required: false
AccountID uint64 `url:"accountId,omitempty"`
AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
// ID of the resource group to limit search to the specified RG level only
// Required: false
RGID uint64 `url:"rgId,omitempty"`
RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"`
// Name of the ViNS to search for
// Required: false
Name string `url:"name,omitempty"`
Name string `url:"name,omitempty" json:"name,omitempty"`
// If False, then VINSes having one of the statuses are not listed for
// Required: false
ShowAll bool `url:"show_all,omitempty"`
ShowAll bool `url:"show_all,omitempty" json:"show_all,omitempty"`
}
// Search search VINSes

View File

@@ -11,7 +11,7 @@ import (
type VNFDevRedeployRequest struct {
// VINS ID
// Required: true
VINSID uint64 `url:"vinsId"`
VINSID uint64 `url:"vinsId" json:"vinsId"`
}
func (vrq VNFDevRedeployRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type VNFDevRestartRequest struct {
// VINS ID
// Required: true
VINSID uint64 `url:"vinsId"`
VINSID uint64 `url:"vinsId" json:"vinsId"`
}
func (vrq VNFDevRestartRequest) validate() error {