Break out ipam vlan to its own type

This commit is contained in:
Kalle Carlbark 2021-01-20 13:56:08 +01:00
parent 77e28e6f1e
commit e8bdaa8429
No known key found for this signature in database
GPG key ID: 5E4BAB01A57CDD62

View file

@ -30,12 +30,7 @@ type IpamVLANsCreate struct {
} `json:"custom_fields"` } `json:"custom_fields"`
} }
// IpamVLANsList is used for the return value from NetBox API ipam_vlans_list type IpamVLAN struct {
type IpamVLANsList struct {
Count int `json:"count"`
Next string `json:"next"`
Previous string `json:"previous"`
Results []struct {
ID int `json:"id"` ID int `json:"id"`
Site struct { Site struct {
ID int `json:"id"` ID int `json:"id"`
@ -78,7 +73,14 @@ type IpamVLANsList struct {
Created string `json:"created"` Created string `json:"created"`
LastUpdated time.Time `json:"last_updated"` LastUpdated time.Time `json:"last_updated"`
PrefixCount int `json:"prefix_count"` PrefixCount int `json:"prefix_count"`
} `json:"results"` }
// IpamVLANsList is used for the return value from NetBox API ipam_vlans_list
type IpamVLANsList struct {
Count int `json:"count"`
Next string `json:"next"`
Previous string `json:"previous"`
Results []IpamVLAN `json:"results"`
} }
type VLAN struct { type VLAN struct {