elasticsearch-api 7.13.3 → 7.17.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +5 -5
- data/README.md +18 -39
- data/Rakefile +2 -16
- data/elasticsearch-api.gemspec +14 -8
- data/lib/elasticsearch/api/actions/bulk.rb +2 -2
- data/lib/elasticsearch/api/actions/cat/aliases.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/allocation.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/count.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/fielddata.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/health.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/help.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/indices.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/master.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/nodes.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/plugins.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/recovery.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/repositories.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/segments.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/shards.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/snapshots.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/tasks.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/templates.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/thread_pool.rb +1 -1
- data/lib/elasticsearch/api/actions/clear_scroll.rb +1 -1
- data/lib/elasticsearch/api/actions/close_point_in_time.rb +1 -1
- data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +3 -3
- data/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +1 -1
- data/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb +1 -1
- data/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +2 -1
- data/lib/elasticsearch/api/actions/cluster/get_component_template.rb +1 -1
- data/lib/elasticsearch/api/actions/cluster/get_settings.rb +1 -1
- data/lib/elasticsearch/api/actions/cluster/health.rb +1 -1
- data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +1 -1
- data/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb +1 -1
- data/lib/elasticsearch/api/actions/cluster/put_component_template.rb +1 -1
- data/lib/elasticsearch/api/actions/cluster/put_settings.rb +1 -1
- data/lib/elasticsearch/api/actions/cluster/remote_info.rb +1 -1
- data/lib/elasticsearch/api/actions/cluster/reroute.rb +1 -1
- data/lib/elasticsearch/api/actions/cluster/state.rb +1 -1
- data/lib/elasticsearch/api/actions/cluster/stats.rb +1 -1
- data/lib/elasticsearch/api/actions/count.rb +7 -2
- data/lib/elasticsearch/api/actions/create.rb +1 -1
- data/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +1 -1
- data/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +1 -1
- data/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb +1 -1
- data/lib/elasticsearch/api/actions/delete.rb +1 -1
- data/lib/elasticsearch/api/actions/delete_by_query.rb +1 -7
- data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +1 -1
- data/lib/elasticsearch/api/actions/delete_script.rb +1 -1
- data/lib/elasticsearch/api/actions/exists.rb +2 -1
- data/lib/elasticsearch/api/actions/exists_source.rb +2 -1
- data/lib/elasticsearch/api/actions/explain.rb +6 -6
- data/lib/elasticsearch/api/actions/features/get_features.rb +1 -1
- data/lib/elasticsearch/api/actions/features/reset_features.rb +1 -1
- data/lib/elasticsearch/api/actions/field_caps.rb +6 -6
- data/lib/elasticsearch/api/actions/get.rb +1 -1
- data/lib/elasticsearch/api/actions/get_script.rb +1 -1
- data/lib/elasticsearch/api/actions/get_script_context.rb +1 -5
- data/lib/elasticsearch/api/actions/get_script_languages.rb +1 -5
- data/lib/elasticsearch/api/actions/get_source.rb +1 -1
- data/lib/elasticsearch/api/actions/index.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/add_block.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/analyze.rb +6 -6
- data/lib/elasticsearch/api/actions/indices/clear_cache.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/clone.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/close.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/create.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/delete.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/delete_alias.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/delete_index_template.rb +6 -2
- data/lib/elasticsearch/api/actions/indices/delete_template.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/disk_usage.rb +68 -0
- data/lib/elasticsearch/api/actions/indices/exists.rb +2 -1
- data/lib/elasticsearch/api/actions/indices/exists_alias.rb +2 -1
- data/lib/elasticsearch/api/actions/indices/exists_index_template.rb +6 -2
- data/lib/elasticsearch/api/actions/indices/exists_template.rb +2 -1
- data/lib/elasticsearch/api/actions/indices/exists_type.rb +2 -1
- data/lib/elasticsearch/api/actions/indices/field_usage_stats.rb +66 -0
- data/lib/elasticsearch/api/actions/indices/flush.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/flush_synced.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/forcemerge.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/get.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/get_alias.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/get_index_template.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/get_mapping.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/get_settings.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/get_template.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/get_upgrade.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/open.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/put_alias.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/put_index_template.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/put_mapping.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/put_settings.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/put_template.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/recovery.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/refresh.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/resolve_index.rb +1 -5
- data/lib/elasticsearch/api/actions/indices/rollover.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/segments.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/shard_stores.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/shrink.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/simulate_template.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/split.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/stats.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/update_aliases.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/upgrade.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/validate_query.rb +8 -8
- data/lib/elasticsearch/api/actions/info.rb +1 -1
- data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +1 -1
- data/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb +1 -1
- data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +1 -1
- data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +1 -1
- data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +3 -1
- data/lib/elasticsearch/api/actions/ingest/simulate.rb +1 -1
- data/lib/elasticsearch/api/actions/mget.rb +1 -1
- data/lib/elasticsearch/api/actions/msearch.rb +3 -3
- data/lib/elasticsearch/api/actions/msearch_template.rb +3 -3
- data/lib/elasticsearch/api/actions/mtermvectors.rb +8 -8
- data/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb +56 -0
- data/lib/elasticsearch/api/actions/{snapshot/get_features.rb → nodes/get_repositories_metering_info.rb} +15 -14
- data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +4 -2
- data/lib/elasticsearch/api/actions/nodes/info.rb +2 -2
- data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +1 -1
- data/lib/elasticsearch/api/actions/nodes/stats.rb +2 -2
- data/lib/elasticsearch/api/actions/nodes/usage.rb +1 -1
- data/lib/elasticsearch/api/actions/open_point_in_time.rb +5 -7
- data/lib/elasticsearch/api/actions/ping.rb +3 -3
- data/lib/elasticsearch/api/actions/put_script.rb +1 -1
- data/lib/elasticsearch/api/actions/rank_eval.rb +1 -5
- data/lib/elasticsearch/api/actions/reindex.rb +1 -1
- data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +1 -1
- data/lib/elasticsearch/api/actions/render_search_template.rb +6 -6
- data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +2 -2
- data/lib/elasticsearch/api/actions/scroll.rb +6 -6
- data/lib/elasticsearch/api/actions/search.rb +8 -8
- data/lib/elasticsearch/api/actions/search_mvt.rb +85 -0
- data/lib/elasticsearch/api/actions/search_shards.rb +1 -1
- data/lib/elasticsearch/api/actions/search_template.rb +2 -2
- data/lib/elasticsearch/api/actions/shutdown/delete_node.rb +1 -5
- data/lib/elasticsearch/api/actions/shutdown/get_node.rb +1 -5
- data/lib/elasticsearch/api/actions/shutdown/put_node.rb +1 -5
- data/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +1 -1
- data/lib/elasticsearch/api/actions/snapshot/clone.rb +1 -1
- data/lib/elasticsearch/api/actions/snapshot/create.rb +1 -1
- data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +1 -1
- data/lib/elasticsearch/api/actions/snapshot/delete.rb +1 -1
- data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +1 -1
- data/lib/elasticsearch/api/actions/snapshot/get.rb +17 -1
- data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +1 -1
- data/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +76 -0
- data/lib/elasticsearch/api/actions/snapshot/restore.rb +1 -1
- data/lib/elasticsearch/api/actions/snapshot/status.rb +1 -1
- data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +1 -1
- data/lib/elasticsearch/api/actions/tasks/cancel.rb +1 -1
- data/lib/elasticsearch/api/actions/tasks/get.rb +1 -1
- data/lib/elasticsearch/api/actions/tasks/list.rb +1 -1
- data/lib/elasticsearch/api/actions/termvectors.rb +11 -10
- data/lib/elasticsearch/api/actions/update.rb +1 -1
- data/lib/elasticsearch/api/actions/update_by_query.rb +1 -7
- data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +1 -1
- data/lib/elasticsearch/api/{actions/remote/info.rb → namespace/security.rb} +12 -13
- data/lib/elasticsearch/api/utils.rb +7 -3
- data/lib/elasticsearch/api/version.rb +1 -1
- data/spec/elasticsearch/api/actions/count_spec.rb +2 -5
- data/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb +16 -3
- data/spec/elasticsearch/api/actions/{abort_benchmark_spec.rb → indices/disk_usage_spec.rb} +19 -5
- data/spec/elasticsearch/api/actions/{benchmark_spec.rb → indices/field_usage_stats_spec.rb} +18 -6
- data/spec/elasticsearch/api/actions/nodes/clear_repositories_metering_archive_spec.rb +51 -0
- data/spec/elasticsearch/api/actions/{remote/info_spec.rb → nodes/get_repositories_metering_info_spec.rb} +17 -8
- data/spec/elasticsearch/api/actions/open_point_in_time_spec.rb +2 -12
- data/spec/elasticsearch/api/actions/search_mvt_spec.rb +52 -0
- data/spec/elasticsearch/api/actions/snapshot/{get_features_spec.rb → repository_analize_spec.rb} +15 -5
- data/spec/elasticsearch/api/rest_api_yaml_spec.rb +18 -6
- data/spec/elasticsearch/api/utils_spec.rb +9 -21
- data/spec/rest_yaml_tests_helper.rb +64 -10
- data/spec/spec_helper.rb +13 -2
- data/utils/README.md +6 -1
- data/utils/thor/.rubocop.yml +2 -0
- data/utils/thor/generate_source.rb +17 -11
- data/utils/thor/generator/endpoint_specifics.rb +3 -1
- data/utils/thor/generator/files_helper.rb +1 -1
- data/utils/thor/templates/_documentation_top.erb +19 -0
- data/utils/thor/templates/_method_setup.erb +18 -0
- data/utils/thor/templates/_params_registry.erb +19 -0
- data/utils/thor/templates/_perform_request.erb +19 -1
- data/utils/thor/templates/test.erb +16 -3
- data/utils/thor/templates/test_helper.rb +0 -4
- metadata +38 -41
- data/lib/elasticsearch/api/actions/abort_benchmark.rb +0 -41
- data/lib/elasticsearch/api/actions/benchmark.rb +0 -81
- data/lib/elasticsearch/api/actions/delete_by_rethrottle.rb +0 -47
- data/lib/elasticsearch/api/actions/nodes/shutdown.rb +0 -56
- data/spec/elasticsearch/api/actions/nodes/shutdown_spec.rb +0 -76
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticsearch-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.17.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karel Minarik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: elasticsearch-
|
70
|
+
name: elasticsearch-transport
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name: elasticsearch-
|
84
|
+
name: elasticsearch-xpack
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -221,7 +221,7 @@ dependencies:
|
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '0'
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
|
-
name:
|
224
|
+
name: activesupport
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
226
226
|
requirements:
|
227
227
|
- - ">="
|
@@ -235,7 +235,7 @@ dependencies:
|
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '0'
|
237
237
|
- !ruby/object:Gem::Dependency
|
238
|
-
name:
|
238
|
+
name: jbuilder
|
239
239
|
requirement: !ruby/object:Gem::Requirement
|
240
240
|
requirements:
|
241
241
|
- - ">="
|
@@ -249,7 +249,7 @@ dependencies:
|
|
249
249
|
- !ruby/object:Gem::Version
|
250
250
|
version: '0'
|
251
251
|
- !ruby/object:Gem::Dependency
|
252
|
-
name:
|
252
|
+
name: cane
|
253
253
|
requirement: !ruby/object:Gem::Requirement
|
254
254
|
requirements:
|
255
255
|
- - ">="
|
@@ -263,7 +263,7 @@ dependencies:
|
|
263
263
|
- !ruby/object:Gem::Version
|
264
264
|
version: '0'
|
265
265
|
- !ruby/object:Gem::Dependency
|
266
|
-
name:
|
266
|
+
name: escape_utils
|
267
267
|
requirement: !ruby/object:Gem::Requirement
|
268
268
|
requirements:
|
269
269
|
- - ">="
|
@@ -277,27 +277,21 @@ dependencies:
|
|
277
277
|
- !ruby/object:Gem::Version
|
278
278
|
version: '0'
|
279
279
|
- !ruby/object:Gem::Dependency
|
280
|
-
name:
|
280
|
+
name: require-prof
|
281
281
|
requirement: !ruby/object:Gem::Requirement
|
282
282
|
requirements:
|
283
|
-
- - "
|
284
|
-
- !ruby/object:Gem::Version
|
285
|
-
version: '0.17'
|
286
|
-
- - "<"
|
283
|
+
- - ">="
|
287
284
|
- !ruby/object:Gem::Version
|
288
|
-
version: '0
|
285
|
+
version: '0'
|
289
286
|
type: :development
|
290
287
|
prerelease: false
|
291
288
|
version_requirements: !ruby/object:Gem::Requirement
|
292
289
|
requirements:
|
293
|
-
- - "
|
294
|
-
- !ruby/object:Gem::Version
|
295
|
-
version: '0.17'
|
296
|
-
- - "<"
|
290
|
+
- - ">="
|
297
291
|
- !ruby/object:Gem::Version
|
298
|
-
version: '0
|
292
|
+
version: '0'
|
299
293
|
- !ruby/object:Gem::Dependency
|
300
|
-
name: simplecov
|
294
|
+
name: simplecov
|
301
295
|
requirement: !ruby/object:Gem::Requirement
|
302
296
|
requirements:
|
303
297
|
- - ">="
|
@@ -357,8 +351,6 @@ files:
|
|
357
351
|
- elasticsearch-api.gemspec
|
358
352
|
- lib/elasticsearch-api.rb
|
359
353
|
- lib/elasticsearch/api.rb
|
360
|
-
- lib/elasticsearch/api/actions/abort_benchmark.rb
|
361
|
-
- lib/elasticsearch/api/actions/benchmark.rb
|
362
354
|
- lib/elasticsearch/api/actions/bulk.rb
|
363
355
|
- lib/elasticsearch/api/actions/cat/aliases.rb
|
364
356
|
- lib/elasticsearch/api/actions/cat/allocation.rb
|
@@ -408,7 +400,6 @@ files:
|
|
408
400
|
- lib/elasticsearch/api/actions/delete.rb
|
409
401
|
- lib/elasticsearch/api/actions/delete_by_query.rb
|
410
402
|
- lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb
|
411
|
-
- lib/elasticsearch/api/actions/delete_by_rethrottle.rb
|
412
403
|
- lib/elasticsearch/api/actions/delete_script.rb
|
413
404
|
- lib/elasticsearch/api/actions/exists.rb
|
414
405
|
- lib/elasticsearch/api/actions/exists_source.rb
|
@@ -433,11 +424,13 @@ files:
|
|
433
424
|
- lib/elasticsearch/api/actions/indices/delete_alias.rb
|
434
425
|
- lib/elasticsearch/api/actions/indices/delete_index_template.rb
|
435
426
|
- lib/elasticsearch/api/actions/indices/delete_template.rb
|
427
|
+
- lib/elasticsearch/api/actions/indices/disk_usage.rb
|
436
428
|
- lib/elasticsearch/api/actions/indices/exists.rb
|
437
429
|
- lib/elasticsearch/api/actions/indices/exists_alias.rb
|
438
430
|
- lib/elasticsearch/api/actions/indices/exists_index_template.rb
|
439
431
|
- lib/elasticsearch/api/actions/indices/exists_template.rb
|
440
432
|
- lib/elasticsearch/api/actions/indices/exists_type.rb
|
433
|
+
- lib/elasticsearch/api/actions/indices/field_usage_stats.rb
|
441
434
|
- lib/elasticsearch/api/actions/indices/flush.rb
|
442
435
|
- lib/elasticsearch/api/actions/indices/flush_synced.rb
|
443
436
|
- lib/elasticsearch/api/actions/indices/forcemerge.rb
|
@@ -482,11 +475,12 @@ files:
|
|
482
475
|
- lib/elasticsearch/api/actions/msearch.rb
|
483
476
|
- lib/elasticsearch/api/actions/msearch_template.rb
|
484
477
|
- lib/elasticsearch/api/actions/mtermvectors.rb
|
478
|
+
- lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb
|
479
|
+
- lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb
|
485
480
|
- lib/elasticsearch/api/actions/nodes/hot_threads.rb
|
486
481
|
- lib/elasticsearch/api/actions/nodes/info.rb
|
487
482
|
- lib/elasticsearch/api/actions/nodes/params_registry.rb
|
488
483
|
- lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb
|
489
|
-
- lib/elasticsearch/api/actions/nodes/shutdown.rb
|
490
484
|
- lib/elasticsearch/api/actions/nodes/stats.rb
|
491
485
|
- lib/elasticsearch/api/actions/nodes/usage.rb
|
492
486
|
- lib/elasticsearch/api/actions/open_point_in_time.rb
|
@@ -496,11 +490,11 @@ files:
|
|
496
490
|
- lib/elasticsearch/api/actions/rank_eval.rb
|
497
491
|
- lib/elasticsearch/api/actions/reindex.rb
|
498
492
|
- lib/elasticsearch/api/actions/reindex_rethrottle.rb
|
499
|
-
- lib/elasticsearch/api/actions/remote/info.rb
|
500
493
|
- lib/elasticsearch/api/actions/render_search_template.rb
|
501
494
|
- lib/elasticsearch/api/actions/scripts_painless_execute.rb
|
502
495
|
- lib/elasticsearch/api/actions/scroll.rb
|
503
496
|
- lib/elasticsearch/api/actions/search.rb
|
497
|
+
- lib/elasticsearch/api/actions/search_mvt.rb
|
504
498
|
- lib/elasticsearch/api/actions/search_shards.rb
|
505
499
|
- lib/elasticsearch/api/actions/search_template.rb
|
506
500
|
- lib/elasticsearch/api/actions/shutdown/delete_node.rb
|
@@ -514,9 +508,9 @@ files:
|
|
514
508
|
- lib/elasticsearch/api/actions/snapshot/delete.rb
|
515
509
|
- lib/elasticsearch/api/actions/snapshot/delete_repository.rb
|
516
510
|
- lib/elasticsearch/api/actions/snapshot/get.rb
|
517
|
-
- lib/elasticsearch/api/actions/snapshot/get_features.rb
|
518
511
|
- lib/elasticsearch/api/actions/snapshot/get_repository.rb
|
519
512
|
- lib/elasticsearch/api/actions/snapshot/params_registry.rb
|
513
|
+
- lib/elasticsearch/api/actions/snapshot/repository_analyze.rb
|
520
514
|
- lib/elasticsearch/api/actions/snapshot/restore.rb
|
521
515
|
- lib/elasticsearch/api/actions/snapshot/status.rb
|
522
516
|
- lib/elasticsearch/api/actions/snapshot/verify_repository.rb
|
@@ -537,13 +531,12 @@ files:
|
|
537
531
|
- lib/elasticsearch/api/namespace/ingest.rb
|
538
532
|
- lib/elasticsearch/api/namespace/nodes.rb
|
539
533
|
- lib/elasticsearch/api/namespace/remote.rb
|
534
|
+
- lib/elasticsearch/api/namespace/security.rb
|
540
535
|
- lib/elasticsearch/api/namespace/shutdown.rb
|
541
536
|
- lib/elasticsearch/api/namespace/snapshot.rb
|
542
537
|
- lib/elasticsearch/api/namespace/tasks.rb
|
543
538
|
- lib/elasticsearch/api/utils.rb
|
544
539
|
- lib/elasticsearch/api/version.rb
|
545
|
-
- spec/elasticsearch/api/actions/abort_benchmark_spec.rb
|
546
|
-
- spec/elasticsearch/api/actions/benchmark_spec.rb
|
547
540
|
- spec/elasticsearch/api/actions/bulk_spec.rb
|
548
541
|
- spec/elasticsearch/api/actions/cat/aliases_spec.rb
|
549
542
|
- spec/elasticsearch/api/actions/cat/allocation_spec.rb
|
@@ -603,10 +596,12 @@ files:
|
|
603
596
|
- spec/elasticsearch/api/actions/indices/delete_alias_spec.rb
|
604
597
|
- spec/elasticsearch/api/actions/indices/delete_spec.rb
|
605
598
|
- spec/elasticsearch/api/actions/indices/delete_template_spec.rb
|
599
|
+
- spec/elasticsearch/api/actions/indices/disk_usage_spec.rb
|
606
600
|
- spec/elasticsearch/api/actions/indices/exists_alias_spec.rb
|
607
601
|
- spec/elasticsearch/api/actions/indices/exists_spec.rb
|
608
602
|
- spec/elasticsearch/api/actions/indices/exists_template_spec.rb
|
609
603
|
- spec/elasticsearch/api/actions/indices/exists_type_spec.rb
|
604
|
+
- spec/elasticsearch/api/actions/indices/field_usage_stats_spec.rb
|
610
605
|
- spec/elasticsearch/api/actions/indices/flush_spec.rb
|
611
606
|
- spec/elasticsearch/api/actions/indices/flush_synced_spec.rb
|
612
607
|
- spec/elasticsearch/api/actions/indices/forcemerge_spec.rb
|
@@ -642,18 +637,19 @@ files:
|
|
642
637
|
- spec/elasticsearch/api/actions/msearch_spec.rb
|
643
638
|
- spec/elasticsearch/api/actions/msearch_template_spec.rb
|
644
639
|
- spec/elasticsearch/api/actions/mtermvectors_spec.rb
|
640
|
+
- spec/elasticsearch/api/actions/nodes/clear_repositories_metering_archive_spec.rb
|
641
|
+
- spec/elasticsearch/api/actions/nodes/get_repositories_metering_info_spec.rb
|
645
642
|
- spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb
|
646
643
|
- spec/elasticsearch/api/actions/nodes/info_spec.rb
|
647
644
|
- spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb
|
648
|
-
- spec/elasticsearch/api/actions/nodes/shutdown_spec.rb
|
649
645
|
- spec/elasticsearch/api/actions/nodes/stats_spec.rb
|
650
646
|
- spec/elasticsearch/api/actions/open_point_in_time_spec.rb
|
651
647
|
- spec/elasticsearch/api/actions/ping_spec.rb
|
652
648
|
- spec/elasticsearch/api/actions/put_script_spec.rb
|
653
649
|
- spec/elasticsearch/api/actions/reindex_spec.rb
|
654
|
-
- spec/elasticsearch/api/actions/remote/info_spec.rb
|
655
650
|
- spec/elasticsearch/api/actions/render_search_template_spec.rb
|
656
651
|
- spec/elasticsearch/api/actions/scroll_spec.rb
|
652
|
+
- spec/elasticsearch/api/actions/search_mvt_spec.rb
|
657
653
|
- spec/elasticsearch/api/actions/search_shards_spec.rb
|
658
654
|
- spec/elasticsearch/api/actions/search_spec.rb
|
659
655
|
- spec/elasticsearch/api/actions/search_template_spec.rb
|
@@ -665,9 +661,9 @@ files:
|
|
665
661
|
- spec/elasticsearch/api/actions/snapshot/create_spec.rb
|
666
662
|
- spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb
|
667
663
|
- spec/elasticsearch/api/actions/snapshot/delete_spec.rb
|
668
|
-
- spec/elasticsearch/api/actions/snapshot/get_features_spec.rb
|
669
664
|
- spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb
|
670
665
|
- spec/elasticsearch/api/actions/snapshot/get_spec.rb
|
666
|
+
- spec/elasticsearch/api/actions/snapshot/repository_analize_spec.rb
|
671
667
|
- spec/elasticsearch/api/actions/snapshot/restore_spec.rb
|
672
668
|
- spec/elasticsearch/api/actions/snapshot/status_spec.rb
|
673
669
|
- spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb
|
@@ -699,13 +695,13 @@ files:
|
|
699
695
|
- utils/thor/templates/method.erb
|
700
696
|
- utils/thor/templates/test.erb
|
701
697
|
- utils/thor/templates/test_helper.rb
|
702
|
-
homepage: https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/7.
|
698
|
+
homepage: https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/7.16/index.html
|
703
699
|
licenses:
|
704
700
|
- Apache-2.0
|
705
701
|
metadata:
|
706
|
-
homepage_uri: https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/7.
|
707
|
-
changelog_uri: https://github.com/elastic/elasticsearch-ruby/blob/7.
|
708
|
-
source_code_uri: https://github.com/elastic/elasticsearch-ruby/tree/7.
|
702
|
+
homepage_uri: https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/7.16/index.html
|
703
|
+
changelog_uri: https://github.com/elastic/elasticsearch-ruby/blob/7.16/CHANGELOG.md
|
704
|
+
source_code_uri: https://github.com/elastic/elasticsearch-ruby/tree/7.16/elasticsearch-api
|
709
705
|
bug_tracker_uri: https://github.com/elastic/elasticsearch-ruby/issues
|
710
706
|
post_install_message:
|
711
707
|
rdoc_options:
|
@@ -723,13 +719,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
723
719
|
- !ruby/object:Gem::Version
|
724
720
|
version: '0'
|
725
721
|
requirements: []
|
726
|
-
rubygems_version: 3.
|
722
|
+
rubygems_version: 3.5.9
|
727
723
|
signing_key:
|
728
724
|
specification_version: 4
|
729
725
|
summary: Ruby API for Elasticsearch.
|
730
726
|
test_files:
|
731
|
-
- spec/elasticsearch/api/actions/abort_benchmark_spec.rb
|
732
|
-
- spec/elasticsearch/api/actions/benchmark_spec.rb
|
733
727
|
- spec/elasticsearch/api/actions/bulk_spec.rb
|
734
728
|
- spec/elasticsearch/api/actions/cat/aliases_spec.rb
|
735
729
|
- spec/elasticsearch/api/actions/cat/allocation_spec.rb
|
@@ -789,10 +783,12 @@ test_files:
|
|
789
783
|
- spec/elasticsearch/api/actions/indices/delete_alias_spec.rb
|
790
784
|
- spec/elasticsearch/api/actions/indices/delete_spec.rb
|
791
785
|
- spec/elasticsearch/api/actions/indices/delete_template_spec.rb
|
786
|
+
- spec/elasticsearch/api/actions/indices/disk_usage_spec.rb
|
792
787
|
- spec/elasticsearch/api/actions/indices/exists_alias_spec.rb
|
793
788
|
- spec/elasticsearch/api/actions/indices/exists_spec.rb
|
794
789
|
- spec/elasticsearch/api/actions/indices/exists_template_spec.rb
|
795
790
|
- spec/elasticsearch/api/actions/indices/exists_type_spec.rb
|
791
|
+
- spec/elasticsearch/api/actions/indices/field_usage_stats_spec.rb
|
796
792
|
- spec/elasticsearch/api/actions/indices/flush_spec.rb
|
797
793
|
- spec/elasticsearch/api/actions/indices/flush_synced_spec.rb
|
798
794
|
- spec/elasticsearch/api/actions/indices/forcemerge_spec.rb
|
@@ -828,18 +824,19 @@ test_files:
|
|
828
824
|
- spec/elasticsearch/api/actions/msearch_spec.rb
|
829
825
|
- spec/elasticsearch/api/actions/msearch_template_spec.rb
|
830
826
|
- spec/elasticsearch/api/actions/mtermvectors_spec.rb
|
827
|
+
- spec/elasticsearch/api/actions/nodes/clear_repositories_metering_archive_spec.rb
|
828
|
+
- spec/elasticsearch/api/actions/nodes/get_repositories_metering_info_spec.rb
|
831
829
|
- spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb
|
832
830
|
- spec/elasticsearch/api/actions/nodes/info_spec.rb
|
833
831
|
- spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb
|
834
|
-
- spec/elasticsearch/api/actions/nodes/shutdown_spec.rb
|
835
832
|
- spec/elasticsearch/api/actions/nodes/stats_spec.rb
|
836
833
|
- spec/elasticsearch/api/actions/open_point_in_time_spec.rb
|
837
834
|
- spec/elasticsearch/api/actions/ping_spec.rb
|
838
835
|
- spec/elasticsearch/api/actions/put_script_spec.rb
|
839
836
|
- spec/elasticsearch/api/actions/reindex_spec.rb
|
840
|
-
- spec/elasticsearch/api/actions/remote/info_spec.rb
|
841
837
|
- spec/elasticsearch/api/actions/render_search_template_spec.rb
|
842
838
|
- spec/elasticsearch/api/actions/scroll_spec.rb
|
839
|
+
- spec/elasticsearch/api/actions/search_mvt_spec.rb
|
843
840
|
- spec/elasticsearch/api/actions/search_shards_spec.rb
|
844
841
|
- spec/elasticsearch/api/actions/search_spec.rb
|
845
842
|
- spec/elasticsearch/api/actions/search_template_spec.rb
|
@@ -851,9 +848,9 @@ test_files:
|
|
851
848
|
- spec/elasticsearch/api/actions/snapshot/create_spec.rb
|
852
849
|
- spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb
|
853
850
|
- spec/elasticsearch/api/actions/snapshot/delete_spec.rb
|
854
|
-
- spec/elasticsearch/api/actions/snapshot/get_features_spec.rb
|
855
851
|
- spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb
|
856
852
|
- spec/elasticsearch/api/actions/snapshot/get_spec.rb
|
853
|
+
- spec/elasticsearch/api/actions/snapshot/repository_analize_spec.rb
|
857
854
|
- spec/elasticsearch/api/actions/snapshot/restore_spec.rb
|
858
855
|
- spec/elasticsearch/api/actions/snapshot/status_spec.rb
|
859
856
|
- spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
-
# license agreements. See the NOTICE file distributed with
|
3
|
-
# this work for additional information regarding copyright
|
4
|
-
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
-
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
-
# not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing,
|
12
|
-
# software distributed under the License is distributed on an
|
13
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
-
# KIND, either express or implied. See the License for the
|
15
|
-
# specific language governing permissions and limitations
|
16
|
-
# under the License.
|
17
|
-
|
18
|
-
module Elasticsearch
|
19
|
-
module API
|
20
|
-
module Actions
|
21
|
-
# Abort a running benchmark
|
22
|
-
#
|
23
|
-
# @example
|
24
|
-
#
|
25
|
-
# client.abort_benchmark name: 'my_benchmark'
|
26
|
-
#
|
27
|
-
# @option arguments [String] :name A benchmark name
|
28
|
-
#
|
29
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-benchmark.html
|
30
|
-
#
|
31
|
-
def abort_benchmark(arguments = {})
|
32
|
-
method = HTTP_POST
|
33
|
-
path = "_bench/abort/#{arguments[:name]}"
|
34
|
-
params = {}
|
35
|
-
body = nil
|
36
|
-
|
37
|
-
perform_request(method, path, params, body).body
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
@@ -1,81 +0,0 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
-
# license agreements. See the NOTICE file distributed with
|
3
|
-
# this work for additional information regarding copyright
|
4
|
-
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
-
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
-
# not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing,
|
12
|
-
# software distributed under the License is distributed on an
|
13
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
-
# KIND, either express or implied. See the License for the
|
15
|
-
# specific language governing permissions and limitations
|
16
|
-
# under the License.
|
17
|
-
|
18
|
-
module Elasticsearch
|
19
|
-
module API
|
20
|
-
module Actions
|
21
|
-
# Run a single query, or a set of queries, and return statistics on their performance
|
22
|
-
#
|
23
|
-
# @example Return statistics for a single query
|
24
|
-
#
|
25
|
-
# client.benchmark body: {
|
26
|
-
# name: 'my_benchmark',
|
27
|
-
# competitors: [
|
28
|
-
# {
|
29
|
-
# name: 'query_1',
|
30
|
-
# requests: [
|
31
|
-
# { query: { match: { _all: 'a*' } } }
|
32
|
-
# ]
|
33
|
-
# }
|
34
|
-
# ]
|
35
|
-
# }
|
36
|
-
#
|
37
|
-
# @example Return statistics for a set of "competing" queries
|
38
|
-
#
|
39
|
-
# client.benchmark body: {
|
40
|
-
# name: 'my_benchmark',
|
41
|
-
# competitors: [
|
42
|
-
# {
|
43
|
-
# name: 'query_a',
|
44
|
-
# requests: [
|
45
|
-
# { query: { match: { _all: 'a*' } } }
|
46
|
-
# ]
|
47
|
-
# },
|
48
|
-
# {
|
49
|
-
# name: 'query_b',
|
50
|
-
# requests: [
|
51
|
-
# { query: { match: { _all: 'b*' } } }
|
52
|
-
# ]
|
53
|
-
# }
|
54
|
-
# ]
|
55
|
-
# }
|
56
|
-
#
|
57
|
-
# @option arguments [List] :index A comma-separated list of index names; use `_all` or empty string
|
58
|
-
# to perform the operation on all indices
|
59
|
-
# @option arguments [String] :type The name of the document type
|
60
|
-
# @option arguments [Hash] :body The search definition using the Query DSL
|
61
|
-
# @option arguments [Boolean] :verbose Specify whether to return verbose statistics about each iteration
|
62
|
-
# (default: false)
|
63
|
-
#
|
64
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-benchmark.html
|
65
|
-
#
|
66
|
-
def benchmark(arguments = {})
|
67
|
-
method = HTTP_PUT
|
68
|
-
path = "_bench"
|
69
|
-
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
70
|
-
body = arguments[:body]
|
71
|
-
|
72
|
-
perform_request(method, path, params, body).body
|
73
|
-
end
|
74
|
-
|
75
|
-
# Register this action with its valid params when the module is loaded.
|
76
|
-
#
|
77
|
-
# @since 6.1.1
|
78
|
-
ParamsRegistry.register(:benchmark, [:verbose].freeze)
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
-
# license agreements. See the NOTICE file distributed with
|
3
|
-
# this work for additional information regarding copyright
|
4
|
-
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
-
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
-
# not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing,
|
12
|
-
# software distributed under the License is distributed on an
|
13
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
-
# KIND, either express or implied. See the License for the
|
15
|
-
# specific language governing permissions and limitations
|
16
|
-
# under the License.
|
17
|
-
|
18
|
-
module Elasticsearch
|
19
|
-
module API
|
20
|
-
module Actions
|
21
|
-
# The value of requests_per_second can be changed on a running delete by query using the _rethrottle API
|
22
|
-
#
|
23
|
-
# @option arguments [String] :task_id The task id to rethrottle (*Required*)
|
24
|
-
# @option arguments [Number] :requests_per_second The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
|
25
|
-
#
|
26
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
|
27
|
-
#
|
28
|
-
def delete_by_query_rethrottle(arguments = {})
|
29
|
-
raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id]
|
30
|
-
|
31
|
-
method = Elasticsearch::API::HTTP_POST
|
32
|
-
path = "_delete_by_query/#{arguments[:task_id]}/_rethrottle"
|
33
|
-
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
34
|
-
body = nil
|
35
|
-
|
36
|
-
perform_request(method, path, params, body).body
|
37
|
-
end
|
38
|
-
|
39
|
-
# Register this action with its valid params when the module is loaded.
|
40
|
-
#
|
41
|
-
# @since 6.2.0
|
42
|
-
ParamsRegistry.register(:delete_by_query_rethrottle, [
|
43
|
-
:requests_per_second
|
44
|
-
].freeze)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
-
# license agreements. See the NOTICE file distributed with
|
3
|
-
# this work for additional information regarding copyright
|
4
|
-
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
-
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
-
# not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing,
|
12
|
-
# software distributed under the License is distributed on an
|
13
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
-
# KIND, either express or implied. See the License for the
|
15
|
-
# specific language governing permissions and limitations
|
16
|
-
# under the License.
|
17
|
-
|
18
|
-
module Elasticsearch
|
19
|
-
module API
|
20
|
-
module Nodes
|
21
|
-
module Actions
|
22
|
-
# Shutdown one or all nodes
|
23
|
-
#
|
24
|
-
# @example Shut down node named _Bloke_
|
25
|
-
#
|
26
|
-
# client.nodes.shutdown node_id: 'Bloke'
|
27
|
-
#
|
28
|
-
# @option arguments [List] :node_id A comma-separated list of node IDs or names to perform the operation on; use
|
29
|
-
# `_local` to shutdown the node you're connected to, leave empty to
|
30
|
-
# shutdown all nodes
|
31
|
-
# @option arguments [Time] :delay Set the delay for the operation (default: 1s)
|
32
|
-
# @option arguments [Boolean] :exit Exit the JVM as well (default: true)
|
33
|
-
#
|
34
|
-
# @see http://elasticsearch.org/guide/reference/api/admin-cluster-nodes-shutdown/
|
35
|
-
#
|
36
|
-
def shutdown(arguments = {})
|
37
|
-
method = HTTP_POST
|
38
|
-
path = Utils.__pathify '_cluster/nodes', Utils.__listify(arguments[:node_id]), '_shutdown'
|
39
|
-
|
40
|
-
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
41
|
-
body = nil
|
42
|
-
|
43
|
-
perform_request(method, path, params, body).body
|
44
|
-
end
|
45
|
-
|
46
|
-
# Register this action with its valid params when the module is loaded.
|
47
|
-
#
|
48
|
-
# @since 6.1.1
|
49
|
-
ParamsRegistry.register(:shutdown, [
|
50
|
-
:delay,
|
51
|
-
:exit
|
52
|
-
].freeze)
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
@@ -1,76 +0,0 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
-
# license agreements. See the NOTICE file distributed with
|
3
|
-
# this work for additional information regarding copyright
|
4
|
-
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
-
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
-
# not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing,
|
12
|
-
# software distributed under the License is distributed on an
|
13
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
-
# KIND, either express or implied. See the License for the
|
15
|
-
# specific language governing permissions and limitations
|
16
|
-
# under the License.
|
17
|
-
|
18
|
-
require 'spec_helper'
|
19
|
-
|
20
|
-
describe 'client.nodes#shutdown' do
|
21
|
-
|
22
|
-
let(:expected_args) do
|
23
|
-
[
|
24
|
-
'POST',
|
25
|
-
url,
|
26
|
-
params,
|
27
|
-
nil,
|
28
|
-
nil
|
29
|
-
]
|
30
|
-
end
|
31
|
-
|
32
|
-
let(:url) do
|
33
|
-
'_cluster/nodes/_shutdown'
|
34
|
-
end
|
35
|
-
|
36
|
-
it 'performs the request' do
|
37
|
-
expect(client_double.nodes.shutdown).to eq({})
|
38
|
-
end
|
39
|
-
|
40
|
-
let(:params) do
|
41
|
-
{}
|
42
|
-
end
|
43
|
-
|
44
|
-
context 'when the node id is specified' do
|
45
|
-
|
46
|
-
let(:url) do
|
47
|
-
'_cluster/nodes/foo/_shutdown'
|
48
|
-
end
|
49
|
-
|
50
|
-
it 'performs the request' do
|
51
|
-
expect(client_double.nodes.shutdown(node_id: 'foo')).to eq({})
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
context 'when multiple node ids are specified as a list' do
|
56
|
-
|
57
|
-
let(:url) do
|
58
|
-
'_cluster/nodes/A,B,C/_shutdown'
|
59
|
-
end
|
60
|
-
|
61
|
-
it 'performs the request' do
|
62
|
-
expect(client_double.nodes.shutdown(node_id: ['A', 'B', 'C'])).to eq({})
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
context 'when multiple node ids are specified as a String' do
|
67
|
-
|
68
|
-
let(:url) do
|
69
|
-
'_cluster/nodes/A,B,C/_shutdown'
|
70
|
-
end
|
71
|
-
|
72
|
-
it 'performs the request' do
|
73
|
-
expect(client_double.nodes.shutdown(node_id: 'A,B,C')).to eq({})
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|