Files
decort-golang-sdk/pkg/cloudapi/extnet/models.go

278 lines
4.8 KiB
Go
Raw Normal View History

2022-10-03 16:56:47 +03:00
package extnet
2022-12-22 17:56:47 +03:00
// Main information about external network
type ItemExtNet struct {
// ID
ID uint64 `json:"id"`
// IPCIDR
IPCIDR string `json:"ipcidr"`
// Name
Name string `json:"name"`
// Status
Status string `json:"status"`
2022-10-03 16:56:47 +03:00
}
2022-12-22 17:56:47 +03:00
// Extend information about external network
type ItemExtNetExtend struct {
// Main information about external network
ItemExtNet
// IP address
2022-10-03 16:56:47 +03:00
IPAddr string `json:"ipaddr"`
}
2022-12-22 17:56:47 +03:00
// List of information about external network
2023-06-30 11:21:47 +03:00
type ListExtNets struct {
Data []ItemExtNet `json:"data"`
EntryCount uint64 `json:"entryCount"`
}
2022-12-22 17:56:47 +03:00
// List of extend information about external network
type ListExtNetExtends []ItemExtNetExtend
// Main information about compute with external network
type ItemExtNetCompute struct {
// Account ID
AccountID uint64 `json:"accountId"`
// Account name
AccountName string `json:"accountName"`
// List of extend information about external network
ExtNets ListExtNetExtends `json:"extnets"`
// ID
ID uint64 `json:"id"`
// Name
Name string `json:"name"`
// Resource group ID
RGID uint64 `json:"rgId"`
// Resource group name
RGName string `json:"rgName"`
2022-10-03 16:56:47 +03:00
}
2022-12-22 17:56:47 +03:00
// List of information about computes with external network
2023-07-21 15:14:10 +03:00
type ListExtNetComputes struct {
// Data
Data []ItemExtNetCompute `json:"data"`
// Entry count
EntryCount uint64 `json:"entryCount"`
}
2022-10-03 16:56:47 +03:00
2022-12-22 17:56:47 +03:00
// QOS
type QOS struct {
2023-04-28 11:46:58 +03:00
// EBurst
EBurst uint64 `json:"eBurst"`
2022-12-22 17:56:47 +03:00
// ERate
ERate uint64 `json:"eRate"`
// GUID
GUID string `json:"guid"`
// InBurst
2022-10-03 16:56:47 +03:00
InBurst uint64 `json:"inBurst"`
2022-12-22 17:56:47 +03:00
// InRate
InRate uint64 `json:"inRate"`
2022-10-03 16:56:47 +03:00
}
2022-12-22 17:56:47 +03:00
// Main information about reservations
type ItemReservation struct {
2024-12-27 11:35:22 +03:00
// Account ID
AccountID uint64 `json:"account_id"`
2022-12-22 17:56:47 +03:00
// ClientType
ClientType string `json:"clientType"`
// Description
2022-10-03 16:56:47 +03:00
Description string `json:"desc"`
2022-12-22 17:56:47 +03:00
// Domain name
DomainName string `json:"domainname"`
// Hostname
Hostname string `json:"hostname"`
// IP
IP string `json:"ip"`
// MAC
MAC string `json:"mac"`
// Type
Type string `json:"type"`
// Virtual machine ID
VMID uint64 `json:"vmId"`
2022-10-03 16:56:47 +03:00
}
2022-12-22 17:56:47 +03:00
// List of information about reservations
type ListReservations []ItemReservation
2022-10-03 16:56:47 +03:00
2022-12-22 17:56:47 +03:00
// VNFs
type VNFs struct {
2022-10-03 16:56:47 +03:00
DHCP uint64 `json:"dhcp"`
}
2023-04-20 11:17:35 +03:00
type Excluded struct {
// ClientType
ClientType string `json:"clientType"`
2023-07-21 15:14:10 +03:00
// Domain name
DomainName string `json:"domainname"`
// Host name
HostName string `json:"hostname"`
2023-04-20 11:17:35 +03:00
// IP
IP string `json:"ip"`
// MAC
MAC string `json:"mac"`
// Type
Type string `json:"type"`
// VMID
VMID uint64 `json:"vmId"`
}
2022-12-22 17:56:47 +03:00
// Detailed information about external network
type RecordExtNet struct {
// CKey
CKey string `json:"_ckey"`
// Meta
Meta []interface{} `json:"_meta"`
// CheckIps
2023-07-07 12:40:03 +03:00
CheckIPs []string `json:"checkIps"`
2022-12-22 17:56:47 +03:00
// Default
Default bool `json:"default"`
// Default QOS
DefaultQOS QOS `json:"defaultQos"`
// Description
Description string `json:"desc"`
// list of DNS
DNS []string `json:"dns"`
// Excluded
2023-04-20 11:17:35 +03:00
Excluded []Excluded `json:"excluded"`
2022-12-22 17:56:47 +03:00
2025-08-29 12:51:25 +03:00
// Enable Security Groups
EnableSecGroups bool `json:"enable_secgroups"`
2022-12-22 17:56:47 +03:00
// Free IPs
2024-08-26 17:51:34 +03:00
FreeIPs int64 `json:"free_ips"`
2022-12-22 17:56:47 +03:00
// Gateway
Gateway string `json:"gateway"`
// Grid ID
GID uint64 `json:"gid"`
// GUID
GUID uint64 `json:"guid"`
// ID
ID uint64 `json:"id"`
// IPCIDR
IPCIDR string `json:"ipcidr"`
// Milestones
Milestones uint64 `json:"milestones"`
2025-07-15 17:39:18 +03:00
// MTU
MTU uint64 `json:"mtu"`
2022-12-22 17:56:47 +03:00
// Name
Name string `json:"name"`
// Network
Network string `json:"network"`
2025-07-15 17:39:18 +03:00
// Network IDs
NetworkIDs NetworkIDs `json:"networkIds"`
2022-12-22 17:56:47 +03:00
2025-04-09 11:21:07 +03:00
// NTP
NTP []string `json:"ntp"`
2022-12-22 17:56:47 +03:00
// OVS Bridge
OVSBridge string `json:"ovsBridge"`
// PreReservation IP num
PreReservationsNum uint64 `json:"preReservationsNum"`
// Prefix
Prefix uint64 `json:"prefix"`
// PriVNFDevID
PriVNFDevID uint64 `json:"priVnfDevId"`
2025-07-15 17:39:18 +03:00
// Redundant
Redundant bool `json:"redundant"`
// SecVnfDevId
SecVNFDevID uint64 `json:"secVnfDevId"`
2022-12-22 17:56:47 +03:00
// List reservations
Reservations ListReservations `json:"reservations"`
2025-07-15 17:39:18 +03:00
// List pre-reservations
PreReservations ListReservations `json:"pre-reservations"`
2022-12-22 17:56:47 +03:00
// Shared with
SharedWith []uint64 `json:"sharedWith"`
// Status
Status string `json:"status"`
// VLAN ID
VLANID uint64 `json:"vlanId"`
// VNFs
VNFs VNFs `json:"vnfs"`
2025-07-15 17:39:18 +03:00
// Zone ID
ZoneID uint64 `json:"zoneId"`
}
type NetworkIDs struct {
// Primary
Primary uint64 `json:"primary"`
// Secondary
Secondary uint64 `json:"secondary"`
2022-10-03 16:56:47 +03:00
}
2024-12-27 11:35:22 +03:00
// Detailed information about reserved address or address pool
type RecordReservedIP struct {
ExtnetID int `json:"extnet_id"`
Reservations []Reservations `json:"reservations"`
}
type Reservations struct {
AccountID int `json:"account_id"`
ClientType string `json:"clientType"`
DomainName string `json:"domainname"`
Hostname string `json:"hostname"`
IP string `json:"ip"`
Mac string `json:"mac"`
Type string `json:"type"`
VMID int `json:"vmId"`
}