map7000 commented on a change in pull request #8686: URL: https://github.com/apache/ignite/pull/8686#discussion_r572901128
########## File path: modules/ducktests/tests/ignitetest/services/utils/control_utility.py ########## @@ -313,6 +303,39 @@ def __parse_output(raw_output): def __alives(self): return [node for node in self._cluster.nodes if self._cluster.alive(node)] + def _get_creds_from_globals(self, user, globals_dict, **kwargs): + + creds = dict() + + if globals_dict.get("use_ssl", False): + admin_dict = globals_dict.get(user, {}) + creds = self._get_ssl_from_dict(admin_dict.get('ssl', {})) + elif kwargs.get('key_store_jks') is not None or kwargs.get('key_store_path') is not None: + creds = self._get_ssl_from_dict(kwargs) + + if globals_dict.get("use_auth", False): + admin_dict = globals_dict.get(user, {}) + creds['login'] = admin_dict.get("login", DEFAULT_AUTH_LOGIN) + creds['password'] = admin_dict.get("password", DEFAULT_AUTH_PASSWORD) + elif kwargs.get('login') is not None: + creds['login'] = kwargs.get("login", DEFAULT_AUTH_LOGIN) + creds['password'] = kwargs.get("password", DEFAULT_AUTH_PASSWORD) + + return creds + + def _get_ssl_from_dict(self, ssl_dict): + + creds = {} + + creds['key_store_path'] = ssl_dict.get("key_store_path", Review comment: Good idea. Dict changed to class ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org