kaqing 2.0.30__py3-none-any.whl → 2.0.31__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,9 @@
1
- import click
2
-
3
1
  from adam.commands.command import Command
4
- from adam.commands.command_helpers import ClusterOrPodCommandHelper
5
- from adam.commands.cql_utils import parse_cql_desc_tables, run_cql
2
+ from adam.commands.cql_utils import tables as get_tables, run_cql
6
3
  from adam.config import Config
7
4
  from adam.pod_exec_result import PodExecResult
8
5
  from adam.repl_state import ReplState, RequiredState
9
- from adam.utils import log, log2
6
+ from adam.utils import log2
10
7
 
11
8
  class AlterTables(Command):
12
9
  COMMAND = 'alter tables with'
@@ -47,16 +44,16 @@ class AlterTables(Command):
47
44
  args, include_reaper = Command.extract_options(args, '--include-reaper')
48
45
  arg_str = ' '.join(args)
49
46
 
50
- r: list[PodExecResult] = run_cql(state, 'describe tables', show_out=False, on_any=True)
51
- if not r:
52
- log2('No pod is available')
53
- return 'no-pod'
47
+ # r: list[PodExecResult] = run_cql(state, 'describe tables', show_out=False, on_any=True)
48
+ # if not r:
49
+ # log2('No pod is available')
50
+ # return 'no-pod'
54
51
 
55
52
  excludes = [e.strip(' \r\n') for e in Config().get(
56
53
  'cql.alter-tables.excludes',
57
54
  'system_auth,system_traces,reaper_db,system_distributed,system_views,system,system_schema,system_virtual_schema').split(',')]
58
55
  batching = Config().get('cql.alter-tables.batching', True)
59
- tables = parse_cql_desc_tables(r[0].stdout)
56
+ tables = get_tables(state, on_any=True)
60
57
  for k, v in tables.items():
61
58
  if k not in excludes or k == 'reaper_db' and include_reaper:
62
59
  if batching:
@@ -1,6 +1,7 @@
1
1
  import functools
2
2
  import re
3
3
 
4
+ from adam.config import Config
4
5
  from adam.k8s_utils.cassandra_clusters import CassandraClusters
5
6
  from adam.k8s_utils.cassandra_nodes import CassandraNodes
6
7
  from adam.k8s_utils.secrets import Secrets
@@ -10,6 +11,8 @@ from adam.utils import log2
10
11
 
11
12
  @functools.lru_cache()
12
13
  def keyspaces(sts: str, namespace: str):
14
+ Config().wait_log("Inspecting Cassandra Keyspaces...")
15
+
13
16
  user, pw = Secrets.get_user_pass(sts, namespace, secret_path='cql.secret')
14
17
  command = f'cqlsh -u {user} -p {pw} -e "describe keyspaces"'
15
18
 
@@ -20,6 +23,18 @@ def keyspaces(sts: str, namespace: str):
20
23
 
21
24
  return parse_cql_desc_keyspaces(r[0].stdout)
22
25
 
26
+ def table_names(state: ReplState):
27
+ return [f'{k}.{t}' for k, ts in tables(state, on_any=True).items() for t in ts]
28
+
29
+ @functools.lru_cache()
30
+ def tables(state: ReplState, on_any=False):
31
+ r: list[PodExecResult] = run_cql(state, 'describe tables', show_out=False, on_any=on_any)
32
+ if not r:
33
+ log2('No pod is available')
34
+ return []
35
+
36
+ return parse_cql_desc_tables(r[0].stdout)
37
+
23
38
  def run_cql(state: ReplState, cql: str, opts: list = [], show_out = False, use_single_quotes = False, on_any = False):
24
39
  user, pw = Secrets.get_user_pass(state.sts if state.sts else state.pod, state.namespace, secret_path='cql.secret')
25
40
  if use_single_quotes:
adam/commands/cqlsh.py CHANGED
@@ -2,7 +2,7 @@ import click
2
2
 
3
3
  from adam.commands.command import Command
4
4
  from adam.commands.command_helpers import ClusterOrPodCommandHelper
5
- from adam.commands.cql_utils import run_cql
5
+ from adam.commands.cql_utils import run_cql, table_names, tables
6
6
  from adam.repl_state import ReplState, RequiredState
7
7
  from adam.utils import log, log2
8
8
 
@@ -54,12 +54,13 @@ class Cqlsh(Command):
54
54
 
55
55
  def completion(self, state: ReplState) -> dict[str, any]:
56
56
  if state.sts or state.pod:
57
+ ts = table_names(state)
57
58
  return {Cqlsh.COMMAND: None} | {
58
- 'delete': {'from': None},
59
- 'insert': {'into': None},
60
- 'select': None,
61
- 'update': None,
62
- 'describe': {'keyspaces': None},
59
+ 'delete': {'from': {t: {'where': None} for t in ts}},
60
+ 'insert': {'into': {t: {'values': None} for t in ts}},
61
+ 'select': {'*': {'from': {t: {'limit': {'1': None}, 'where': None} for t in ts}}},
62
+ 'update': {t: {'set': None} for t in ts},
63
+ 'describe': {'keyspaces': None, 'table': {t: None for t in ts}, 'tables': None},
63
64
  }
64
65
 
65
66
  return {}
File without changes
@@ -1,12 +1,8 @@
1
- import click
2
-
3
1
  from adam.commands.command import Command
