Skip to content

dns: add support for /v2/quotas#2399

Closed
SuperSandro2000 wants to merge 2 commits intogophercloud:masterfrom
sapcc:designate-quotas
Closed

dns: add support for /v2/quotas#2399
SuperSandro2000 wants to merge 2 commits intogophercloud:masterfrom
sapcc:designate-quotas

Conversation

@SuperSandro2000
Copy link
Copy Markdown
Contributor

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

@mandre
Copy link
Copy Markdown
Contributor

mandre commented May 14, 2022

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.

@SuperSandro2000
Copy link
Copy Markdown
Contributor Author

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.

@EmilienM
Copy link
Copy Markdown
Contributor

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.
Indeed, 0.04% isn't a big deal.

@SuperSandro2000
Copy link
Copy Markdown
Contributor Author

You should be able to configure that on the mostly undocumented settings page https://coveralls.io/github/gophercloud/gophercloud/settings

@EmilienM
Copy link
Copy Markdown
Contributor

I'm not admin on this page. @jtopjian could help probably?

@jtopjian
Copy link
Copy Markdown
Contributor

@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.

@EmilienM
Copy link
Copy Markdown
Contributor

@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 :-)
https://coveralls.io/github/gophercloud/gophercloud/settings

Copy link
Copy Markdown
Contributor

@mandre mandre left a 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"
Copy link
Copy Markdown
Contributor

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.

@SuperSandro2000
Copy link
Copy Markdown
Contributor Author

SuperSandro2000 commented Jun 21, 2022

I currently don't have enough time to add the reset-quotas endpoint and do a full end to end test.
If someone else wants to pickup the work, feel free to do so. :)

@pierreprinetti pierreprinetti added the needinfo Additional information requested label Jul 23, 2024
@pierreprinetti
Copy link
Copy Markdown
Member

Being reworked in #3186

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needinfo Additional information requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for dns/v2/quotas

5 participants