Skip to content

Commit

Permalink
Fix /cluster/stats in a backwards compatible way (#851)
Browse files Browse the repository at this point in the history
* Ran nox -s generate.

Signed-off-by: dblock <[email protected]>

* Fix: backwards compatible parameter order in cluster stats.

Signed-off-by: dblock <[email protected]>

* Moved Updated APIs section to the correct set.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock authored Nov 25, 2024
1 parent 12c379d commit bf9add4
Show file tree
Hide file tree
Showing 59 changed files with 9,023 additions and 4,389 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Changed
### Deprecated
### Removed
### Updated APIs
- Updated opensearch-py APIs to reflect [opensearch-api-specification@4615564](https://github.com/opensearch-project/opensearch-api-specification/commit/4615564b05d410575bb6ed3ed34ea136bf2e4312)
### Fixed
- Fix `Transport.perform_request`'s arguments `timeout` and `ignore` variable usage ([810](https://github.com/opensearch-project/opensearch-py/pull/810))
- Fix `Index.save` not passing through aliases to the underlying index ([823](https://github.com/opensearch-project/opensearch-py/pull/823))
Expand Down
853 changes: 516 additions & 337 deletions opensearchpy/_async/client/__init__.py

Large diffs are not rendered by default.

494 changes: 270 additions & 224 deletions opensearchpy/_async/client/cat.py

Large diffs are not rendered by default.

393 changes: 223 additions & 170 deletions opensearchpy/_async/client/cluster.py

Large diffs are not rendered by default.

58 changes: 32 additions & 26 deletions opensearchpy/_async/client/dangling_indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,25 +61,27 @@ async def delete_dangling_index(
Deletes the specified dangling index.
:arg index_uuid: The UUID of the dangling index
:arg index_uuid: The UUID of the dangling index.
:arg accept_data_loss: Must be set to true in order to delete
the dangling index
the dangling index.
:arg cluster_manager_timeout: Operation timeout for connection
to cluster-manager node.
:arg error_trace: Whether to include the stack trace of returned
errors.
:arg filter_path: Comma-separated list of filters used to reduce
the response.
errors. Default is false.
:arg filter_path: Used to reduce the response. This parameter
takes a comma-separated list of filters. It supports using wildcards to
match any field or part of a field’s name. You can also exclude fields
with "-".
:arg human: Whether to return human readable values for
statistics.
statistics. Default is True.
:arg master_timeout (Deprecated: To promote inclusive language,
use 'cluster_manager_timeout' instead.): Specify timeout for connection
to master
use `cluster_manager_timeout` instead.): Specify timeout for connection
to cluster manager.
:arg pretty: Whether to pretty format the returned JSON
response.
response. Default is false.
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
:arg timeout: Explicit operation timeout
:arg timeout: Explicit operation timeout.
"""
if index_uuid in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argument 'index_uuid'.")
Expand Down Expand Up @@ -112,25 +114,27 @@ async def import_dangling_index(
Imports the specified dangling index.
:arg index_uuid: The UUID of the dangling index
:arg index_uuid: The UUID of the dangling index.
:arg accept_data_loss: Must be set to true in order to import
the dangling index
the dangling index.
:arg cluster_manager_timeout: Operation timeout for connection
to cluster-manager node.
:arg error_trace: Whether to include the stack trace of returned
errors.
:arg filter_path: Comma-separated list of filters used to reduce
the response.
errors. Default is false.
:arg filter_path: Used to reduce the response. This parameter
takes a comma-separated list of filters. It supports using wildcards to
match any field or part of a field’s name. You can also exclude fields
with "-".
:arg human: Whether to return human readable values for
statistics.
statistics. Default is True.
:arg master_timeout (Deprecated: To promote inclusive language,
use 'cluster_manager_timeout' instead.): Specify timeout for connection
to master
use `cluster_manager_timeout` instead.): Specify timeout for connection
to cluster manager.
:arg pretty: Whether to pretty format the returned JSON
response.
response. Default is false.
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
:arg timeout: Explicit operation timeout
:arg timeout: Explicit operation timeout.
"""
if index_uuid in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argument 'index_uuid'.")
Expand All @@ -146,17 +150,19 @@ async def list_dangling_indices(
headers: Any = None,
) -> Any:
"""
Returns all dangling indices.
Returns all dangling indexes.
:arg error_trace: Whether to include the stack trace of returned
errors.
:arg filter_path: Comma-separated list of filters used to reduce
the response.
errors. Default is false.
:arg filter_path: Used to reduce the response. This parameter
takes a comma-separated list of filters. It supports using wildcards to
match any field or part of a field’s name. You can also exclude fields
with "-".
:arg human: Whether to return human readable values for
statistics.
statistics. Default is True.
:arg pretty: Whether to pretty format the returned JSON
response.
response. Default is false.
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
"""
Expand Down
Loading

0 comments on commit bf9add4

Please sign in to comment.