Skip to content

Commit

Permalink
Updated opensearch-py to reflect the latest OpenSearch API spec (2024…
Browse files Browse the repository at this point in the history
…-09-20)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
saimedhi authored and github-actions[bot] committed Sep 20, 2024
1 parent a24b9f3 commit bb0c54e
Show file tree
Hide file tree
Showing 51 changed files with 4,631 additions and 1,221 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixed the use of `minimum_should_match` with `Bool` to allow the use of string-based value (percent string, combination). ([#780](https://github.com/opensearch-project/opensearch-py/pull/780))
- Fixed incorrect `retry_on_conflict` type ([#795](https://github.com/opensearch-project/opensearch-py/pull/795))
### Updated APIs
- Updated opensearch-py APIs to reflect [opensearch-api-specification@2487252](https://github.com/opensearch-project/opensearch-api-specification/commit/2487252d82c1007ad0bf2edf434c998374469c57)
- Updated opensearch-py APIs to reflect [opensearch-api-specification@9d3bc34](https://github.com/opensearch-project/opensearch-api-specification/commit/9d3bc340ccd7d049e7d6e14a4aff2293780cb446)
### Dependencies
- Bump `pytest-asyncio` from <=0.23.7 to <=0.23.8 ([#787](https://github.com/opensearch-project/opensearch-py/pull/787))
Expand Down
255 changes: 170 additions & 85 deletions opensearchpy/_async/client/__init__.py

Large diffs are not rendered by default.

144 changes: 96 additions & 48 deletions opensearchpy/_async/client/cat.py

Large diffs are not rendered by default.

130 changes: 88 additions & 42 deletions opensearchpy/_async/client/cluster.py

Large diffs are not rendered by default.

18 changes: 12 additions & 6 deletions opensearchpy/_async/client/dangling_indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ async def delete_dangling_index(
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.
: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.
:arg master_timeout (Deprecated: To promote inclusive language,
Expand Down Expand Up @@ -119,8 +121,10 @@ async def import_dangling_index(
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.
: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.
:arg master_timeout (Deprecated: To promote inclusive language,
Expand Down Expand Up @@ -151,8 +155,10 @@ async def list_dangling_indices(
: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.
: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.
:arg pretty: Whether to pretty format the returned JSON
Expand Down
288 changes: 192 additions & 96 deletions opensearchpy/_async/client/indices.py

Large diffs are not rendered by default.

30 changes: 20 additions & 10 deletions opensearchpy/_async/client/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ async def get_pipeline(
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.
: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.
:arg master_timeout (Deprecated: To promote inclusive language,
Expand Down Expand Up @@ -110,8 +112,10 @@ async def put_pipeline(
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.
: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.
:arg master_timeout (Deprecated: To promote inclusive language,
Expand Down Expand Up @@ -165,8 +169,10 @@ async def delete_pipeline(
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.
: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.
:arg master_timeout (Deprecated: To promote inclusive language,
Expand Down Expand Up @@ -208,8 +214,10 @@ async def simulate(
the request body, this parameter is required.
: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.
: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.
:arg pretty: Whether to pretty format the returned JSON
Expand Down Expand Up @@ -242,8 +250,10 @@ async def processor_grok(
: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.
: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.
:arg pretty: Whether to pretty format the returned JSON
Expand Down
30 changes: 20 additions & 10 deletions opensearchpy/_async/client/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ async def reload_secure_settings(
target.
: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.
: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.
:arg pretty: Whether to pretty format the returned JSON
Expand Down Expand Up @@ -104,8 +106,10 @@ async def info(
metrics. Supports a comma-separated list, such as http,ingest.
: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.
: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 flat_settings: If true, returns settings in flat format.
Default is false.
:arg human: Whether to return human readable values for
Expand Down Expand Up @@ -164,8 +168,10 @@ async def stats(
expressions of fields to include in fielddata statistics.
:arg fields: Comma-separated list or wildcard expressions of
fields to include in the statistics.
:arg filter_path: Comma-separated list of filters used to reduce
the response.
: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 groups: Comma-separated list of search groups to include in
the search statistics.
:arg human: Whether to return human readable values for
Expand Down Expand Up @@ -224,8 +230,10 @@ async def hot_threads(
wait.
: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.
: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.
:arg ignore_idle_threads: Don't show threads that are in known-
Expand Down Expand Up @@ -274,8 +282,10 @@ async def usage(
`rest_actions`.
: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.
: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.
:arg pretty: Whether to pretty format the returned JSON
Expand Down
10 changes: 10 additions & 0 deletions opensearchpy/_async/client/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
from typing import Any

from ..plugins.alerting import AlertingClient
from ..plugins.asynchronous_search import AsynchronousSearchClient
from ..plugins.flow_framework import FlowFrameworkClient
from ..plugins.index_management import IndexManagementClient
from ..plugins.ism import IsmClient
from ..plugins.knn import KnnClient
from ..plugins.ml import MlClient
from ..plugins.notifications import NotificationsClient
Expand All @@ -26,6 +29,7 @@


class PluginsClient(NamespacedClient):
asynchronous_search: Any
alerting: Any
index_management: Any
knn: Any
Expand All @@ -41,6 +45,9 @@ class PluginsClient(NamespacedClient):
def __init__(self, client: Client) -> None:
super().__init__(client)

self.ism = IsmClient(client)
self.flow_framework = FlowFrameworkClient(client)
self.asynchronous_search = AsynchronousSearchClient(client)
self.alerting = AlertingClient(client)
self.index_management = IndexManagementClient(client)
self.knn = KnnClient(client)
Expand All @@ -59,6 +66,9 @@ def _dynamic_lookup(self, client: Any) -> None:
# Issue : https://github.com/opensearch-project/opensearch-py/issues/90#issuecomment-1003396742

plugins = [
"ism",
"flow_framework",
"asynchronous_search",
"alerting",
"index_management",
"knn",
Expand Down
6 changes: 4 additions & 2 deletions opensearchpy/_async/client/remote_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ async def restore(
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.
: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.
:arg pretty: Whether to pretty format the returned JSON
Expand Down
18 changes: 12 additions & 6 deletions opensearchpy/_async/client/search_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ async def get(
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.
: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.
:arg pretty: Whether to pretty format the returned JSON
Expand Down Expand Up @@ -83,8 +85,10 @@ async def delete(
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.
: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.
:arg pretty: Whether to pretty format the returned JSON
Expand Down Expand Up @@ -128,8 +132,10 @@ async def put(
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.
: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.
:arg pretty: Whether to pretty format the returned JSON
Expand Down
Loading

0 comments on commit bb0c54e

Please sign in to comment.