forked from riptano/ccm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
extension.py
54 lines (36 loc) · 1.25 KB
/
extension.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
PRE_CLUSTER_START_HOOKS = []
POST_CLUSTER_START_HOOKS = []
PRE_CLUSTER_STOP_HOOKS = []
POST_CLUSTER_STOP_HOOKS = []
APPEND_TO_CLUSTER_CONFIG_HOOKS = []
LOAD_FROM_CLUSTER_CONFIG_HOOKS = []
APPEND_TO_SERVER_ENV_HOOKS = []
APPEND_TO_CLIENT_ENV_HOOKS = []
APPEND_TO_CQLSH_ARGS_HOOKS = []
def pre_cluster_start(cluster):
for hook in PRE_CLUSTER_START_HOOKS:
hook(cluster)
def post_cluster_start(cluster):
for hook in POST_CLUSTER_START_HOOKS:
hook(cluster)
def pre_cluster_stop(cluster):
for hook in PRE_CLUSTER_STOP_HOOKS:
hook(cluster)
def post_cluster_stop(cluster):
for hook in POST_CLUSTER_STOP_HOOKS:
hook(cluster)
def append_to_cluster_config(cluster, config_map):
for hook in APPEND_TO_CLUSTER_CONFIG_HOOKS:
hook(cluster, config_map)
def load_from_cluster_config(cluster, config_map):
for hook in LOAD_FROM_CLUSTER_CONFIG_HOOKS:
hook(cluster, config_map)
def append_to_server_env(node, env):
for hook in APPEND_TO_SERVER_ENV_HOOKS:
hook(node, env)
def append_to_client_env(node, env):
for hook in APPEND_TO_CLIENT_ENV_HOOKS:
hook(node, env)
def append_to_cqlsh_args(node, env, args):
for hook in APPEND_TO_CQLSH_ARGS_HOOKS:
hook(node, env, args)