def __prepare_ssl(self, test_globals, shared_root): """ Updates ssl configuration from globals. """ ssl_params = None if self.ssl_params is None and is_ssl_enabled(test_globals): ssl_params = get_ssl_params(test_globals, shared_root, IGNITE_CLIENT_ALIAS) if ssl_params: return self._replace(ssl_params=ssl_params) return self
def __init__(self, cluster, ssl_params=None, username=None, password=None): self._cluster = cluster self.logger = cluster.context.logger if ssl_params: self.ssl_params = ssl_params elif is_ssl_enabled(cluster.context.globals): self.ssl_params = get_ssl_params(cluster.context.globals, cluster.shared_root, IGNITE_ADMIN_ALIAS) if username and password: self.username, self.password = username, password elif is_auth_enabled(cluster.context.globals): self.username, self.password = get_credentials(cluster.context.globals)
def __prepare_ssl(self, test_globals, shared_root): """ Updates ssl configuration from globals. """ ssl_params = None if self.ssl_params is None and is_ssl_enabled(test_globals): ssl_params = get_ssl_params( test_globals, shared_root, IGNITE_CLIENT_ALIAS if self.client_mode else IGNITE_SERVER_ALIAS) if ssl_params: return self._replace( ssl_params=ssl_params, connector_configuration=ConnectorConfiguration( ssl_enabled=True, ssl_params=ssl_params), client_connector_configuration=ClientConnectorConfiguration( ssl_enabled=True, ssl_params=ssl_params)) return self
def check_parse(test_globals, shared_root, expected): """ Check that SslParams correctly parse SSL params from globals """ assert _compare(expected, get_ssl_params(test_globals, shared_root, IGNITE_CLIENT_ALIAS))