Fix netbox 2.9 api changes
Status is no longer returning int but string
This commit is contained in:
parent
5ec76803a5
commit
19e0e8f21d
1 changed files with 3 additions and 3 deletions
|
@ -60,7 +60,7 @@ type IpamVLANsList struct {
|
||||||
} `json:"tenant"`
|
} `json:"tenant"`
|
||||||
Status struct {
|
Status struct {
|
||||||
Label string `json:"label"`
|
Label string `json:"label"`
|
||||||
Value int `json:"value"`
|
Value string `json:"value"`
|
||||||
} `json:"status"`
|
} `json:"status"`
|
||||||
Role struct {
|
Role struct {
|
||||||
ID int `json:"id"`
|
ID int `json:"id"`
|
||||||
|
@ -131,7 +131,7 @@ type VLANFilter struct {
|
||||||
Offset int64 `schema:"offset,omitempty"`
|
Offset int64 `schema:"offset,omitempty"`
|
||||||
Limit int64 `schema:"limit,omitempty"`
|
Limit int64 `schema:"limit,omitempty"`
|
||||||
|
|
||||||
//User specific filters
|
// User specific filters
|
||||||
Vid string `schema:"vid,omitempty"`
|
Vid string `schema:"vid,omitempty"`
|
||||||
Name string `schema:"name,omitempty"`
|
Name string `schema:"name,omitempty"`
|
||||||
TenantGroupID string `schema:"tenant_group_id,omitempty"`
|
TenantGroupID string `schema:"tenant_group_id,omitempty"`
|
||||||
|
@ -152,7 +152,7 @@ type VLANFilter struct {
|
||||||
|
|
||||||
// ListVLANs returns Netbox ipam_vlans_list
|
// ListVLANs returns Netbox ipam_vlans_list
|
||||||
func (n *NetBox) ListVLANs(i *IpamVLANsList, f *VLANFilter) error {
|
func (n *NetBox) ListVLANs(i *IpamVLANsList, f *VLANFilter) error {
|
||||||
var encoder = schema.NewEncoder()
|
encoder := schema.NewEncoder()
|
||||||
|
|
||||||
form := url.Values{}
|
form := url.Values{}
|
||||||
err := encoder.Encode(f, form)
|
err := encoder.Encode(f, form)
|
||||||
|
|
Loading…
Reference in a new issue