-
Notifications
You must be signed in to change notification settings - Fork 557
dns: add support for /v2/quotas #2399
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
Conversation
Hey @SuperSandro2000 , thanks for the contribution. Could you also add acceptance tests please? They are important to us because they allow to verify the code works correctly on all supported OpenStack versions and catch regressions. |
I wouldn't mind if the coveralls settings where changed so that coverage needs to decrease at least 0.5% to go red. A 0.04% change is not a deal breaker in my opinion. |
For reference I'm trying to bump Coveralls to see if that makes a difference, in all our PRs the job is never happy and reports red if coverage didn't change. |
You should be able to configure that on the mostly undocumented settings page https://coveralls.io/github/gophercloud/gophercloud/settings |
I'm not admin on this page. @jtopjian could help probably? |
@EmilienM Just to confirm: did you sign in to the Coveralls page via Github authentication? Once I did that, I was able to access the settings. If that's still not working, let me know what percentage you'd like me to change the total coverage threshold and coverage decreased threshold. |
I have access! Seems like I didn't look in the right place :-) |
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.
We need a bit more work on the acceptance tests before we can merge. I left some comments, let me know if something is unclear.
Also, would be cool to implement quota reset too: https://docs.openstack.org/api-ref/dns/?expanded=#reset-quotas
client, err := clients.NewDNSV2Client() | ||
th.AssertNoErr(t, err) | ||
|
||
randomUUID := "513788b0-4f1b-4107-aee2-fbcdca9b9833" |
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.
This is likely going to generate an error, querying for a project that doesn't exist.
I'd expect we validate both Get and Update() functions.
You could for instance request the current quota, modify a value, then check it was effectively modified.
Then, if you implement quota reset, you can restore the original quota and verify it was changed back to the initial value.
You can use clients.RequireAdmin(t)
to request admin creds if needed.
2113078
to
f304337
Compare
I currently don't have enough time to add the reset-quotas endpoint and do a full end to end test. |
Being reworked in #3186 |
Prior to starting a PR, please make sure you have read our
contributor tutorial.
Prior to a PR being reviewed, there needs to be a Github issue that the PR
addresses. Replace the brackets and text below with that issue number.
Fixes #2398
Links to the line numbers/files in the OpenStack source code that support the
code in this PR:
https://docs.openstack.org/api-ref/dns/#view-quotas