Fix listprefixes struct.
This commit is contained in:
parent
a94cdc3159
commit
42a0bb87e1
1 changed files with 43 additions and 17 deletions
|
@ -33,32 +33,58 @@ type IpamPrefixesCreate struct {
|
||||||
|
|
||||||
// IpamPrefixList is used for the return value from NetBox API ipam_prefixes_list
|
// IpamPrefixList is used for the return value from NetBox API ipam_prefixes_list
|
||||||
type IpamPrefixesList struct {
|
type IpamPrefixesList struct {
|
||||||
Count int `json:"count"`
|
Count int `json:"count"`
|
||||||
Next string `json:"next"`
|
Next string `json:"next"`
|
||||||
Previous interface{} `json:"previous"`
|
Previous string `json:"previous"`
|
||||||
Results []struct {
|
Results []struct {
|
||||||
ID int `json:"id"`
|
ID int `json:"id"`
|
||||||
Family struct {
|
Family struct {
|
||||||
Value int `json:"value"`
|
|
||||||
Label string `json:"label"`
|
Label string `json:"label"`
|
||||||
|
Value int `json:"value"`
|
||||||
} `json:"family"`
|
} `json:"family"`
|
||||||
Prefix string `json:"prefix"`
|
Prefix string `json:"prefix"`
|
||||||
Site interface{} `json:"site"`
|
Site struct {
|
||||||
Vrf interface{} `json:"vrf"`
|
ID int `json:"id"`
|
||||||
Tenant interface{} `json:"tenant"`
|
URL string `json:"url"`
|
||||||
Vlan interface{} `json:"vlan"`
|
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 {
|
Status struct {
|
||||||
Value int `json:"value"`
|
|
||||||
Label string `json:"label"`
|
Label string `json:"label"`
|
||||||
|
Value int `json:"value"`
|
||||||
} `json:"status"`
|
} `json:"status"`
|
||||||
Role interface{} `json:"role"`
|
Role struct {
|
||||||
IsPool bool `json:"is_pool"`
|
ID int `json:"id"`
|
||||||
Description string `json:"description"`
|
URL string `json:"url"`
|
||||||
Tags []interface{} `json:"tags"`
|
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 []string `json:"tags"`
|
||||||
CustomFields struct {
|
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"`
|
} `json:"custom_fields"`
|
||||||
Created string `json:"created"`
|
Created string `json:"created"`
|
||||||
LastUpdated time.Time `json:"last_updated"`
|
LastUpdated time.Time `json:"last_updated"`
|
||||||
|
|
Loading…
Reference in a new issue