-
Notifications
You must be signed in to change notification settings - Fork 130
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
Support mark_utilized in available_prefix resource #111
Conversation
Which linter do you use? Also, please add tests! |
5a3ff41
to
344432a
Compare
I added some tests, please let me know if it is what you had in mind. |
Can this attribute be unset, or does this run into the same issue as #109 |
Just tested (by hand, it was faster than adding a test and see it failing without hope :) ). The parameter is not shown in the API call JSON when it should be changed to "false". The change is planned and apply reports it, but no changes are made by the PUT call. So it seems that the issue #109 hits also in this case. I guess that for the time being we can skip the true->false transition test. I'll be happy to add the test at a later date, including my other change previously merged. (tenant_id in vrf) |
You could add a test that unsets / sets to false the attribute and then verifies that it is false. This will probably make the test fail. You can then use the This would acknowledge the bug in the codebase. After fixing the bug in go-netbox, the test will "fail" (since it expects an error but doesnt get one) and the Let me know if you want to do that, else I just merge and eventually maybe an issue pops up. |
344432a
to
69c7da4
Compare
You mean something like this? |
69c7da4
to
ab92b52
Compare
Absolutely! 👍 |
This small patch simply add the mark_utilized parameter for available_prefix resource. Changes in data source are only to make my linter happy :)