lib/elasticsearch/api/actions/cat/master.rb in elasticsearch-api-6.1.0 vs lib/elasticsearch/api/actions/cat/master.rb in elasticsearch-api-6.2.0
- old
+ new
@@ -27,24 +27,27 @@
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
#
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-master.html
#
def master(arguments={})
- valid_params = [
- :local,
- :master_timeout,
- :h,
- :help,
- :v,
- :s ]
-
method = HTTP_GET
path = "_cat/master"
- params = Utils.__validate_and_extract_params arguments, valid_params
+ params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
body = nil
perform_request(method, path, params, body).body
end
+
+ # Register this action with its valid params when the module is loaded.
+ #
+ # @since 6.2.0
+ ParamsRegistry.register(:master, [
+ :local,
+ :master_timeout,
+ :h,
+ :help,
+ :v,
+ :s ].freeze)
end
end
end
end