This commit is contained in:
2023-09-18 14:13:55 +03:00
parent 4d9b8fc9d8
commit df8b045e77
16 changed files with 413 additions and 281 deletions

View File

@@ -345,7 +345,7 @@ type NATConfig struct {
Network string `json:"network"`
// Rules
Rules []interface{} `json:"rules"`
Rules []ItemNATRule `json:"rules"`
}
// Main information about NAT
@@ -357,7 +357,7 @@ type RecordNAT struct {
InfoVNF
}
// NAT/GW/NAT details
// DHCP/GW/NAT details
type InfoVNF struct {
// CKey
CKey string `json:"_ckey"`
@@ -368,9 +368,6 @@ type InfoVNF struct {
// Account ID
AccountID uint64 `json:"accountId"`
// Config
Config NATConfig `json:"config"`
// CreatedTime
CreatedTime uint64 `json:"createdTime"`
@@ -401,6 +398,9 @@ type InfoVNF struct {
// Pure virtual
PureVirtual bool `json:"pureVirtual"`
// Routes
Routes ListRoutes `json:"routes"`
// Status
Status string `json:"status"`
@@ -411,6 +411,28 @@ type InfoVNF struct {
Type string `json:"type"`
}
type ListRoutes []ItemRoutes
type ItemRoutes struct {
//Compute Id
ComputeIds []uint64 `json:"computeIds"`
// Destination network
Destination string `json:"destination"`
//Next hop host, IP address from ViNS ID free IP pool
Gateway string `json:"gateway"`
// GUID
GUID uint64 `json:"guid"`
// ID
ID uint64 `json:"id"`
//Destination network mask in 255.255.255.255 format
Netmask string `json:"netmask"`
}
// main information about VNF
type RecordVNFs struct {
// DHCP
@@ -428,12 +450,6 @@ type RecordVINS struct {
// VNF device
VNFDev VNFDev `json:"VNFDev"`
// CKey
CKey string `json:"_ckey"`
// Meta
Meta []interface{} `json:"_meta"`
// Account ID
AccountID uint64 `json:"accountId"`