@@ -172,7 +172,7 @@ def _get_dse_version_from_cass(cass_version):
172
172
cassandra_version = Version (mcv_string )
173
173
174
174
CASSANDRA_VERSION = Version (mcv_string ) if mcv_string else cassandra_version
175
- CCM_VERSION = cassandra_version if mcv_string else CASSANDRA_VERSION
175
+ CCM_VERSION = mcv_string or cv_string
176
176
177
177
CASSANDRA_IP = os .getenv ('CLUSTER_IP' , '127.0.0.1' )
178
178
CASSANDRA_DIR = os .getenv ('CASSANDRA_DIR' , None )
@@ -458,15 +458,9 @@ def use_cluster(cluster_name, nodes, ipformat=None, start=True, workloads=None,
458
458
elif ccm_options is None :
459
459
ccm_options = CCM_KWARGS .copy ()
460
460
461
- if 'version' in ccm_options and not isinstance (ccm_options ['version' ], Version ):
462
- ccm_options ['version' ] = Version (ccm_options ['version' ])
463
-
464
461
cassandra_version = ccm_options .get ('version' , CCM_VERSION )
465
462
dse_version = ccm_options .get ('version' , DSE_VERSION )
466
463
467
- if 'version' in ccm_options :
468
- ccm_options ['version' ] = ccm_options ['version' ].base_version
469
-
470
464
global CCM_CLUSTER
471
465
if USE_CASS_EXTERNAL :
472
466
if CCM_CLUSTER :
@@ -515,12 +509,12 @@ def use_cluster(cluster_name, nodes, ipformat=None, start=True, workloads=None,
515
509
CCM_CLUSTER = DseCluster (path , cluster_name , ** ccm_options )
516
510
CCM_CLUSTER .set_configuration_options ({'start_native_transport' : True })
517
511
CCM_CLUSTER .set_configuration_options ({'batch_size_warn_threshold_in_kb' : 5 })
518
- if dse_version >= Version ('5.0' ):
512
+ if Version ( dse_version ) >= Version ('5.0' ):
519
513
CCM_CLUSTER .set_configuration_options ({'enable_user_defined_functions' : True })
520
514
CCM_CLUSTER .set_configuration_options ({'enable_scripted_user_defined_functions' : True })
521
515
if 'spark' in workloads :
522
516
config_options = {"initial_spark_worker_resources" : 0.1 }
523
- if dse_version >= Version ('6.7' ):
517
+ if Version ( dse_version ) >= Version ('6.7' ):
524
518
log .debug ("Disabling AlwaysON SQL for a DSE 6.7 Cluster" )
525
519
config_options ['alwayson_sql_options' ] = {'enabled' : False }
526
520
CCM_CLUSTER .set_dse_configuration_options (config_options )
@@ -532,9 +526,9 @@ def use_cluster(cluster_name, nodes, ipformat=None, start=True, workloads=None,
532
526
else :
533
527
CCM_CLUSTER = CCMCluster (path , cluster_name , ** ccm_options )
534
528
CCM_CLUSTER .set_configuration_options ({'start_native_transport' : True })
535
- if cassandra_version >= Version ('2.2' ):
529
+ if Version ( cassandra_version ) >= Version ('2.2' ):
536
530
CCM_CLUSTER .set_configuration_options ({'enable_user_defined_functions' : True })
537
- if cassandra_version >= Version ('3.0' ):
531
+ if Version ( cassandra_version ) >= Version ('3.0' ):
538
532
CCM_CLUSTER .set_configuration_options ({'enable_scripted_user_defined_functions' : True })
539
533
common .switch_cluster (path , cluster_name )
540
534
CCM_CLUSTER .set_configuration_options (configuration_options )
0 commit comments