| 1033 | |
| 1034 | |
| 1035 | class TestCluster(object): |
| 1036 | __test__ = False |
| 1037 | DEFAULT_PROTOCOL_VERSION = default_protocol_version |
| 1038 | DEFAULT_CASSANDRA_IP = CASSANDRA_IP |
| 1039 | DEFAULT_ALLOW_BETA = ALLOW_BETA_PROTOCOL |
| 1040 | |
| 1041 | def __new__(cls, **kwargs): |
| 1042 | if 'protocol_version' not in kwargs: |
| 1043 | kwargs['protocol_version'] = cls.DEFAULT_PROTOCOL_VERSION |
| 1044 | if 'contact_points' not in kwargs: |
| 1045 | kwargs['contact_points'] = [cls.DEFAULT_CASSANDRA_IP] |
| 1046 | if 'allow_beta_protocol_version' not in kwargs: |
| 1047 | kwargs['allow_beta_protocol_version'] = cls.DEFAULT_ALLOW_BETA |
| 1048 | return Cluster(**kwargs) |
| 1049 | |
| 1050 | # Subclass of CCMCluster (i.e. ccmlib.cluster.Cluster) which transparently performs |
| 1051 | # conversion of cassandra.yml directives into something matching the new syntax |
no outgoing calls