File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 11from typing import Dict , List
22from dataclasses import dataclass , field
33
4- from suzieq .shared .utils import SUPPORTED_ENGINES
4+ from suzieq .shared .utils import SUPPORTED_ENGINES , set_rest_engine
55
66
77@dataclass
@@ -34,15 +34,10 @@ def __post_init__(self):
3434 if not self .engine :
3535 self .engine = self .cfg .get ('ux' , {}).get ('engine' , 'pandas' )
3636 if self .engine == 'rest' :
37- # See if we can extract the REST info from the REST part
38- restcfg = self .cfg .get ('rest' , {})
39- self .rest_server_ip = restcfg .get ('address' , '127.0.0.1' )
40- self .rest_server_port = restcfg .get ('port' , '80' )
41- if restcfg .get ('no-https' , False ):
42- self .rest_transport = 'http'
43- else :
44- self .rest_transport = 'https'
45- self .rest_api_key = restcfg .get ('API_KEY' , '' )
37+ self .rest_server_ip ,\
38+ self .rest_server_port ,\
39+ self .rest_transport ,\
40+ self .rest_api_key = set_rest_engine (self .cfg )
4641
4742 if self .engine not in SUPPORTED_ENGINES :
4843 raise ValueError (f'Engine { self .engine } not supported' )
You can’t perform that action at this time.
0 commit comments