lib/elasticsearch/api/actions/cluster/allocation_explain.rb in elasticsearch-api-6.1.0 vs lib/elasticsearch/api/actions/cluster/allocation_explain.rb in elasticsearch-api-6.2.0
- old
+ new
@@ -11,19 +11,23 @@
# (default: false)
#
# @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html
#
def allocation_explain(arguments={})
- valid_params = [
- :include_yes_decisions,
- :include_disk_info ]
method = 'GET'
path = "_cluster/allocation/explain"
- params = Utils.__validate_and_extract_params arguments, valid_params
+ params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
body = arguments[:body]
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(:allocation_explain, [
+ :include_yes_decisions,
+ :include_disk_info ].freeze)
end
end
end
end