Closed erikkn closed 4 years ago
cc @awlx (not sure if you receive a notification if I mention/tag you in the description box).
Oh, seems really like the issue. But I think we use it as []NestedTag in our code. But let me check. Happy to take a PR @erikkn
//Edit: See below are you running Netbox 2.9?
So according to the netbox API this is a []NestedTag for Netbox 2.9
Thanks for your reply! Will look into it later today, but I am pretty sure you are right
@awlx , you are absolutely right! Thanks for your help!
I really thought I was running Netbox >=2.9, turned out I was running version 2.8.4 :man_facepalming: . For the sake of completion, this code works:
test2 := []*models.NestedTag{{Name: &name, Slug: &slug}
params := ipam.NewIpamIPAddressesCreateParams()
params.WithData(&models.WritableIPAddress{
Address: &address,
Tags: test2,
})
Hi folks,
Please consider the following snippet:
I am pretty new to the scene, so forgive the ugliness, but this results in the following error:
I believe this error is related to the 'type' change that got introduced in PR#92 (https://github.com/netbox-community/go-netbox/pull/92). This PR changes the type of the
Tags
field of the 'netbox/models/writable_ip_address.go' file from[]string
to[]NestedTag
. (cc @awlx)I am happy to open a PR and revert the type change, but as I mentioned, I am pretty new and I would like to receive some feedback on this first :).
Cheers,