4
- from adam.commands.command_helpers import ClusterOrPodCommandHelper
5
- from adam.commands.cql_utils import keyspaces, parse_cql_desc_tables, run_cql
6
- from adam.config import Config
2
+ from adam.commands.cql_utils import keyspaces, run_cql
7
3
  from adam.pod_exec_result import PodExecResult
8
4
  from adam.repl_state import ReplState, RequiredState
9
- from adam.utils import log, log2
5
+ from adam.utils import log2
10
6
 
11
7
  class DescribeKeyspace(Command):
12
8
  COMMAND = 'describe keyspace'
@@ -34,6 +30,8 @@ class DescribeKeyspace(Command):
34
30
  if not self.validate_state(state):
35
31
  return state
36
32
 
33
+ args, all_nodes = Command.extract_options(args, '--all-nodes')
34
+
37
35
  if not args:
38
36
  if state.in_repl:
39
37
  log2('Please enter keyspace name')
@@ -44,7 +42,7 @@ class DescribeKeyspace(Command):
44
42
 
45
43
  return 'missing-keyspace'
46
44
 
47
- r: list[PodExecResult] = run_cql(state, f'describe keyspace {args[0]}', show_out=True, on_any=True)
45
+ r: list[PodExecResult] = run_cql(state, f'describe keyspace {args[0]}', show_out=True, on_any=not all_nodes)
48
46
  if not r:
49
47
  log2('No pod is available')
50
48
  return 'no-pod'
@@ -54,10 +52,9 @@ class DescribeKeyspace(Command):
54
52
 
55
53
  def completion(self, state: ReplState) -> dict[str, any]:
56
54
  if state.sts:
57
- state.wait_log("Inspecting Cassandra Keyspaces...")
58
- return super().completion(state, {ks: None for ks in keyspaces(state.sts, state.namespace)})
55
+ return super().completion(state, {ks: {'--all-nodes': None} for ks in keyspaces(state.sts, state.namespace)})
59
56
 
60
57
  return {}
61
58
 
62
59
  def help(self, _: ReplState) -> str:
63
- return f'{DescribeKeyspace.COMMAND} <keyspace-name>\t describe Cassandra keyspace'
60
+ return f'{DescribeKeyspace.COMMAND} <keyspace-name> [--all-nodes]\t describe Cassandra keyspace'
@@ -0,0 +1,50 @@
1
+ from adam.commands.command import Command
2
+ from adam.commands.cql_utils import keyspaces, run_cql
3
+ from adam.pod_exec_result import PodExecResult
4
+ from adam.repl_state import ReplState, RequiredState
5
+ from adam.utils import log2
6
+
7
+ class DescribeKeyspaces(Command):
8
+ COMMAND = 'describe keyspaces'
9
+
10
+ # the singleton pattern
11
+ def __new__(cls, *args, **kwargs):
12
+ if not hasattr(cls, 'instance'): cls.instance = super(DescribeKeyspaces, cls).__new__(cls)
13
+
14
+ return cls.instance
15
+
16
+ def __init__(self, successor: Command=None):
17
+ super().__init__(successor)
18
+
19
+ def required(self):
20
+ return RequiredState.CLUSTER
21
+
22
+ def command(self):
23
+ return DescribeKeyspaces.COMMAND
24
+
25
+ def run(self, cmd: str, state: ReplState):
26
+ if not(args := self.args(cmd)):
27
+ return super().run(cmd, state)
28
+
29
+ state, args = self.apply_state(args, state)
30
+ if not self.validate_state(state):
31
+ return state
32
+
33
+ _, all_nodes = Command.extract_options(args, '--all-nodes')
34
+
35
+ r: list[PodExecResult] = run_cql(state, f'describe keyspaces', show_out=True, on_any=not all_nodes)
36
+ if not r:
37
+ log2('No pod is available')
38
+ return 'no-pod'
39
+
40
+ # do not continue to cql route
41
+ return state
42
+
43
+ def completion(self, state: ReplState) -> dict[str, any]:
44
+ if state.sts:
45
+ return super().completion(state, {'--all-nodes': None})
46
+
47
+ return {}
48
+
49
+ def help(self, _: ReplState) -> str:
50
+ return f'{DescribeKeyspaces.COMMAND} [--all-nodes]\t describe Cassandra keyspaces'
@@ -0,0 +1,60 @@
1
+ from adam.commands.command import Command
2
+ from adam.commands.cql_utils import keyspaces, run_cql, table_names, tables
3
+ from adam.pod_exec_result import PodExecResult
4
+ from adam.repl_state import ReplState, RequiredState
5
+ from adam.utils import log2
6
+
7
+ class DescribeTable(Command):
8
+ COMMAND = 'describe table'
9
+
10
+ # the singleton pattern
11
+ def __new__(cls, *args, **kwargs):
12
+ if not hasattr(cls, 'instance'): cls.instance = super(DescribeTable, cls).__new__(cls)
13
+
14
+ return cls.instance
15
+
16
+ def __init__(self, successor: Command=None):
17
+ super().__init__(successor)
18
+
19
+ def required(self):
20
+ return RequiredState.CLUSTER
21
+
22
+ def command(self):
23
+ return DescribeTable.COMMAND
24
+
25
+ def run(self, cmd: str, state: ReplState):
26
+ if not(args := self.args(cmd)):
27
+ return super().run(cmd, state)
28
+
29
+ state, args = self.apply_state(args, state)
30
+ if not self.validate_state(state):
31
+ return state
32
+
33
+ args, all_nodes = Command.extract_options(args, '--all-nodes')
34
+
35
+ if not args:
36
+ if state.in_repl:
37
+ log2('Please enter table name')
38
+ else:
39
+ log2('* table name is missing.')
40
+ log2()
41
+ Command.display_help()
42
+
43
+ return 'missing-table'
44
+
45
+ r: list[PodExecResult] = run_cql(state, f'describe table {args[0]}', show_out=True, on_any=not all_nodes)
46
+ if not r:
47
+ log2('No pod is available')
48
+ return 'no-pod'
49
+
50
+ # do not continue to cql route
51
+ return state
52
+
53
+ def completion(self, state: ReplState) -> dict[str, any]:
54
+ if state.sts:
55
+ return super().completion(state, {t: {'--all-nodes': None} for t in table_names(state)})
56
+
57
+ return {}
58
+
59
+ def help(self, _: ReplState) -> str:
60
+ return f'{DescribeTable.COMMAND} <table-name> [--all-nodes]\t describe Cassandra table'
@@ -0,0 +1,50 @@
1
+ from adam.commands.command import Command
2
+ from adam.commands.cql_utils import keyspaces, run_cql, table_names, tables
3
+ from adam.pod_exec_result import PodExecResult
4
+ from adam.repl_state import ReplState, RequiredState
5
+ from adam.utils import log2
6
+
7
+ class DescribeTables(Command):
8
+ COMMAND = 'describe tables'
9
+
10
+ # the singleton pattern
11
+ def __new__(cls, *args, **kwargs):
12
+ if not hasattr(cls, 'instance'): cls.instance = super(DescribeTables, cls).__new__(cls)
13
+
14
+ return cls.instance
15
+
16
+ def __init__(self, successor: Command=None):
17
+ super().__init__(successor)
18
+
19
+ def required(self):
20
+ return RequiredState.CLUSTER
21
+
22
+ def command(self):
23
+ return DescribeTables.COMMAND
24
+
25
+ def run(self, cmd: str, state: ReplState):
26
+ if not(args := self.args(cmd)):
27
+ return super().run(cmd, state)
28
+
29
+ state, args = self.apply_state(args, state)
30
+ if not self.validate_state(state):
31
+ return state
32
+
33
+ _, all_nodes = Command.extract_options(args, '--all-nodes')
34
+
35
+ r: list[PodExecResult] = run_cql(state, f'describe tables', show_out=True, on_any=not all_nodes)
36
+ if not r:
37
+ log2('No pod is available')
38
+ return 'no-pod'
39
+
40
+ # do not continue to cql route
41
+ return state
42
+
43
+ def completion(self, state: ReplState) -> dict[str, any]:
44
+ if state.sts:
45
+ return super().completion(state, {'--all-nodes': None})
46
+
47
+ return {}
48
+
49
+ def help(self, _: ReplState) -> str:
50
+ return f'{DescribeTables.COMMAND} [--all-nodes]\t describe Cassandra tables'
@@ -1,7 +1,7 @@
1
1
  import functools
