Skip to content

Commit 13c75f4

Browse files
saimedhigithub-actions[bot]
authored andcommitted
Updated opensearch-py to reflect the latest OpenSearch API spec (2024-09-18)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent a24b9f3 commit 13c75f4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+4627
-1219
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
3131
- 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))
3232
- Fixed incorrect `retry_on_conflict` type ([#795](https://github.com/opensearch-project/opensearch-py/pull/795))
3333
### Updated APIs
34+
- Updated opensearch-py APIs to reflect [opensearch-api-specification@3d49360](https://github.com/opensearch-project/opensearch-api-specification/commit/3d49360c45c33f4aebf09a50ef9e06a27a225e66)
3435
- Updated opensearch-py APIs to reflect [opensearch-api-specification@9d3bc34](https://github.com/opensearch-project/opensearch-api-specification/commit/9d3bc340ccd7d049e7d6e14a4aff2293780cb446)
3536
### Dependencies
3637
- Bump `pytest-asyncio` from <=0.23.7 to <=0.23.8 ([#787](https://github.com/opensearch-project/opensearch-py/pull/787))

opensearchpy/_async/client/__init__.py

Lines changed: 168 additions & 84 deletions
Large diffs are not rendered by default.

opensearchpy/_async/client/cat.py

Lines changed: 96 additions & 48 deletions
Large diffs are not rendered by default.

opensearchpy/_async/client/cluster.py

Lines changed: 88 additions & 42 deletions
Large diffs are not rendered by default.

opensearchpy/_async/client/dangling_indices.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ async def delete_dangling_index(
6868
to cluster-manager node.
6969
:arg error_trace: Whether to include the stack trace of returned
7070
errors.
71-
:arg filter_path: Comma-separated list of filters used to reduce
72-
the response.
71+
:arg filter_path: Used to reduce the response. This parameter
72+
takes a comma-separated list of filters. It supports using wildcards to
73+
match any field or part of a field’s name. You can also exclude fields
74+
with "-".
7375
:arg human: Whether to return human readable values for
7476
statistics.
7577
:arg master_timeout (Deprecated: To promote inclusive language,
@@ -119,8 +121,10 @@ async def import_dangling_index(
119121
to cluster-manager node.
120122
:arg error_trace: Whether to include the stack trace of returned
121123
errors.
122-
:arg filter_path: Comma-separated list of filters used to reduce
123-
the response.
124+
:arg filter_path: Used to reduce the response. This parameter
125+
takes a comma-separated list of filters. It supports using wildcards to
126+
match any field or part of a field’s name. You can also exclude fields
127+
with "-".
124128
:arg human: Whether to return human readable values for
125129
statistics.
126130
:arg master_timeout (Deprecated: To promote inclusive language,
@@ -151,8 +155,10 @@ async def list_dangling_indices(
151155
152156
:arg error_trace: Whether to include the stack trace of returned
153157
errors.
154-
:arg filter_path: Comma-separated list of filters used to reduce
155-
the response.
158+
:arg filter_path: Used to reduce the response. This parameter
159+
takes a comma-separated list of filters. It supports using wildcards to
160+
match any field or part of a field’s name. You can also exclude fields
161+
with "-".
156162
:arg human: Whether to return human readable values for
157163
statistics.
158164
:arg pretty: Whether to pretty format the returned JSON

opensearchpy/_async/client/indices.py

Lines changed: 192 additions & 96 deletions
Large diffs are not rendered by default.

opensearchpy/_async/client/ingest.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ async def get_pipeline(
6666
to cluster-manager node.
6767
:arg error_trace: Whether to include the stack trace of returned
6868
errors.
69-
:arg filter_path: Comma-separated list of filters used to reduce
70-
the response.
69+
:arg filter_path: Used to reduce the response. This parameter
70+
takes a comma-separated list of filters. It supports using wildcards to
71+
match any field or part of a field’s name. You can also exclude fields
72+
with "-".
7173
:arg human: Whether to return human readable values for
7274
statistics.
7375
:arg master_timeout (Deprecated: To promote inclusive language,
@@ -110,8 +112,10 @@ async def put_pipeline(
110112
to cluster-manager node.
111113
:arg error_trace: Whether to include the stack trace of returned
112114
errors.
113-
:arg filter_path: Comma-separated list of filters used to reduce
114-
the response.
115+
:arg filter_path: Used to reduce the response. This parameter
116+
takes a comma-separated list of filters. It supports using wildcards to
117+
match any field or part of a field’s name. You can also exclude fields
118+
with "-".
115119
:arg human: Whether to return human readable values for
116120
statistics.
117121
:arg master_timeout (Deprecated: To promote inclusive language,
@@ -165,8 +169,10 @@ async def delete_pipeline(
165169
to cluster-manager node.
166170
:arg error_trace: Whether to include the stack trace of returned
167171
errors.
168-
:arg filter_path: Comma-separated list of filters used to reduce
169-
the response.
172+
:arg filter_path: Used to reduce the response. This parameter
173+
takes a comma-separated list of filters. It supports using wildcards to
174+
match any field or part of a field’s name. You can also exclude fields
175+
with "-".
170176
:arg human: Whether to return human readable values for
171177
statistics.
172178
:arg master_timeout (Deprecated: To promote inclusive language,
@@ -208,8 +214,10 @@ async def simulate(
208214
the request body, this parameter is required.
209215
:arg error_trace: Whether to include the stack trace of returned
210216
errors.
211-
:arg filter_path: Comma-separated list of filters used to reduce
212-
the response.
217+
:arg filter_path: Used to reduce the response. This parameter
218+
takes a comma-separated list of filters. It supports using wildcards to
219+
match any field or part of a field’s name. You can also exclude fields
220+
with "-".
213221
:arg human: Whether to return human readable values for
214222
statistics.
215223
:arg pretty: Whether to pretty format the returned JSON
@@ -242,8 +250,10 @@ async def processor_grok(
242250
243251
:arg error_trace: Whether to include the stack trace of returned
244252
errors.
245-
:arg filter_path: Comma-separated list of filters used to reduce
246-
the response.
253+
:arg filter_path: Used to reduce the response. This parameter
254+
takes a comma-separated list of filters. It supports using wildcards to
255+
match any field or part of a field’s name. You can also exclude fields
256+
with "-".
247257
:arg human: Whether to return human readable values for
248258
statistics.
249259
:arg pretty: Whether to pretty format the returned JSON

opensearchpy/_async/client/nodes.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ async def reload_secure_settings(
5858
target.
5959
:arg error_trace: Whether to include the stack trace of returned
6060
errors.
61-
:arg filter_path: Comma-separated list of filters used to reduce
62-
the response.
61+
:arg filter_path: Used to reduce the response. This parameter
62+
takes a comma-separated list of filters. It supports using wildcards to
63+
match any field or part of a field’s name. You can also exclude fields
64+
with "-".
6365
:arg human: Whether to return human readable values for
6466
statistics.
6567
:arg pretty: Whether to pretty format the returned JSON
@@ -104,8 +106,10 @@ async def info(
104106
metrics. Supports a comma-separated list, such as http,ingest.
105107
:arg error_trace: Whether to include the stack trace of returned
106108
errors.
107-
:arg filter_path: Comma-separated list of filters used to reduce
108-
the response.
109+
:arg filter_path: Used to reduce the response. This parameter
110+
takes a comma-separated list of filters. It supports using wildcards to
111+
match any field or part of a field’s name. You can also exclude fields
112+
with "-".
109113
:arg flat_settings: If true, returns settings in flat format.
110114
Default is false.
111115
:arg human: Whether to return human readable values for
@@ -164,8 +168,10 @@ async def stats(
164168
expressions of fields to include in fielddata statistics.
165169
:arg fields: Comma-separated list or wildcard expressions of
166170
fields to include in the statistics.
167-
:arg filter_path: Comma-separated list of filters used to reduce
168-
the response.
171+
:arg filter_path: Used to reduce the response. This parameter
172+
takes a comma-separated list of filters. It supports using wildcards to
173+
match any field or part of a field’s name. You can also exclude fields
174+
with "-".
169175
:arg groups: Comma-separated list of search groups to include in
170176
the search statistics.
171177
:arg human: Whether to return human readable values for
@@ -224,8 +230,10 @@ async def hot_threads(
224230
wait.
225231
:arg error_trace: Whether to include the stack trace of returned
226232
errors.
227-
:arg filter_path: Comma-separated list of filters used to reduce
228-
the response.
233+
:arg filter_path: Used to reduce the response. This parameter
234+
takes a comma-separated list of filters. It supports using wildcards to
235+
match any field or part of a field’s name. You can also exclude fields
236+
with "-".
229237
:arg human: Whether to return human readable values for
230238
statistics.
231239
:arg ignore_idle_threads: Don't show threads that are in known-
@@ -274,8 +282,10 @@ async def usage(
274282
`rest_actions`.
275283
:arg error_trace: Whether to include the stack trace of returned
276284
errors.
277-
:arg filter_path: Comma-separated list of filters used to reduce
278-
the response.
285+
:arg filter_path: Used to reduce the response. This parameter
286+
takes a comma-separated list of filters. It supports using wildcards to
287+
match any field or part of a field’s name. You can also exclude fields
288+
with "-".
279289
:arg human: Whether to return human readable values for
280290
statistics.
281291
:arg pretty: Whether to pretty format the returned JSON

opensearchpy/_async/client/plugins.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
from typing import Any
1212

1313
from ..plugins.alerting import AlertingClient
14+
from ..plugins.asynchronous_search import AsynchronousSearchClient
15+
from ..plugins.flow_framework import FlowFrameworkClient
1416
from ..plugins.index_management import IndexManagementClient
17+
from ..plugins.ism import IsmClient
1518
from ..plugins.knn import KnnClient
1619
from ..plugins.ml import MlClient
1720
from ..plugins.notifications import NotificationsClient
@@ -26,6 +29,7 @@
2629

2730

2831
class PluginsClient(NamespacedClient):
32+
asynchronous_search: Any
2933
alerting: Any
3034
index_management: Any
3135
knn: Any
@@ -41,6 +45,9 @@ class PluginsClient(NamespacedClient):
4145
def __init__(self, client: Client) -> None:
4246
super().__init__(client)
4347

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

6168
plugins = [
69+
"ism",
70+
"flow_framework",
71+
"asynchronous_search",
6272
"alerting",
6373
"index_management",
6474
"knn",

opensearchpy/_async/client/remote_store.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ async def restore(
4646
to cluster-manager node.
4747
:arg error_trace: Whether to include the stack trace of returned
4848
errors.
49-
:arg filter_path: Comma-separated list of filters used to reduce
50-
the response.
49+
:arg filter_path: Used to reduce the response. This parameter
50+
takes a comma-separated list of filters. It supports using wildcards to
51+
match any field or part of a field’s name. You can also exclude fields
52+
with "-".
5153
:arg human: Whether to return human readable values for
5254
statistics.
5355
:arg pretty: Whether to pretty format the returned JSON

0 commit comments

Comments
 (0)