Fix /cluster/stats in a backwards compatible way (#851)
* 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]>
This commit is contained in:
@@ -11,6 +11,8 @@ import warnings
|
||||
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.knn import KnnClient
|
||||
from ..plugins.ml import MlClient
|
||||
@@ -18,6 +20,7 @@ from ..plugins.notifications import NotificationsClient
|
||||
from ..plugins.observability import ObservabilityClient
|
||||
from ..plugins.ppl import PplClient
|
||||
from ..plugins.query import QueryClient
|
||||
from ..plugins.replication import ReplicationClient
|
||||
from ..plugins.rollups import RollupsClient
|
||||
from ..plugins.sql import SqlClient
|
||||
from ..plugins.transforms import TransformsClient
|
||||
@@ -26,12 +29,25 @@ from .utils import NamespacedClient
|
||||
|
||||
|
||||
class PluginsClient(NamespacedClient):
|
||||
asynchronous_search: Any
|
||||
alerting: Any
|
||||
index_management: Any
|
||||
knn: Any
|
||||
ml: Any
|
||||
notifications: Any
|
||||
observability: Any
|
||||
ppl: Any
|
||||
query: Any
|
||||
rollups: Any
|
||||
sql: Any
|
||||
transforms: Any
|
||||
|
||||
def __init__(self, client: Client) -> None:
|
||||
super().__init__(client)
|
||||
|
||||
self.replication = ReplicationClient(client)
|
||||
self.flow_framework = FlowFrameworkClient(client)
|
||||
self.asynchronous_search = AsynchronousSearchClient(client)
|
||||
self.alerting = AlertingClient(client)
|
||||
self.index_management = IndexManagementClient(client)
|
||||
self.knn = KnnClient(client)
|
||||
@@ -50,13 +66,20 @@ class PluginsClient(NamespacedClient):
|
||||
# Issue : https://github.com/opensearch-project/opensearch-py/issues/90#issuecomment-1003396742
|
||||
|
||||
plugins = [
|
||||
# "query_workbench",
|
||||
# "reporting",
|
||||
# "notebooks",
|
||||
"replication",
|
||||
"flow_framework",
|
||||
"asynchronous_search",
|
||||
"alerting",
|
||||
# "anomaly_detection",
|
||||
# "trace_analytics",
|
||||
"index_management",
|
||||
"knn",
|
||||
"ml",
|
||||
"notifications",
|
||||
"observability",
|
||||
"ppl",
|
||||
"query",
|
||||
"rollups",
|
||||
"sql",
|
||||
"transforms",
|
||||
]
|
||||
for plugin in plugins:
|
||||
if not hasattr(client, plugin):
|
||||
|
||||
Reference in New Issue
Block a user