Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fix symbol error and Fix SSLError when connect es. #831

Merged
merged 3 commits into from
Nov 18, 2020
Merged
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
4 changes: 2 additions & 2 deletions sql-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ To install the SQL CLI:
1. To launch the CLI, run:

```
odfesql https://localhost:9200 --username admin password admin
odfesql https://localhost:9200 --username admin --password admin
```
By default, the `odfesql` command connects to [http://localhost:9200](http://localhost:9200/).

Expand Down Expand Up @@ -90,7 +90,7 @@ For a list of all available configurations, see [clirc](https://github.com/opend
2. Index the sample data.

```
curl -H "Content-Type: application/x-ndjson" -POST https://localhost:9200/data/_bulk -u admin:admin --insecure data-binary "@accounts.json"
curl -H "Content-Type: application/x-ndjson" -POST https://localhost:9200/data/_bulk -u admin:admin --insecure --data-binary "@accounts.json"
```


Expand Down
3 changes: 2 additions & 1 deletion sql-cli/src/odfe_sql_cli/esconnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def get_open_distro_client(self):
ssl_context.verify_mode = ssl.CERT_NONE

open_distro_client = Elasticsearch(
[self.endpoint], http_auth=self.http_auth, verify_certs=False, ssl_context=ssl_context
[self.endpoint], http_auth=self.http_auth, verify_certs=False, ssl_context=ssl_context,
connection_class=RequestsHttpConnection
)

return open_distro_client
Expand Down
3 changes: 2 additions & 1 deletion sql-cli/tests/test_esconnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ def test_get_od_client(self):
od_test_executor.get_open_distro_client()

mock_es.assert_called_with(
[OPEN_DISTRO_ENDPOINT], http_auth=AUTH, verify_certs=False, ssl_context=od_test_executor.ssl_context
[OPEN_DISTRO_ENDPOINT], http_auth=AUTH, verify_certs=False, ssl_context=od_test_executor.ssl_context,
connection_class=RequestsHttpConnection
)

def test_get_aes_client(self):
Expand Down