2
2
 
3
3
  from adam.commands.command import Command
4
- from adam.commands.cql_utils import parse_cql_desc_tables, run_cql
4
+ from adam.commands.cql_utils import run_cql, tables
5
5
  from adam.commands.postgres.postgres_session import PostgresSession
6
6
  from adam.config import Config
7
7
  from adam.pod_exec_result import PodExecResult
@@ -74,10 +74,9 @@ class PreviewTable(Command):
74
74
  if state.device == ReplState.P:
75
75
  if tables := PreviewTable.pg_tables(state.namespace, state.pg_path):
76
76
  return {PreviewTable.COMMAND: {db["name"]: None for db in tables if db["schema"] == PostgresSession.default_schema()}}
77
- else:
78
- if state.pod:
79
- tables = PreviewTable.cql_tables(state)
80
- return {PreviewTable.COMMAND: {f'{k}.{t}': None for k, ts in tables.items() for t in ts}}
77
+ elif state.sts:
78
+ tables = PreviewTable.cql_tables(state)
79
+ return {PreviewTable.COMMAND: {f'{k}.{t}': None for k, ts in tables.items() for t in ts}}
81
80
 
82
81
  return {}
83
82
 
@@ -86,8 +85,16 @@ class PreviewTable(Command):
86
85
 
87
86
  @functools.lru_cache()
88
87
  def cql_tables(state: ReplState):
89
- r: PodExecResult = run_cql(state, 'describe tables', show_out=False)
90
- return parse_cql_desc_tables(r.stdout)
88
+ if state.pod:
89
+ return tables(state)
90
+
91
+ return tables(state, on_any=True)
92
+
93
+ # r: list[PodExecResult] = run_cql(state, 'describe tables', show_out=False, on_any=True)
94
+ # if not r:
95
+ # return []
96
+
97
+ # return parse_cql_desc_tables(r[0].stdout)
91
98
 
92
99
  @functools.lru_cache()
93
100
  def pg_tables(ns: str, pg_path: str):
@@ -149,7 +149,7 @@ class ReaperSession:
149
149
  return ReaperSession.schedules_ids_by_cluster[state.sts]
150
150
 
