Skip to content

Commit 719f370

Browse files
committed
[API] Adds timeout and master_timeout parameters to APIs
- license.delete - license.post - license.post_start_basic - license.post_start_trial - snapshot_lifecycle_management.start - snapshot_lifecycle_management.stop
1 parent bd16056 commit 719f370

File tree

6 files changed

+15
-3
lines changed

6 files changed

+15
-3
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/license/delete.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ module License
2424
module Actions
2525
# Deletes licensing information for the cluster
2626
#
27+
# @option arguments [Time] :master_timeout Timeout for processing on master node
28+
# @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster
2729
# @option arguments [Hash] :headers Custom HTTP headers
2830
#
2931
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-license.html
@@ -38,7 +40,7 @@ def delete(arguments = {})
3840

3941
method = Elasticsearch::API::HTTP_DELETE
4042
path = '_license'
41-
params = {}
43+
params = Utils.process_params(arguments)
4244

4345
Elasticsearch::API::Response.new(
4446
perform_request(method, path, params, body, headers, request_opts)

elasticsearch-api/lib/elasticsearch/api/actions/license/post.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ module Actions
2525
# Updates the license for the cluster.
2626
#
2727
# @option arguments [Boolean] :acknowledge whether the user has acknowledged acknowledge messages (default: false)
28+
# @option arguments [Time] :master_timeout Timeout for processing on master node
29+
# @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster
2830
# @option arguments [Hash] :headers Custom HTTP headers
2931
# @option arguments [Hash] :body licenses to be installed
3032
#

elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_basic.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ module Actions
2525
# Starts an indefinite basic license.
2626
#
2727
# @option arguments [Boolean] :acknowledge whether the user has acknowledged acknowledge messages (default: false)
28+
# @option arguments [Time] :master_timeout Timeout for processing on master node
29+
# @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster
2830
# @option arguments [Hash] :headers Custom HTTP headers
2931
#
3032
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-basic.html

elasticsearch-api/lib/elasticsearch/api/actions/license/post_start_trial.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ module Actions
2626
#
2727
# @option arguments [String] :type The type of trial license to generate (default: "trial")
2828
# @option arguments [Boolean] :acknowledge whether the user has acknowledged acknowledge messages (default: false)
29+
# @option arguments [Time] :master_timeout Timeout for processing on master node
30+
# @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster
2931
# @option arguments [Hash] :headers Custom HTTP headers
3032
#
3133
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-trial.html

elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ module SnapshotLifecycleManagement
2424
module Actions
2525
# Turns on snapshot lifecycle management (SLM).
2626
#
27+
# @option arguments [Time] :master_timeout Timeout for processing on master node
28+
# @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster
2729
# @option arguments [Hash] :headers Custom HTTP headers
2830
#
2931
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html
@@ -38,7 +40,7 @@ def start(arguments = {})
3840

3941
method = Elasticsearch::API::HTTP_POST
4042
path = '_slm/start'
41-
params = {}
43+
params = Utils.process_params(arguments)
4244

4345
Elasticsearch::API::Response.new(
4446
perform_request(method, path, params, body, headers, request_opts)

elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ module SnapshotLifecycleManagement
2424
module Actions
2525
# Turns off snapshot lifecycle management (SLM).
2626
#
27+
# @option arguments [Time] :master_timeout Timeout for processing on master node
28+
# @option arguments [Time] :timeout Timeout for acknowledgement of update from all nodes in cluster
2729
# @option arguments [Hash] :headers Custom HTTP headers
2830
#
2931
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-stop.html
@@ -38,7 +40,7 @@ def stop(arguments = {})
3840

3941
method = Elasticsearch::API::HTTP_POST
4042
path = '_slm/stop'
41-
params = {}
43+
params = Utils.process_params(arguments)
4244

4345
Elasticsearch::API::Response.new(
4446
perform_request(method, path, params, body, headers, request_opts)

0 commit comments

Comments
 (0)