kaqing 2.0.98__py3-none-any.whl → 2.0.171__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.
- adam/__init__.py +0 -2
- adam/app_session.py +9 -7
- adam/batch.py +4 -18
- adam/checks/check_utils.py +14 -46
- adam/checks/cpu.py +7 -1
- adam/checks/cpu_metrics.py +52 -0
- adam/columns/columns.py +3 -1
- adam/columns/cpu.py +3 -1
- adam/columns/cpu_metrics.py +22 -0
- adam/commands/__init__.py +15 -0
- adam/commands/alter_tables.py +50 -61
- adam/commands/app_cmd.py +38 -0
- adam/commands/app_ping.py +8 -14
- adam/commands/audit/audit.py +43 -30
- adam/commands/audit/audit_repair_tables.py +26 -46
- adam/commands/audit/audit_run.py +50 -0
- adam/commands/audit/show_last10.py +48 -0
- adam/commands/audit/show_slow10.py +47 -0
- adam/commands/audit/show_top10.py +45 -0
- adam/commands/audit/utils_show_top10.py +59 -0
- adam/commands/bash/__init__.py +5 -0
- adam/commands/bash/bash.py +36 -0
- adam/commands/bash/bash_completer.py +93 -0
- adam/commands/bash/utils_bash.py +16 -0
- adam/commands/cat.py +50 -0
- adam/commands/cd.py +15 -91
- adam/commands/check.py +23 -18
- adam/commands/cli_commands.py +2 -3
- adam/commands/code.py +57 -0
- adam/commands/command.py +96 -40
- adam/commands/commands_utils.py +9 -19
- adam/commands/cp.py +33 -39
- adam/commands/cql/cql_completions.py +30 -8
- adam/commands/cql/cqlsh.py +12 -27
- adam/commands/cql/utils_cql.py +343 -0
- adam/commands/deploy/code_start.py +7 -10
- adam/commands/deploy/code_stop.py +4 -21
- adam/commands/deploy/code_utils.py +3 -3
- adam/commands/deploy/deploy.py +4 -21
- adam/commands/deploy/deploy_frontend.py +14 -17
- adam/commands/deploy/deploy_pg_agent.py +3 -6
- adam/commands/deploy/deploy_pod.py +67 -73
- adam/commands/deploy/deploy_utils.py +14 -24
- adam/commands/deploy/undeploy.py +4 -21
- adam/commands/deploy/undeploy_frontend.py +4 -7
- adam/commands/deploy/undeploy_pg_agent.py +6 -8
- adam/commands/deploy/undeploy_pod.py +11 -12
- adam/commands/devices/device.py +118 -0
- adam/commands/devices/device_app.py +173 -0
- adam/commands/devices/device_auit_log.py +49 -0
- adam/commands/devices/device_cass.py +185 -0
- adam/commands/devices/device_export.py +86 -0
- adam/commands/devices/device_postgres.py +144 -0
- adam/commands/devices/devices.py +25 -0
- adam/commands/exit.py +1 -4
- adam/commands/export/__init__.py +0 -0
- adam/commands/export/clean_up_all_export_sessions.py +37 -0
- adam/commands/export/clean_up_export_sessions.py +51 -0
- adam/commands/export/drop_export_database.py +55 -0
- adam/commands/export/drop_export_databases.py +43 -0
- adam/commands/export/export.py +53 -0
- adam/commands/export/export_databases.py +170 -0
- adam/commands/export/export_handlers.py +71 -0
- adam/commands/export/export_select.py +81 -0
- adam/commands/export/export_select_x.py +54 -0
- adam/commands/export/export_use.py +52 -0
- adam/commands/export/exporter.py +352 -0
- adam/commands/export/import_session.py +40 -0
- adam/commands/export/importer.py +67 -0
- adam/commands/export/importer_athena.py +80 -0
- adam/commands/export/importer_sqlite.py +47 -0
- adam/commands/export/show_column_counts.py +54 -0
- adam/commands/export/show_export_databases.py +36 -0
- adam/commands/export/show_export_session.py +48 -0
- adam/commands/export/show_export_sessions.py +44 -0
- adam/commands/export/utils_export.py +314 -0
- adam/commands/help.py +10 -6
- adam/commands/intermediate_command.py +49 -0
- adam/commands/issues.py +14 -40
- adam/commands/kubectl.py +38 -0
- adam/commands/login.py +28 -24
- adam/commands/logs.py +4 -6
- adam/commands/ls.py +11 -116
- adam/commands/medusa/medusa.py +4 -22
- adam/commands/medusa/medusa_backup.py +20 -24
- adam/commands/medusa/medusa_restore.py +30 -32
- adam/commands/medusa/medusa_show_backupjobs.py +16 -17
- adam/commands/medusa/medusa_show_restorejobs.py +12 -17
- adam/commands/nodetool.py +11 -17
- adam/commands/param_get.py +11 -12
- adam/commands/param_set.py +9 -10
- adam/commands/postgres/postgres.py +43 -36
- adam/commands/postgres/{postgres_session.py → postgres_context.py} +80 -46
- adam/commands/postgres/postgres_ls.py +4 -8
- adam/commands/postgres/postgres_preview.py +5 -9
- adam/commands/postgres/psql_completions.py +2 -2
- adam/commands/postgres/utils_postgres.py +66 -0
- adam/commands/preview_table.py +8 -61
- adam/commands/pwd.py +14 -44
- adam/commands/reaper/reaper.py +4 -24
- adam/commands/reaper/reaper_forward.py +48 -55
- adam/commands/reaper/reaper_forward_session.py +6 -0
- adam/commands/reaper/reaper_forward_stop.py +10 -16
- adam/commands/reaper/reaper_restart.py +7 -14
- adam/commands/reaper/reaper_run_abort.py +11 -30
- adam/commands/reaper/reaper_runs.py +42 -57
- adam/commands/reaper/reaper_runs_abort.py +29 -49
- adam/commands/reaper/reaper_schedule_activate.py +11 -30
- adam/commands/reaper/reaper_schedule_start.py +10 -29
- adam/commands/reaper/reaper_schedule_stop.py +10 -29
- adam/commands/reaper/reaper_schedules.py +4 -14
- adam/commands/reaper/reaper_status.py +8 -16
- adam/commands/reaper/utils_reaper.py +196 -0
- adam/commands/repair/repair.py +4 -22
- adam/commands/repair/repair_log.py +4 -7
- adam/commands/repair/repair_run.py +27 -29
- adam/commands/repair/repair_scan.py +31 -34
- adam/commands/repair/repair_stop.py +4 -7
- adam/commands/report.py +25 -21
- adam/commands/restart.py +25 -26
- adam/commands/rollout.py +19 -24
- adam/commands/shell.py +5 -4
- adam/commands/show/show.py +6 -19
- adam/commands/show/show_app_actions.py +26 -22
- adam/commands/show/show_app_id.py +8 -11
- adam/commands/show/show_app_queues.py +7 -10
- adam/commands/show/{show_repairs.py → show_cassandra_repairs.py} +8 -17
- adam/commands/show/show_cassandra_status.py +29 -33
- adam/commands/show/show_cassandra_version.py +4 -14
- adam/commands/show/show_commands.py +19 -21
- adam/commands/show/show_host.py +1 -1
- adam/commands/show/show_login.py +26 -24
- adam/commands/show/show_processes.py +16 -18
- adam/commands/show/show_storage.py +10 -20
- adam/commands/watch.py +26 -29
- adam/config.py +5 -14
- adam/embedded_params.py +1 -1
- adam/pod_exec_result.py +7 -1
- adam/repl.py +95 -131
- adam/repl_commands.py +48 -20
- adam/repl_state.py +270 -61
- adam/sql/sql_completer.py +105 -63
- adam/sql/sql_state_machine.py +618 -0
- adam/sql/term_completer.py +3 -0
- adam/sso/authn_ad.py +6 -5
- adam/sso/authn_okta.py +3 -3
- adam/sso/cred_cache.py +3 -2
- adam/sso/idp.py +3 -3
- adam/utils.py +439 -3
- adam/utils_app.py +98 -0
- adam/utils_athena.py +140 -87
- adam/utils_audits.py +106 -0
- adam/utils_issues.py +32 -0
- adam/utils_k8s/app_clusters.py +28 -0
- adam/utils_k8s/app_pods.py +33 -0
- adam/utils_k8s/cassandra_clusters.py +22 -20
- adam/utils_k8s/cassandra_nodes.py +4 -4
- adam/utils_k8s/custom_resources.py +5 -0
- adam/utils_k8s/ingresses.py +2 -2
- adam/utils_k8s/k8s.py +87 -0
- adam/utils_k8s/pods.py +77 -68
- adam/utils_k8s/secrets.py +4 -4
- adam/utils_k8s/service_accounts.py +5 -4
- adam/utils_k8s/services.py +2 -2
- adam/utils_k8s/statefulsets.py +1 -12
- adam/utils_net.py +4 -4
- adam/utils_repl/__init__.py +0 -0
- adam/utils_repl/automata_completer.py +48 -0
- adam/utils_repl/repl_completer.py +46 -0
- adam/utils_repl/state_machine.py +173 -0
- adam/utils_sqlite.py +109 -0
- adam/version.py +1 -1
- {kaqing-2.0.98.dist-info → kaqing-2.0.171.dist-info}/METADATA +1 -1
- kaqing-2.0.171.dist-info/RECORD +236 -0
- adam/commands/app.py +0 -67
- adam/commands/bash.py +0 -92
- adam/commands/cql/cql_table_completer.py +0 -8
- adam/commands/cql/cql_utils.py +0 -115
- adam/commands/describe/describe.py +0 -47
- adam/commands/describe/describe_keyspace.py +0 -60
- adam/commands/describe/describe_keyspaces.py +0 -49
- adam/commands/describe/describe_schema.py +0 -49
- adam/commands/describe/describe_table.py +0 -60
- adam/commands/describe/describe_tables.py +0 -49
- adam/commands/devices.py +0 -118
- adam/commands/postgres/postgres_utils.py +0 -31
- adam/commands/postgres/psql_table_completer.py +0 -11
- adam/commands/reaper/reaper_session.py +0 -159
- adam/sql/state_machine.py +0 -460
- kaqing-2.0.98.dist-info/RECORD +0 -191
- /adam/commands/{describe → devices}/__init__.py +0 -0
- {kaqing-2.0.98.dist-info → kaqing-2.0.171.dist-info}/WHEEL +0 -0
- {kaqing-2.0.98.dist-info → kaqing-2.0.171.dist-info}/entry_points.txt +0 -0
- {kaqing-2.0.98.dist-info → kaqing-2.0.171.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
from abc import abstractmethod
|
|
2
|
+
from typing import Generic, TypeVar
|
|
3
|
+
|
|
4
|
+
__all__ = [
|
|
5
|
+
'State',
|
|
6
|
+
'StateMachine',
|
|
7
|
+
]
|
|
8
|
+
|
|
9
|
+
T = TypeVar('T')
|
|
10
|
+
|
|
11
|
+
class State:
|
|
12
|
+
def __init__(self, state: str, comeback_token: str = None, comeback_state: str = None):
|
|
13
|
+
self.state = state
|
|
14
|
+
self.comeback_token = comeback_token
|
|
15
|
+
self.comeback_state = comeback_state
|
|
16
|
+
self.context: dict[str, str] = {}
|
|
17
|
+
|
|
18
|
+
def __str__(self):
|
|
19
|
+
return f'{self.state if self.state else None} comeback[{self.comeback_token} {self.comeback_state}]'
|
|
20
|
+
|
|
21
|
+
class StateMachine(Generic[T]):
|
|
22
|
+
@abstractmethod
|
|
23
|
+
def spec(self) -> str:
|
|
24
|
+
return None
|
|
25
|
+
|
|
26
|
+
@abstractmethod
|
|
27
|
+
def keywords(self) -> list[str]:
|
|
28
|
+
return None
|
|
29
|
+
|
|
30
|
+
def expandable_names(self):
|
|
31
|
+
return []
|
|
32
|
+
|
|
33
|
+
def incomplete_name_transition_condition(self, from_s: str, token: str, to_s: str, suggestions: str) -> list[str]:
|
|
34
|
+
if not suggestions:
|
|
35
|
+
return None
|
|
36
|
+
|
|
37
|
+
tokens = [token]
|
|
38
|
+
if '|' in token:
|
|
39
|
+
tokens = token.split('|')
|
|
40
|
+
|
|
41
|
+
if 'name' not in tokens:
|
|
42
|
+
return None
|
|
43
|
+
|
|
44
|
+
return tokens
|
|
45
|
+
|
|
46
|
+
def __init__(self, indent=0, push_level = 0, debug = False):
|
|
47
|
+
self.states: dict[str, State] = {}
|
|
48
|
+
self.suggestions: dict[str, str] = {}
|
|
49
|
+
|
|
50
|
+
self.indent = indent
|
|
51
|
+
self.push_level = push_level
|
|
52
|
+
self.comebacks: dict[int, str] = {}
|
|
53
|
+
self.debug = debug
|
|
54
|
+
|
|
55
|
+
from_ss_to_add = []
|
|
56
|
+
from_ss = ['']
|
|
57
|
+
words: str = None
|
|
58
|
+
for l in self.spec():
|
|
59
|
+
t_and_w = l.split('^')
|
|
60
|
+
if len(t_and_w) > 1:
|
|
61
|
+
words = t_and_w[1].strip()
|
|
62
|
+
else:
|
|
63
|
+
words = None
|
|
64
|
+
|
|
65
|
+
tks = t_and_w[0].strip(' ').split('>')
|
|
66
|
+
if not l.startswith('-'):
|
|
67
|
+
if words:
|
|
68
|
+
self.suggestions[tks[0].strip(' ')] = words
|
|
69
|
+
|
|
70
|
+
if len(tks) == 1:
|
|
71
|
+
from_ss_to_add.append(tks[0].strip(' '))
|
|
72
|
+
continue
|
|
73
|
+
|
|
74
|
+
from_ss = []
|
|
75
|
+
from_ss.extend(from_ss_to_add)
|
|
76
|
+
from_ss_to_add = []
|
|
77
|
+
from_ss.append(tks[0].strip(' '))
|
|
78
|
+
|
|
79
|
+
self.add_transitions(from_ss, tks, words)
|
|
80
|
+
|
|
81
|
+
def add_transitions(self, from_ss: list[str], tks: list[str], words: str):
|
|
82
|
+
token = tks[1].strip(' ')
|
|
83
|
+
if len(tks) > 2:
|
|
84
|
+
to_s = tks[2].strip(' ')
|
|
85
|
+
for from_s in from_ss:
|
|
86
|
+
self.add_whitespace_transition(from_s, to_s)
|
|
87
|
+
self.add_transition(from_s, token, to_s)
|
|
88
|
+
self.add_incomplete_name_transition(from_s, token, to_s, words)
|
|
89
|
+
elif '<' in tks[0]:
|
|
90
|
+
from_and_token = tks[0].split('<')
|
|
91
|
+
if len(from_and_token) > 1:
|
|
92
|
+
for from_s in from_ss:
|
|
93
|
+
self.add_comeback_transition(from_s, from_and_token[1], tks[1].strip(' '))
|
|
94
|
+
|
|
95
|
+
def add_whitespace_transition(self, from_s: str, to_s: str):
|
|
96
|
+
if self.witespace_transition_condition(from_s, to_s):
|
|
97
|
+
if self.debug:
|
|
98
|
+
print(f'{from_s[:-1]} > _ = {to_s}')
|
|
99
|
+
self.states[f'{from_s[:-1]} > _'] = State(from_s)
|
|
100
|
+
|
|
101
|
+
def witespace_transition_condition(self, from_s: str, to_s: str):
|
|
102
|
+
return from_s.endswith('_')
|
|
103
|
+
|
|
104
|
+
def add_incomplete_name_transition(self, from_s: str, token: str, to_s: str, words: str):
|
|
105
|
+
if tokens := self.incomplete_name_transition_condition(from_s, token, to_s, words):
|
|
106
|
+
self.suggestions[to_s] = words
|
|
107
|
+
for token in tokens:
|
|
108
|
+
if self.debug:
|
|
109
|
+
print(f'{to_s} > {token} = {to_s}')
|
|
110
|
+
self.states[f'{to_s} > {token}'] = State(to_s)
|
|
111
|
+
|
|
112
|
+
def add_transition(self, from_s: str, token: str, to_s: str):
|
|
113
|
+
tokens = [token]
|
|
114
|
+
if '|' in token:
|
|
115
|
+
tokens = token.split('|')
|
|
116
|
+
|
|
117
|
+
for t in tokens:
|
|
118
|
+
if t == '_or_':
|
|
119
|
+
t = '||'
|
|
120
|
+
elif t == 'pipe':
|
|
121
|
+
t = '|'
|
|
122
|
+
elif t == '_rdr0_':
|
|
123
|
+
t = '<'
|
|
124
|
+
elif t == '_rdr1_':
|
|
125
|
+
t = '>'
|
|
126
|
+
elif t == '_rdr2_':
|
|
127
|
+
t = '2>'
|
|
128
|
+
|
|
129
|
+
if self.debug:
|
|
130
|
+
print(f'{from_s} > {t} = {to_s}')
|
|
131
|
+
self.states[f'{from_s} > {t}'] = State(to_s)
|
|
132
|
+
|
|
133
|
+
def add_comeback_transition(self, from_s: str, token: str, to_s: str):
|
|
134
|
+
key = f'{from_s} > ('
|
|
135
|
+
orig = self.states[key]
|
|
136
|
+
if not orig:
|
|
137
|
+
raise Exception(f'from state not found for {key}')
|
|
138
|
+
|
|
139
|
+
orig.comeback_token = token
|
|
140
|
+
orig.comeback_state = to_s
|
|
141
|
+
if self.debug:
|
|
142
|
+
print(f'{from_s} > ) = {to_s}')
|
|
143
|
+
self.states[key] = orig
|
|
144
|
+
|
|
145
|
+
def traverse_tokens(self, tokens: list[str], state: State = State('')):
|
|
146
|
+
for token in tokens[:-1]:
|
|
147
|
+
if not token:
|
|
148
|
+
continue
|
|
149
|
+
|
|
150
|
+
if self.debug:
|
|
151
|
+
print(f'{token} ', end='')
|
|
152
|
+
|
|
153
|
+
last_name = None
|
|
154
|
+
|
|
155
|
+
if (t := token.lower()) in self.keywords():
|
|
156
|
+
token = t
|
|
157
|
+
elif token in ['*', ',', '.']:
|
|
158
|
+
pass
|
|
159
|
+
else:
|
|
160
|
+
last_name = token
|
|
161
|
+
token = 'word'
|
|
162
|
+
|
|
163
|
+
try:
|
|
164
|
+
context = state.context
|
|
165
|
+
state = self.states[f'{state.state} > {token}']
|
|
166
|
+
state.context = context
|
|
167
|
+
|
|
168
|
+
if last_name:
|
|
169
|
+
state.context['last_name'] = last_name
|
|
170
|
+
except:
|
|
171
|
+
pass
|
|
172
|
+
|
|
173
|
+
return state
|
adam/utils_sqlite.py
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import functools
|
|
2
|
+
import glob
|
|
3
|
+
import os
|
|
4
|
+
import sqlite3
|
|
5
|
+
import pandas
|
|
6
|
+
|
|
7
|
+
from adam.config import Config
|
|
8
|
+
from adam.utils import lines_to_tabular, log, wait_log
|
|
9
|
+
|
|
10
|
+
class CursorHandler:
|
|
11
|
+
def __init__(self, conn: sqlite3.Connection):
|
|
12
|
+
self.conn = conn
|
|
13
|
+
|
|
14
|
+
def __enter__(self):
|
|
15
|
+
self.cursor = self.conn.cursor()
|
|
16
|
+
|
|
17
|
+
return self.cursor
|
|
18
|
+
|
|
19
|
+
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
20
|
+
if self.cursor:
|
|
21
|
+
self.cursor.close()
|
|
22
|
+
|
|
23
|
+
return False
|
|
24
|
+
|
|
25
|
+
# no state utility class
|
|
26
|
+
class SQLite:
|
|
27
|
+
def cursor(conn: sqlite3.Connection):
|
|
28
|
+
return CursorHandler(conn)
|
|
29
|
+
|
|
30
|
+
def local_db_dir():
|
|
31
|
+
return Config().get('export.sqlite.local-db-dir', '/tmp/qing-db')
|
|
32
|
+
|
|
33
|
+
def keyspace(database: str):
|
|
34
|
+
return '_'.join(database.replace(".db", "").split('_')[1:])
|
|
35
|
+
|
|
36
|
+
def connect(session: str):
|
|
37
|
+
os.makedirs(SQLite.local_db_dir(), exist_ok=True)
|
|
38
|
+
|
|
39
|
+
conn = None
|
|
40
|
+
|
|
41
|
+
try:
|
|
42
|
+
conn = sqlite3.connect(f'{SQLite.local_db_dir()}/{session}_root.db')
|
|
43
|
+
with SQLite.cursor(conn) as cursor:
|
|
44
|
+
for d in SQLite.database_names(session):
|
|
45
|
+
if d != f'{session}_root.db':
|
|
46
|
+
q = f"ATTACH DATABASE '{SQLite.local_db_dir()}/{d}' AS {SQLite.keyspace(d)};"
|
|
47
|
+
cursor.execute(q)
|
|
48
|
+
finally:
|
|
49
|
+
pass
|
|
50
|
+
|
|
51
|
+
return conn
|
|
52
|
+
|
|
53
|
+
@functools.lru_cache()
|
|
54
|
+
def database_names(prefix: str = None):
|
|
55
|
+
wait_log('Inspecting export databases...')
|
|
56
|
+
|
|
57
|
+
pattern = f'{SQLite.local_db_dir()}/s*.db'
|
|
58
|
+
if prefix:
|
|
59
|
+
pattern = f'{SQLite.local_db_dir()}/{prefix}*'
|
|
60
|
+
return [os.path.basename(f) for f in glob.glob(pattern)]
|
|
61
|
+
|
|
62
|
+
def clear_cache(cache: str = None):
|
|
63
|
+
SQLite.database_names.cache_clear()
|
|
64
|
+
SQLite.table_names.cache_clear()
|
|
65
|
+
|
|
66
|
+
@functools.lru_cache()
|
|
67
|
+
def table_names(database: str):
|
|
68
|
+
tokens = database.replace('.db', '').split('_')
|
|
69
|
+
ts_prefix = tokens[0]
|
|
70
|
+
keyspace = '_'.join(tokens[1:])
|
|
71
|
+
|
|
72
|
+
conn = None
|
|
73
|
+
tables = []
|
|
74
|
+
try:
|
|
75
|
+
conn = sqlite3.connect(f'{SQLite.local_db_dir()}/{ts_prefix}_{keyspace}.db')
|
|
76
|
+
with SQLite.cursor(conn) as cursor:
|
|
77
|
+
cursor.execute("SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;")
|
|
78
|
+
|
|
79
|
+
tables = [row[0] for row in cursor.fetchall() if row[0] != "sqlite_sequence"]
|
|
80
|
+
|
|
81
|
+
return tables
|
|
82
|
+
except sqlite3.Error as e:
|
|
83
|
+
print(f"Error connecting to or querying the database: {e}")
|
|
84
|
+
return []
|
|
85
|
+
finally:
|
|
86
|
+
if conn:
|
|
87
|
+
conn.close()
|
|
88
|
+
|
|
89
|
+
@functools.lru_cache()
|
|
90
|
+
def column_names(tables: list[str] = [], database: str = None, function: str = 'audit', partition_cols_only = False):
|
|
91
|
+
pass
|
|
92
|
+
|
|
93
|
+
def run_query(query: str, database: str = None, conn_passed = None):
|
|
94
|
+
conn = None
|
|
95
|
+
try:
|
|
96
|
+
if not conn_passed:
|
|
97
|
+
conn = SQLite.connect(database)
|
|
98
|
+
|
|
99
|
+
df = SQLite.query(conn_passed if conn_passed else conn, query)
|
|
100
|
+
lines = ['\t'.join(map(str, line)) for line in df.values.tolist()]
|
|
101
|
+
log(lines_to_tabular(lines, header='\t'.join(df.columns.tolist()), separator='\t'))
|
|
102
|
+
|
|
103
|
+
return len(lines)
|
|
104
|
+
finally:
|
|
105
|
+
if conn:
|
|
106
|
+
conn.close()
|
|
107
|
+
|
|
108
|
+
def query(conn, sql: str) -> tuple[str, str, list]:
|
|
109
|
+
return pandas.read_sql_query(sql, conn)
|
adam/version.py
CHANGED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
adam/__init__.py,sha256=is7iqn2nhRzPymhTEajITEFVyvROZ9GWfNsZX3L5g_o,45
|
|
2
|
+
adam/app_session.py,sha256=ra_BPhHIpvjFAGwoRru4MLU8S4RcxPFNfGea-g2ClKQ,7041
|
|
3
|
+
adam/apps.py,sha256=okYibOEiCVoM5zsPUKaLJZlwlnvWSHKL7U2J1Yk3-Aw,6701
|
|
4
|
+
adam/batch.py,sha256=i63DTlmgNmA7OMCeIR3-iIJGa3kBuGIvRtWlxi475ko,24029
|
|
5
|
+
adam/cli.py,sha256=03pIZdomAu7IL-GSP6Eun_PKwwISShRAmfx6eVRPGC0,458
|
|
6
|
+
adam/cli_group.py,sha256=W3zy1BghCtVcEXizq8fBH-93ZRVVwgAyGPzy0sHno1Y,593
|
|
7
|
+
adam/config.py,sha256=LJWT9eiKhNj6qYDKx8TAkCmlBsxXTxLbYuSppnP5SGA,2697
|
|
8
|
+
adam/embedded_apps.py,sha256=lKPx63mKzJbNmwz0rgL4gF76M9fDGxraYTtNAIGnZ_s,419
|
|
9
|
+
adam/embedded_params.py,sha256=WvNmCJ1YY-_98mwfDaIbz2rRil6dcIOieAV2T5WcQEc,5670
|
|
10
|
+
adam/log.py,sha256=gg5DK52wLPc9cjykeh0WFHyAk1qI3HEpGaAK8W2dzXY,1146
|
|
11
|
+
adam/pod_exec_result.py,sha256=YORij4tRFBOzLEcLQOz3HcKQgltm7T5YaNre1ju8yRc,1245
|
|
12
|
+
adam/repl.py,sha256=4vmSxqn0xD1viizW-EU06rFmcWtwdSQYkIwFOh83X1U,7421
|
|
13
|
+
adam/repl_commands.py,sha256=vZmRonr5hGrX4VIqC9kbpsAn78oNwGfIo22mqc4JQjM,6439
|
|
14
|
+
adam/repl_session.py,sha256=uIogcvWBh7wd8QQ-p_JgLsyJ8YJgINw5vOd6JIsd7Vo,472
|
|
15
|
+
adam/repl_state.py,sha256=ckyoj6j17cxQy0h1jVyxAgDvRRAzJeOS0SV01gzbEs0,15532
|
|
16
|
+
adam/utils.py,sha256=PiRvRqUf4mDpzaAeji2JTqTwpPj44V6gcIQPPZd7k2k,19822
|
|
17
|
+
adam/utils_app.py,sha256=TQM7AH4hCk7Wl88r-rzecEZ7djejp3vtVGvug63kGD8,3024
|
|
18
|
+
adam/utils_athena.py,sha256=94vrzSijnYZu6WlZ9_XS1Z_9G8mburM_B6Hx8BjE3A0,5251
|
|
19
|
+
adam/utils_audits.py,sha256=GZDE6WPJgSGuNqWbiRPgeeuPo_Y4anqBPW3g6d2gcBo,4118
|
|
20
|
+
adam/utils_issues.py,sha256=XDiHDxQcYEvIxwL-fOeIXDRPpKinnggB5sSM3Yo2P-I,1458
|
|
21
|
+
adam/utils_net.py,sha256=byEtNVr8iG9UaD7dM77dN2WEBClB7YNKult7LKFTCOc,428
|
|
22
|
+
adam/utils_sqlite.py,sha256=fEJX7hlNIA8M5eRLqlq2exepVNucceB5Ywg8BbKh-lU,3358
|
|
23
|
+
adam/version.py,sha256=xTrq0v1ljrZzUT2Esn2V_2MsusYef2vgLRe8u48utc8,140
|
|
24
|
+
adam/checks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
|
+
adam/checks/check.py,sha256=Qopr3huYcMu2bzQgb99dEUYjFzkjKHRI76S6KA9b9Rk,702
|
|
26
|
+
adam/checks/check_context.py,sha256=FEHkQ32jY1EDopQ2uYWqy9v7aEEX1orLpJWhopwAlh4,402
|
|
27
|
+
adam/checks/check_result.py,sha256=5_DVNgkCC9t7xFJYNsjd9bfXA1I4vYb6K3kmN8cdMrA,669
|
|
28
|
+
adam/checks/check_utils.py,sha256=Oo7Ps0g4n5BfZbOZgeWqHNAaypidWGkK1ITA_kzs0bc,2694
|
|
29
|
+
adam/checks/compactionstats.py,sha256=NFi9RcRImZqCJBZs3LH851RHmlu4BO0s_QOsvkdUxKQ,2304
|
|
30
|
+
adam/checks/cpu.py,sha256=j1CFzDO77uTpnYW7xUbx0OzHkQksc2IEXLPXenDo2wE,2978
|
|
31
|
+
adam/checks/cpu_metrics.py,sha256=ymDxof0l4PdRp527nFAJae7Yzn7zjAOvDMZiBwS50QY,2023
|
|
32
|
+
adam/checks/disk.py,sha256=y0gwfh-MuEx0Ot7EXf8d7Q0ovbkThFMS1yWrIeeVe84,5214
|
|
33
|
+
adam/checks/gossip.py,sha256=60PeVkhtMWziiYILPwMKfesFjOanIn-nxeZZL5nUHQs,3119
|
|
34
|
+
adam/checks/issue.py,sha256=u3E6yCpDGGJiveKXdpkrKq7HQRTrG7aR2XLCoO-ys7U,498
|
|
35
|
+
adam/checks/memory.py,sha256=1TPoC_eL7QmMMJfaclW3hoSxudsUc4qvrzzb0Z4f5Kw,3056
|
|
36
|
+
adam/checks/status.py,sha256=4IFCesrovCbGKgbJxLr0VxjGGWmmF23ZQNfHUFb5Kyg,2140
|
|
37
|
+
adam/columns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
|
+
adam/columns/column.py,sha256=O_5ptfx136BKdLo8enDvSL3HlId1dkjMM2XUumg1tNA,956
|
|
39
|
+
adam/columns/columns.py,sha256=AqUhIdu8dlaZuA96rWW3TBnR6SdbvQkr02ZGyHZKKmU,1708
|
|
40
|
+
adam/columns/compactions.py,sha256=ybIEYTkDuRTBLIUNurGhu1jhVnf1UEpJ0abo3GTgmKw,928
|
|
41
|
+
adam/columns/cpu.py,sha256=b_kFLUwBFxAkZXmqu-L7stuJDT_5bbEUZPLiTOQaBKg,585
|
|
42
|
+
adam/columns/cpu_metrics.py,sha256=4CWz-hwJhAW00Yd-7jKWRYIPviyjY4THp_FulMW6otc,711
|
|
43
|
+
adam/columns/dir_data.py,sha256=gDLcrwMZ6dEVTmpvc35yX3iNY97mQ5q0eQojm8tZ2so,545
|
|
44
|
+
adam/columns/dir_snapshots.py,sha256=OSseuf7gAvT-_ujLvGt43jF-q7QVJNDcvqOK47QSJbk,451
|
|
45
|
+
adam/columns/gossip.py,sha256=KKUycFG-8YxMh9VYUrYOFwPVvnh-0i19k---DrpW93g,656
|
|
46
|
+
adam/columns/host_id.py,sha256=oqesvFCzUu0utkcH5mhYg0vx7lAW2EIDoezgY_CCP_Y,350
|
|
47
|
+
adam/columns/memory.py,sha256=GinntQroWK6kxn6PrumkJd9ok2skTWXLepM1U6lzc4g,701
|
|
48
|
+
adam/columns/node_address.py,sha256=PqSm2FtR0NAhc-R17sPRJJ3c6eWlJLHPctu8RsCslcM,355
|
|
49
|
+
adam/columns/node_load.py,sha256=Oc-kdfezYBP5eWDug-ijgM48x6XRNjwxxoQDZt_MbQc,349
|
|
50
|
+
adam/columns/node_owns.py,sha256=Iv5FDYV0m3ZM2JK05Fl485ZxDgOxZHDIN9KYNJc6Zdg,349
|
|
51
|
+
adam/columns/node_status.py,sha256=im52GfdETXVJVM00fU5OjJM2FvLZrgqpLkWKCwWhjAs,353
|
|
52
|
+
adam/columns/node_tokens.py,sha256=38D9xJ3uA48gzEYBtIiIUbZJcteM1H4KryzJNn01uZ8,353
|
|
53
|
+
adam/columns/node_utils.py,sha256=ql2StXmASC7equuabZVZEQ_BPTu2KkS99gY_3JXpIvU,774
|
|
54
|
+
adam/columns/pod_name.py,sha256=IYw0ZKA7Fb9LaGXENqzZTiTgL98tahwFRtfy0KkKh2Q,280
|
|
55
|
+
adam/columns/volume_cassandra.py,sha256=9KRNOzjNYganI9avN6zaA5_-7yxD4rV-KNxro9CSUg4,753
|
|
56
|
+
adam/columns/volume_root.py,sha256=29ujLoCAf9LO75u62LxEaPD58s6ihV-tcK17OeLSOM0,556
|
|
57
|
+
adam/commands/__init__.py,sha256=Bq4rke8AOVpOe5lt_UUqJ7fVvo1Wl1IxWKTUc6WF040,663
|
|
58
|
+
adam/commands/alter_tables.py,sha256=X0XaWKIeU1KIcQ5MAQkqDVAGguB2Ri_dUvJC3BlH60M,3581
|
|
59
|
+
adam/commands/app_cmd.py,sha256=mjieddAahG3wnXMOIcrrclVqzqsA-6gRvTLjp6Qr4Gs,1198
|
|
60
|
+
adam/commands/app_ping.py,sha256=VOPaWE2DQjAXlN1uonH2chNItiTUt7HqltQDA2LkwrU,1207
|
|
61
|
+
adam/commands/cat.py,sha256=LAC5kv3-VxMBDB33N4VCi68Dj8nzO8AFRzZR2mI_7a8,1582
|
|
62
|
+
adam/commands/cd.py,sha256=C0ikeXY3voFqfW0Fr2sc8FORFulBJ1q1nTD2UiRSLLs,1290
|
|
63
|
+
adam/commands/check.py,sha256=poaOg2n3crI0o5AAbXfZfFKtALRkTQRBJDRsLBTHqPk,2467
|
|
64
|
+
adam/commands/cli_commands.py,sha256=TGnm2uxtuDRmkNNMlPOpYAXJkgDQEuhDeimBcwsEtC8,3574
|
|
65
|
+
adam/commands/code.py,sha256=8SwSYuMx2QNFB3RUfVPfYVUAf_unEjADx4xvrstepJc,1906
|
|
66
|
+
adam/commands/command.py,sha256=XGGYHwaMZGVMVOp8-RcVT9p8WHgPKBr9YdQ10CBO5mw,5667
|
|
67
|
+
adam/commands/command_helpers.py,sha256=leOJJK1UXczNTJHN9TGMCbIpUpmpreULvQ-TvnsYS7w,1134
|
|
68
|
+
adam/commands/commands_utils.py,sha256=PjhJqqGdKNsUYry4ZU53tlR_NVwc0Fb8J-ZarN0uiD0,2856
|
|
69
|
+
adam/commands/cp.py,sha256=MLxhq4t7DDJGT20u3LVEL_f7Bu8Ch5SxJ3FsOJyftsc,3113
|
|
70
|
+
adam/commands/exit.py,sha256=T7bCEShd6MXQ8rXak7vGZTvqEOejPOUPtbdfy7d8WWA,753
|
|
71
|
+
adam/commands/help.py,sha256=v8VPGfnMC_PY_oqJUlwdAqIeJ9-EicvMEVT1RDKSmyI,1907
|
|
72
|
+
adam/commands/intermediate_command.py,sha256=HBSV0tdocHtpe4g3BDagEp55SpDdMAtOVb_ZWVh8v78,1755
|
|
73
|
+
adam/commands/issues.py,sha256=5evrVBzc4sCMHwQ9LmuGAgoPBINr-OCa9FZMJVJDwH8,1431
|
|
74
|
+
adam/commands/kubectl.py,sha256=kCXIl_9vNDW6CBirCeowQjJ2UhidlCEDBP8XOVIloF8,993
|
|
75
|
+
adam/commands/login.py,sha256=lmtAND1ATW20uLyzf6WQIbdwGzcCZXkySn_o1-m-vJ0,2154
|
|
76
|
+
adam/commands/logs.py,sha256=CS4eh5JWzoXboYSXXpiE6CDsky1Jsu61Q1MZAqGjOB8,1142
|
|
77
|
+
adam/commands/ls.py,sha256=b6EBzjXdlagOkpD_OM77I_n18ikGub5obtuerruA9yA,1298
|
|
78
|
+
adam/commands/nodetool.py,sha256=QUgKWjtPCuoA2vsip7naaf-5XGqHVinhWjsxmIxd8AA,2161
|
|
79
|
+
adam/commands/nodetool_commands.py,sha256=5IgWC3rmeDD1cgwqQjiiWzi-wJpJ3n_8pAzz_9phXuk,2635
|
|
80
|
+
adam/commands/param_get.py,sha256=ExSONU1fqi4kE3GGmWTBoeuLgWjOERWBURhZuwKhNYE,1350
|
|
81
|
+
adam/commands/param_set.py,sha256=brmBcncmI4qUXSkmtf4FJ5JSClYvDa-OB0RQlECXuSw,1308
|
|
82
|
+
adam/commands/preview_table.py,sha256=0vwrF3R_inbffQrf_fBqPs8EOaVQZLk57KszUNl6LpI,1140
|
|
83
|
+
adam/commands/pwd.py,sha256=IfLsilO-x3QufndW2d9x1UWYtuju84C7Rvj2s31pu_Y,1462
|
|
84
|
+
adam/commands/report.py,sha256=IESGEq6akUY2IznKUZV90_5s2gRM4npexFQH7Pa3rAI,2086
|
|
85
|
+
adam/commands/restart.py,sha256=CUjHxdWznqgY2BdYcHHKH2eolj3cPeE5xbMjkIiyJ2A,2202
|
|
86
|
+
adam/commands/rollout.py,sha256=BmlvnVffPGCERfXxdJJFnxtU3yDILp5016N7C-EWCOE,3032
|
|
87
|
+
adam/commands/shell.py,sha256=5Ggyx49H6k2ZA5CYCQPhrC0yx3ROijuT-jiceS7pC1k,879
|
|
88
|
+
adam/commands/watch.py,sha256=q3kJd6YSO_ZxQ107EeIWZsW8m2X7YIGT3QPXjKloTIo,2459
|
|
89
|
+
adam/commands/audit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
90
|
+
adam/commands/audit/audit.py,sha256=pzbPZif1P8JuKZKRHC5VVEizlEttYnLqmtmoUd40goE,3159
|
|
91
|
+
adam/commands/audit/audit_repair_tables.py,sha256=zM9euuedjSoZ4adczijdj95EgNzyp0qyY7xxy8RkG-g,2536
|
|
92
|
+
adam/commands/audit/audit_run.py,sha256=yFrLGRYblEwOgB2nxEjicSVD3ZzcYV4hmH0AoB7u8OE,1698
|
|
93
|
+
adam/commands/audit/show_last10.py,sha256=Jd0YUTPntkLh6YDK6pS-ZIaK2twkRkQCTGfrIe2J63c,1425
|
|
94
|
+
adam/commands/audit/show_slow10.py,sha256=10gI7kJhozSjl0OoqHFHkh0OjwoXV6z5-Iow6rWbMIU,1444
|
|
95
|
+
adam/commands/audit/show_top10.py,sha256=HiwrYtKBwQWwleJZaVn2bhOjfPDSs11R_ivbRWzyMuw,1475
|
|
96
|
+
adam/commands/audit/utils_show_top10.py,sha256=LtRZ0wDPDYQ9S3PlUIBbAP8zYzKPB58n1iIcHLca8P8,1865
|
|
97
|
+
adam/commands/bash/__init__.py,sha256=K4BBF_T-6czi7uqBN-WQg3eNvG-ePJF3IPp8eyGyqmk,163
|
|
98
|
+
adam/commands/bash/bash.py,sha256=AvXehWWltrT9sXttpeGFhRoNO0PAjyNEiqnbxSiNpZI,1168
|
|
99
|
+
adam/commands/bash/bash_completer.py,sha256=IStUg5LLTqc3vjupw33WtXUG9zRQ37BctjDYGDyYEXU,3883
|
|
100
|
+
adam/commands/bash/utils_bash.py,sha256=LmpTVPaM0aEMDqKPFnyEp5EidAyQQiiUkcvRjvOu-20,433
|
|
101
|
+
adam/commands/cql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
102
|
+
adam/commands/cql/cql_completions.py,sha256=EDuzxpbJcZTwt-OqVvNAfo7o_arL1Ni0EpTWvDv-KCg,1452
|
|
103
|
+
adam/commands/cql/cqlsh.py,sha256=ddb1JBdCs8sMHt8L-1gDHIir9hbjxP0gJKpKCBFPFuM,2381
|
|
104
|
+
adam/commands/cql/utils_cql.py,sha256=gbQIW29fdd8xZLPly26-jFmt9UHepqY1LyILYW0nwrc,12874
|
|
105
|
+
adam/commands/deploy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
106
|
+
adam/commands/deploy/code_start.py,sha256=0h8AIPjThC7uxa4HVkYMdC-7qCNXk0QXO1zDrzIOA4s,1335
|
|
107
|
+
adam/commands/deploy/code_stop.py,sha256=R9zvNVD4NLUD3J6ktZ53Rsalzn-t0ZxEpeyOoiizfgU,1153
|
|
108
|
+
adam/commands/deploy/code_utils.py,sha256=H0XgKxVV1Rt3JRjZlssUHwkttuRQ0n6JjjsYw-jn5kI,3285
|
|
109
|
+
adam/commands/deploy/deploy.py,sha256=TmJbWS6JPts8mfPakguTMA88xjstdiUgYfA2aacLA2E,821
|
|
110
|
+
adam/commands/deploy/deploy_frontend.py,sha256=msfDZW8aAlL8E5ve36VkWthuqmXONGRVe7djqLo3i7g,1689
|
|
111
|
+
adam/commands/deploy/deploy_pg_agent.py,sha256=WGFvoYBUbtnbXHROlRUGenYMtb5EZYU3q1Kr3HQNjp8,1144
|
|
112
|
+
adam/commands/deploy/deploy_pod.py,sha256=4CjWNoootnyB4RCB8l5XWmiwCgw2Lgpc1bit_xl3QiI,4578
|
|
113
|
+
adam/commands/deploy/deploy_utils.py,sha256=P_Z-8tY_ZZuucsHL-8r5rt1c0LfIM-CYpvPsTiM4oe8,1241
|
|
114
|
+
adam/commands/deploy/undeploy.py,sha256=QblQDQOjesNbMfi0Rx_D3oxC93LEPfTVqDj5sLAc84g,873
|
|
115
|
+
adam/commands/deploy/undeploy_frontend.py,sha256=khgxZ94bXlQ8c737B_J-gE0pNBA0GaIQmxCapnkI98c,1210
|
|
116
|
+
adam/commands/deploy/undeploy_pg_agent.py,sha256=t9l9XJiChiH61Z7Zc967b3zH_Tsj7Grntx-8op0wWmY,1253
|
|
117
|
+
adam/commands/deploy/undeploy_pod.py,sha256=Pc5xpU4z5_CHrtz3cAzReT4Qxyks2kQ-uWSRUnAYiJ4,1907
|
|
118
|
+
adam/commands/devices/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
119
|
+
adam/commands/devices/device.py,sha256=UPqHLQXar5a3ENQDaqimcX2DrX3OPILrbBTTfIB39F4,3336
|
|
120
|
+
adam/commands/devices/device_app.py,sha256=w7PTv1pYdHCFovxvHpOfO3p1Vki1VTYpC3VqFobx610,6794
|
|
121
|
+
adam/commands/devices/device_auit_log.py,sha256=PaniVrADdqQM0xAkXtT3w5MFkERKWH0wdHl3mXnlMpo,1587
|
|
122
|
+
adam/commands/devices/device_cass.py,sha256=66I7xoCUzaYv0la6itl8JFO579qe03HlBVQdUEm-MT4,7042
|
|
123
|
+
adam/commands/devices/device_export.py,sha256=Fo5TCNaEgChrRR6nzoHmKCW7vDxjBofq-OnDDDNYfP8,3062
|
|
124
|
+
adam/commands/devices/device_postgres.py,sha256=Km3O3t9ChyhUr7gwXgKUm1abuUHmkiSkCukx3e88GYM,5774
|
|
125
|
+
adam/commands/devices/devices.py,sha256=-VV8nU-Qcebx2g2ftOywmgrn8wW7-teCpxFQjU9wBR4,965
|
|
126
|
+
adam/commands/export/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
127
|
+
adam/commands/export/clean_up_all_export_sessions.py,sha256=VNe9pVcF8xrkFfQ_XO2qjueuJiJcLCkP1XV1kS7WYwg,1196
|
|
128
|
+
adam/commands/export/clean_up_export_sessions.py,sha256=eLnLUFs98HcdYu_LrU7-Mj0B64Mc79GaYhpcNB0vuXc,1672
|
|
129
|
+
adam/commands/export/drop_export_database.py,sha256=iKXvP06dk7QP6sEE4WUyDoIkRuqm8nfEkPja6AP0_kE,1678
|
|
130
|
+
adam/commands/export/drop_export_databases.py,sha256=sLNNygGw6Ltfe9t4i_DJEHckMgFy3qCqLYssA7aSdow,1270
|
|
131
|
+
adam/commands/export/export.py,sha256=_nzqXntCZweQMoxeseB81Wpxsx-947W6DR1Fj7NB7WQ,2112
|
|
132
|
+
adam/commands/export/export_databases.py,sha256=Y60Dd2V8S9I-hlCFMlQQF0x3QzSkdPT_DusR_N1OvDQ,5347
|
|
133
|
+
adam/commands/export/export_handlers.py,sha256=1pBf-XxRyyYmGNrt_a-UaWvtPQ25MHwjP6sHLJC7dx4,2354
|
|
134
|
+
adam/commands/export/export_select.py,sha256=Bvw-SJtM9U-na5nUMCTbLE9UVrOJSTUUZEyw8IKkxFw,2639
|
|
135
|
+
adam/commands/export/export_select_x.py,sha256=_wGW_PRBZMhFWGHGBXaakt8ERfsBRBpDGqLRBxbKxMY,1997
|
|
136
|
+
adam/commands/export/export_use.py,sha256=1CR9L0-Ao7wlrXO_00sZKj9kKRq7j9Pudfdx-yOuUXo,1573
|
|
137
|
+
adam/commands/export/exporter.py,sha256=NSm8ftbne6saUTuYyUKi66tq2IMZHj5i3tGnUBaKzSY,15979
|
|
138
|
+
adam/commands/export/import_session.py,sha256=8qZoOKHSETOXHFU_5se7h93QRWht9foxizymIhdnIFA,1375
|
|
139
|
+
adam/commands/export/importer.py,sha256=TttTWE2VK4xjKFnsQyaJ0oRVsUQGdZW93kQmdOKKDI0,2292
|
|
140
|
+
adam/commands/export/importer_athena.py,sha256=3TmAn8Qf3dtwR1ncuF4ml4O02e0TqxG4AZfsp5eKexg,3320
|
|
141
|
+
adam/commands/export/importer_sqlite.py,sha256=WdcmoU0ijzRjeKp9tYOZFJ1cP302MGpII_GpXnzLE1Q,1739
|
|
142
|
+
adam/commands/export/show_column_counts.py,sha256=nj77CLDm9qSvNiuMKsldR2faJPEy8WBL9wyghrC5hz8,1811
|
|
143
|
+
adam/commands/export/show_export_databases.py,sha256=LrzSODX2G9KCu9BUMgpz353MaE7NuIreEmeZNTlW0Lk,1169
|
|
144
|
+
adam/commands/export/show_export_session.py,sha256=ErYgzIXe0AKFKHX_XcgVVNURejGruYNHTIWOJB7QV-o,1634
|
|
145
|
+
adam/commands/export/show_export_sessions.py,sha256=fW9vcnekTZJvPM4oNAiXXxoh9phGiSOUK6cDKM_Y_Ic,1580
|
|
146
|
+
adam/commands/export/utils_export.py,sha256=lBcmqJJiWqf9BbeT6cKGu9qT3zPBuKIAWrqendZibEc,11247
|
|
147
|
+
adam/commands/medusa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
148
|
+
adam/commands/medusa/medusa.py,sha256=Ey2kJpoKqPFP6m623B3ciMoLur5SVcHEBYsvW7G7aAY,958
|
|
149
|
+
adam/commands/medusa/medusa_backup.py,sha256=RmiND5P9l4aoDBur9kW2ICvFSA-R4pmL7kDg9E7iKo0,1821
|
|
150
|
+
adam/commands/medusa/medusa_restore.py,sha256=590507YdE7ItABRCoxGdUtLMA3NcWzuCnxsregb9jxs,3329
|
|
151
|
+
adam/commands/medusa/medusa_show_backupjobs.py,sha256=G_J-AGfmsDZOww_EZi8CMdOdLFZl7nk7T6QZfgrSJ18,1807
|
|
152
|
+
adam/commands/medusa/medusa_show_restorejobs.py,sha256=2LrdUPHRWGFHb1-XTYXjADJuDl9vOlnBBFyfVhCls1A,1584
|
|
153
|
+
adam/commands/postgres/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
154
|
+
adam/commands/postgres/postgres.py,sha256=pjnYxCHaYRNP7iPzKU_EGP4isjHFRie8_-tA1Y4H3dU,3661
|
|
155
|
+
adam/commands/postgres/postgres_context.py,sha256=4X6FPyjKuRw7WWQoeUCuEq-zHmGnaQg6mrpufClWBtE,10828
|
|
156
|
+
adam/commands/postgres/postgres_ls.py,sha256=yT-V1mGnvImaIr4s75FUsV5klcrOB7HHJwWbY6h1Kpk,1111
|
|
157
|
+
adam/commands/postgres/postgres_preview.py,sha256=Bmw3YC98tFdjUx2CRHOakcvLHCOLtEiKxvNDjlDoRo0,1174
|
|
158
|
+
adam/commands/postgres/psql_completions.py,sha256=LVw7LvKSRh61Dfqxh_FZp7wmIeejHjK_V6QGwUrePfw,336
|
|
159
|
+
adam/commands/postgres/utils_postgres.py,sha256=SeAtjxF2dBiu9G4nTjMcgDXIMFrFafvj48jbG1Lkg3s,2025
|
|
160
|
+
adam/commands/reaper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
161
|
+
adam/commands/reaper/reaper.py,sha256=Xrfjvqtn5txnaMwofBb77yEsmSYLO_-Bi43ABq2ZmaQ,1398
|
|
162
|
+
adam/commands/reaper/reaper_forward.py,sha256=Su3tFrx2MTTXvaPC0EsmCnTKDuUjziyED583IX2UJ84,3326
|
|
163
|
+
adam/commands/reaper/reaper_forward_session.py,sha256=CfKMYQPDZYQBtYQjxcPs7ns5e8AGZj9Q0LD8dOxvLl0,160
|
|
164
|
+
adam/commands/reaper/reaper_forward_stop.py,sha256=a8i6Zp4rYKFt6qC7iqpf57gDZTMAtZy1H1PXq5tTOHM,1375
|
|
165
|
+
adam/commands/reaper/reaper_restart.py,sha256=Ms3OWhV6pqEtmQiupvKO9ArTVBPlniPtg4BwPCgaFq8,1173
|
|
166
|
+
adam/commands/reaper/reaper_run_abort.py,sha256=rqargemlEXoeL6e1OYyroxGanGopi0rgk-RYTSFejJU,1363
|
|
167
|
+
adam/commands/reaper/reaper_runs.py,sha256=hXfGdtlRyf6jOyoILGFEec_lL4RWn_Eqiw69Zge9SLo,3065
|
|
168
|
+
adam/commands/reaper/reaper_runs_abort.py,sha256=ykY8D5fcZwqMRebM2JxFClVksjeDIBTIQe5nSk5oyp0,2058
|
|
169
|
+
adam/commands/reaper/reaper_schedule_activate.py,sha256=WHr1avsnK9_0YUA42jMF6gsc-d9UWszAVurCdbVotXY,1496
|
|
170
|
+
adam/commands/reaper/reaper_schedule_start.py,sha256=9SQoQRPWUIZQZlfDy08LOwHj0N-jXoLFWwEynI9QTfc,1483
|
|
171
|
+
adam/commands/reaper/reaper_schedule_stop.py,sha256=R_oktRyc2oqZg7-yvYLgshdSRyY1rCQn40yS7-z83UI,1479
|
|
172
|
+
adam/commands/reaper/reaper_schedules.py,sha256=vbvt0JojQecWCo5i4M-3HenWSnJU68F1MAoWcPhp8bo,1071
|
|
173
|
+
adam/commands/reaper/reaper_status.py,sha256=IuRbQwlZB4pDZu4iuPk5TXdTqvzBTMtAl68tHiiPZM0,1801
|
|
174
|
+
adam/commands/reaper/utils_reaper.py,sha256=jQIjpBfQxCPfD_63RpbRZ_tbW2335mBaYiBHalhijSc,7541
|
|
175
|
+
adam/commands/repair/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
176
|
+
adam/commands/repair/repair.py,sha256=tNNJk01Bo8KYeogoUO0oGzwErCfFZz_aW7CmzP81Fs4,830
|
|
177
|
+
adam/commands/repair/repair_log.py,sha256=mTkPu5JFq_nfJx70LG4JG4Wk7LFRAIVHVk7tn240D5o,1108
|
|
178
|
+
adam/commands/repair/repair_run.py,sha256=AyYvYfh9TcO_W_Tri86tV94qXXq924UpqDpzI-y9Ifw,2626
|
|
179
|
+
adam/commands/repair/repair_scan.py,sha256=pi1FtuXiMz4Mc_zBVB1akQwZiCdZ1T3_xcgpSdCa2Dk,2469
|
|
180
|
+
adam/commands/repair/repair_stop.py,sha256=WWotOe8uiK0we1G1Ov6zLuSIG3UOteytzasF6CYGBfE,1142
|
|
181
|
+
adam/commands/show/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
182
|
+
adam/commands/show/show.py,sha256=_ST0tz3ipi0nWLgXZVoyWaMCY1urDOAbU1AMuND0HwM,1709
|
|
183
|
+
adam/commands/show/show_adam.py,sha256=osuafMipN2My4O7bLdukBLsDHtTKguDfTagmgz7aZvw,1314
|
|
184
|
+
adam/commands/show/show_app_actions.py,sha256=-2ntPTnTpCYEya7fHHyKNNNzA50sX7drHQyXY7eqIuk,2121
|
|
185
|
+
adam/commands/show/show_app_id.py,sha256=4Y4uTZa7J5NJI6W8OTqtS5ynCoflYiPVz98c-h3hNBo,1359
|
|
186
|
+
adam/commands/show/show_app_queues.py,sha256=0vOs3F9X2hUPa29lS2r3IKUDJaI_WCIJsZNgJOTOXxA,1283
|
|
187
|
+
adam/commands/show/show_cassandra_repairs.py,sha256=k7zwlURlcOozzYRX7FilOl4on9StEToPQfflEi3BFzM,1174
|
|
188
|
+
adam/commands/show/show_cassandra_status.py,sha256=iB-5dmBL0zPmQu12Bu7YTz6TXUgQFGUQyXpBsnMXjRM,4858
|
|
189
|
+
adam/commands/show/show_cassandra_version.py,sha256=gLfp-lRsjZfHgL5ymWdjifvq2qr8wBE6X6KorsF0ZSs,1189
|
|
190
|
+
adam/commands/show/show_commands.py,sha256=5ij7yZ9yIat3Kg4nkN6yTWsd1K7qi6sK9EICKCPxKHw,1954
|
|
191
|
+
adam/commands/show/show_host.py,sha256=b7UrC_n9qRp9jHuQqint1YDEmBbC2dZUjHr59Wff-nM,868
|
|
192
|
+
adam/commands/show/show_login.py,sha256=vO6r5aRizfAwWBlMDnFsZApg6Rp7nseW7NZNpOsdZRc,2009
|
|
193
|
+
adam/commands/show/show_params.py,sha256=LoBj_ScmtsPrXSUH59p3IYAlmL-0Q_Gb01bp_7zrwQA,1008
|
|
194
|
+
adam/commands/show/show_processes.py,sha256=2Od3Cpm0vq6D0pzqYnymB40t2LmH985VIKP1sEZTo1w,2096
|
|
195
|
+
adam/commands/show/show_storage.py,sha256=e9dotAxlPdSa4jE8OXLWqlu8NKuXOLXz_ERi9V8p4XU,1558
|
|
196
|
+
adam/sql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
197
|
+
adam/sql/sql_completer.py,sha256=aKYgiCJJmtTZyh8OCJa48XVF4g1WxuRpXD_lpnJvotQ,4000
|
|
198
|
+
adam/sql/sql_state_machine.py,sha256=NNULfElQG9UhWQyRXWtbImtFQLA7BVNQ_j9lVeRlPm8,38015
|
|
199
|
+
adam/sql/term_completer.py,sha256=HZjOV4fEV9LraoMjkk8lHxNvzRtSIYsGUJhSMOhuoHY,2599
|
|
200
|
+
adam/sso/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
201
|
+
adam/sso/authenticator.py,sha256=BCm16L9zf5aLU47-sTCnudn2zLPwd8M2wwRminJfsqw,615
|
|
202
|
+
adam/sso/authn_ad.py,sha256=M4ewbIfU4FO9hG-DmRjM342KoXfufyd6XKdZbRQu6o4,5841
|
|
203
|
+
adam/sso/authn_okta.py,sha256=W3KVjnauk6CMyuhg6TOd72iZYl8_FIWi0enRrjE69Tw,4518
|
|
204
|
+
adam/sso/cred_cache.py,sha256=xaRk047iXz9fVVeOqVaoi1zASB_KZsE69clkBoV3_YI,2110
|
|
205
|
+
adam/sso/id_token.py,sha256=wmVZ8S0sjScnOxmSvOKlIEKgnvdWqhsgq9XjFe355O4,744
|
|
206
|
+
adam/sso/idp.py,sha256=nh-9DskqrcaPGqcEfkNk3bUnq2TO7IKPp7PB26jSpy4,5787
|
|
207
|
+
adam/sso/idp_login.py,sha256=QAtCUeDTVWliJy40RK_oac8Vgybr13xH8wzeBoxPaa8,1754
|
|
208
|
+
adam/sso/idp_session.py,sha256=9BUHNRf70u4rVKrVY1HKPOEmOviXvkjam8WJxmXSKIM,1735
|
|
209
|
+
adam/sso/sso_config.py,sha256=5N8WZgIJQBtHUy585XLRWKjpU87_v6QluyNK9E27D5s,2459
|
|
210
|
+
adam/utils_k8s/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
211
|
+
adam/utils_k8s/app_clusters.py,sha256=czH5UUu_nRzU-3i_KZl2sq4AKdBO8sXzC-mCMQNAKfA,1216
|
|
212
|
+
adam/utils_k8s/app_pods.py,sha256=ztPxQci2bwOiylaWtzb-lrQTIYOtlCOa6PEb_AmP8Cg,1479
|
|
213
|
+
adam/utils_k8s/cassandra_clusters.py,sha256=Hn5k7rFA5kgBHosp-htul0s8CIzmBxdMLmC6O56u5a0,1572
|
|
214
|
+
adam/utils_k8s/cassandra_nodes.py,sha256=SPYWPkjB3ETVcdFveLvvFAGYrrt6K_D6R_XB7Lpd0-k,1550
|
|
215
|
+
adam/utils_k8s/config_maps.py,sha256=vc9A-2D1-1mindCMFL1wuysDOXb0RCl4BdjC6B6usXI,1194
|
|
216
|
+
adam/utils_k8s/custom_resources.py,sha256=aMjLAclPHW0KEJiOzBJx8tAqoU63_X2WxOVBbg0memc,7777
|
|
217
|
+
adam/utils_k8s/deployment.py,sha256=SLhnMm5GMXwEldj2OupSFBUsvNjynwSNrv5tIDvLMrc,2921
|
|
218
|
+
adam/utils_k8s/ingresses.py,sha256=q8nJTIoxa_dVrGMl1HS5yTS_11jLNBAnWlc2ZishMEE,3458
|
|
219
|
+
adam/utils_k8s/jobs.py,sha256=gJpBpjcZ_FlkWJJIlavbHC_bqdmvv-GMVo8UZVh0sOQ,2610
|
|
220
|
+
adam/utils_k8s/k8s.py,sha256=eodkX7ZnqArniiAOHAQsqgBPYCHZj-Silv48g1rcGg4,3088
|
|
221
|
+
adam/utils_k8s/kube_context.py,sha256=xJF_72vUJu-X9MpIYzOIfnj7KEWU7a_sLBR-H3994Y0,3311
|
|
222
|
+
adam/utils_k8s/pods.py,sha256=wQO8W4Txj5C9WyS7jP3lZQYTjKbMMAUEwgi6iHD-Ffg,11078
|
|
223
|
+
adam/utils_k8s/secrets.py,sha256=xnqRSumCIcPaASDcErzxjx1BCE-qJkPoG5wIP7YHzIo,2430
|
|
224
|
+
adam/utils_k8s/service_accounts.py,sha256=OF1-UwWupUAvn_rqNNTWsF3BWYgaLiGTJfinn8sreog,6342
|
|
225
|
+
adam/utils_k8s/services.py,sha256=7K6CxvYntbCsRjTZVcuYiBb5WPH7A5CTWTlUGvaVDRg,3154
|
|
226
|
+
adam/utils_k8s/statefulsets.py,sha256=06ccJhkkFQekIG8gIS9BicMZV1FVX_FKZOOxzdaTUcA,4097
|
|
227
|
+
adam/utils_k8s/volumes.py,sha256=RIBmlOSWM3V3QVXLCFT0owVOyh4rGG1ETp521a-6ndo,1137
|
|
228
|
+
adam/utils_repl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
229
|
+
adam/utils_repl/automata_completer.py,sha256=LJP_2WHHR7AtjX00MJ59VGQEL3t0XS-qYnDmMaZe-Tk,1641
|
|
230
|
+
adam/utils_repl/repl_completer.py,sha256=lsu0vWFdTs8SSSY9gxHN-fQSap-Wqz1QhMF4FqGf7qA,1722
|
|
231
|
+
adam/utils_repl/state_machine.py,sha256=SGNFwxERS_nZC4iHomlLCy1FaKuEx3Z2HRAVbsIu4Lc,5424
|
|
232
|
+
kaqing-2.0.171.dist-info/METADATA,sha256=WJRz6duS1qnfyzE1WmJG-kzz7wgwXVrfwAzhv4dKTJg,133
|
|
233
|
+
kaqing-2.0.171.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
234
|
+
kaqing-2.0.171.dist-info/entry_points.txt,sha256=SkzhuQJUWsXOzHeZ5TgQ2c3_g53UGK23zzJU_JTZOZI,39
|
|
235
|
+
kaqing-2.0.171.dist-info/top_level.txt,sha256=8_2PZkwBb-xDcnc8a2rAbQeJhXKXskc7zTP7pSPa1fw,5
|
|
236
|
+
kaqing-2.0.171.dist-info/RECORD,,
|
adam/commands/app.py
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import json
|
|
2
|
-
|
|
3
|
-
from adam.apps import Apps
|
|
4
|
-
from adam.commands.command import Command
|
|
5
|
-
from adam.repl_state import ReplState, RequiredState
|
|
6
|
-
from adam.app_session import AppSession
|
|
7
|
-
from adam.utils import log2
|
|
8
|
-
|
|
9
|
-
class App(Command):
|
|
10
|
-
COMMAND = 'app'
|
|
11
|
-
|
|
12
|
-
# the singleton pattern
|
|
13
|
-
def __new__(cls, *args, **kwargs):
|
|
14
|
-
if not hasattr(cls, 'instance'): cls.instance = super(App, cls).__new__(cls)
|
|
15
|
-
|
|
16
|
-
return cls.instance
|
|
17
|
-
|
|
18
|
-
def __init__(self, successor: Command=None):
|
|
19
|
-
super().__init__(successor)
|
|
20
|
-
|
|
21
|
-
def command(self):
|
|
22
|
-
return App.COMMAND
|
|
23
|
-
|
|
24
|
-
def required(self):
|
|
25
|
-
return RequiredState.CLUSTER_OR_POD
|
|
26
|
-
|
|
27
|
-
def run(self, cmd: str, state: ReplState):
|
|
28
|
-
if not(args := self.args(cmd)):
|
|
29
|
-
return super().run(cmd, state)
|
|
30
|
-
|
|
31
|
-
state, args = self.apply_state(args, state)
|
|
32
|
-
if not self.validate_state(state, app_required=RequiredState.APP_APP):
|
|
33
|
-
return state
|
|
34
|
-
|
|
35
|
-
args, forced = Command.extract_options(args, '--force')
|
|
36
|
-
|
|
37
|
-
if not args:
|
|
38
|
-
return 'arg missing'
|
|
39
|
-
|
|
40
|
-
t_f = args[0].split('.')
|
|
41
|
-
if len(t_f) < 2:
|
|
42
|
-
return 'arg missing'
|
|
43
|
-
|
|
44
|
-
payload, valid = Apps().payload(t_f[0], t_f[1], args[1:] if len(args) > 1 else [])
|
|
45
|
-
if not valid:
|
|
46
|
-
log2('Missing one or more action arguments.')
|
|
47
|
-
return state
|
|
48
|
-
|
|
49
|
-
if payload:
|
|
50
|
-
try:
|
|
51
|
-
payload = json.loads(payload)
|
|
52
|
-
except json.decoder.JSONDecodeError as e:
|
|
53
|
-
log2(f'Invalid json argument: {e}')
|
|
54
|
-
return state
|
|
55
|
-
|
|
56
|
-
AppSession.run(state.app_env, state.app_app, state.namespace, t_f[0], t_f[1], payload=payload, forced=forced)
|
|
57
|
-
|
|
58
|
-
return state
|
|
59
|
-
|
|
60
|
-
def completion(self, state: ReplState):
|
|
61
|
-
if state.app_app:
|
|
62
|
-
return super().completion(state, {'--force': None})
|
|
63
|
-
|
|
64
|
-
return {}
|
|
65
|
-
|
|
66
|
-
def help(self, _: ReplState):
|
|
67
|
-
return f"{App.COMMAND} [--force]\t post app API query with type and function"
|