151
151
  if reaper := ReaperSession.create(state):
152
- state.wait_log("Inspecting Cassandra Reaper...")
152
+ Config().wait_log("Inspecting Cassandra Reaper...")
153
153
 
154
154
  schedules = reaper.schedule_ids(state, show_output = False)
155
155
  ReaperSession.schedules_ids_by_cluster[state.sts] = schedules
adam/config.py CHANGED
@@ -17,6 +17,7 @@ class Config:
17
17
 
18
18
  def __init__(self, path: str = None, is_user_entry = False):
19
19
  if path:
20
+ self.wait_log_flag = False
20
21
  try:
21
22
  with open(path) as f:
22
23
  self.params = cast(dict[str, any], yaml.safe_load(f))
@@ -83,4 +84,12 @@ class Config:
83
84
  log2(f'incorrect path: {key}')
84
85
  return None
85
86
 
86
- return v if v else 'false'
87
+ return v if v else 'false'
88
+
89
+ def wait_log(self, msg: str):
90
+ if not self.wait_log_flag:
91
+ log2(msg)
92
+ self.wait_log_flag = True
93
+
94
+ def clear_wait_log_flag(self):
95
+ self.wait_log_flag = False
@@ -3,6 +3,7 @@ from concurrent.futures import ThreadPoolExecutor
3
3
  import sys
4
4
  from typing import TypeVar
5
5
 
6
+ from adam.config import Config
6
7
  from adam.k8s_utils.cassandra_nodes import CassandraNodes
7
8
  from adam.pod_exec_result import PodExecResult
8
9
  from adam.utils import log2
adam/k8s_utils/pods.py CHANGED
@@ -47,7 +47,7 @@ class Pods:
47
47
 
48
48
  if not max_workers:
49
49
  max_workers = Config().action_workers(action, 0)
50
- if not on_any and max_workers > 0:
50
+ if not on_any and max_workers > 0:
51
51
  # if parallel, node sampling is suppressed
52
52
  if KubeContext.show_parallelism():
53
53
  log2(f'Executing on all nodes from statefulset in parallel...')
@@ -79,7 +79,8 @@ class Pods:
79
79
  log2(f'Executing on {adj} nodes from statefulset...')
80
80
  for pod_name in pods:
81
81
  try:
82
- result = body(None, pod_name, namespace, show_out)
82
+ # disable stdout from the pod_exec, then show the output in a for loop
83
+ result = body(None, pod_name, namespace, False)
83
84
  if post:
84
85
  result = post(result, show_out=show_out)
85
86
  results.append(result)
adam/repl.py CHANGED
@@ -70,7 +70,7 @@ def enter_repl(state: ReplState):
70
70
  cluster = ss[0]
71
71
  state.sts = cluster[0]
72
72
  state.namespace = cluster[1]
73
- state.wait_log(f'Moving to the only Cassandra cluster: {state.sts}@{state.namespace}...')
73
+ Config().wait_log(f'Moving to the only Cassandra cluster: {state.sts}@{state.namespace}...')
74
74
  elif state.device == ReplState.A:
75
75
  if app := Config().get('repl.auto-enter-app', 'c3/c3'):
76
76
  if app != 'no':
@@ -78,9 +78,9 @@ def enter_repl(state: ReplState):
78
78
  state.app_env = ea[0]
79
79
  if len(ea) > 1:
80
80
  state.app_app = ea[1]
81
- state.wait_log(f'Moving to {state.app_env}/{state.app_app}...')
81
+ Config().wait_log(f'Moving to {state.app_env}/{state.app_app}...')
82
82
  else:
83
- state.wait_log(f'Moving to {state.app_env}...')
83
+ Config().wait_log(f'Moving to {state.app_env}...')
84
84
 
85
85
  kb = KeyBindings()
86
86
 
@@ -151,7 +151,7 @@ def enter_repl(state: ReplState):
151
151
  log2(e)
152
152
  Config().debug(traceback.format_exc())
153
153
  finally:
154
- state.clear_wait_log_flag()
154
+ Config().clear_wait_log_flag()
155
155
  if Config().get('debugs.timings', False) and 'cmd' in locals() and 's0' in locals():
156
156
  print('Timing command', cmd, f'{time.time() - s0:.2f}')
157
157
 
@@ -168,5 +168,5 @@ def repl(kubeconfig: str, config: str, param: list[str], cluster:str, namespace:
168
168
  return
169
169
 
170
170
  state = ReplState(device=Config().get('repl.start-drive', 'a'), ns_sts=cluster, namespace=namespace, in_repl=True)
171
- state, _ = state.apply_args(extra_args)
171
+ state, _ = state.apply_device_arg(extra_args)
172
172
  enter_repl(state)
adam/repl_commands.py CHANGED
@@ -11,7 +11,10 @@ from adam.commands.deploy.undeploy import Undeploy
11
11
  from adam.commands.deploy.undeploy_frontend import UndeployFrontend
12
12
  from adam.commands.deploy.undeploy_pg_agent import UndeployPgAgent
13
13
  from adam.commands.deploy.undeploy_pod import UndeployPod
14
- from adam.commands.describe_keyspace import DescribeKeyspace
14
+ from adam.commands.describe.describe_keyspace import DescribeKeyspace
15
+ from adam.commands.describe.describe_keyspaces import DescribeKeyspaces
16
+ from adam.commands.describe.describe_table import DescribeTable
17
+ from adam.commands.describe.describe_tables import DescribeTables
15
18
  from adam.commands.shell import Shell
16
19
  from adam.commands.show.show_app_queues import ShowAppQueues
17
20
  from adam.commands.cp import ClipboardCopy
@@ -76,14 +79,15 @@ class ReplCommands:
76
79
  GetParam(), SetParam(), ShowParams(), ShowKubectlCommands(), ShowLogin(), ShowAdam()]
