Closed TimSimmons closed 2 years ago
This seems to be obsolete with merge of? #92
I'd have to test to be sure! I don't see some of the analogous changes, I can try and do that and get back to you though!
That would be awesome thank you!
Any updates or do we close it for now? :)
sorry for the delay here, shameful of me. looks like ive still got my primary issue
$ cat go.mod | grep netbox
github.com/netbox-community/go-netbox v0.0.0-20201002085217-91e5d561efe4
...
56 params := dcim.NewDcimDevicesListParamsWithTimeout(30 * time.Second)
57 params.Limit = &limit
58 params.Q = &r.query.Rack
59 params.Role = &r.query.Role
60 params.Site = &r.query.Region
61 configContext := "config_context"
62 params.Exclude = &configContext
discovery/netbox.go:62:8: params.Exclude undefined (type *dcim.DcimDevicesListParams has no field or method Exclude)
Hello,
I am running on Netbox 2.9.0 and working with the latest netbox-community/go-netbox version;
cat go.mod | grep netbox
github.com/netbox-community/go-netbox v0.0.0-20201107160141-927b38be4340
I think I am also having this problem? As like OP, I have a similar config_context
structure which results in the following error when attempting to unmarshall the data:
cannot unmarshal object into Go struct field VirtualMachineWithConfigContext.results.config_context of type string
My implementation:
params := virtualization.NewVirtualizationVirtualMachinesListParams()
l, err := client.Virtualization.VirtualizationVirtualMachinesList(params, nil)
change device "config_context" type we've seen this field looking like
Which was not compatible with the
map[string]string
it was trying to parse with. So I've changed it to be anmap[string]interface{}
so that it can be arbitrary json.allow
?exclude=config_context
URL parameter for device listing This is mentioned in the v2.6 release netbox-community/netbox#3271"API Device/VM Config Context Included by Default (#2350)"
imports style changes this happened when I generated, shouldn't change anything in practice