@@ -178,7 +178,7 @@ def _get_dse_version_from_cass(cass_version):
178
178
cassandra_version = Version (mcv_string )
179
179
180
180
CASSANDRA_VERSION = Version (mcv_string ) if mcv_string else cassandra_version
181
- CCM_VERSION = cassandra_version if mcv_string else CASSANDRA_VERSION
181
+ CCM_VERSION = mcv_string or cv_string
182
182
183
183
CASSANDRA_IP = os .getenv ('CLUSTER_IP' , '127.0.0.1' )
184
184
CASSANDRA_DIR = os .getenv ('CASSANDRA_DIR' , None )
@@ -476,15 +476,9 @@ def use_cluster(cluster_name, nodes, ipformat=None, start=True, workloads=None,
476
476
elif ccm_options is None :
477
477
ccm_options = CCM_KWARGS .copy ()
478
478
479
- if 'version' in ccm_options and not isinstance (ccm_options ['version' ], Version ):
480
- ccm_options ['version' ] = Version (ccm_options ['version' ])
481
-
482
479
cassandra_version = ccm_options .get ('version' , CCM_VERSION )
483
480
dse_version = ccm_options .get ('version' , DSE_VERSION )
484
481
485
- if 'version' in ccm_options :
486
- ccm_options ['version' ] = ccm_options ['version' ].base_version
487
-
488
482
global CCM_CLUSTER
489
483
if USE_CASS_EXTERNAL :
490
484
if CCM_CLUSTER :
@@ -533,7 +527,7 @@ def use_cluster(cluster_name, nodes, ipformat=None, start=True, workloads=None,
533
527
CCM_CLUSTER = DseCluster (path , cluster_name , ** ccm_options )
534
528
CCM_CLUSTER .set_configuration_options ({'start_native_transport' : True })
535
529
CCM_CLUSTER .set_configuration_options ({'batch_size_warn_threshold_in_kb' : 5 })
536
- if dse_version >= Version ('5.0' ):
530
+ if Version ( dse_version ) >= Version ('5.0' ):
537
531
CCM_CLUSTER .set_configuration_options ({'enable_user_defined_functions' : True })
538
532
CCM_CLUSTER .set_configuration_options ({'enable_scripted_user_defined_functions' : True })
539
533
if dse_version >= Version ('5.1' ):
@@ -555,7 +549,7 @@ def use_cluster(cluster_name, nodes, ipformat=None, start=True, workloads=None,
555
549
})
556
550
if 'spark' in workloads :
557
551
config_options = {"initial_spark_worker_resources" : 0.1 }
558
- if dse_version >= Version ('6.7' ):
552
+ if Version ( dse_version ) >= Version ('6.7' ):
559
553
log .debug ("Disabling AlwaysON SQL for a DSE 6.7 Cluster" )
560
554
config_options ['alwayson_sql_options' ] = {'enabled' : False }
561
555
CCM_CLUSTER .set_dse_configuration_options (config_options )
@@ -567,9 +561,9 @@ def use_cluster(cluster_name, nodes, ipformat=None, start=True, workloads=None,
567
561
else :
568
562
CCM_CLUSTER = CCMCluster (path , cluster_name , ** ccm_options )
569
563
CCM_CLUSTER .set_configuration_options ({'start_native_transport' : True })
570
- if cassandra_version >= Version ('2.2' ):
564
+ if Version ( cassandra_version ) >= Version ('2.2' ):
571
565
CCM_CLUSTER .set_configuration_options ({'enable_user_defined_functions' : True })
572
- if cassandra_version >= Version ('3.0' ):
566
+ if Version ( cassandra_version ) >= Version ('3.0' ):
573
567
CCM_CLUSTER .set_configuration_options ({'enable_scripted_user_defined_functions' : True })
574
568
common .switch_cluster (path , cluster_name )
575
569
CCM_CLUSTER .set_configuration_options (configuration_options )
0 commit comments