77
80
 
78
81
  def cassandra_check() -> list[Command]:
79
- return [DescribeKeyspace(), ShowCassandraStatus(), ShowCassandraVersion(), ShowRepairs(), ShowStorage(), ShowProcesses(), Check(), Issues(), NodeTool(), Report()]
82
+ return [DescribeKeyspace(), DescribeKeyspaces(), DescribeTable(), DescribeTables(), ShowCassandraStatus(),
83
+ ShowCassandraVersion(), ShowRepairs(), ShowStorage(), ShowProcesses(), Check(), Issues(), NodeTool(), Report()]
80
84
 
81
85
  def cassandra_ops() -> list[Command]:
82
- # return Medusa.cmd_list() + [Restart(), RollOut(), Watch()] + Reaper.cmd_list() + Repair.cmd_list()
83
86
  return [AlterTables()] + Medusa.cmd_list() + [Restart(), RollOut(), Watch()] + Reaper.cmd_list() + Repair.cmd_list()
84
87
 
85
88
  def tools() -> list[Command]:
86
- return [Cqlsh(), Postgres(), Bash(), Shell(), CodeStart(), CodeStop(), DeployFrontend(), UndeployFrontend(), DeployPod(), UndeployPod(), DeployPgAgent(), UndeployPgAgent()]
89
+ return [Cqlsh(), Postgres(), Bash(), Shell(), CodeStart(), CodeStop(), DeployFrontend(), UndeployFrontend(),
90
+ DeployPod(), UndeployPod(), DeployPgAgent(), UndeployPgAgent()]
87
91
 
88
92
  def app() -> list[Command]:
89
93
  return [ShowAppActions(), ShowAppId(), ShowAppQueues(), AppPing(), App()]
adam/repl_state.py CHANGED
@@ -67,7 +67,7 @@ class ReplState:
67
67
  self.in_repl = in_repl
68
68
  self.bash_session = bash_session
69
69
  self.remote_dir = remote_dir
70
- self.wait_log_flag = False
70
+ # self.wait_log_flag = False
71
71
 
72
72
  if ns_sts:
73
73
  nn = ns_sts.split('@')
@@ -120,6 +120,26 @@ class ReplState:
120
120
 
121
121
  return (state, new_args)
122
122
 
123
+ def apply_device_arg(self, args: list[str], cmd: list[str] = None) -> tuple['ReplState', list[str]]:
124
+ state = self
125
+
126
+ new_args = []
127
+ for index, arg in enumerate(args):
128
+ if index < 6:
129
+ state = copy.copy(state)
130
+
131
+ if arg in [f'{ReplState.A}:', f'{ReplState.C}:', f'{ReplState.P}:']:
132
+ state.device = arg.strip(':')
133
+ else:
134
+ new_args.append(arg)
135
+ else:
136
+ new_args.append(arg)
137
+
138
+ if cmd:
139
+ new_args = new_args[len(cmd):]
140
+
141
+ return (state, new_args)
142
+
123
143
  def validate(self, required: RequiredState = None, pg_required: RequiredState = None, app_required: RequiredState = None):
124
144
  if not pg_required and not app_required:
125
145
  if required == RequiredState.CLUSTER:
@@ -200,12 +220,4 @@ class ReplState:
200
220
  if self.bash_session and self.bash_session.device:
201
221
  self.device = self.bash_session.device
202
222
 
203
- self.bash_session = None
204
-
205
- def wait_log(self, msg: str):
206
- if not self.wait_log_flag:
207
- log2(msg)
208
- self.wait_log_flag = True
209
-
210
- def clear_wait_log_flag(self):
211
- self.wait_log_flag = False
223
+ self.bash_session = None
adam/version.py CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
- __version__ = "2.0.30" #: the working version
4
+ __version__ = "2.0.31" #: the working version
5
5
  __release__ = "1.0.0" #: the release version
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kaqing
3
- Version: 2.0.30
3
+ Version: 2.0.31
4
4
  Summary: UNKNOWN
5
5
  Home-page: UNKNOWN
6
6
  License: UNKNOWN
@@ -4,17 +4,17 @@ adam/apps.py,sha256=UTpUJBAMRFvR8kJZwileGC0UmPvsOjJ_AgvWoGmnIFI,6701
4
4
  adam/batch.py,sha256=o82yYDgyoJw1t87QyAfn9jGqIcWX23ehRI21U4JUTv8,23221
5
5
  adam/cli.py,sha256=03pIZdomAu7IL-GSP6Eun_PKwwISShRAmfx6eVRPGC0,458
6
6
  adam/cli_group.py,sha256=W3zy1BghCtVcEXizq8fBH-93ZRVVwgAyGPzy0sHno1Y,593
