opensearch-api 2.0.2 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/Gemfile +2 -2
  4. data/Rakefile +3 -3
  5. data/lib/opensearch/api/actions/cat/allocation.rb +4 -2
  6. data/lib/opensearch/api/actions/cat/cluster_manager.rb +54 -0
  7. data/lib/opensearch/api/actions/cat/indices.rb +4 -2
  8. data/lib/opensearch/api/actions/cat/master.rb +3 -1
  9. data/lib/opensearch/api/actions/cat/nodeattrs.rb +4 -2
  10. data/lib/opensearch/api/actions/cat/nodes.rb +4 -2
  11. data/lib/opensearch/api/actions/cat/pending_tasks.rb +4 -2
  12. data/lib/opensearch/api/actions/cat/plugins.rb +4 -2
  13. data/lib/opensearch/api/actions/cat/repositories.rb +4 -2
  14. data/lib/opensearch/api/actions/cat/shards.rb +4 -2
  15. data/lib/opensearch/api/actions/cat/snapshots.rb +3 -1
  16. data/lib/opensearch/api/actions/cat/templates.rb +4 -2
  17. data/lib/opensearch/api/actions/cat/thread_pool.rb +4 -2
  18. data/lib/opensearch/api/actions/cluster/delete_component_template.rb +4 -2
  19. data/lib/opensearch/api/actions/cluster/exists_component_template.rb +4 -2
  20. data/lib/opensearch/api/actions/cluster/get_component_template.rb +4 -2
  21. data/lib/opensearch/api/actions/cluster/get_settings.rb +3 -1
  22. data/lib/opensearch/api/actions/cluster/health.rb +4 -2
  23. data/lib/opensearch/api/actions/cluster/pending_tasks.rb +5 -3
  24. data/lib/opensearch/api/actions/cluster/put_component_template.rb +4 -2
  25. data/lib/opensearch/api/actions/cluster/put_settings.rb +3 -1
  26. data/lib/opensearch/api/actions/cluster/reroute.rb +4 -2
  27. data/lib/opensearch/api/actions/cluster/state.rb +4 -2
  28. data/lib/opensearch/api/actions/dangling_indices/delete_dangling_index.rb +4 -2
  29. data/lib/opensearch/api/actions/dangling_indices/import_dangling_index.rb +4 -2
  30. data/lib/opensearch/api/actions/delete_script.rb +4 -2
  31. data/lib/opensearch/api/actions/features/get_features.rb +4 -2
  32. data/lib/opensearch/api/actions/get_script.rb +4 -2
  33. data/lib/opensearch/api/actions/indices/add_block.rb +3 -1
  34. data/lib/opensearch/api/actions/indices/clone.rb +3 -1
  35. data/lib/opensearch/api/actions/indices/close.rb +3 -1
  36. data/lib/opensearch/api/actions/indices/create.rb +4 -2
  37. data/lib/opensearch/api/actions/indices/delete.rb +3 -1
  38. data/lib/opensearch/api/actions/indices/delete_alias.rb +4 -2
  39. data/lib/opensearch/api/actions/indices/delete_index_template.rb +4 -2
  40. data/lib/opensearch/api/actions/indices/delete_template.rb +4 -2
  41. data/lib/opensearch/api/actions/indices/exists_index_template.rb +4 -2
  42. data/lib/opensearch/api/actions/indices/exists_template.rb +4 -2
  43. data/lib/opensearch/api/actions/indices/get.rb +4 -2
  44. data/lib/opensearch/api/actions/indices/get_index_template.rb +4 -2
  45. data/lib/opensearch/api/actions/indices/get_mapping.rb +4 -2
  46. data/lib/opensearch/api/actions/indices/get_settings.rb +3 -1
  47. data/lib/opensearch/api/actions/indices/get_template.rb +4 -2
  48. data/lib/opensearch/api/actions/indices/open.rb +3 -1
  49. data/lib/opensearch/api/actions/indices/put_alias.rb +4 -2
  50. data/lib/opensearch/api/actions/indices/put_index_template.rb +4 -2
  51. data/lib/opensearch/api/actions/indices/put_mapping.rb +3 -1
  52. data/lib/opensearch/api/actions/indices/put_settings.rb +3 -1
  53. data/lib/opensearch/api/actions/indices/put_template.rb +4 -2
  54. data/lib/opensearch/api/actions/indices/rollover.rb +3 -1
  55. data/lib/opensearch/api/actions/indices/shrink.rb +3 -1
  56. data/lib/opensearch/api/actions/indices/simulate_index_template.rb +4 -2
  57. data/lib/opensearch/api/actions/indices/simulate_template.rb +4 -2
  58. data/lib/opensearch/api/actions/indices/split.rb +3 -1
  59. data/lib/opensearch/api/actions/indices/update_aliases.rb +4 -2
  60. data/lib/opensearch/api/actions/ingest/delete_pipeline.rb +3 -1
  61. data/lib/opensearch/api/actions/ingest/get_pipeline.rb +4 -2
  62. data/lib/opensearch/api/actions/ingest/put_pipeline.rb +3 -1
  63. data/lib/opensearch/api/actions/put_script.rb +3 -1
  64. data/lib/opensearch/api/actions/search_shards.rb +1 -1
  65. data/lib/opensearch/api/actions/snapshot/cleanup_repository.rb +3 -1
  66. data/lib/opensearch/api/actions/snapshot/clone.rb +4 -2
  67. data/lib/opensearch/api/actions/snapshot/create.rb +3 -1
  68. data/lib/opensearch/api/actions/snapshot/create_repository.rb +3 -1
  69. data/lib/opensearch/api/actions/snapshot/delete.rb +4 -2
  70. data/lib/opensearch/api/actions/snapshot/delete_repository.rb +3 -1
  71. data/lib/opensearch/api/actions/snapshot/get.rb +3 -1
  72. data/lib/opensearch/api/actions/snapshot/get_features.rb +4 -2
  73. data/lib/opensearch/api/actions/snapshot/get_repository.rb +3 -2
  74. data/lib/opensearch/api/actions/snapshot/restore.rb +3 -1
  75. data/lib/opensearch/api/actions/snapshot/status.rb +3 -1
  76. data/lib/opensearch/api/actions/snapshot/verify_repository.rb +3 -1
  77. data/lib/opensearch/api/utils.rb +4 -4
  78. data/lib/opensearch/api/version.rb +1 -1
  79. data/spec/opensearch/api/actions/cat/allocation_spec.rb +6 -7
  80. data/spec/opensearch/api/actions/cat/cluster_manager_spec.rb +26 -0
  81. data/spec/opensearch/api/actions/get_script_spec.rb +2 -2
  82. data/spec/opensearch/api/actions/hashie_spec.rb +0 -2
  83. data/spec/opensearch/api/actions/indices/clone_spec.rb +2 -2
  84. data/spec/opensearch/api/utils_spec.rb +6 -6
  85. data.tar.gz.sig +0 -0
  86. metadata +14 -11
  87. metadata.gz.sig +0 -0
@@ -32,7 +32,8 @@ module OpenSearch
32
32
  # @option arguments [String] :id Script ID
33
33
  # @option arguments [String] :context Script context
34
34
  # @option arguments [Time] :timeout Explicit operation timeout
35
- # @option arguments [Time] :master_timeout Specify timeout for connection to master
35
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
36
+ # @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
36
37
  # @option arguments [Hash] :headers Custom HTTP headers
37
38
  # @option arguments [Hash] :body The document (*Required*)
38
39
  #
@@ -67,6 +68,7 @@ module OpenSearch
67
68
  ParamsRegistry.register(:put_script, [
68
69
  :timeout,
69
70
  :master_timeout,
71
+ :cluster_manager_timeout,
70
72
  :context
71
73
  ].freeze)
72
74
  end
@@ -32,7 +32,7 @@ module OpenSearch
32
32
  # @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
33
33
  # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
34
34
  # @option arguments [String] :routing Specific routing value
35
- # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
35
+ # @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
36
36
  # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
37
37
  # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
38
38
  # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all)
@@ -31,7 +31,8 @@ module OpenSearch
31
31
  # Removes stale data from repository.
32
32
  #
33
33
  # @option arguments [String] :repository A repository name
34
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
34
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
35
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
35
36
  # @option arguments [Time] :timeout Explicit operation timeout
36
37
  # @option arguments [Hash] :headers Custom HTTP headers
37
38
  #
@@ -58,6 +59,7 @@ module OpenSearch
58
59
  # @since 6.2.0
59
60
  ParamsRegistry.register(:cleanup_repository, [
60
61
  :master_timeout,
62
+ :cluster_manager_timeout,
61
63
  :timeout
62
64
  ].freeze)
63
65
  end
@@ -33,7 +33,8 @@ module OpenSearch
33
33
  # @option arguments [String] :repository A repository name
34
34
  # @option arguments [String] :snapshot The name of the snapshot to clone from
35
35
  # @option arguments [String] :target_snapshot The name of the cloned snapshot to create
36
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
36
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
37
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
37
38
  # @option arguments [Hash] :headers Custom HTTP headers
38
39
  # @option arguments [Hash] :body The snapshot clone definition (*Required*)
39
40
  #
@@ -66,7 +67,8 @@ module OpenSearch
66
67
  #
67
68
  # @since 6.2.0
68
69
  ParamsRegistry.register(:clone, [
69
- :master_timeout
70
+ :master_timeout,
71
+ :cluster_manager_timeout
70
72
  ].freeze)
71
73
  end
72
74
  end
@@ -32,7 +32,8 @@ module OpenSearch
32
32
  #
33
33
  # @option arguments [String] :repository A repository name
34
34
  # @option arguments [String] :snapshot A snapshot name
35
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
35
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
36
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
36
37
  # @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning
37
38
  # @option arguments [Hash] :headers Custom HTTP headers
38
39
  # @option arguments [Hash] :body The snapshot definition
@@ -63,6 +64,7 @@ module OpenSearch
63
64
  # @since 6.2.0
64
65
  ParamsRegistry.register(:create, [
65
66
  :master_timeout,
67
+ :cluster_manager_timeout,
66
68
  :wait_for_completion
67
69
  ].freeze)
68
70
  end
@@ -31,7 +31,8 @@ module OpenSearch
31
31
  # Creates a repository.
32
32
  #
33
33
  # @option arguments [String] :repository A repository name
34
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
34
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
35
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
35
36
  # @option arguments [Time] :timeout Explicit operation timeout
36
37
  # @option arguments [Boolean] :verify Whether to verify the repository after creation
37
38
  # @option arguments [Hash] :headers Custom HTTP headers
@@ -61,6 +62,7 @@ module OpenSearch
61
62
  # @since 6.2.0
62
63
  ParamsRegistry.register(:create_repository, [
63
64
  :master_timeout,
65
+ :cluster_manager_timeout,
64
66
  :timeout,
65
67
  :verify
66
68
  ].freeze)
@@ -32,7 +32,8 @@ module OpenSearch
32
32
  #
33
33
  # @option arguments [String] :repository A repository name
34
34
  # @option arguments [String] :snapshot A snapshot name
35
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
35
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
36
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
36
37
  # @option arguments [Hash] :headers Custom HTTP headers
37
38
  #
38
39
  #
@@ -64,7 +65,8 @@ module OpenSearch
64
65
  #
65
66
  # @since 6.2.0
66
67
  ParamsRegistry.register(:delete, [
67
- :master_timeout
68
+ :master_timeout,
69
+ :cluster_manager_timeout
68
70
  ].freeze)
69
71
  end
70
72
  end
@@ -31,7 +31,8 @@ module OpenSearch
31
31
  # Deletes a repository.
32
32
  #
33
33
  # @option arguments [List] :repository Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported.
34
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
34
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
35
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
35
36
  # @option arguments [Time] :timeout Explicit operation timeout
36
37
  # @option arguments [Hash] :headers Custom HTTP headers
37
38
  #
@@ -62,6 +63,7 @@ module OpenSearch
62
63
  # @since 6.2.0
63
64
  ParamsRegistry.register(:delete_repository, [
64
65
  :master_timeout,
66
+ :cluster_manager_timeout,
65
67
  :timeout
66
68
  ].freeze)
67
69
  end
@@ -32,7 +32,8 @@ module OpenSearch
32
32
  #
33
33
  # @option arguments [String] :repository A repository name
34
34
  # @option arguments [List] :snapshot A comma-separated list of snapshot names
