ceph/go-ceph

Support bucket scope quota

R4scal opened this issue · 4 comments

R4scal commented

Hello.

For now SetUserQuota method forces QuotaType to user, but api support bucket option doc

// SetUserQuota sets quota to a user
// Global quotas (https://docs.ceph.com/en/latest/radosgw/admin/#reading-writing-global-quotas) are not surfaced in the Admin Ops API
// So this library cannot expose it yet
func (api *API) SetUserQuota(ctx context.Context, quota QuotaSpec) error {
	// Always for quota type to user
	quota.QuotaType = "user"

Are there any reasons not to remove this restriction in the library?

thotz commented

More like not implemented till now, no specific reason for that. In other words, for OBC use case we need to implement the user quota. It was not necessary at that point. Feel free to contribute bucket quotas apis @R4scal

R4scal commented

@thotz I created an MR that tried to keep current version logic for non-bucket QuotaType values. Feel free to give any feedback

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contribution.