7
- adam/config.py,sha256=rnMcBBPXOJCO-MrjleGpW5_-G0OAyxtzvqhZAwffhqI,2543
7
+ adam/config.py,sha256=5v8tf98SPnb9Mmn9EzxV1_EbjVrHo1ElkvyHpFMfbzk,2783
8
8
  adam/embedded_apps.py,sha256=lKPx63mKzJbNmwz0rgL4gF76M9fDGxraYTtNAIGnZ_s,419
9
9
  adam/embedded_params.py,sha256=_9tBKpkSzBfzm-s3tUgZs8DcSVBnPA1iumG0ZRCbZIs,4586
10
10
  adam/log.py,sha256=gg5DK52wLPc9cjykeh0WFHyAk1qI3HEpGaAK8W2dzXY,1146
11
11
  adam/pod_exec_result.py,sha256=nq0xnCNOpUGBSijGF0H-YNrwBc9vUQs4DkvLMIFS5LQ,951
12
- adam/repl.py,sha256=3MmQBHI0I05TayRJY66h6XybmNz-cHAR_RbCB_ZThR0,7259
13
- adam/repl_commands.py,sha256=FZj57MRw-DQk-rJjVieN9Cqmq6j8GA7bkwQMTjTr75g,4518
12
+ adam/repl.py,sha256=Yx7paOgzj-KCX8q46nsr9LQJAmoz-Gvnzo7dH9rwh_0,7277
13
+ adam/repl_commands.py,sha256=Qg5b83NOoVigHB9b5wThhpUUTb-Gxy1b4IkBXQqQJa4,4708
14
14
  adam/repl_session.py,sha256=uIogcvWBh7wd8QQ-p_JgLsyJ8YJgINw5vOd6JIsd7Vo,472
15
- adam/repl_state.py,sha256=QarrUAwYWOz3YTemtaf2opbHLa5a3LEsyuonNwhvOhk,7131
15
+ adam/repl_state.py,sha256=591d7gV6uQSFtm7IWdlIYAHjfAzs9bdvIkwlIAeKddE,7540
16
16
  adam/utils.py,sha256=2DoWsrcaioFFH0-RjT30qelVRPUJqCGTfz_ucfE7F8g,7406
17
- adam/version.py,sha256=mXqrSPTU-W-eJr88DNwAKCqexgkZP8CHrGml1Q_lyNs,139
17
+ adam/version.py,sha256=WSZ2ZAbg3ooZRCiU80NkMKydx70-Lk81JfbRHesWvc8,139
18
18
  adam/checks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  adam/checks/check.py,sha256=Qopr3huYcMu2bzQgb99dEUYjFzkjKHRI76S6KA9b9Rk,702
20
20
  adam/checks/check_context.py,sha256=FEHkQ32jY1EDopQ2uYWqy9v7aEEX1orLpJWhopwAlh4,402
@@ -47,7 +47,7 @@ adam/columns/pod_name.py,sha256=IYw0ZKA7Fb9LaGXENqzZTiTgL98tahwFRtfy0KkKh2Q,280
47
47
  adam/columns/volume_cassandra.py,sha256=9KRNOzjNYganI9avN6zaA5_-7yxD4rV-KNxro9CSUg4,753
48
48
  adam/columns/volume_root.py,sha256=29ujLoCAf9LO75u62LxEaPD58s6ihV-tcK17OeLSOM0,556
49
49
  adam/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
- adam/commands/alter_tables.py,sha256=9roVR8Ba0UWgNLS6Z1eeEFC23726-tU5oqRvNbdFYYY,3662
50
+ adam/commands/alter_tables.py,sha256=Y5cWg0Ow93rIDusbHgxQcC7sSB64LmULTlDxPLybiVM,3578
51
51
  adam/commands/app.py,sha256=7alV8wK801t67_rUe6EmhtHJTl-6K7fGCm6Uz1dDgpM,1963
52
52
  adam/commands/app_ping.py,sha256=Xk7cfefphXM2w-UvpnhNUTZ3BU38f0deehUb2FEyLCI,1337
53
53
  adam/commands/bash.py,sha256=1O9cCl9JHQdttqNAgdB44rO0NjCqHzHv4psAEQMJcjw,2714
@@ -58,9 +58,8 @@ adam/commands/command.py,sha256=lULNtaRJ-S9hTBpJY2rjWwZaQi_S4zGqZrsd89M_wik,2879
58
58
  adam/commands/command_helpers.py,sha256=leOJJK1UXczNTJHN9TGMCbIpUpmpreULvQ-TvnsYS7w,1134
59
59
  adam/commands/commands_utils.py,sha256=ShUcxtDSd9B3NM0GDj3NBvKdmjCGY8qXgeUJpzNF63E,3122
60
60
  adam/commands/cp.py,sha256=dyQViRDPNqsKRkxPb7WyEVIBNw7YB6IfYa2q3VtfzyA,3107
61
- adam/commands/cql_utils.py,sha256=QAZ104eGdFmuim3vW04gEbiU3xDXXUVIlNYDHFX9_Rw,3513
62
- adam/commands/cqlsh.py,sha256=7G1HmfvpYaSZVHYTY7zS3ZI0jjW-a00fND8FKZ4lTNA,2684
63
- adam/commands/describe_keyspace.py,sha256=FmVywSL8N2NwfSLZwpEawaC_KD6kkUDWLuElissI8t4,2028
61
+ adam/commands/cql_utils.py,sha256=v2qQqDecYOJaurimJta2eUCYiHyIL4jtLSC_vg7931c,4001
62
+ adam/commands/cqlsh.py,sha256=4dcemAdCQvpUAkLTpkOEhrbRHimovxSAG8eJ0i4RQM8,2939
64
63
  adam/commands/devices.py,sha256=_f8j6aQzTL8_pFlWYawRuG2Ju1zPjYSPcRIlLnZng10,2397
