Skip to content
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

What should GetQuota return? #2069

Closed
michielbdejong opened this issue Sep 14, 2021 · 5 comments
Closed

What should GetQuota return? #2069

michielbdejong opened this issue Sep 14, 2021 · 5 comments

Comments

@michielbdejong
Copy link
Contributor

The GetQuota function on the storage provider API returns two uint64 values.
Are those "maxBytes" and "maxFiles" like in https://github.com/cs3org/go-cs3apis/blob/970eec3/cs3/storage/provider/v1beta1/resources.pb.go#L1491-L1505 ?

Or "total" and "used" like in

total = getQuotaRes.TotalBytes
used = getQuotaRes.UsedBytes
?

Is there any documentation for this?
Maybe this function should return something a bit more typed, or at least we could improve the documentation.

@michielbdejong
Copy link
Contributor Author

Is this because GetQuota on the storage provider gives the current user's quota for all storage spaces, and the Quota included in the ListStorageSpacesResponse is only for that one storage space?

@butonic
Copy link
Contributor

butonic commented Sep 16, 2021

sadly, the ocs api does not differentiate between different storage spaces. it cannot take into account quota on an external storage or a federated share. for ocis we decided to report the quote from the users home space. with the spaces concept and the graph api we introduce it will be possible to get the quote of every storage space the user has access to.

@michielbdejong
Copy link
Contributor Author

michielbdejong commented Sep 16, 2021

Thanks for clarifying that!
But I'm still wondering, what is the meaning of each of the two uint64 numbers?

@phil-davis
Copy link
Contributor

I will guess and someone can confirm if I am correct:
getQuotaRes.TotalBytes = the total amount of storage that you are allowed to use (for example a number like 10,000,000,000 about 10GB)
getQuotaRes.UsedBytes = the number of bytes that your files/folders use at the moment (for example a number like 7,000,000,000 about 7GB)

And anyone can calculate that the remaining available storage space "free space" is 3,000,000,000 about 3GB.

@michielbdejong
Copy link
Contributor Author

Yes, that answer makes sense to me. That's probably what it is. I'll add a code comment!

michielbdejong added a commit to michielbdejong/reva that referenced this issue Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants