Skip to content

Commit

Permalink
Update comments around deprecated and inclusive naming
Browse files Browse the repository at this point in the history
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
  • Loading branch information
harshavamsi committed Nov 14, 2022
1 parent d0056eb commit d210ca4
Show file tree
Hide file tree
Showing 81 changed files with 258 additions and 112 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added Sigv4 Support with `opensearch-aws-sigv4` gem ([#71](https://github.com/opensearch-project/opensearch-ruby/issues/71))

### Changed
- Updated for inclusive naming ([#112](https://github.com/opensearch-project/opensearch-ruby/issues/112))


### Deprecated

Expand Down
5 changes: 3 additions & 2 deletions opensearch-api/lib/opensearch/api/actions/cat/allocation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ module Actions
# @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
# @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
# @option arguments [List] :h Comma-separated list of column names to display
# @option arguments [Boolean] :help Return help information
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
Expand Down
54 changes: 54 additions & 0 deletions opensearch-api/lib/opensearch/api/actions/cat/cluster_manager.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
#
# Modifications Copyright OpenSearch Contributors. See
# GitHub history for details.

module OpenSearch
module API
module Cat
module Actions
# Returns information about the cluster_manager node.
#
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
# @option arguments [List] :h Comma-separated list of column names to display
# @option arguments [Boolean] :help Return help information
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
# @option arguments [Boolean] :v Verbose mode. Display column headers
# @option arguments [Hash] :headers Custom HTTP headers
#
#
def cluster_manager(arguments = {})
headers = arguments.delete(:headers) || {}

arguments = arguments.clone

method = OpenSearch::API::HTTP_GET
path = '_cat/cluster_manager'
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

body = nil
perform_request(method, path, params, body, headers).body
end

# Register this action with its valid params when the module is loaded.
#
# @since 6.2.0
ParamsRegistry.register(:cluster_manager, %i[
format
local
cluster_manager_timeout
h
help
s
v
].freeze)
end
end
end
end
5 changes: 3 additions & 2 deletions opensearch-api/lib/opensearch/api/actions/cat/indices.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ module Actions
# @option arguments [List] :index A comma-separated list of index names to limit the returned information
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
# @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) *Deprecated*
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
# @option arguments [List] :h Comma-separated list of column names to display
# @option arguments [String] :health A health status ("green", "yellow", or "red" to filter only indices matching the specified health status (options: green, yellow, red)
# @option arguments [Boolean] :help Return help information
Expand Down
3 changes: 2 additions & 1 deletion opensearch-api/lib/opensearch/api/actions/cat/master.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.


# @deprecated Please use cluster_manager instead.
module OpenSearch
module API
module Cat
Expand Down
5 changes: 3 additions & 2 deletions opensearch-api/lib/opensearch/api/actions/cat/nodeattrs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ module Actions
# Returns information about custom node attributes.
#
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
# @option arguments [List] :h Comma-separated list of column names to display
# @option arguments [Boolean] :help Return help information
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
Expand Down
5 changes: 3 additions & 2 deletions opensearch-api/lib/opensearch/api/actions/cat/nodes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ module Actions
# @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
# @option arguments [Boolean] :full_id Return the full node ID instead of the shortened version (default: false)
# @option arguments [Boolean] :local Calculate the selected nodes using the local cluster state rather than the state from master node (default: false) *Deprecated*
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Boolean] :local Calculate the selected nodes using the local cluster state rather than the state from cluster_manager node (default: false) *Deprecated*
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
# @option arguments [List] :h Comma-separated list of column names to display
# @option arguments [Boolean] :help Return help information
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ module Actions
# Returns a concise representation of the cluster pending tasks.
#
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
# @option arguments [List] :h Comma-separated list of column names to display
# @option arguments [Boolean] :help Return help information
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
Expand Down
5 changes: 3 additions & 2 deletions opensearch-api/lib/opensearch/api/actions/cat/plugins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ module Actions
# Returns information about installed plugins across nodes node.
#
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
# @option arguments [List] :h Comma-separated list of column names to display
# @option arguments [Boolean] :help Return help information
# @option arguments [Boolean] :include_bootstrap Include bootstrap plugins in the response
Expand Down
5 changes: 3 additions & 2 deletions opensearch-api/lib/opensearch/api/actions/cat/repositories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ module Actions
# Returns information about snapshot repositories registered in the cluster.
#
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
# @option arguments [List] :h Comma-separated list of column names to display
# @option arguments [Boolean] :help Return help information
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
Expand Down
5 changes: 3 additions & 2 deletions opensearch-api/lib/opensearch/api/actions/cat/shards.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ module Actions
# @option arguments [List] :index A comma-separated list of index names to limit the returned information
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
# @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) *Deprecated*
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false) *Deprecated*
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
# @option arguments [List] :h Comma-separated list of column names to display
# @option arguments [Boolean] :help Return help information
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
Expand Down
3 changes: 2 additions & 1 deletion opensearch-api/lib/opensearch/api/actions/cat/snapshots.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ module Actions
# @option arguments [List] :repository Name of repository from which to fetch the snapshot information
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
# @option arguments [Boolean] :ignore_unavailable Set to true to ignore unavailable snapshots
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
# @option arguments [List] :h Comma-separated list of column names to display
# @option arguments [Boolean] :help Return help information
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
Expand Down
5 changes: 3 additions & 2 deletions opensearch-api/lib/opensearch/api/actions/cat/templates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ module Actions
#
# @option arguments [String] :name A pattern that returned template names must match
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
# @option arguments [List] :h Comma-separated list of column names to display
# @option arguments [Boolean] :help Return help information
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
Expand Down
5 changes: 3 additions & 2 deletions opensearch-api/lib/opensearch/api/actions/cat/thread_pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ module Actions
# @option arguments [List] :thread_pool_patterns A comma-separated list of regular-expressions to filter the thread pools in the output
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
# @option arguments [String] :size The multiplier in which to display values *Deprecated* (options: , k, m, g, t, p)
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
# @option arguments [List] :h Comma-separated list of column names to display
# @option arguments [Boolean] :help Return help information
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ module Actions
#
# @option arguments [String] :name The name of the template
# @option arguments [Time] :timeout Explicit operation timeout
# @option arguments [Time] :master_timeout Specify timeout for connection to master
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
# @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
# @option arguments [Hash] :headers Custom HTTP headers
#
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ module Actions
# Returns information about whether a particular component template exist
#
# @option arguments [String] :name The name of the template
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
# @option arguments [Hash] :headers Custom HTTP headers
#
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ module Actions
# Returns one or more component templates
#
# @option arguments [List] :name The comma separated names of the component templates
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
# @option arguments [Hash] :headers Custom HTTP headers
#
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ module Actions
# Returns cluster settings.
#
# @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
# @option arguments [Time] :timeout Explicit operation timeout
# @option arguments [Boolean] :include_defaults Whether to return all default clusters setting.
# @option arguments [Hash] :headers Custom HTTP headers
Expand Down
Loading

0 comments on commit d210ca4

Please sign in to comment.