Break out ipam vlan to its own type
This commit is contained in:
parent
77e28e6f1e
commit
e8bdaa8429
1 changed files with 49 additions and 47 deletions
|
@ -30,55 +30,57 @@ type IpamVLANsCreate struct {
|
|||
} `json:"custom_fields"`
|
||||
}
|
||||
|
||||
type IpamVLAN struct {
|
||||
ID int `json:"id"`
|
||||
Site struct {
|
||||
ID int `json:"id"`
|
||||
URL string `json:"url"`
|
||||
Name string `json:"name"`
|
||||
Slug string `json:"slug"`
|
||||
} `json:"site"`
|
||||
Group struct {
|
||||
ID int `json:"id"`
|
||||
URL string `json:"url"`
|
||||
Name string `json:"name"`
|
||||
Slug string `json:"slug"`
|
||||
VLANCount int `json:"vlan_count"`
|
||||
} `json:"group"`
|
||||
Vid int `json:"vid"`
|
||||
Name string `json:"name"`
|
||||
Tenant struct {
|
||||
ID int `json:"id"`
|
||||
URL string `json:"url"`
|
||||
Name string `json:"name"`
|
||||
Slug string `json:"slug"`
|
||||
} `json:"tenant"`
|
||||
Status struct {
|
||||
Label string `json:"label"`
|
||||
Value string `json:"value"`
|
||||
} `json:"status"`
|
||||
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"`
|
||||
Description string `json:"description"`
|
||||
Tags []string `json:"tags"`
|
||||
DisplayName string `json:"display_name"`
|
||||
CustomFields struct {
|
||||
} `json:"custom_fields"`
|
||||
Created string `json:"created"`
|
||||
LastUpdated time.Time `json:"last_updated"`
|
||||
PrefixCount int `json:"prefix_count"`
|
||||
}
|
||||
|
||||
// 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 []struct {
|
||||
ID int `json:"id"`
|
||||
Site struct {
|
||||
ID int `json:"id"`
|
||||
URL string `json:"url"`
|
||||
Name string `json:"name"`
|
||||
Slug string `json:"slug"`
|
||||
} `json:"site"`
|
||||
Group struct {
|
||||
ID int `json:"id"`
|
||||
URL string `json:"url"`
|
||||
Name string `json:"name"`
|
||||
Slug string `json:"slug"`
|
||||
VLANCount int `json:"vlan_count"`
|
||||
} `json:"group"`
|
||||
Vid int `json:"vid"`
|
||||
Name string `json:"name"`
|
||||
Tenant struct {
|
||||
ID int `json:"id"`
|
||||
URL string `json:"url"`
|
||||
Name string `json:"name"`
|
||||
Slug string `json:"slug"`
|
||||
} `json:"tenant"`
|
||||
Status struct {
|
||||
Label string `json:"label"`
|
||||
Value string `json:"value"`
|
||||
} `json:"status"`
|
||||
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"`
|
||||
Description string `json:"description"`
|
||||
Tags []string `json:"tags"`
|
||||
DisplayName string `json:"display_name"`
|
||||
CustomFields struct {
|
||||
} `json:"custom_fields"`
|
||||
Created string `json:"created"`
|
||||
LastUpdated time.Time `json:"last_updated"`
|
||||
PrefixCount int `json:"prefix_count"`
|
||||
} `json:"results"`
|
||||
Count int `json:"count"`
|
||||
Next string `json:"next"`
|
||||
Previous string `json:"previous"`
|
||||
Results []IpamVLAN `json:"results"`
|
||||
}
|
||||
|
||||
type VLAN struct {
|
||||
|
|
Loading…
Reference in a new issue