mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
Moving setting the LOAD_BALANCING_POLICY_MAP dictionary into the try except block that determines if the cassandra_cql module should be made available.
This commit is contained in:
parent
1404abe773
commit
a3e56f4d60
2 changed files with 18 additions and 17 deletions
1
changelog/62886.fixed
Normal file
1
changelog/62886.fixed
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Moving setting the LOAD_BALANCING_POLICY_MAP dictionary into the try except block that determines if the cassandra_cql module should be made available.
|
|
@ -136,27 +136,27 @@ try:
|
||||||
|
|
||||||
# pylint: enable=import-error,no-name-in-module
|
# pylint: enable=import-error,no-name-in-module
|
||||||
HAS_DRIVER = True
|
HAS_DRIVER = True
|
||||||
|
|
||||||
|
LOAD_BALANCING_POLICY_MAP = {
|
||||||
|
"HostDistance": HostDistance,
|
||||||
|
"LoadBalancingPolicy": LoadBalancingPolicy,
|
||||||
|
"RoundRobinPolicy": RoundRobinPolicy,
|
||||||
|
"DCAwareRoundRobinPolicy": DCAwareRoundRobinPolicy,
|
||||||
|
"WhiteListRoundRobinPolicy": WhiteListRoundRobinPolicy,
|
||||||
|
"TokenAwarePolicy": TokenAwarePolicy,
|
||||||
|
"HostFilterPolicy": HostFilterPolicy,
|
||||||
|
"SimpleConvictionPolicy": SimpleConvictionPolicy,
|
||||||
|
"ExponentialReconnectionPolicy": ExponentialReconnectionPolicy,
|
||||||
|
"RetryPolicy": RetryPolicy,
|
||||||
|
"IdentityTranslator": IdentityTranslator,
|
||||||
|
"NoSpeculativeExecutionPlan": NoSpeculativeExecutionPlan,
|
||||||
|
"NoSpeculativeExecutionPolicy": NoSpeculativeExecutionPolicy,
|
||||||
|
}
|
||||||
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
LOAD_BALANCING_POLICY_MAP = {
|
|
||||||
"HostDistance": HostDistance,
|
|
||||||
"LoadBalancingPolicy": LoadBalancingPolicy,
|
|
||||||
"RoundRobinPolicy": RoundRobinPolicy,
|
|
||||||
"DCAwareRoundRobinPolicy": DCAwareRoundRobinPolicy,
|
|
||||||
"WhiteListRoundRobinPolicy": WhiteListRoundRobinPolicy,
|
|
||||||
"TokenAwarePolicy": TokenAwarePolicy,
|
|
||||||
"HostFilterPolicy": HostFilterPolicy,
|
|
||||||
"SimpleConvictionPolicy": SimpleConvictionPolicy,
|
|
||||||
"ExponentialReconnectionPolicy": ExponentialReconnectionPolicy,
|
|
||||||
"RetryPolicy": RetryPolicy,
|
|
||||||
"IdentityTranslator": IdentityTranslator,
|
|
||||||
"NoSpeculativeExecutionPlan": NoSpeculativeExecutionPlan,
|
|
||||||
"NoSpeculativeExecutionPolicy": NoSpeculativeExecutionPolicy,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def __virtual__():
|
def __virtual__():
|
||||||
"""
|
"""
|
||||||
Return virtual name of the module only if the python driver can be loaded.
|
Return virtual name of the module only if the python driver can be loaded.
|
||||||
|
|
Loading…
Add table
Reference in a new issue