moving import
This commit is contained in:
@@ -97,7 +97,7 @@ Elastic Cloud (and SSL) use-case::
|
||||
Using SSL Context with a self-signed cert use-case::
|
||||
|
||||
>>> from elasticsearch import Elasticsearch
|
||||
>>> from elasticsearch.connection.http_urllib3 import create_ssl_context
|
||||
>>> from elasticsearch.connection import create_ssl_context
|
||||
|
||||
>>> context = create_ssl_context(cafile="path/to/cafile.pem")
|
||||
>>> es = Elasticsearch("https://elasticsearch.url:port", ssl_context=context, http_auth=('elastic','yourpassword'))
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ or you can use the wrapper function :function:`~elasticsearch.connection.http_ur
|
||||
|
||||
To create an `SSLContext` object you only need to use one of cafile, capath or cadata::
|
||||
|
||||
>>> from elasticsearch.connection.http_urllib3 import create_ssl_context
|
||||
>>> from elasticsearch.connection import create_ssl_context
|
||||
>>> context = create_ssl_context(cafile=None, capath=None, cadata=None)
|
||||
|
||||
* `cafile` is the path to your CA File
|
||||
|
||||
+1
-1
@@ -200,7 +200,7 @@ elasticsearch cluster, including certificate verification and http auth::
|
||||
|
||||
# SSL client authentication using client_cert and client_key
|
||||
|
||||
from elasticsearch.connection.http_urllib3 import create_ssl_context
|
||||
from elasticsearch.connection import create_ssl_context
|
||||
|
||||
context = create_ssl_context(cafile="path/to/cert.pem")
|
||||
es = Elasticsearch(
|
||||
|
||||
Reference in New Issue
Block a user