65
64
  adam/commands/exit.py,sha256=5MWUAmzYBlsrp0CoiTDB13SUkX9Ya18UlGeOIPia6TA,798
66
65
  adam/commands/help.py,sha256=Ey3R1X8w_CMhdADI0t8dSQ28euhDHheJm7NermiGni4,1645
@@ -72,7 +71,7 @@ adam/commands/nodetool.py,sha256=HV9yDzMhRjS4lw6UfV7Hc1pcmeSx5a1jU6cAEKSZ1Bg,233
72
71
  adam/commands/nodetool_commands.py,sha256=5IgWC3rmeDD1cgwqQjiiWzi-wJpJ3n_8pAzz_9phXuk,2635
73
72
  adam/commands/param_get.py,sha256=kPAAppK2T0tEFRnSIVFLDPIIGHhgLA7drJhn8TRyvvE,1305
74
73
  adam/commands/param_set.py,sha256=QDIuqfU80aWCB16OK49yf7XRaRTWwiLkwMsJuVikq9I,1271
75
- adam/commands/preview_table.py,sha256=NbnQRjCQ7SJHzQqtB8RgJn8yydTVknaSF-qklLXDQ58,3383
74
+ adam/commands/preview_table.py,sha256=ROEYHwCOhTxkSNqEyYZ9ASSevNmkN_mHEeH8LXa4gw8,3513
76
75
  adam/commands/pwd.py,sha256=VlgFjxFl66I7Df1YI6cuiEeY6Q13lEavMKfrzHLESKo,2340
77
76
  adam/commands/report.py,sha256=Ky45LIzSlB_X4V12JZWjU3SA2u4_FKRencRTq7psOWU,1944
78
77
  adam/commands/restart.py,sha256=Hik1t5rjH2ATZv4tzwrGB3e44b3dNuATgY327_Nb8Bs,2044
@@ -92,6 +91,11 @@ adam/commands/deploy/undeploy.py,sha256=HDPFSYTOAmSc11OmgKBxq64S4lqyEC8zL1q69CVD
92
91
  adam/commands/deploy/undeploy_frontend.py,sha256=gHekPn7l19JgVbhneKpQ7ModNoDFmzWRMyQv9v4FBxo,1261
93
92
  adam/commands/deploy/undeploy_pg_agent.py,sha256=RYME8no1FT94WpVg-HXDGL1NmLlpE1I9R4htitjaxpo,1319
94
93
  adam/commands/deploy/undeploy_pod.py,sha256=hTcL8cAh7xYPcSm9sgiVFCxPh3SskefBfTmla310oUA,1905
94
+ adam/commands/describe/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
95
+ adam/commands/describe/describe_keyspace.py,sha256=9HN6_bJSmfgNl16rYsWkCD7Q3gHhb3lcpUD_Vjosm70,1935
96
+ adam/commands/describe/describe_keyspaces.py,sha256=uXiVgpJlJz-8Q_rB2u3LWQixdECw6VWinfN70a5c3WQ,1585
97
+ adam/commands/describe/describe_table.py,sha256=8jBiTqvZy0xzZdVTSzW6co6Ku-_seLqkdmrA3QXFgSQ,1902
98
+ adam/commands/describe/describe_tables.py,sha256=RbbDhbyNjB1NyHP5LREAMPpXlgd1zmPlFQIp6jUVCdI,1585
95
99
  adam/commands/medusa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
96
100
  adam/commands/medusa/medusa.py,sha256=Y_yyOZRb6u45wfTVBRp3kuklyYDTSlaAJQdAiymP_8M,2185
97
101
  adam/commands/medusa/medusa_backup.py,sha256=j4DTVWFT-4rzs4gG_pBvjE-JuPsVCJIsnyQjIzJ4EbA,1801
@@ -115,7 +119,7 @@ adam/commands/reaper/reaper_schedule_activate.py,sha256=HbwaSeKaDoR2qgiWgglwM5gm
115
119
  adam/commands/reaper/reaper_schedule_start.py,sha256=oDwH99QVyeKgu-jk5-pB7BzUH_rablCbtumNHXjBnpU,1940
116
120
  adam/commands/reaper/reaper_schedule_stop.py,sha256=_Ld5BRX5pqfIis5i1KG8yif0q5u9RTaFBmmQwkZuOMY,1929
117
121
  adam/commands/reaper/reaper_schedules.py,sha256=-b7eKl0wJT7zMru8qKcLqG5JF0-LfeTcNmlxut9t93E,1263
118
- adam/commands/reaper/reaper_session.py,sha256=gHk1OjcU8xH3Cjjgt_BLnfYPOjS_JSAw6-tggBE_zEY,6647
122
+ adam/commands/reaper/reaper_session.py,sha256=Y-NYEpADhE1XJoaXQKBa8lObtoz4ny8_XB7byV-2RZ0,6650
119
123
  adam/commands/reaper/reaper_status.py,sha256=g3Uep1AVYOThAaZoFjn4bWTKHElZnCleJyYYHP9HayY,1967
