Fix prefixes as well

This commit is contained in:
Kalle Carlbark 2020-12-22 16:44:19 +01:00
parent 550adeb746
commit 77e28e6f1e
No known key found for this signature in database
GPG key ID: 5E4BAB01A57CDD62

View file

@ -71,7 +71,7 @@ type IpamPrefixesList struct {
} `json:"vlan"`
Status struct {
Label string `json:"label"`
Value int `json:"value"`
Value string `json:"value"`
} `json:"status"`
Role struct {
ID int `json:"id"`
@ -96,7 +96,7 @@ type PrefixFilter struct {
Offset int64 `schema:"offset,omitempty"`
Limit int64 `schema:"limit,omitempty"`
//User specific filters
// User specific filters
Family string `schema:"family,omitempty"`
IsPool string `schema:"is_pool,omitempty"`
EnforceUnique string `schema:"enforce_unique,omitempty"`
@ -125,7 +125,7 @@ type PrefixFilter struct {
// ListPrefixes returns Netbox ipam_prefixes_list
func (n *NetBox) ListPrefixes(i *IpamPrefixesList, f *PrefixFilter) error {
var encoder = schema.NewEncoder()
encoder := schema.NewEncoder()
form := url.Values{}
err := encoder.Encode(f, form)