v1.2.0
This commit is contained in:
@@ -11,11 +11,11 @@ import (
|
||||
type AccessAddRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
|
||||
// Account ID
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
}
|
||||
|
||||
func (erq AccessAddRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type AccessRemoveRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
|
||||
// Account ID
|
||||
// Required: true
|
||||
AccountID uint64 `url:"accountId"`
|
||||
AccountID uint64 `url:"accountId" json:"accountId"`
|
||||
}
|
||||
|
||||
func (erq AccessRemoveRequest) validate() error {
|
||||
|
||||
@@ -11,64 +11,64 @@ import (
|
||||
type CreateRequest struct {
|
||||
// External network name
|
||||
// Required: true
|
||||
Name string `url:"name"`
|
||||
Name string `url:"name" json:"name"`
|
||||
|
||||
// Grid (platform) ID
|
||||
// Required: true
|
||||
GID uint64 `url:"gid"`
|
||||
GID uint64 `url:"gid" json:"gid"`
|
||||
|
||||
// IP network CIDR
|
||||
// For example 192.168.0.0/24
|
||||
// Required: true
|
||||
IPCIDR string `url:"ipcidr"`
|
||||
IPCIDR string `url:"ipcidr" json:"ipcidr"`
|
||||
|
||||
// External network gateway IP address
|
||||
// Required: true
|
||||
Gateway string `url:"gateway"`
|
||||
Gateway string `url:"gateway" json:"gateway"`
|
||||
|
||||
// VLAN ID
|
||||
// Required: true
|
||||
VLANID uint64 `url:"vlanId"`
|
||||
VLANID uint64 `url:"vlanId" json:"vlanId"`
|
||||
|
||||
// List of DNS addresses
|
||||
// Required: false
|
||||
DNS []string `url:"dns,omitempty"`
|
||||
DNS []string `url:"dns,omitempty" json:"dns,omitempty"`
|
||||
|
||||
// List of NTP addresses
|
||||
// Required: false
|
||||
NTP []string `url:"ntp,omitempty"`
|
||||
NTP []string `url:"ntp,omitempty" json:"ntp,omitempty"`
|
||||
|
||||
// IPs to check network availability
|
||||
// Required: false
|
||||
CheckIPs []string `url:"checkIps,omitempty"`
|
||||
CheckIPs []string `url:"checkIps,omitempty" json:"checkIps,omitempty"`
|
||||
|
||||
// If true - platform DHCP server will not be created
|
||||
// Required: false
|
||||
Virtual bool `url:"virtual,omitempty"`
|
||||
Virtual bool `url:"virtual,omitempty" json:"virtual,omitempty"`
|
||||
|
||||
// Optional description
|
||||
// Required: false
|
||||
Description string `url:"desc,omitempty"`
|
||||
Description string `url:"desc,omitempty" json:"desc,omitempty"`
|
||||
|
||||
// Start of IP range to be explicitly included
|
||||
// Required: false
|
||||
StartIP string `url:"startIP,omitempty"`
|
||||
StartIP string `url:"startIP,omitempty" json:"startIP,omitempty"`
|
||||
|
||||
// End of IP range to be explicitly included
|
||||
// Required: false
|
||||
EndIP string `url:"endIP,omitempty"`
|
||||
EndIP string `url:"endIP,omitempty" json:"endIP,omitempty"`
|
||||
|
||||
// IP to create VNFDev with
|
||||
// Required: false
|
||||
VNFDevIP string `url:"vnfdevIP,omitempty"`
|
||||
VNFDevIP string `url:"vnfdevIP,omitempty" json:"vnfdevIP,omitempty"`
|
||||
|
||||
// Number of pre created reservations
|
||||
// Required: false
|
||||
PreReservationsNum uint64 `url:"preReservationsNum,omitempty"`
|
||||
PreReservationsNum uint64 `url:"preReservationsNum,omitempty" json:"preReservationsNum,omitempty"`
|
||||
|
||||
// OpenvSwith bridge name for ExtNet connection
|
||||
// Required: false
|
||||
OVSBridge string `url:"ovsBridge,omitempty"`
|
||||
OVSBridge string `url:"ovsBridge,omitempty" json:"ovsBridge,omitempty"`
|
||||
}
|
||||
|
||||
func (erq CreateRequest) validate() error {
|
||||
|
||||
@@ -11,19 +11,19 @@ import (
|
||||
type DefaultQOSUpdateRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
|
||||
// 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 (erq DefaultQOSUpdateRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type DestroyRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
}
|
||||
|
||||
func (erq DestroyRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type DeviceDeployRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
}
|
||||
|
||||
func (erq DeviceDeployRequest) validate() error {
|
||||
|
||||
@@ -11,10 +11,10 @@ import (
|
||||
type DeviceMigrateRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
|
||||
// Target stack ID to migrate to
|
||||
StackID uint64 `url:"stackId"`
|
||||
StackID uint64 `url:"stackId" json:"stackId"`
|
||||
}
|
||||
|
||||
func (erq DeviceMigrateRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type DeviceRemoveRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
}
|
||||
|
||||
func (erq DeviceRemoveRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type DeviceRestartRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
}
|
||||
|
||||
func (erq DeviceRestartRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type DisableRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
}
|
||||
|
||||
func (erq DisableRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type DNSApplyRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
|
||||
// List of DNS to apply
|
||||
// Required: false
|
||||
DNSList []string `url:"dns_list,omitempty"`
|
||||
DNSList []string `url:"dns_list,omitempty" json:"dns_list,omitempty"`
|
||||
}
|
||||
|
||||
func (erq DNSApplyRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type EnableRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
}
|
||||
|
||||
func (erq EnableRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type GetRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
}
|
||||
|
||||
func (erq GetRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type IPsExcludeRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
|
||||
// List of IPs for exclude from external network
|
||||
// Required: true
|
||||
IPs []string `url:"ips"`
|
||||
IPs []string `url:"ips" json:"ips"`
|
||||
}
|
||||
|
||||
func (erq IPsExcludeRequest) validate() error {
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
type IPsExcludeRangeRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
|
||||
// Starting IP
|
||||
// Required: true
|
||||
IPStart string `url:"ip_start"`
|
||||
IPStart string `url:"ip_start" json:"ip_start"`
|
||||
|
||||
// Ending IP
|
||||
// Required: true
|
||||
IPEnd string `url:"ip_end"`
|
||||
IPEnd string `url:"ip_end" json:"ip_end"`
|
||||
}
|
||||
|
||||
func (erq IPsExcludeRangeRequest) validate() error {
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type IPsIncludeRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
|
||||
// List of IPs for include to external network
|
||||
// Required: true
|
||||
IPs []string `url:"ips"`
|
||||
IPs []string `url:"ips" json:"ips"`
|
||||
}
|
||||
|
||||
func (erq IPsIncludeRequest) validate() error {
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
type IPsIncludeRangeRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
|
||||
// Starting IP
|
||||
// Required: true
|
||||
IPStart string `url:"ip_start"`
|
||||
IPStart string `url:"ip_start" json:"ip_start"`
|
||||
|
||||
// Ending IP
|
||||
// Required: true
|
||||
IPEnd string `url:"ip_end"`
|
||||
IPEnd string `url:"ip_end" json:"ip_end"`
|
||||
}
|
||||
|
||||
func (erq IPsIncludeRangeRequest) validate() error {
|
||||
|
||||
@@ -10,15 +10,15 @@ import (
|
||||
type ListRequest struct {
|
||||
// Filter by account ID
|
||||
// Required: false
|
||||
AccountID uint64 `url:"accountId,omitempty"`
|
||||
AccountID uint64 `url:"accountId,omitempty" json:"accountId,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 all available external networks
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
type NTPApplyRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
|
||||
// List of NTP to apply
|
||||
// Required: false
|
||||
NTPList []string `url:"ntp_list,omitempty"`
|
||||
NTPList []string `url:"ntp_list,omitempty" json:"ntp_list,omitempty"`
|
||||
}
|
||||
|
||||
func (erq NTPApplyRequest) validate() error {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
type SetDefaultRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
}
|
||||
|
||||
func (erq SetDefaultRequest) validate() error {
|
||||
|
||||
@@ -11,15 +11,15 @@ import (
|
||||
type UpdateRequest struct {
|
||||
// ID of external network
|
||||
// Required: true
|
||||
NetID uint64 `url:"net_id"`
|
||||
NetID uint64 `url:"net_id" json:"net_id"`
|
||||
|
||||
// New external network name
|
||||
// Required: false
|
||||
Name string `url:"name,omitempty"`
|
||||
Name string `url:"name,omitempty" json:"name,omitempty"`
|
||||
|
||||
// New external network description
|
||||
// Required: false
|
||||
Description string `url:"desc,omitempty"`
|
||||
Description string `url:"desc,omitempty" json:"desc,omitempty"`
|
||||
}
|
||||
|
||||
func (erq UpdateRequest) validate() error {
|
||||
|
||||
Reference in New Issue
Block a user