Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## [Unreleased]
### Added
### Updated APIs
- Updated opensearch-py APIs to reflect [opensearch-api-specification@9e6420d](https://github.com/opensearch-project/opensearch-api-specification/commit/9e6420de753751d28e845aa3aee930df1c0b7156)
- Updated opensearch-py APIs to reflect [opensearch-api-specification@3be80d7](https://github.com/opensearch-project/opensearch-api-specification/commit/3be80d700cccc60093ad6265a9582572c0b1e9f4)
- Updated opensearch-py APIs to reflect [opensearch-api-specification@89c586c](https://github.com/opensearch-project/opensearch-api-specification/commit/89c586cfe65584f789e8fccc5f6c416cee1e8b3b)
- Updated opensearch-py APIs to reflect [opensearch-api-specification@cac8c5d](https://github.com/opensearch-project/opensearch-api-specification/commit/cac8c5d8ab39c702c6c428cfdc3a3a710cf2c0b0)
Expand Down
4 changes: 4 additions & 0 deletions opensearchpy/_async/client/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@
from ..plugins.sm import SmClient
from ..plugins.sql import SqlClient
from ..plugins.transforms import TransformsClient
from ..plugins.ubi import UbiClient
from .client import Client
from .utils import NamespacedClient


class PluginsClient(NamespacedClient):
ubi: Any
security_analytics: Any
search_relevance: Any
sm: Any
Expand All @@ -57,6 +59,7 @@ class PluginsClient(NamespacedClient):
def __init__(self, client: Client) -> None:
super().__init__(client)

self.ubi = UbiClient(client)
self.security_analytics = SecurityAnalyticsClient(client)
self.search_relevance = SearchRelevanceClient(client)
self.sm = SmClient(client)
Expand Down Expand Up @@ -84,6 +87,7 @@ def _dynamic_lookup(self, client: Any) -> None:
# Issue : https://github.com/opensearch-project/opensearch-py/issues/90#issuecomment-1003396742

plugins = [
"ubi",
"security_analytics",
"search_relevance",
"sm",
Expand Down
50 changes: 50 additions & 0 deletions opensearchpy/_async/plugins/ubi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
#
# Modifications Copyright OpenSearch Contributors. See
# GitHub history for details.

# ------------------------------------------------------------------------------------------
# THIS CODE IS AUTOMATICALLY GENERATED AND MANUAL EDITS WILL BE LOST
#
# To contribute, kindly make modifications in the opensearch-py client generator
# or in the OpenSearch API specification, and run `nox -rs generate`. See DEVELOPER_GUIDE.md
# and https://github.com/opensearch-project/opensearch-api-specification for details.
# -----------------------------------------------------------------------------------------+


from typing import Any

from ..client.utils import NamespacedClient, query_params


class UbiClient(NamespacedClient):
@query_params("error_trace", "filter_path", "human", "pretty", "source")
async def initialize(
self,
*,
params: Any = None,
headers: Any = None,
) -> Any:
"""
Initializes the UBI indexes.


:arg error_trace: Whether to include the stack trace of returned
errors. Default is false.
:arg filter_path: A comma-separated list of filters used to
filter the response. Use wildcards to match any field or part of a
field's name. To exclude fields, use `-`.
:arg human: Whether to return human-readable values for
statistics. Default is false.
:arg pretty: Whether to pretty-format the returned JSON
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.
"""
return await self.transport.perform_request(
"POST", "/_plugins/ubi/initialize", params=params, headers=headers
)
4 changes: 4 additions & 0 deletions opensearchpy/client/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@
from ..plugins.sm import SmClient
from ..plugins.sql import SqlClient
from ..plugins.transforms import TransformsClient
from ..plugins.ubi import UbiClient
from .client import Client
from .utils import NamespacedClient


class PluginsClient(NamespacedClient):
ubi: Any
security_analytics: Any
search_relevance: Any
sm: Any
Expand All @@ -57,6 +59,7 @@ class PluginsClient(NamespacedClient):
def __init__(self, client: Client) -> None:
super().__init__(client)

self.ubi = UbiClient(client)
self.security_analytics = SecurityAnalyticsClient(client)
self.search_relevance = SearchRelevanceClient(client)
self.sm = SmClient(client)
Expand Down Expand Up @@ -84,6 +87,7 @@ def _dynamic_lookup(self, client: Any) -> None:
# Issue : https://github.com/opensearch-project/opensearch-py/issues/90#issuecomment-1003396742

plugins = [
"ubi",
"security_analytics",
"search_relevance",
"sm",
Expand Down
50 changes: 50 additions & 0 deletions opensearchpy/plugins/ubi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
#
# Modifications Copyright OpenSearch Contributors. See
# GitHub history for details.

# ------------------------------------------------------------------------------------------
# THIS CODE IS AUTOMATICALLY GENERATED AND MANUAL EDITS WILL BE LOST
#
# To contribute, kindly make modifications in the opensearch-py client generator
# or in the OpenSearch API specification, and run `nox -rs generate`. See DEVELOPER_GUIDE.md
# and https://github.com/opensearch-project/opensearch-api-specification for details.
# -----------------------------------------------------------------------------------------+


from typing import Any

from ..client.utils import NamespacedClient, query_params


class UbiClient(NamespacedClient):
@query_params("error_trace", "filter_path", "human", "pretty", "source")
def initialize(
self,
*,
params: Any = None,
headers: Any = None,
) -> Any:
"""
Initializes the UBI indexes.


:arg error_trace: Whether to include the stack trace of returned
errors. Default is false.
:arg filter_path: A comma-separated list of filters used to
filter the response. Use wildcards to match any field or part of a
field's name. To exclude fields, use `-`.
:arg human: Whether to return human-readable values for
statistics. Default is false.
:arg pretty: Whether to pretty-format the returned JSON
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.
"""
return self.transport.perform_request(
"POST", "/_plugins/ubi/initialize", params=params, headers=headers
)