-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: tag management with netbox >= 2.9 #307
Conversation
Hey, thanks for the PR. I'm a little hesitant to take this approach because (I think) you'll end up beating up the endpoint we're getting the version from if you have a lot of changes. We could cache that value, but I'd like to explore just inspecting the elements of |
I support the idea of inspecting the tag object type and acting accordingly. Also, instead of caching the NetBox API version (if needed frequently for any reason, internal to |
💯 , that would be nice. |
Hello I didn't update the pytest yet but I made some changes to catch the api version from headers after each calls. The changes don't look elegant to me and may probably have a more pythonic version in your mind. Tell me about the changes, I didn't spend a lot of time for this, I'm still getting confident that you'll soon find some time to do the fix. If you wish an improvement (and make CI green again) to release this fix because you lack of time let me know. Regards. PS: @zachmoody I let you handle the object inspection/comparison if you wish later as well |
See also #311 |
Thanks again for the PR, but ended up opting for the approach in #311. |
Hello,
This PR is made with the purpose of keeping backward compatibility with previous versions. There's in my opinion another way arround I though about: we can make tags membership of
LIST_AS_SET
conditional to the API version and keep it the way it was.This would force end users to first create or retrieve tags objects in or from Netbox API and use the records in the append() function. In this case #291 would just need a version check conditional if i'm correct. But it wouldn't work when user provides a dictionnary.