Fixing more Cassandra consistency issues (#488)

* Fixing more Cassandra work

* Fix tests
This commit is contained in:
cybermaggedon 2025-09-04 00:58:11 +01:00 committed by GitHub
parent ccaec88a72
commit 85e669c763
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 196 additions and 208 deletions

View file

@ -119,26 +119,16 @@ def get_cassandra_config_from_params(params: dict) -> Tuple[List[str], Optional[
"""
Extract and resolve Cassandra configuration from a parameters dictionary.
Handles both old graph_* and new cassandra_* parameter names for backward compatibility.
Args:
params: Dictionary of parameters that may contain Cassandra configuration
Returns:
tuple: (hosts_list, username, password)
"""
# Check for new parameter names first
# Get Cassandra parameters
host = params.get('cassandra_host')
username = params.get('cassandra_username')
password = params.get('cassandra_password')
# Fall back to old graph_* names for backward compatibility
if not host:
host = params.get('graph_host')
if not username:
username = params.get('graph_username', params.get('cassandra_user'))
if not password:
password = params.get('graph_password')
# Use resolve function to handle defaults and list conversion
return resolve_cassandra_config(host=host, username=username, password=password)