Commit Graph
56 Commits
Author SHA1 Message Date
Sai Medhini Reddy MaryadaandGitHub 49c2f6e87d Bump version to 2.3.2 (#524)
Signed-off-by: saimedhi <[email protected]>
2023-10-06 16:37:56 -04:00
80b96812a7 Integrated generated 'nodes' client APIs into the existing module, ensuring alignment with the server and maintaining backward compatibility (#514)
Signed-off-by: saimedhi <[email protected]>
Signed-off-by: Sai Medhini Reddy Maryada <[email protected]>
Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
2023-10-03 15:00:49 -07:00
Bhavani RaviandGitHub 1a47e6fa1f fixes: #512 Wrong return type hint in async_scan (#520)
* fixes: #512 Wrong return type hint in async_scan

Signed-off-by: Bhavani Ravi <[email protected]>

* add: changelog

Signed-off-by: Bhavani Ravi <[email protected]>

---------

Signed-off-by: Bhavani Ravi <[email protected]>
2023-10-03 10:45:35 -04:00
Sai Medhini Reddy MaryadaandGitHub 9fe5f5ad62 Integrated generated dangling_indices client APIs into the existing module, ensuring alignment with the server and maintaining backward compatibility (#511)
Signed-off-by: saimedhi <[email protected]>
Signed-off-by: Sai Medhini Reddy Maryada <[email protected]>
2023-10-03 10:40:51 -04:00
Sai Medhini Reddy MaryadaandGitHub 7d3c528dff Integrated generated ingest client APIs into the existing module, ensuring alignment with the server and maintaining backward compatibility (#513)
Signed-off-by: saimedhi <[email protected]>
2023-09-28 20:18:53 -07:00
Sai Medhini Reddy MaryadaandGitHub 2feccc22bb Integrated generated APIs into the existing module, ensuring alignment with the server and maintaining backward compatibility (#508)
Signed-off-by: saimedhi <[email protected]>
2023-09-26 12:49:25 -04:00
Sai Medhini Reddy MaryadaandGitHub c6c7df5461 Updated APIs to match other clients and opensearch openapi spec (#502)
Signed-off-by: saimedhi <[email protected]>
2023-09-26 12:46:18 -04:00
Sai Medhini Reddy MaryadaandGitHub 14602d61cf Bump version to 2.3.1 (#481)
Signed-off-by: saimedhi <[email protected]>
Signed-off-by: Sai Medhini Reddy Maryada <[email protected]>
2023-08-21 12:06:19 -07:00
Logan AttwoodandGitHub fca8bd3d0e Fix race condition in AWS request signers (#470)
* Fix race condition in AWS request signers

Signed-off-by: Logan Attwood <[email protected]>

* Conditionally expose get_frozen_credentials on mock_session

Signed-off-by: Logan Attwood <[email protected]>

* Use inheritance to make tests cleaner

Signed-off-by: Logan Attwood <[email protected]>

---------

Signed-off-by: Logan Attwood <[email protected]>
2023-08-10 13:32:53 -04:00
Sai Medhini Reddy MaryadaandGitHub b1c82a265d Bump version to 2.3.0 (#456)
Signed-off-by: saimedhi <[email protected]>
2023-07-26 17:19:22 -07:00
Sai Medhini Reddy MaryadaandGitHub caeaa13250 Updated Security Client APIs (#450)
Signed-off-by: saimedhi <[email protected]>
2023-07-26 18:38:49 -04:00
florianvazelleandGitHub 5dc51d4b7f Move security api from plugins to clients (#442)
* fix(security): move security api from plugins to clients

Signed-off-by: florian <[email protected]>

* chore(CHANGELOG): update CHANGELOG for the PR#442

Signed-off-by: florian <[email protected]>

---------

Signed-off-by: florian <[email protected]>
2023-07-21 13:07:20 -04:00
Michael OliverandGitHub 4dba35deea Allow passing trust_env to aiohttp.ClientSession (#438)
Fixes #368

Signed-off-by: Michael Oliver <[email protected]>
2023-07-19 09:02:04 -04:00
12ebe82cba Fix string/tuple/no auth on AsyncHttpConnection class (#424)
* Fix string/tuple/no auth on AsyncHttpConnection class. Fixes #283

Signed-off-by: dannosaur <[email protected]>

* Update for PR comments. Add tests.

Signed-off-by: dannosaur <[email protected]>

* Moving tests to its own file.

Also had to install asynctest into the dev-requirements to get access to the context managers necessary to mock out aiohttp.

Signed-off-by: dannosaur <[email protected]>

* Update CHANGELOG

Signed-off-by: dannosaur <[email protected]>

* Linter fixes. Add license text to new file.

Signed-off-by: dannosaur <[email protected]>

* Move AsyncContextManagerMock to utils package for future re-use

Signed-off-by: dannosaur <[email protected]>

* Lint

Signed-off-by: dannosaur <[email protected]>

* Refactor async tests - remove asynctest package

Signed-off-by: dannosaur <[email protected]>

* Switch out to using aiounittest for async testing prior to py3.8

Signed-off-by: dannosaur <[email protected]>

* Use RequestContextManager from opensearchpy._asycn._extra_imports

Signed-off-by: dannosaur <[email protected]>

* Simplify test somewhat, move to `test_async` since all other async tests are ignored on runners <3.6

Signed-off-by: dannosaur <[email protected]>

* Lint

Signed-off-by: dannosaur <[email protected]>

---------

Signed-off-by: dannosaur <[email protected]>
Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
2023-07-06 18:01:52 -04:00
florianvazelleandGitHub 2e8d5ce1a5 Index State Management support (#398)
* feat(plugins): add index management client plugin

Signed-off-by: florian <[email protected]>

* chore(CHANGELOG): added entry for ISM api support in changelog

Signed-off-by: florian <[email protected]>

* test(plugins): use assertEqual to compare call parameters

Signed-off-by: florian <[email protected]>

* test(plugins): edit policy to support older versions of opensearch

Signed-off-by: florian <[email protected]>

* test(plugins): ignore plugin tests when opensearch is unreleased

Signed-off-by: florian <[email protected]>

* test(plugins): move plugin tests into separate files

Signed-off-by: florian <[email protected]>

* test(plugins): fix import of OpenSearchTestCase

Signed-off-by: florian <[email protected]>

* chore(USER_GUIDE): add a index management plugin part

Signed-off-by: florian <[email protected]>

---------

Signed-off-by: florian <[email protected]>
2023-06-28 16:56:00 -04:00
florianvazelleandGitHub c60c259d96 Security plugin support (#399)
* feat(plugins): add security client plugin

Signed-off-by: florian <[email protected]>

* test(plugins): skip security plugin tests when disabled

Signed-off-by: florian <[email protected]>

* fix(security): remove non-ASCII character

Signed-off-by: florian <[email protected]>

* chore(CHANGELOG): added entry for security api support in changelog

Signed-off-by: florian <[email protected]>

* test(plugins): add asynchronous tests version

Signed-off-by: florian <[email protected]>

* test: remove some warnings

Signed-off-by: florian <[email protected]>

* chore(USER_GUIDE): add a security plugin part

Signed-off-by: florian <[email protected]>

* test(security): Split out security plugin tests in its own file

Signed-off-by: florian <[email protected]>

* chore: apply reviews

Signed-off-by: florian <[email protected]>

---------

Signed-off-by: florian <[email protected]>
2023-06-27 11:01:40 -04:00
db972e615b feat: Add a collapse method to opensearchpy.helpers.search.Search (#409)
Signed-off-by: Quentin Coumes <[email protected]>
Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
2023-06-26 19:19:15 -04:00
Sai Medhini Reddy MaryadaandGitHub f1b5706ebd Added 'allow_redirects' parameter in perform_request function for RequestsHttpConnection (#401)
Signed-off-by: saimedhi <[email protected]>
2023-06-13 15:15:00 -04:00
Charles GreerandGitHub fe3b5a8922 [#387] Do not escape the "timeout" parameter. (#394)
* [#387] Do not escape the "timeout" parameter.

When the "timeout" parameter is escaped and turned into
a string, it does not pass validation checks.
This PR ensures that timeout is passed through as-is,
just like "request_timeout".
There's no explicit test for this parameter, but I included
it on some existing tests just to ensure that the code
is exercised.  Without the fix in place, one of the tests as modified will not pass.

Signed-off-by: Charles Greer <[email protected]>

* Unit test for timeout parameter

Revert original test modifications.

Signed-off-by: Charles Greer <[email protected]>

* Extend test and linter

Signed-off-by: Charles Greer <[email protected]>

---------

Signed-off-by: Charles Greer <[email protected]>
2023-05-23 18:12:29 -04:00
gg-kialoandGitHub 707373e369 Include parsed error info in TransportError in async connections (#226)
Passing the Content-Type to `_raise_errors` will cause the json body to
be parsed and included in the `TransportError`.

This matches the behaviour of the sync client.

Fixes #225

Signed-off-by: Gordon Govan <[email protected]>
2023-05-09 15:16:03 -04:00
Sai Medhini Reddy MaryadaandGitHub 2abb8c4317 Updated pyi file for point in time API (#378)
Signed-off-by: saimedhi <[email protected]>
2023-04-28 13:11:37 -04:00
Sai Medhini Reddy MaryadaandGitHub 2b9aee73a5 Added async support for helpers that are merged from opensearch-dsl-py (#329)
Signed-off-by: saimedhi <[email protected]>
2023-03-17 12:03:46 -07:00
aiudirogandGitHub f1f73e7ff2 Fixed utils/build-dists.py which was broken by 49ae7c7 (#316)
* Fixed utils/build-dists.py which was broken by 49ae7c7
Previously the async helpers imported AsyncOpenSearch and therefore failed to import anytime it did

Signed-off-by: Roger Aiudi <[email protected]>

* Refactor async helpers try block to a simple if statement

Signed-off-by: Roger Aiudi <[email protected]>

* Remove newline to pass black

Signed-off-by: Roger Aiudi <[email protected]>

---------

Signed-off-by: Roger Aiudi <[email protected]>
2023-03-08 17:34:43 -08:00
aiudirogandGitHub 49ae7c76e0 Fix async helpers import cycle (#311)
* Import async helpers through public interface in tests

Signed-off-by: Roger Aiudi <[email protected]>

* Removed unused import of AsyncOpenSearch in async helpers that was causing an import cycle (fixes #310)

Signed-off-by: Roger Aiudi <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Roger Aiudi <[email protected]>

* Change 2.2.1 in the changelog to Unreleased

Signed-off-by: Roger Aiudi <[email protected]>

* Separated changelog entries for 2.2.0 from 2.1.1

Signed-off-by: Roger Aiudi <[email protected]>

---------

Signed-off-by: Roger Aiudi <[email protected]>
2023-03-08 15:05:06 -05:00
Vacha ShahandGitHub 754dcc7339 Removing low-level and high-level client terminology (#298)
Signed-off-by: Vacha Shah <[email protected]>
2023-02-21 15:06:39 -08:00
Sai Medhini Reddy MaryadaandGitHub c58375aa7b Merging opensearch-dsl-py to opensearch-py (#287)
Signed-off-by: saimedhi <[email protected]>
2023-02-14 15:03:56 -08:00
Sai Medhini Reddy MaryadaandGitHub 93636399ec Removed 'out/opensearchpy' folder which was produced while generating pyi files for plugins (#288)
Signed-off-by: saimedhi <[email protected]>
2023-02-14 11:09:14 -08:00
Theo Nam TruongandGitHub 58aa041db3 Fixed Sigv4 Signing for Managed Service (#279)
Fixed SigV4 Signing for Async Requests with QueryStrings

Signed-off-by: Theo Truong <[email protected]>

Signed-off-by: Theo Truong <[email protected]>
2023-01-23 18:38:31 -08:00
Harsha Vamsi KalluriandGitHub 4059251c13 Bump version to 2.1.0 (#277)
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
2023-01-20 14:58:31 -08:00
Sai Medhini Reddy MaryadaandGitHub 176c78c58e Updated CI tests to make them work locally (#275)
Signed-off-by: saimedhi <[email protected]>

Signed-off-by: saimedhi <[email protected]>
2023-01-19 15:20:19 -08:00
Sai Medhini Reddy MaryadaandGitHub 7d83a69494 Adding explicit parameters for AIOHttpConnection and AsyncTransport (#276)
Signed-off-by: saimedhi <[email protected]>

Signed-off-by: saimedhi <[email protected]>
2023-01-19 15:15:35 -08:00
Harsha Vamsi KalluriandGitHub 5c1c890f69 Abstract away service name (#268)
* Abstract away service name

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

* Compuute x-amz-content-256 header

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

* Fix async signing

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

* Adds types-six to dependencies

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

* Optionally remove Content-Length

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

* Fix dict typo

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

* Remove requirement for x-amz-content-sha256 header

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

* Remove deletion of content-length

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

* Fix capitalization

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

* Adding unit tests

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
2023-01-18 18:06:59 -05:00
Harsha Vamsi KalluriandGitHub cfb2cf7b60 Adding async support for AWSSigV4 (#254)
* Adding async support for AWSSigV4

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

* Fix names for connection classes

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

* Update tests to async name space

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

* Add import exceptions to python < 3.6

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
2023-01-02 17:25:48 -05:00
Jeppe Fihl-PearsonandGitHub 4c4091b12c Fix DeprecationWarning raised by urllib3 1.26.13 (#246)
* Fix DeprecationWarning raised by urllib3 1.26.13

urllib3 has started to emit a DeprecationWarning whenever
HTTPResponse.getheaders() is called since version 1.26.13.

This changes the one place where this is done to instead use
HTTPResponse.headers instead, which is the recommend way of retrieving
the headers going forwards.

Signed-off-by: Jeppe Fihl-Pearson <[email protected]>

* Add CHANGELOG entry

Signed-off-by: Jeppe Fihl-Pearson <[email protected]>

Signed-off-by: Jeppe Fihl-Pearson <[email protected]>
2022-12-01 11:26:24 -08:00
b6b35f4666 feat: Added pool_maxsize for RequestsHttpConnection (#216)
Signed-off-by: Niket Singh <[email protected]>

Signed-off-by: Niket Singh <[email protected]>
Co-authored-by: Niket Singh <[email protected]>
Co-authored-by: Harsha Vamsi Kalluri <[email protected]>
2022-12-01 11:24:59 -08:00
Sai Medhini Reddy MaryadaandGitHub 659d30f539 Modified index definition in client/__init__py (#245)
Signed-off-by: saimedhi <[email protected]>

Signed-off-by: saimedhi <[email protected]>
2022-11-30 11:04:34 -05:00
Harsha Vamsi KalluriandGitHub a372f313dd Incrementing version to 2.0.1 (#206)
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
2022-11-29 14:09:34 -08:00
Harsha Vamsi KalluriandGitHub 7874ed0e32 fix tests for master (#243)
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
2022-11-28 14:29:37 -08:00
Sai Medhini Reddy MaryadaandGitHub dea10c80e5 Updated bulk action in helpers (#239)
Signed-off-by: saimedhi <[email protected]>

Signed-off-by: saimedhi <[email protected]>
2022-11-23 14:04:05 -05:00
2672f3f572 Check OpenSSL environment variables before defaulting to certifi (#196)
* Check OpenSSL environment variables before defaulting to certifi

Signed-off-by: Roger Aiudi <[email protected]>

* Fix formatting

Signed-off-by: Roger Aiudi <[email protected]>

* Moved CA_CERTS to the base Connection module

Signed-off-by: Roger Aiudi <[email protected]>

* Updated requests Connection to use common CA_CERTS by default

Signed-off-by: Roger Aiudi <[email protected]>

* Pass nox linting

Signed-off-by: Roger Aiudi <[email protected]>

* Update CHANGELOG.md and USER_GUIDE.md

Signed-off-by: Roger Aiudi <[email protected]>

* Updated AIOHttpConnection to only load CA_CERTS if verify_certs is True

Signed-off-by: Roger Aiudi <[email protected]>

* Added test cases for CA_CERTS handling in each Connection implementation

Signed-off-by: Roger Aiudi <[email protected]>

* Move CA cert handling to Connection.default_ca_certs()
Add test cases for the different CA cert configurations

Signed-off-by: Roger Aiudi <[email protected]>

* Update actions to test unsupported Python versions on ubuntu-20.04

Signed-off-by: Roger Aiudi <[email protected]>

* Fix Python versions being interpreted as floats

Signed-off-by: Roger Aiudi <[email protected]>

* Workaround Monkeypatch not available on old pytest versions

Signed-off-by: Roger Aiudi <[email protected]>

Signed-off-by: Roger Aiudi <[email protected]>
Co-authored-by: Harsha Vamsi Kalluri <[email protected]>
2022-11-22 11:33:45 -05:00
Arpit-BandejiyaandGitHub 8ece008605 Fix point in time rest api (#191)
* Add change for point in time

Signed-off-by: Arpit Bandejiya <[email protected]>

* resolve minor comments

Signed-off-by: Arpit Bandejiya <[email protected]>

* Add Unit tests

Signed-off-by: Arpit Bandejiya <[email protected]>

* minor changes

Signed-off-by: Arpit Bandejiya <[email protected]>

* minor edits in API calls

Signed-off-by: Arpit Bandejiya <[email protected]>

* Fixing lint errors

Signed-off-by: Arpit Bandejiya <[email protected]>

* Add documentation for the new API

Signed-off-by: Arpit Bandejiya <[email protected]>

* minor nit fix

Signed-off-by: Arpit Bandejiya <[email protected]>

* minor nit fix

Signed-off-by: Arpit Bandejiya <[email protected]>

* Added license in test file

Signed-off-by: Arpit Bandejiya <[email protected]>

* Add ChangeLog

Signed-off-by: Arpit Bandejiya <[email protected]>

Signed-off-by: Arpit Bandejiya <[email protected]>
2022-11-01 23:19:31 -07:00
Harsha Vamsi KalluriandGitHub 8879644ec4 Added timeout to available input query parameters (#210)
* Added timeout to available input query parameters

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

* Add unit test to ensure that timeout is an accepted parameter

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
2022-10-25 10:41:29 -07:00
2d03dc773b Alerting Plugins (#93)
* Alert Plugin

Signed-off-by: Arnav Das <[email protected]>

* lint file header license

Signed-off-by: Arnav Das <[email protected]>

* Tests For Alerting[Monitors]

Signed-off-by: Arnav Das <[email protected]>

* Tests For Alerting[Destinations]

Signed-off-by: Arnav Das <[email protected]>

* dynamic lookup 90#issuecomment-1003396742

Signed-off-by: Arnav Das <[email protected]>

* Alerting Async

Signed-off-by: Arnav Das <[email protected]>

* Lint Changes

Signed-off-by: Arnav Das <[email protected]>

* alerting plugins integration tests

Signed-off-by: Arnav Das <[email protected]>

* Integ UnitTests Skip on OPENSEARCH_VERSION >= 2.0.0

Signed-off-by: Arnav Das <[email protected]>

* Unit Test Skip Complete

Signed-off-by: Arnav Das <[email protected]>

* License Headers fixed

Signed-off-by: Arnav Das <[email protected]>

* test_urllib3_connection timeout

Signed-off-by: Arnav Das <[email protected]>

* lint

Signed-off-by: Arnav Das <[email protected]>

* Fix licenses in all files

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

* Remove elastic search licenses on new files

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

* Fix formatting

Signed-off-by: Harsha Vamsi Kalluri <[email protected]>

Signed-off-by: Arnav Das <[email protected]>
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
Co-authored-by: Harsha Vamsi Kalluri <[email protected]>
2022-10-03 14:45:18 -04:00
Vacha ShahandGitHub cae0577fd2 Bump client version to 2.0.0 (#167)
* Bump client version to 2.0.0

Signed-off-by: Vacha Shah <[email protected]>

* Adding test support for other unreleased branches

Signed-off-by: Vacha Shah <[email protected]>
2022-05-26 11:07:47 -04:00
Vacha ShahandGitHub 1569c05f08 Remove include_type_name parameter from APIs (#156)
* Remove include_type_name parameter from APIs

Signed-off-by: Vacha Shah <[email protected]>

* Applying formatting

Signed-off-by: Vacha Shah <[email protected]>
2022-04-20 13:58:13 -07:00
Vacha ShahandGitHub b1eaba0064 Type removal breaking changes (#151)
* Breaking changes for type removal

Signed-off-by: Vacha Shah <[email protected]>

* Adding support to test against unreleased OpenSearch

Signed-off-by: Vacha Shah <[email protected]>

* Formatting

Signed-off-by: Vacha Shah <[email protected]>

* Addressing comments to refactor run-opensearch.sh

Signed-off-by: Vacha Shah <[email protected]>
2022-04-13 10:47:48 -07:00
Shivam DharandShivam Dhar cd63637c28 updates version for 1.1 release
Signed-off-by: Shivam Dhar <[email protected]>
2022-03-21 13:18:17 -07:00
Shivam DharandShivam Dhar 6ab90be906 adds IAM auth support
Signed-off-by: Shivam Dhar <[email protected]>
2022-03-09 13:12:45 -08:00
Philip MayandVijayan Balasubramanian 96bbbfa336 remove unused "type: ignore" comment
Signed-off-by: Philip May <[email protected]>
2022-02-01 13:05:37 -08:00
Shivam DharandShivam Dhar 25ff092c8f removes cert usage from CI module
Signed-off-by: Shivam Dhar <[email protected]>
2022-01-08 15:15:15 +05:30