-
Notifications
You must be signed in to change notification settings - Fork 253
fix issue 1479 - netbox_service - More than one result returned for #1484
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
base: devel
Are you sure you want to change the base?
Conversation
47a3c14 to
5a4514c
Compare
|
I have this on my list to take a look at, sorry for the delay |
|
So, my main problem with this PR is that there are a couple changes in this PR. They are valid changes and good to have, but I would feel more comfortable if we broke them apart so that if there was a problem, we could easily revert. If that is even possible? I do understand why they are all part of this PR but changes to how we parse the version string from the Netbox API response is always a little fraught. We recently got bitten by a change that the Docker deployment of NetBox does where they append their release version to the string, so that is why I am a little shy about this PR. If this is indeed an all or nothing change, I would appreciate some unit tests around version string parsing just to give me peace of mind. Thanks, and great work. |
- allow compare even 3 digit versions or more - sanitize inputs - full_version can sometimes be 4.2.9-Docker-3.2.1 just use only 4.2.9
- allow compare even 3 digit versions or more - sanitize inputs - full_version can sometimes be 4.2.9-Docker-3.2.1 just use only 4.2.9
- elif parent == "services":
is workaround for Netbox 4.3.0 - 4.4.3 - #20554
GET Parent_object_type wrong data type - integer instead of string
Just delete parent_object_type and parent_object_id
GET is broken anyway
- netbox-version can sometimes be 4.2.9-Docker-3.2.1 but expecting full_version is just 4.2.9 do not see any purpose Docker-3.2.1
5a4514c to
588215d
Compare
|
Just remembered that the CI tests run against live Netbox so the version string does get parsed and tested in CI. Sorry, brain fart. I think this is good. |
sc68cal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just needs yamllint fix to some change of fragments
Related Issue
Issue #1479
(and PR #1427 seems missing ALLOWED_QUERY_PARAMS part)
Modified Behavior
add
parent_object_typeandparent_object_idtoservicesALLOWED_QUERY_PARAMSadd workaround to
_build_query_paramsfor services and Netbox 4.3.0 - 4.4.3ipam/services: GET parent_object_type - wrong data type - integer netbox#20554
sanitized
full_versionin netbox_utilsadded
_version_less_thanto netbox_utilsimproved
_version_check_greaterin netbox_utilsadded
yamllintand errors fixesNew Behavior
None
...
Contrast to Current Behavior
You'll be able to create more services with the same name but different parent. For netbox 4.4.4 and never
Parent param introduced in Netbox 4.3.0
...
Discussion: Benefits and Drawbacks
Services will work correctly again for Netbox 4.4.4 (4.3.0) and never
parent_object_typeandparent_object_idshould be added toservicesALLOWED_QUERY_PARAMS...
Changes to the Documentation
None
...
Proposed Release Note Entry
Fix netbox_services for Netbox 4.3.0 and never
...
Double Check
develbranch.