35
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
35
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
36
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
36
37
  # @option arguments [Boolean] :ignore_unavailable Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
37
38
  # @option arguments [Boolean] :index_details Whether to include details of each index in the snapshot, if those details are available. Defaults to false.
38
39
  # @option arguments [Boolean] :include_repository Whether to include the repository name in the snapshot info. Defaults to true.
@@ -69,6 +70,7 @@ module OpenSearch
69
70
  # @since 6.2.0
70
71
  ParamsRegistry.register(:get, [
71
72
  :master_timeout,
73
+ :cluster_manager_timeout,
72
74
  :ignore_unavailable,
73
75
  :index_details,
74
76
  :include_repository,
@@ -30,7 +30,8 @@ module OpenSearch
30
30
  module Actions
31
31
  # Returns a list of features which can be snapshotted in this cluster.
32
32
  #
33
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
33
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
34
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
34
35
  # @option arguments [Hash] :headers Custom HTTP headers
35
36
  #
36
37
  #
@@ -51,7 +52,8 @@ module OpenSearch
51
52
  #
52
53
  # @since 6.2.0
53
54
  ParamsRegistry.register(:get_features, [
54
- :master_timeout
55
+ :master_timeout,
56
+ :cluster_manager_timeout
55
57
  ].freeze)
56
58
  end
57
59
  end
@@ -31,8 +31,8 @@ module OpenSearch
31
31
  # Returns information about a repository.
32
32
  #
33
33
  # @option arguments [List] :repository A comma-separated list of repository names
34
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
35
- # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
34
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to cluster_manager node
35
+ # @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
36
36
  # @option arguments [Hash] :headers Custom HTTP headers
37
37
  #
38
38
  #
@@ -64,6 +64,7 @@ module OpenSearch
64
64
  # @since 6.2.0
65
65
  ParamsRegistry.register(:get_repository, [
66
66
  :master_timeout,
67
+ :cluster_manager_timeout,
67
68
  :local
68
69
  ].freeze)
69
70
  end
@@ -32,7 +32,8 @@ module OpenSearch
32
32
  #
33
33
  # @option arguments [String] :repository A repository name
34
34
  # @option arguments [String] :snapshot A snapshot name
35
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
35
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
36
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
36
37
  # @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning
37
38
  # @option arguments [Hash] :headers Custom HTTP headers
38
39
  # @option arguments [Hash] :body Details of what to restore
@@ -63,6 +64,7 @@ module OpenSearch
63
64
  # @since 6.2.0
64
65
  ParamsRegistry.register(:restore, [
65
66
  :master_timeout,
67
+ :cluster_manager_timeout,
66
68
  :wait_for_completion
67
69
  ].freeze)
68
70
  end
@@ -32,7 +32,8 @@ module OpenSearch
32
32
  #
33
33
  # @option arguments [String] :repository A repository name
34
34
  # @option arguments [List] :snapshot A comma-separated list of snapshot names
35
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
35
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
36
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
36
37
  # @option arguments [Boolean] :ignore_unavailable Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
37
38
  # @option arguments [Hash] :headers Custom HTTP headers
38
39
  #
@@ -69,6 +70,7 @@ module OpenSearch
69
70
  # @since 6.2.0
70
71
  ParamsRegistry.register(:status, [
71
72
  :master_timeout,
73
+ :cluster_manager_timeout,
72
74
  :ignore_unavailable
73
75
  ].freeze)
74
76
  end
@@ -31,7 +31,8 @@ module OpenSearch
31
31
  # Verifies a repository.
32
32
  #
33
33
  # @option arguments [String] :repository A repository name
34
- # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
34
+ # @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
35
+ # @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
35
36
  # @option arguments [Time] :timeout Explicit operation timeout
36
37
  # @option arguments [Hash] :headers Custom HTTP headers
37
38
  #
@@ -58,6 +59,7 @@ module OpenSearch
58
59
  # @since 6.2.0
59
60
  ParamsRegistry.register(:verify_repository, [
60
61
  :master_timeout,
62
+ :cluster_manager_timeout,
61
63
  :timeout
62
64
  ].freeze)
63
65
  end
@@ -97,13 +97,13 @@ module OpenSearch
97
97
  # in a single item.
98
98
  #
99
99
  # OpenSearch::API::Utils.__bulkify [
100
- # { :index => { :_index => 'myindexA', :_type => 'mytype', :_id => '1', :data => { :title => 'Test' } } },
101
- # { :update => { :_index => 'myindexB', :_type => 'mytype', :_id => '2', :data => { :doc => { :title => 'Update' } } } }
100
+ # { :index => { :_index => 'myindexA', :_id => '1', :data => { :title => 'Test' } } },
101
+ # { :update => { :_index => 'myindexB', :_id => '2', :data => { :doc => { :title => 'Update' } } } }
102
102
  # ]
103
103
  #
104
- # # => {"index":{"_index":"myindexA","_type":"mytype","_id":"1"}}
104
+ # # => {"index":{"_index":"myindexA","_id":"1"}}
105
105
  # # => {"title":"Test"}
106
- # # => {"update":{"_index":"myindexB","_type":"mytype","_id":"2"}}
106
+ # # => {"update":{"_index":"myindexB","_id":"2"}}
107
107
  # # => {"doc":{"title":"Update"}}
108
108
  #
109
109
  def __bulkify(payload)
@@ -26,6 +26,6 @@
26
26
 
27
27
  module OpenSearch
28
28
  module API
29
- VERSION = '2.0.2'.freeze
29
+ VERSION = '2.1.0'.freeze
30
30
  end
31
31
  end
@@ -27,18 +27,17 @@
27
27
  require 'spec_helper'
28
28
 
29
29
  describe 'client.cat#allocation' do
30
-
31
30
  let(:expected_args) do
32
31
  [
33
- 'GET',
34
- '_cat/allocation',
35
- {},
36
- nil,
37
- {}
32
+ 'GET',
33
+ '_cat/allocation',
34
+ {cluster_manager_timeout: 2},
35
+ nil,
36
+ {}
38
37
  ]
39
38
  end
40
39
 
41
40
  it 'performs the request' do
42
- expect(client_double.cat.allocation).to eq({})
41
+ expect(client_double.cat.allocation(cluster_manager_timeout: 2)).to eq({})
43
42
  end
44
43
  end
@@ -0,0 +1,26 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ #
3
+ # The OpenSearch Contributors require contributions made to
4
+ # this file be licensed under the Apache-2.0 license or a
5
+ # compatible open source license.
6
+ #
7
+ # Modifications Copyright OpenSearch Contributors. See
8
+ # GitHub history for details.
9
+
10
+ require 'spec_helper'
11
+
12
+ describe 'client.cat#cluster_manager' do
13
+ let(:expected_args) do
14
+ [
15
+ 'GET',
16
+ '_cat/cluster_manager',
17
+ {},
18
+ nil,
19
+ {}
20
+ ]
21
+ end
22
+
23
+ it 'performs the request' do
24
+ expect(client_double.cat.cluster_manager).to eq({})
25
+ end
26
+ end
@@ -49,11 +49,11 @@ describe 'client#get_script' do
49
49
  context 'when the `lang` parameter is specificed' do
50
50
 
51
51
  let(:params) do
52
- { master_timeout: '1s' }
52
+ { cluster_manager_timeout: '1s' }
53
53
  end
54
54
 
55
55
  it 'performs the request' do
56
- expect(client_double.get_script(master_timeout: '1s', id: 'foo')).to eq({})
56
+ expect(client_double.get_script(cluster_manager_timeout: '1s', id: 'foo')).to eq({})
57
57
  end
58
58
  end
59
59
  end
@@ -45,7 +45,6 @@ describe 'Hashie' do
45
45
  "hits": [
46
46
  {
47
47
  "_index": "myindex",
48
- "_type": "mytype",
49
48
  "_id": "1",
50
49
  "_score": 0.51104903,
51
50
  "_source": {
@@ -63,7 +62,6 @@ describe 'Hashie' do
63
62
  },
64
63
  "facets": {
65
64
  "tags": {
66
- "_type": "terms",
67
65
  "missing": 0,
68
66
  "total": 10,
69
67
  "other": 0,
@@ -88,7 +88,7 @@ describe 'client.indices#clone' do
88
88
  let(:params) do
89
89
  {
90
90
  timeout: '1s',
91
- master_timeout: '10s',
91
+ cluster_manager_timeout: '10s',
92
92
  wait_for_active_shards: 1
93
93
  }
94
94
  end
@@ -97,7 +97,7 @@ describe 'client.indices#clone' do
97
97
  expect(client_double.indices.clone(index: 'my_source_index',
98
98
  target: 'my_target_index',
99
99
  timeout: '1s',
100
- master_timeout: '10s',
100
+ cluster_manager_timeout: '10s',
101
101
  wait_for_active_shards: 1)).to eq({})
102
102
  end
103
103
  end
@@ -109,19 +109,19 @@ describe OpenSearch::API::Utils do
109
109
 
110
110
  let(:result) do
111
111
  utils.__bulkify [
112
- { :index => { :_index => 'myindexA', :_type => 'mytype', :_id => '1', :data => { :title => 'Test' } } },
113
- { :update => { :_index => 'myindexB', :_type => 'mytype', :_id => '2', :data => { :doc => { :title => 'Update' } } } },
114
- { :delete => { :_index => 'myindexC', :_type => 'mytypeC', :_id => '3' } }
112
+ { :index => { :_index => 'myindexA', :_id => '1', :data => { :title => 'Test' } } },
113
+ { :update => { :_index => 'myindexB', :_id => '2', :data => { :doc => { :title => 'Update' } } } },
114
+ { :delete => { :_index => 'myindexC', :_id => '3' } }
115
115
  ]
116
116
  end
117
117
 
118
118
  let(:expected_string) do
119
119
  <<-PAYLOAD.gsub(/^\s+/, '')
120
- {"index":{"_index":"myindexA","_type":"mytype","_id":"1"}}
120
+ {"index":{"_index":"myindexA","_id":"1"}}
121
121
  {"title":"Test"}
122
- {"update":{"_index":"myindexB","_type":"mytype","_id":"2"}}
122
+ {"update":{"_index":"myindexB","_id":"2"}}
123
123
  {"doc":{"title":"Update"}}
124
- {"delete":{"_index":"myindexC","_type":"mytypeC","_id":"3"}}
124
+ {"delete":{"_index":"myindexC","_id":"3"}}
125
125
  PAYLOAD
126
126
  end
127
127
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opensearch-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jayesh Hathila
@@ -15,7 +15,7 @@ cert_chain:
15
15
  -----BEGIN CERTIFICATE-----
16
16
  MIIDfDCCAmSgAwIBAgIBATANBgkqhkiG9w0BAQUFADBCMRMwEQYDVQQDDApvcGVu
17
17
  c2VhcmNoMRYwFAYKCZImiZPyLGQBGRYGYW1hem9uMRMwEQYKCZImiZPyLGQBGRYD
18
- Y29tMB4XDTIxMDgwMjIxMDQwM1oXDTIyMDgwMjIxMDQwM1owQjETMBEGA1UEAwwK
18
+ Y29tMB4XDTIyMDgxNzE3NTIzNFoXDTIzMDgxNzE3NTIzNFowQjETMBEGA1UEAwwK
19
19
  b3BlbnNlYXJjaDEWMBQGCgmSJomT8ixkARkWBmFtYXpvbjETMBEGCgmSJomT8ixk
20
20
  ARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM1z3/jcitjV
21
21
  umXwRFn+JSBBd36qZB54Dtucf6+E2fmNPzBRhgYN5XJy/+clQJ9NIJV7C8H52P3V
@@ -26,14 +26,14 @@ cert_chain:
26
26
  zfR37/NQFkECAwEAAaN9MHswCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
27
27
  BBYEFJJ2myhLXK742btavNbG0IWrMNBIMCAGA1UdEQQZMBeBFW9wZW5zZWFyY2hA
28
28
  YW1hem9uLmNvbTAgBgNVHRIEGTAXgRVvcGVuc2VhcmNoQGFtYXpvbi5jb20wDQYJ
29
- KoZIhvcNAQEFBQADggEBAE7gBP5ecTtKb04qmEsnbJ6+yn0LUSmxPabFBnB6h1+T
30
- XW8BvBw9MpE//5fQf4HSia3m9XjRpl4WxBcJiyfLER64tk/c1JLhV2+rq3CCV/be
31
- DFSP6gY93kK7jwauajGQvyHzORaW1TBM6diIRYCMLY7Isf+PTHl0xhZZBSVm8wl6
32
- IstV+mTP2KC1l7hSzUDb4rrOSnpRB7AEczcDdkjwzHKIlw8rcL+PLLnFTOgqKyq3
33
- yXikuH6LEVykA8pgOcB9gKsB2/zMd2ZlSj2monM8Qw9EfB14ZSDTYS8VYuwWCeF0
34
- eFmXXk0ufQFKl1Yll7quHkmQ0PzKkvXTpONBT6qPkXE=
29
+ KoZIhvcNAQEFBQADggEBAH5pWLYwKWFh1OjdCReGz/VEAiF4jXXputoN5Z8ga+1Z
30
+ lg8/diJf0PlP2B46PdmxH/TVc/o+qglNO2cHVEp8xZfEd83dfioOBeK90URQUpC5
31
+ UZmO0LZusg46SQKwKa2ukpIy2fNi3PeHRiV+W2Zv69GoWppyLun+fMez7wVoah2r
32
+ r5ROUYuAvFUvga1Vm+49pKiPM5n+MAYP5t/vWhgymY3SYQ1TfewkvKAFiFXikOR+
33
+ r+j7FLyKuk5DzIxiCp8QN5dU71BbGUmsHf/C5UV76WLPOFX/szeaHhPwpjR3sK7r
34
+ 5zLgCV1KP7cgDdCYMlmZGeSViU8NV+Yy8/ghrzGpqVw=
35
35
  -----END CERTIFICATE-----
36
- date: 2022-06-30 00:00:00.000000000 Z
36
+ date: 2022-11-30 00:00:00.000000000 Z
37
37
  dependencies:
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: multi_json
@@ -317,7 +317,7 @@ dependencies:
317
317
  version: '0'
318
318
  description: 'Ruby API for OpenSearch. See the `opensearch` gem for full integration.
319
319
 
320
- '
320
+ '
321
321
  email:
322
322
  - jayehh@amazon.com
323
323
  - vamshin@amazon.com
@@ -341,6 +341,7 @@ files:
341
341
  - lib/opensearch/api/actions/bulk.rb
342
342
  - lib/opensearch/api/actions/cat/aliases.rb
343
343
  - lib/opensearch/api/actions/cat/allocation.rb
344
+ - lib/opensearch/api/actions/cat/cluster_manager.rb
344
345
  - lib/opensearch/api/actions/cat/count.rb
345
346
  - lib/opensearch/api/actions/cat/fielddata.rb
346
347
  - lib/opensearch/api/actions/cat/health.rb
@@ -529,6 +530,7 @@ files:
529
530
  - spec/opensearch/api/actions/bulk_spec.rb
530
531
  - spec/opensearch/api/actions/cat/aliases_spec.rb
531
532
  - spec/opensearch/api/actions/cat/allocation_spec.rb
533
+ - spec/opensearch/api/actions/cat/cluster_manager_spec.rb
532
534
  - spec/opensearch/api/actions/cat/count_spec.rb
533
535
  - spec/opensearch/api/actions/cat/fielddata_spec.rb
534
536
  - spec/opensearch/api/actions/cat/health_spec.rb
@@ -690,7 +692,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
690
692
  - !ruby/object:Gem::Version
691
693
  version: '0'
692
694
  requirements: []
693
- rubygems_version: 3.0.8
695
+ rubygems_version: 3.3.26
694
696
  signing_key:
695
697
  specification_version: 4
696
698
  summary: Ruby API for OpenSearch.
@@ -700,6 +702,7 @@ test_files:
700
702
  - spec/opensearch/api/actions/bulk_spec.rb
701
703
  - spec/opensearch/api/actions/cat/aliases_spec.rb
702
704
  - spec/opensearch/api/actions/cat/allocation_spec.rb
705
+ - spec/opensearch/api/actions/cat/cluster_manager_spec.rb
703
706
  - spec/opensearch/api/actions/cat/count_spec.rb
704
707
  - spec/opensearch/api/actions/cat/fielddata_spec.rb
705
708
  - spec/opensearch/api/actions/cat/health_spec.rb
metadata.gz.sig CHANGED
Binary file