120
124
  adam/commands/repair/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
121
125
  adam/commands/repair/repair.py,sha256=5jdKVpP03GYNPuqeGlidOcFLTwl9gIzVDbxgXtUjAjw,2100
@@ -138,7 +142,7 @@ adam/commands/show/show_processes.py,sha256=jAesWDD_l0T6ql6LawnGpev-Glz21tFkegtC
138
142
  adam/commands/show/show_repairs.py,sha256=qpbyeRyLPyBWmn_4yxFu8KIjfd58HGry5pvqNyMwn5I,1477
139
143
  adam/commands/show/show_storage.py,sha256=LUTkH_qnc1d9s4jKsps8jhB4rkUuN7ifMlHSwFqd8_c,1837
140
144
  adam/k8s_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
141
- adam/k8s_utils/cassandra_clusters.py,sha256=lx_jSuxSZEIUvlmDMzPw0d7j2AeiBClLsudNMlK7RaM,1399
145
+ adam/k8s_utils/cassandra_clusters.py,sha256=CBn2GgN2N9voY04gSnZxgXttDxexgvEnSE_cXnHD4fs,1430
142
146
  adam/k8s_utils/cassandra_nodes.py,sha256=Fr0PxjaVxkIhNMxzpNDD4bNeJ4xSE66pVHMbpBd8mzU,1119
143
147
  adam/k8s_utils/config_maps.py,sha256=vc9A-2D1-1mindCMFL1wuysDOXb0RCl4BdjC6B6usXI,1194
144
148
  adam/k8s_utils/custom_resources.py,sha256=cIeaZRQET2DelTGU2f5QsMckh7TddPpWZDFeNK3txeQ,7647
@@ -146,7 +150,7 @@ adam/k8s_utils/deployment.py,sha256=3oZPfPgQfqtAQaxEFL4daUfRSieRAhysmuaWMzUYgXk,
146
150
  adam/k8s_utils/ingresses.py,sha256=ul3Z6fDGc_Cxcn-ExP0vXhZatoShCUZFtpwtCY4Qx7o,3460
147
151
  adam/k8s_utils/jobs.py,sha256=gJpBpjcZ_FlkWJJIlavbHC_bqdmvv-GMVo8UZVh0sOQ,2610
148
152
  adam/k8s_utils/kube_context.py,sha256=xJF_72vUJu-X9MpIYzOIfnj7KEWU7a_sLBR-H3994Y0,3311
149
- adam/k8s_utils/pods.py,sha256=waj02Av78DWFVUIvVhru1fZNm2uZtgG5nhKspsURhzo,10453
153
+ adam/k8s_utils/pods.py,sha256=ljn5tB-j8bdof6X_YWS9Hf5cjAzwmYw61I9_0bwIjCc,10540
150
154
  adam/k8s_utils/secrets.py,sha256=pYaVKXTpx3-QgFtBjznWFq0N6ZcBdxnx21FRe5nBCCo,2305
151
155
  adam/k8s_utils/service_accounts.py,sha256=v2oQSqCrNvt2uRnKlNwR3fjtpUG7oF5nqgzEB7NnT-U,6349
152
156
  adam/k8s_utils/services.py,sha256=EOJJGACVbbRvu5T3rMKqIJqgYic1_MSJ17EA0TJ6UOk,3156
@@ -162,8 +166,8 @@ adam/sso/idp.py,sha256=fvcwUw_URTgsO6ySaqTIw0zQT2qRO1IPSGhf6rPtybo,5804
162
166
  adam/sso/idp_login.py,sha256=QAtCUeDTVWliJy40RK_oac8Vgybr13xH8wzeBoxPaa8,1754
163
167
  adam/sso/idp_session.py,sha256=9BUHNRf70u4rVKrVY1HKPOEmOviXvkjam8WJxmXSKIM,1735
164
168
  adam/sso/sso_config.py,sha256=5N8WZgIJQBtHUy585XLRWKjpU87_v6QluyNK9E27D5s,2459
165
- kaqing-2.0.30.dist-info/METADATA,sha256=pgrZuwOMEBEQzmy-9TyioV4GmY7-4nQYJp5FQa3QmYQ,132
166
- kaqing-2.0.30.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
167
- kaqing-2.0.30.dist-info/entry_points.txt,sha256=SkzhuQJUWsXOzHeZ5TgQ2c3_g53UGK23zzJU_JTZOZI,39
168
- kaqing-2.0.30.dist-info/top_level.txt,sha256=8_2PZkwBb-xDcnc8a2rAbQeJhXKXskc7zTP7pSPa1fw,5
169
- kaqing-2.0.30.dist-info/RECORD,,
169
+ kaqing-2.0.31.dist-info/METADATA,sha256=SSGMR2e1t9fREOsVU6kFYil93ig3Ei0l2hhV9hlQ8z8,132
170
+ kaqing-2.0.31.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
171
+ kaqing-2.0.31.dist-info/entry_points.txt,sha256=SkzhuQJUWsXOzHeZ5TgQ2c3_g53UGK23zzJU_JTZOZI,39
172
+ kaqing-2.0.31.dist-info/top_level.txt,sha256=8_2PZkwBb-xDcnc8a2rAbQeJhXKXskc7zTP7pSPa1fw,5
173
+ kaqing-2.0.31.dist-info/RECORD,,