Skip to content

Commit

Permalink
Merge pull request #122 from aerospike/CLIENT-2526
Browse files Browse the repository at this point in the history
[CLIENT-2526] Expose the set_quotas API
  • Loading branch information
vmsachin committed Aug 24, 2023
2 parents 0684af6 + dae2afb commit fbc79de
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## [2.29.0] 2023-08-24
- **Updates**
- [CLIENT-2526] Support for set quota for user defined roles

## [2.28.0] 2023-06-23
- **New Features**
- [CLIENT-1432] Support minimum connections in connection pools
Expand Down
7 changes: 7 additions & 0 deletions lib/aerospike/client.rb
Expand Up @@ -894,6 +894,13 @@ def revoke_privileges(role_name, privileges, options = nil)
command.revoke_privileges(@cluster, policy, role_name, privileges)
end

# Set or update quota for a role.
def set_quotas(role_name, read_quota, write_quota, options = nil)
policy = create_policy(options, AdminPolicy, default_admin_policy)
command = AdminCommand.new
command.set_quotas(@cluster, policy, role_name, read_quota, write_quota)
end

private

def set_default_policies(policies)
Expand Down
2 changes: 1 addition & 1 deletion lib/aerospike/version.rb
@@ -1,4 +1,4 @@
# encoding: utf-8
module Aerospike
VERSION = "2.28.0"
VERSION = "2.28.1"
end

0 comments on commit fbc79de

Please sign in to comment.