elasticsearch-api 7.6.0 → 7.7.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elasticsearch/api/actions/bulk.rb +6 -3
- data/lib/elasticsearch/api/actions/cat/aliases.rb +10 -4
- data/lib/elasticsearch/api/actions/cat/allocation.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/count.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/fielddata.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/health.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/help.rb +5 -3
- data/lib/elasticsearch/api/actions/cat/indices.rb +11 -5
- data/lib/elasticsearch/api/actions/cat/master.rb +5 -3
- data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +5 -3
- data/lib/elasticsearch/api/actions/cat/nodes.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/plugins.rb +5 -3
- data/lib/elasticsearch/api/actions/cat/recovery.rb +7 -5
- data/lib/elasticsearch/api/actions/cat/repositories.rb +5 -3
- data/lib/elasticsearch/api/actions/cat/segments.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/shards.rb +7 -5
- data/lib/elasticsearch/api/actions/cat/snapshots.rb +7 -5
- data/lib/elasticsearch/api/actions/cat/tasks.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/templates.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/thread_pool.rb +6 -4
- data/lib/elasticsearch/api/actions/clear_scroll.rb +6 -4
- data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +5 -3
- data/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +45 -0
- data/lib/elasticsearch/api/actions/cluster/get_component_template.rb +47 -0
- data/lib/elasticsearch/api/actions/cluster/get_settings.rb +5 -3
- data/lib/elasticsearch/api/actions/cluster/health.rb +7 -4
- data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +5 -3
- data/lib/elasticsearch/api/actions/cluster/put_component_template.rb +49 -0
- data/lib/elasticsearch/api/actions/cluster/put_settings.rb +5 -3
- data/lib/elasticsearch/api/actions/cluster/remote_info.rb +5 -3
- data/lib/elasticsearch/api/actions/cluster/reroute.rb +5 -3
- data/lib/elasticsearch/api/actions/cluster/state.rb +7 -4
- data/lib/elasticsearch/api/actions/cluster/stats.rb +6 -4
- data/lib/elasticsearch/api/actions/count.rb +8 -6
- data/lib/elasticsearch/api/actions/create.rb +2 -2
- data/lib/elasticsearch/api/actions/delete.rb +6 -3
- data/lib/elasticsearch/api/actions/delete_by_query.rb +7 -5
- data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +5 -3
- data/lib/elasticsearch/api/actions/delete_script.rb +5 -3
- data/lib/elasticsearch/api/actions/exists.rb +5 -2
- data/lib/elasticsearch/api/actions/exists_source.rb +5 -2
- data/lib/elasticsearch/api/actions/explain.rb +5 -3
- data/lib/elasticsearch/api/actions/field_caps.rb +7 -5
- data/lib/elasticsearch/api/actions/get.rb +6 -3
- data/lib/elasticsearch/api/actions/get_script.rb +5 -3
- data/lib/elasticsearch/api/actions/get_script_context.rb +5 -3
- data/lib/elasticsearch/api/actions/get_script_languages.rb +5 -3
- data/lib/elasticsearch/api/actions/get_source.rb +5 -2
- data/lib/elasticsearch/api/actions/index.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/analyze.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/clear_cache.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/clone.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/close.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/create.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/create_data_stream.rb +37 -0
- data/lib/elasticsearch/api/actions/indices/delete.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/delete_alias.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +35 -0
- data/lib/elasticsearch/api/actions/indices/delete_template.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/exists.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/exists_alias.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/exists_template.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/exists_type.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/flush.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/flush_synced.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/forcemerge.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/get.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/get_alias.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/get_data_streams.rb +37 -0
- data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/get_mapping.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/get_settings.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/get_template.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/get_upgrade.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/open.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/put_alias.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/put_mapping.rb +6 -3
- data/lib/elasticsearch/api/actions/indices/put_settings.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/put_template.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/recovery.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/refresh.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/rollover.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/segments.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/shard_stores.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/shrink.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/split.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/stats.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/update_aliases.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/upgrade.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/validate_query.rb +7 -5
- data/lib/elasticsearch/api/actions/info.rb +5 -3
- data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +5 -3
- data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +6 -4
- data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +5 -3
- data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +5 -3
- data/lib/elasticsearch/api/actions/ingest/simulate.rb +5 -3
- data/lib/elasticsearch/api/actions/mget.rb +5 -3
- data/lib/elasticsearch/api/actions/msearch.rb +7 -4
- data/lib/elasticsearch/api/actions/msearch_template.rb +6 -3
- data/lib/elasticsearch/api/actions/mtermvectors.rb +6 -3
- data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +6 -4
- data/lib/elasticsearch/api/actions/nodes/info.rb +6 -4
- data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +6 -4
- data/lib/elasticsearch/api/actions/nodes/stats.rb +6 -4
- data/lib/elasticsearch/api/actions/nodes/usage.rb +6 -4
- data/lib/elasticsearch/api/actions/ping.rb +5 -3
- data/lib/elasticsearch/api/actions/put_script.rb +5 -3
- data/lib/elasticsearch/api/actions/rank_eval.rb +6 -3
- data/lib/elasticsearch/api/actions/reindex.rb +6 -4
- data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +5 -3
- data/lib/elasticsearch/api/actions/render_search_template.rb +6 -4
- data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +5 -3
- data/lib/elasticsearch/api/actions/scroll.rb +6 -4
- data/lib/elasticsearch/api/actions/search.rb +8 -6
- data/lib/elasticsearch/api/actions/search_shards.rb +7 -4
- data/lib/elasticsearch/api/actions/search_template.rb +6 -4
- data/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +6 -5
- data/lib/elasticsearch/api/actions/snapshot/create.rb +5 -3
- data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +5 -3
- data/lib/elasticsearch/api/actions/snapshot/delete.rb +6 -4
- data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +6 -4
- data/lib/elasticsearch/api/actions/snapshot/get.rb +6 -4
- data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +7 -5
- data/lib/elasticsearch/api/actions/snapshot/restore.rb +5 -3
- data/lib/elasticsearch/api/actions/snapshot/status.rb +7 -5
- data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +5 -3
- data/lib/elasticsearch/api/actions/tasks/cancel.rb +6 -4
- data/lib/elasticsearch/api/actions/tasks/get.rb +5 -3
- data/lib/elasticsearch/api/actions/tasks/list.rb +5 -3
- data/lib/elasticsearch/api/actions/termvectors.rb +5 -2
- data/lib/elasticsearch/api/actions/update.rb +6 -4
- data/lib/elasticsearch/api/actions/update_by_query.rb +7 -5
- data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +5 -3
- data/lib/elasticsearch/api/version.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/aliases_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/allocation_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/count_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/fielddata_spec.rb +2 -2
- data/spec/elasticsearch/api/actions/cat/health_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/help_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/indices_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/master_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/nodes_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/plugins_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/recovery_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/repositories_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/segments_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/shards_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/snapshot_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/tasks_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/templates_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/clear_scroll_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cluster/health_spec.rb +3 -3
- data/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cluster/reroute_spec.rb +2 -2
- data/spec/elasticsearch/api/actions/cluster/state_spec.rb +2 -2
- data/spec/elasticsearch/api/actions/cluster/stats_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/count_spec.rb +6 -3
- data/spec/elasticsearch/api/actions/create_document_spec.rb +8 -4
- data/spec/elasticsearch/api/actions/delete_by_query_spec.rb +6 -3
- data/spec/elasticsearch/api/actions/delete_document_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/delete_script_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/exists_document_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/explain_document_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/field_caps_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/get_document_source_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/get_document_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/get_script_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/index_document_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/clone_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/close_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/create_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/delete_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/delete_template_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/exists_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/exists_template_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/exists_type_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/flush_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/flush_synced_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/get_alias_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/get_settings_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/get_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/open_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/put_alias_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/put_settings_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/put_template_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/recovery_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/refresh_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/rollover_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/segments_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/shrink_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/split_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/stats_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/upgrade_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/validate_query_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/info_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/ingest/simulate_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/json_builders_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/mget_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/mtermvectors_spec.rb +3 -2
- data/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/nodes/info_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/nodes/stats_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/ping_spec.rb +3 -2
- data/spec/elasticsearch/api/actions/put_script_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/reindex_spec.rb +3 -2
- data/spec/elasticsearch/api/actions/render_search_template_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/scroll_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/search_shards_spec.rb +3 -2
- data/spec/elasticsearch/api/actions/search_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/search_template_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/create_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/delete_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/get_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/restore_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/status_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/tasks/cancel_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/tasks/get_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/tasks/list_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/termvectors_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/update_by_query_spec.rb +3 -2
- data/spec/elasticsearch/api/actions/update_document_spec.rb +2 -1
- data/utils/thor/generator/endpoint_specifics.rb +1 -1
- data/utils/thor/templates/_documentation_top.erb +3 -2
- data/utils/thor/templates/_perform_request.erb +6 -5
- data/utils/thor/templates/method.erb +2 -1
- metadata +10 -17
- data/lib/elasticsearch/api/actions/abort_benchmark.rb +0 -28
- data/lib/elasticsearch/api/actions/benchmark.rb +0 -68
- data/lib/elasticsearch/api/actions/delete_by_rethrottle.rb +0 -34
- data/lib/elasticsearch/api/actions/nodes/shutdown.rb +0 -43
- data/lib/elasticsearch/api/actions/remote/info.rb +0 -24
- data/spec/elasticsearch/api/actions/abort_benchmark_spec.rb +0 -21
- data/spec/elasticsearch/api/actions/benchmark_spec.rb +0 -21
- data/spec/elasticsearch/api/actions/nodes/shutdown_spec.rb +0 -63
- data/spec/elasticsearch/api/actions/remote/info_spec.rb +0 -22
@@ -1,43 +0,0 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
-
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
-
# See the LICENSE file in the project root for more information
|
4
|
-
|
5
|
-
module Elasticsearch
|
6
|
-
module API
|
7
|
-
module Nodes
|
8
|
-
module Actions
|
9
|
-
# Shutdown one or all nodes
|
10
|
-
#
|
11
|
-
# @example Shut down node named _Bloke_
|
12
|
-
#
|
13
|
-
# client.nodes.shutdown node_id: 'Bloke'
|
14
|
-
#
|
15
|
-
# @option arguments [List] :node_id A comma-separated list of node IDs or names to perform the operation on; use
|
16
|
-
# `_local` to shutdown the node you're connected to, leave empty to
|
17
|
-
# shutdown all nodes
|
18
|
-
# @option arguments [Time] :delay Set the delay for the operation (default: 1s)
|
19
|
-
# @option arguments [Boolean] :exit Exit the JVM as well (default: true)
|
20
|
-
#
|
21
|
-
# @see http://elasticsearch.org/guide/reference/api/admin-cluster-nodes-shutdown/
|
22
|
-
#
|
23
|
-
def shutdown(arguments = {})
|
24
|
-
method = HTTP_POST
|
25
|
-
path = Utils.__pathify '_cluster/nodes', Utils.__listify(arguments[:node_id]), '_shutdown'
|
26
|
-
|
27
|
-
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
28
|
-
body = nil
|
29
|
-
|
30
|
-
perform_request(method, path, params, body).body
|
31
|
-
end
|
32
|
-
|
33
|
-
# Register this action with its valid params when the module is loaded.
|
34
|
-
#
|
35
|
-
# @since 6.1.1
|
36
|
-
ParamsRegistry.register(:shutdown, [
|
37
|
-
:delay,
|
38
|
-
:exit
|
39
|
-
].freeze)
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
-
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
-
# See the LICENSE file in the project root for more information
|
4
|
-
|
5
|
-
module Elasticsearch
|
6
|
-
module API
|
7
|
-
module Remote
|
8
|
-
module Actions
|
9
|
-
# Returns all of the configured remote cluster information
|
10
|
-
#
|
11
|
-
# @see http://www.elastic.co/guide/en/elasticsearch/reference/master/remote-info.html
|
12
|
-
#
|
13
|
-
def info(arguments = {})
|
14
|
-
method = HTTP_GET
|
15
|
-
path = "_remote/info"
|
16
|
-
params = {}
|
17
|
-
body = nil
|
18
|
-
|
19
|
-
perform_request(method, path, params, body).body
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
-
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
-
# See the LICENSE file in the project root for more information
|
4
|
-
|
5
|
-
require 'spec_helper'
|
6
|
-
|
7
|
-
describe 'client#abort_benchmark' do
|
8
|
-
|
9
|
-
let(:expected_args) do
|
10
|
-
[
|
11
|
-
'POST',
|
12
|
-
'_bench/abort/foo',
|
13
|
-
{},
|
14
|
-
nil
|
15
|
-
]
|
16
|
-
end
|
17
|
-
|
18
|
-
it 'performs the request' do
|
19
|
-
expect(client_double.abort_benchmark(name: 'foo'))
|
20
|
-
end
|
21
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
-
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
-
# See the LICENSE file in the project root for more information
|
4
|
-
|
5
|
-
require 'spec_helper'
|
6
|
-
|
7
|
-
describe 'client#benchmark' do
|
8
|
-
|
9
|
-
let(:expected_args) do
|
10
|
-
[
|
11
|
-
'PUT',
|
12
|
-
'_bench',
|
13
|
-
{},
|
14
|
-
{ name: 'foo' }
|
15
|
-
]
|
16
|
-
end
|
17
|
-
|
18
|
-
it 'performs the request' do
|
19
|
-
expect(client_double.benchmark(body: { name: 'foo' }))
|
20
|
-
end
|
21
|
-
end
|
@@ -1,63 +0,0 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
-
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
-
# See the LICENSE file in the project root for more information
|
4
|
-
|
5
|
-
require 'spec_helper'
|
6
|
-
|
7
|
-
describe 'client.nodes#shutdown' do
|
8
|
-
|
9
|
-
let(:expected_args) do
|
10
|
-
[
|
11
|
-
'POST',
|
12
|
-
url,
|
13
|
-
params,
|
14
|
-
nil,
|
15
|
-
nil
|
16
|
-
]
|
17
|
-
end
|
18
|
-
|
19
|
-
let(:url) do
|
20
|
-
'_cluster/nodes/_shutdown'
|
21
|
-
end
|
22
|
-
|
23
|
-
it 'performs the request' do
|
24
|
-
expect(client_double.nodes.shutdown).to eq({})
|
25
|
-
end
|
26
|
-
|
27
|
-
let(:params) do
|
28
|
-
{}
|
29
|
-
end
|
30
|
-
|
31
|
-
context 'when the node id is specified' do
|
32
|
-
|
33
|
-
let(:url) do
|
34
|
-
'_cluster/nodes/foo/_shutdown'
|
35
|
-
end
|
36
|
-
|
37
|
-
it 'performs the request' do
|
38
|
-
expect(client_double.nodes.shutdown(node_id: 'foo')).to eq({})
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
context 'when multiple node ids are specified as a list' do
|
43
|
-
|
44
|
-
let(:url) do
|
45
|
-
'_cluster/nodes/A,B,C/_shutdown'
|
46
|
-
end
|
47
|
-
|
48
|
-
it 'performs the request' do
|
49
|
-
expect(client_double.nodes.shutdown(node_id: ['A', 'B', 'C'])).to eq({})
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
context 'when multiple node ids are specified as a String' do
|
54
|
-
|
55
|
-
let(:url) do
|
56
|
-
'_cluster/nodes/A,B,C/_shutdown'
|
57
|
-
end
|
58
|
-
|
59
|
-
it 'performs the request' do
|
60
|
-
expect(client_double.nodes.shutdown(node_id: 'A,B,C')).to eq({})
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
-
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
-
# See the LICENSE file in the project root for more information
|
4
|
-
|
5
|
-
require 'spec_helper'
|
6
|
-
|
7
|
-
describe 'client.remote#info' do
|
8
|
-
|
9
|
-
let(:expected_args) do
|
10
|
-
[
|
11
|
-
'GET',
|
12
|
-
'_remote/info',
|
13
|
-
{},
|
14
|
-
nil,
|
15
|
-
nil
|
16
|
-
]
|
17
|
-
end
|
18
|
-
|
19
|
-
it 'performs the request' do
|
20
|
-
expect(client_double.remote.info).to eq({})
|
21
|
-
end
|
22
|
-
end
|