Fix listprefixes struct.

This commit is contained in:
Kalle Carlbark 2020-02-09 22:59:14 +01:00
parent a94cdc3159
commit 42a0bb87e1
No known key found for this signature in database
GPG key ID: 5E4BAB01A57CDD62

View file

@ -35,30 +35,56 @@ type IpamPrefixesCreate struct {
type IpamPrefixesList struct {
Count int `json:"count"`
Next string `json:"next"`
Previous interface{} `json:"previous"`
Previous string `json:"previous"`
Results []struct {
ID int `json:"id"`
Family struct {
Value int `json:"value"`
Label string `json:"label"`
Value int `json:"value"`
} `json:"family"`
Prefix string `json:"prefix"`
Site interface{} `json:"site"`
Vrf interface{} `json:"vrf"`
Tenant interface{} `json:"tenant"`
Vlan interface{} `json:"vlan"`
Site struct {
ID int `json:"id"`
URL string `json:"url"`
Name string `json:"name"`
Slug string `json:"slug"`
} `json:"site"`
Vrf struct {
ID int `json:"id"`
URL string `json:"url"`
Name string `json:"name"`
Rd string `json:"rd"`
PrefixCount int `json:"prefix_count"`
} `json:"vrf"`
Tenant struct {
ID int `json:"id"`
URL string `json:"url"`
Name string `json:"name"`
Slug string `json:"slug"`
} `json:"tenant"`
Vlan struct {
ID int `json:"id"`
URL string `json:"url"`
Vid int `json:"vid"`
Name string `json:"name"`
DisplayName string `json:"display_name"`
} `json:"vlan"`
Status struct {
Value int `json:"value"`
Label string `json:"label"`
Value int `json:"value"`
} `json:"status"`
Role interface{} `json:"role"`
Role struct {
ID int `json:"id"`
URL string `json:"url"`
Name string `json:"name"`
Slug string `json:"slug"`
PrefixCount int `json:"prefix_count"`
VlanCount int `json:"vlan_count"`
} `json:"role"`
IsPool bool `json:"is_pool"`
Description string `json:"description"`
Tags []interface{} `json:"tags"`
Tags []string `json:"tags"`
CustomFields struct {
IpamPrefixRouted interface{} `json:"ipam_prefix_routed"`
IpamPrefixRoutedLastUpdate interface{} `json:"ipam_prefix_routed_last_update"`
IpamPrefixExitpoint interface{} `json:"ipam_prefix_exitpoint"`
} `json:"custom_fields"`
Created string `json:"created"`
LastUpdated time.Time `json:"last_updated"`