Refactor functions.
This commit is contained in:
parent
37458a35ed
commit
36129c8f88
1 changed files with 2 additions and 2 deletions
|
@ -109,7 +109,7 @@ type InterfaceFilter struct {
|
|||
Vlan string `schema:"vlan,omitempty"`
|
||||
}
|
||||
|
||||
func (i *Dcim_Interfaces_List) ListInterfaces(n *NetBox, f *InterfaceFilter) error {
|
||||
func (n *NetBox) ListInterfaces(i *Dcim_Interfaces_List, f *InterfaceFilter) error {
|
||||
var encoder = schema.NewEncoder()
|
||||
|
||||
form := url.Values{}
|
||||
|
@ -154,7 +154,7 @@ func (i *Dcim_Interfaces_List) ListInterfaces(n *NetBox, f *InterfaceFilter) err
|
|||
return nil
|
||||
}
|
||||
|
||||
func (i *Dcim_Interfaces_Create) CreateInterfaces(n *NetBox) error {
|
||||
func (n *NetBox) CreateInterfaces(i *Dcim_Interfaces_Create) error {
|
||||
interfaceData, err := json.Marshal(i)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue