Coverage for mindsdb / integrations / handlers / elasticsearch_handler / connection_args.py: 0%

4 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-01-21 00:36 +0000

1from collections import OrderedDict 

2 

3from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE as ARG_TYPE 

4 

5 

6connection_args = OrderedDict( 

7 hosts={ 

8 "type": ARG_TYPE.STR, 

9 "description": "The host name(s) or IP address(es) of the Elasticsearch server(s). If multiple host name(s) or " 

10 "IP address(es) exist, they should be separated by commas, e.g., `host1:port1, host2:port2`. " 

11 "If this parameter is not provided, `cloud_id` should be.", 

12 }, 

13 cloud_id={ 

14 "type": ARG_TYPE.STR, 

15 "description": "The unique ID to your hosted Elasticsearch cluster on Elasticsearch Service. If this parameter is " 

16 "not provided, `hosts` should be.", 

17 }, 

18 user={ 

19 "type": ARG_TYPE.STR, 

20 "description": "The username to connect to the Elasticsearch server with.", 

21 }, 

22 password={ 

23 "type": ARG_TYPE.PWD, 

24 "description": "The password to authenticate the user with the Elasticsearch server.", 

25 "secret": True, 

26 }, 

27 api_key={ 

28 "type": ARG_TYPE.STR, 

29 "description": "The API key for authentication with the Elasticsearch server.", 

30 "secret": True, 

31 }, 

32) 

33 

34connection_args_example = OrderedDict( 

35 hosts="localhost:9200", 

36 user="admin", 

37 password="password", 

38)