opensearch-project / opensearch-py

Python Client for OpenSearch
https://opensearch.org/docs/latest/clients/python/
Apache License 2.0
359 stars 178 forks source link

[FEATURE] Add Tests for Notifications Plugin #636

Closed spapadop closed 5 months ago

spapadop commented 11 months ago

Is your feature request related to a problem?

The plugins.alerting.AlertingClient.create_destination API does not work with latest OpenSearch clusters, as destinations have been deprecated in favor of Notification channels. As a result, using that API gives:

opensearchpy.exceptions.TransportError: TransportError(405, 'Incorrect HTTP method for uri [/_plugins/_alerting/destinations] and method [POST], allowed: [GET]', 'Incorrect HTTP method for uri [/_plugins/_alerting/destinations] and method [POST], allowed: [GET]')

What solution would you like?

Add support for Notification APIs, I guess through a different plugin.

What alternatives have you considered?

One can still use transport.perform_request in order to use Notification channels APIs, but it would be nicer to have it natively supported on the python client.

dblock commented 11 months ago

Yes, please contribute! I believe you can add the spec to https://github.com/opensearch-project/opensearch-api-specification and the client will auto-generate the methods.

spapadop commented 11 months ago

Thanks the the prompt reply, I raised https://github.com/opensearch-project/opensearch-api-specification/pull/169 just to get this thing going, I'd appreciate your feedback there so that I can continue the work. Many thanks in advance!

saimedhi commented 7 months ago

Notifications API Added: Updating Issue to Add Tests for the API. Please feel free to contribute.

saimedhi commented 6 months ago

https://github.com/opensearch-project/opensearch-py/pull/668

saimedhi commented 5 months ago

resolved