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
…-04-20)

Signed-off-by: GitHub <noreply@github.com>
  • Loading branch information
saimedhi authored Apr 20, 2024
1 parent 3082d92 commit d3aa149
Show file tree
Hide file tree
Showing 17 changed files with 297 additions and 240 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Fixed
- Updated code generator to use native OpenAPI specification ([#721](https://github.com/opensearch-project/opensearch-py/pull/721))
### Updated APIs
- Updated opensearch-py APIs to reflect [opensearch-api-specification@e02c076](https://github.com/opensearch-project/opensearch-api-specification/commit/e02c076ef63f7a9b650ca1416380120cc640620a)
- Updated opensearch-py APIs to reflect [opensearch-api-specification@fe6f977](https://github.com/opensearch-project/opensearch-api-specification/commit/fe6f977bcae4e27a2b261fb9599884df5606c0bc)
- Updated opensearch-py APIs to reflect [opensearch-api-specification@29faff0](https://github.com/opensearch-project/opensearch-api-specification/commit/29faff0709b2557acfd4c3c7e053a2c313413633)
### Security
Expand Down
122 changes: 67 additions & 55 deletions opensearchpy/_async/client/__init__.py

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions opensearchpy/_async/client/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ async def health(
:arg time: The unit used to display time values. Valid choices
are nanos, micros, ms, s, m, h, d.
:arg ts: If true, returns `HH:MM:SS` and Unix epoch timestamps.
Default is True.
:arg v: Verbose mode. Display column headers. Default is false.
"""
return await self.transport.perform_request(
Expand Down Expand Up @@ -491,7 +492,8 @@ async def indices(
:arg human: Whether to return human readable values for
statistics.
:arg include_unloaded_segments: If true, the response includes
information from segments that are not loaded into memory.
information from segments that are not loaded into memory. Default is
false.
:arg local: Return local information, do not retrieve the state
from cluster-manager node. Default is false.
:arg master_timeout (Deprecated: To promote inclusive language,
Expand All @@ -500,7 +502,7 @@ async def indices(
:arg pretty: Whether to pretty format the returned JSON
response.
:arg pri: If true, the response only includes information from
primary shards.
primary shards. Default is false.
:arg s: Comma-separated list of column names or column aliases
to sort by.
:arg source: The URL-encoded request definition. Useful for
Expand Down Expand Up @@ -662,7 +664,7 @@ async def nodes(
:arg format: A short version of the Accept header, e.g. json,
yaml.
:arg full_id: If `true`, return the full node ID. If `false`,
return the shortened node ID.
return the shortened node ID. Default is false.
:arg h: Comma-separated list of column names to display.
:arg help: Return help information. Default is false.
:arg human: Whether to return human readable values for
Expand Down Expand Up @@ -871,11 +873,11 @@ async def recovery(
:arg index: Comma-separated list or wildcard expression of index
names to limit the returned information.
:arg active_only: If `true`, the response only includes ongoing
shard recoveries.
shard recoveries. Default is false.
:arg bytes: The unit used to display byte values. Valid choices
are b, k, kb, m, mb, g, gb, t, tb, p, pb.
:arg detailed: If `true`, the response includes detailed
information about shard recoveries.
information about shard recoveries. Default is false.
:arg error_trace: Whether to include the stack trace of returned
errors.
:arg filter_path: Comma-separated list of filters used to reduce
Expand Down Expand Up @@ -1261,7 +1263,7 @@ async def snapshots(
:arg human: Whether to return human readable values for
statistics.
:arg ignore_unavailable: If `true`, the response does not
include information from unavailable snapshots.
include information from unavailable snapshots. Default is false.
:arg master_timeout (Deprecated: To promote inclusive language,
use 'cluster_manager_timeout' instead.): Operation timeout for
connection to master node.
Expand Down Expand Up @@ -1312,7 +1314,7 @@ async def tasks(
:arg actions: The task action names, which are used to limit the
response.
:arg detailed: If `true`, the response includes detailed
information about shard recoveries.
information about shard recoveries. Default is false.
:arg error_trace: Whether to include the stack trace of returned
errors.
:arg filter_path: Comma-separated list of filters used to reduce
Expand Down
27 changes: 15 additions & 12 deletions opensearchpy/_async/client/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async def health(
cluster, indices, shards, awareness_attributes.
:arg local: If true, the request retrieves information from the
local node only. Defaults to false, which means information is retrieved
from the master node.
from the master node. Default is false.
:arg master_timeout (Deprecated: To promote inclusive language,
use 'cluster_manager_timeout' instead.): Period to wait for a connection
to the master node. If no response is received before the timeout
Expand Down Expand Up @@ -165,7 +165,7 @@ async def pending_tasks(
statistics.
:arg local: If `true`, the request retrieves information from
the local node only.If `false`, information is retrieved from the master
node.
node. Default is false.
:arg master_timeout (Deprecated: To promote inclusive language,
use 'cluster_manager_timeout' instead.): Period to wait for a connection
to the master node.If no response is received before the timeout
Expand Down Expand Up @@ -223,13 +223,13 @@ async def state(
:arg filter_path: Comma-separated list of filters used to reduce
the response.
:arg flat_settings: Return settings in flat format (default:
false)
false) Default is false.
:arg human: Whether to return human readable values for
statistics.
:arg ignore_unavailable: Whether specified concrete indices
should be ignored when unavailable (missing or closed)
:arg local: Return local information, do not retrieve the state
from cluster-manager node (default: false)
from cluster-manager node (default: false) Default is false.
:arg master_timeout (Deprecated: To promote inclusive language,
use 'cluster_manager_timeout' instead.): Specify timeout for connection
to master
Expand Down Expand Up @@ -278,6 +278,7 @@ async def stats(
:arg filter_path: Comma-separated list of filters used to reduce
the response.
:arg flat_settings: If `true`, returns settings in flat format.
Default is false.
:arg human: Whether to return human readable values for
statistics.
:arg pretty: Whether to pretty format the returned JSON
Expand Down Expand Up @@ -386,10 +387,11 @@ async def get_settings(
:arg filter_path: Comma-separated list of filters used to reduce
the response.
:arg flat_settings: If `true`, returns settings in flat format.
Default is false.
:arg human: Whether to return human readable values for
statistics.
:arg include_defaults: If `true`, returns default cluster
settings from the local node.
settings from the local node. Default is false.
:arg master_timeout (Deprecated: To promote inclusive language,
use 'cluster_manager_timeout' instead.): Period to wait for a connection
to the master node.If no response is received before the timeout
Expand Down Expand Up @@ -436,7 +438,7 @@ async def put_settings(
:arg filter_path: Comma-separated list of filters used to reduce
the response.
:arg flat_settings: Return settings in flat format (default:
false)
false) Default is false.
:arg human: Whether to return human readable values for
statistics.
:arg master_timeout (Deprecated: To promote inclusive language,
Expand Down Expand Up @@ -508,9 +510,9 @@ async def allocation_explain(
:arg human: Whether to return human readable values for
statistics.
:arg include_disk_info: If true, returns information about disk
usage and shard sizes.
usage and shard sizes. Default is false.
:arg include_yes_decisions: If true, returns YES decisions in
explanation.
explanation. Default is false.
:arg pretty: Whether to pretty format the returned JSON
response.
:arg source: The URL-encoded request definition. Useful for
Expand Down Expand Up @@ -608,7 +610,7 @@ async def get_component_template(
statistics.
:arg local: If `true`, the request retrieves information from
the local node only.If `false`, information is retrieved from the master
node.
node. Default is false.
:arg master_timeout (Deprecated: To promote inclusive language,
use 'cluster_manager_timeout' instead.): Period to wait for a connection
to the master node.If no response is received before the timeout
Expand Down Expand Up @@ -661,7 +663,7 @@ async def put_component_template(
:arg cluster_manager_timeout: Operation timeout for connection
to cluster-manager node.
:arg create: If `true`, this request cannot replace or update
existing component templates.
existing component templates. Default is false.
:arg error_trace: Whether to include the stack trace of returned
errors.
:arg filter_path: Comma-separated list of filters used to reduce
Expand Down Expand Up @@ -722,7 +724,7 @@ async def exists_component_template(
statistics.
:arg local: If true, the request retrieves information from the
local node only.Defaults to false, which means information is retrieved
from the master node.
from the master node. Default is false.
:arg master_timeout (Deprecated: To promote inclusive language,
use 'cluster_manager_timeout' instead.): Period to wait for a connection
to the master node. If no response isreceived before the timeout
Expand Down Expand Up @@ -769,7 +771,8 @@ async def delete_voting_config_exclusions(
configuration exclusions list.Defaults to true, meaning that all
excluded nodes must be removed fromthe cluster before this API takes any
action. If set to false then thevoting configuration exclusions list is
cleared even if some excludednodes are still in the cluster.
cleared even if some excludednodes are still in the cluster. Default is
True.
"""
return await self.transport.perform_request(
"DELETE",
Expand Down
Loading

0 comments on commit d3aa149

Please sign in to comment.