kaqing 2.0.95__py3-none-any.whl → 2.0.115__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.
Potentially problematic release.
This version of kaqing might be problematic. Click here for more details.
- adam/batch.py +1 -15
- adam/commands/alter_tables.py +3 -14
- adam/commands/app.py +3 -3
- adam/commands/app_ping.py +2 -2
- adam/commands/audit/audit.py +26 -11
- adam/commands/audit/audit_repair_tables.py +20 -37
- adam/commands/audit/audit_run.py +58 -0
- adam/commands/audit/show_last10.py +51 -0
- adam/commands/audit/show_slow10.py +50 -0
- adam/commands/audit/show_top10.py +49 -0
- adam/commands/audit/utils_show_top10.py +59 -0
- adam/commands/bash/bash.py +124 -0
- adam/commands/bash/bash_completer.py +93 -0
- adam/commands/cat.py +55 -0
- adam/commands/cd.py +23 -11
- adam/commands/check.py +6 -0
- adam/commands/code.py +60 -0
- adam/commands/command.py +9 -4
- adam/commands/commands_utils.py +1 -2
- adam/commands/cql/cql_completions.py +7 -3
- adam/commands/cql/cql_utils.py +100 -8
- adam/commands/cql/cqlsh.py +10 -5
- adam/commands/deploy/deploy.py +7 -1
- adam/commands/deploy/deploy_pg_agent.py +2 -2
- adam/commands/deploy/undeploy.py +7 -1
- adam/commands/deploy/undeploy_pg_agent.py +2 -2
- adam/commands/devices.py +29 -0
- adam/commands/export/__init__.py +0 -0
- adam/commands/export/export.py +60 -0
- adam/commands/export/export_on_x.py +76 -0
- adam/commands/export/export_rmdbs.py +65 -0
- adam/commands/export/export_select.py +68 -0
- adam/commands/export/export_use.py +56 -0
- adam/commands/export/utils_export.py +253 -0
- adam/commands/help.py +9 -5
- adam/commands/issues.py +6 -0
- adam/commands/kubectl.py +41 -0
- adam/commands/login.py +6 -3
- adam/commands/logs.py +1 -0
- adam/commands/ls.py +39 -27
- adam/commands/medusa/medusa_show_backupjobs.py +1 -0
- adam/commands/nodetool.py +5 -2
- adam/commands/postgres/postgres.py +4 -4
- adam/commands/postgres/{postgres_session.py → postgres_context.py} +26 -27
- adam/commands/postgres/postgres_utils.py +5 -5
- adam/commands/postgres/psql_completions.py +1 -1
- adam/commands/preview_table.py +18 -32
- adam/commands/pwd.py +4 -3
- adam/commands/reaper/reaper.py +3 -0
- adam/commands/repair/repair.py +3 -3
- adam/commands/report.py +6 -0
- adam/commands/show/show.py +3 -1
- adam/commands/show/show_app_actions.py +3 -0
- adam/commands/show/show_app_queues.py +3 -2
- adam/commands/show/show_login.py +3 -0
- adam/config.py +1 -1
- adam/embedded_params.py +1 -1
- adam/pod_exec_result.py +7 -1
- adam/repl.py +121 -97
- adam/repl_commands.py +29 -17
- adam/repl_state.py +224 -44
- adam/sql/sql_completer.py +86 -62
- adam/sql/sql_state_machine.py +563 -0
- adam/sql/term_completer.py +3 -0
- adam/utils_athena.py +108 -74
- adam/utils_audits.py +104 -0
- adam/utils_export.py +42 -0
- adam/utils_k8s/app_clusters.py +33 -0
- adam/utils_k8s/app_pods.py +31 -0
- adam/utils_k8s/cassandra_clusters.py +4 -5
- adam/utils_k8s/cassandra_nodes.py +4 -4
- adam/utils_k8s/pods.py +42 -6
- adam/utils_k8s/statefulsets.py +2 -2
- adam/version.py +1 -1
- {kaqing-2.0.95.dist-info → kaqing-2.0.115.dist-info}/METADATA +1 -1
- {kaqing-2.0.95.dist-info → kaqing-2.0.115.dist-info}/RECORD +80 -67
- adam/commands/bash.py +0 -92
- adam/commands/cql/cql_table_completer.py +0 -8
- adam/commands/describe/describe.py +0 -46
- adam/commands/describe/describe_keyspace.py +0 -60
- adam/commands/describe/describe_keyspaces.py +0 -50
- adam/commands/describe/describe_table.py +0 -60
- adam/commands/describe/describe_tables.py +0 -50
- adam/commands/postgres/psql_table_completer.py +0 -11
- adam/sql/state_machine.py +0 -460
- /adam/commands/{describe → bash}/__init__.py +0 -0
- {kaqing-2.0.95.dist-info → kaqing-2.0.115.dist-info}/WHEEL +0 -0
- {kaqing-2.0.95.dist-info → kaqing-2.0.115.dist-info}/entry_points.txt +0 -0
- {kaqing-2.0.95.dist-info → kaqing-2.0.115.dist-info}/top_level.txt +0 -0
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
adam/__init__.py,sha256=oVw1FNd9HZPJ7wm6BNn5ybyNGJLjJ8kopMeBiwgMaOI,59
|
|
2
2
|
adam/app_session.py,sha256=Klypm4JYHOlovaRCHAZ2P_Mj_nheMlcQgX403R0TJGk,6969
|
|
3
3
|
adam/apps.py,sha256=okYibOEiCVoM5zsPUKaLJZlwlnvWSHKL7U2J1Yk3-Aw,6701
|
|
4
|
-
adam/batch.py,sha256=
|
|
4
|
+
adam/batch.py,sha256=V_2DvL4p6FVHda-d1EysXK47-9vYNR3Gc7FPj9E0JOo,23974
|
|
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=
|
|
7
|
+
adam/config.py,sha256=GRtfpGgGwfeYdVSPfk3LKCRXlOEJZ2vmXM3ADr7IhVk,2880
|
|
8
8
|
adam/embedded_apps.py,sha256=lKPx63mKzJbNmwz0rgL4gF76M9fDGxraYTtNAIGnZ_s,419
|
|
9
|
-
adam/embedded_params.py,sha256=
|
|
9
|
+
adam/embedded_params.py,sha256=dqIS4yUzGMud7D6_KD8PobyYqU0JWl2xeozGNMpuRzs,5175
|
|
10
10
|
adam/log.py,sha256=gg5DK52wLPc9cjykeh0WFHyAk1qI3HEpGaAK8W2dzXY,1146
|
|
11
|
-
adam/pod_exec_result.py,sha256=
|
|
12
|
-
adam/repl.py,sha256=
|
|
13
|
-
adam/repl_commands.py,sha256=
|
|
11
|
+
adam/pod_exec_result.py,sha256=YORij4tRFBOzLEcLQOz3HcKQgltm7T5YaNre1ju8yRc,1245
|
|
12
|
+
adam/repl.py,sha256=0FS7SNE8ig79W45IJEUqpDdZPxWopDXHvGLRYKC6n0w,10247
|
|
13
|
+
adam/repl_commands.py,sha256=7hSc3z6ZcOVJxdj0yUo-HFnq3VV-lvgzYiLqKmeaeAU,5295
|
|
14
14
|
adam/repl_session.py,sha256=uIogcvWBh7wd8QQ-p_JgLsyJ8YJgINw5vOd6JIsd7Vo,472
|
|
15
|
-
adam/repl_state.py,sha256=
|
|
15
|
+
adam/repl_state.py,sha256=GYk5zJGVhH029FGksxzRxui49lElEa6eZJPJqgd9TQ0,14601
|
|
16
16
|
adam/utils.py,sha256=sbsNZP3qGJtb6fXCa4dDXHry5ay9ev583cCZIQzy07s,7382
|
|
17
|
-
adam/utils_athena.py,sha256=
|
|
17
|
+
adam/utils_athena.py,sha256=HY56Wr_icg6bUifMvn-SEMoEQ6UmUae9wYN4FTiWTW4,4692
|
|
18
|
+
adam/utils_audits.py,sha256=wRhUtWxPuwsAj5IetVN8HsO7YKhprY_WdEzgabh9jfo,4027
|
|
19
|
+
adam/utils_export.py,sha256=rLdec2GZWYd4vBoujhWHQilvm4eHy0kIwZqhE5vUXF8,1533
|
|
18
20
|
adam/utils_net.py,sha256=65fhBnWMCkhGtyHqz95qcHaCo35q-WX1RBkkXG8dKpI,416
|
|
19
|
-
adam/version.py,sha256=
|
|
21
|
+
adam/version.py,sha256=x8_TLPZv7E6mDyCNY2xrTl8OFXXqKJa2jg3vAM4QJvA,140
|
|
20
22
|
adam/checks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
23
|
adam/checks/check.py,sha256=Qopr3huYcMu2bzQgb99dEUYjFzkjKHRI76S6KA9b9Rk,702
|
|
22
24
|
adam/checks/check_context.py,sha256=FEHkQ32jY1EDopQ2uYWqy9v7aEEX1orLpJWhopwAlh4,402
|
|
@@ -49,78 +51,87 @@ adam/columns/pod_name.py,sha256=IYw0ZKA7Fb9LaGXENqzZTiTgL98tahwFRtfy0KkKh2Q,280
|
|
|
49
51
|
adam/columns/volume_cassandra.py,sha256=9KRNOzjNYganI9avN6zaA5_-7yxD4rV-KNxro9CSUg4,753
|
|
50
52
|
adam/columns/volume_root.py,sha256=29ujLoCAf9LO75u62LxEaPD58s6ihV-tcK17OeLSOM0,556
|
|
51
53
|
adam/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
52
|
-
adam/commands/alter_tables.py,sha256=
|
|
53
|
-
adam/commands/app.py,sha256=
|
|
54
|
-
adam/commands/app_ping.py,sha256=
|
|
55
|
-
adam/commands/
|
|
56
|
-
adam/commands/cd.py,sha256=
|
|
57
|
-
adam/commands/check.py,sha256=
|
|
54
|
+
adam/commands/alter_tables.py,sha256=DaJ77QSILzCnCBU1TzTQLiy67PooeneJ0kIm9Fkom4I,3112
|
|
55
|
+
adam/commands/app.py,sha256=KejN5TlR_0uC1RZKD62awJ7dtGa9qzNzx3umhTubHZI,1948
|
|
56
|
+
adam/commands/app_ping.py,sha256=YxuTvhIiZWfhr_OKquGAhRQfrhPdE8zL5tsb3MDf48Y,1294
|
|
57
|
+
adam/commands/cat.py,sha256=pOGaQyH3yW2g7LYAACF6MyKj9d9bMVx8nzZ_6pb71rg,1828
|
|
58
|
+
adam/commands/cd.py,sha256=X9W5TLoTiFlsn0JL4E_hEWf7GyoHrRWg5kthugyMoHg,5236
|
|
59
|
+
adam/commands/check.py,sha256=DOWoTpyuwgXm0wGCjLeAljkTkXbAoeh7zmBAUxePFFo,2306
|
|
58
60
|
adam/commands/cli_commands.py,sha256=vZMgXBQpTfiJ9E4v9yHB6WwcJgO6UcqWF3NuRspicq8,3620
|
|
59
|
-
adam/commands/
|
|
61
|
+
adam/commands/code.py,sha256=x1xCNlm5eb33SJUbvFLTUTbqNdOJhhTAt7PSgwvIO8I,1905
|
|
62
|
+
adam/commands/command.py,sha256=8SXYJiBo_umDS6w5G4BcGQqIKcvHXnuXScdeoxIGrUo,4219
|
|
60
63
|
adam/commands/command_helpers.py,sha256=leOJJK1UXczNTJHN9TGMCbIpUpmpreULvQ-TvnsYS7w,1134
|
|
61
|
-
adam/commands/commands_utils.py,sha256=
|
|
64
|
+
adam/commands/commands_utils.py,sha256=lRzLrgDklmDPDDS3brG_ZVBabpG4M9W-fi_1bw799dE,3093
|
|
62
65
|
adam/commands/cp.py,sha256=dyQViRDPNqsKRkxPb7WyEVIBNw7YB6IfYa2q3VtfzyA,3107
|
|
63
|
-
adam/commands/devices.py,sha256=
|
|
66
|
+
adam/commands/devices.py,sha256=UsJBju6-3ztbZt-2zpuMmrH4-LoDGD7pETG1WRxNS88,3971
|
|
64
67
|
adam/commands/exit.py,sha256=5MWUAmzYBlsrp0CoiTDB13SUkX9Ya18UlGeOIPia6TA,798
|
|
65
|
-
adam/commands/help.py,sha256=
|
|
66
|
-
adam/commands/issues.py,sha256=
|
|
67
|
-
adam/commands/
|
|
68
|
-
adam/commands/
|
|
69
|
-
adam/commands/
|
|
70
|
-
adam/commands/
|
|
68
|
+
adam/commands/help.py,sha256=B0Gz7x8X-1n4yn3YuC1B5MJvXAuQOZ7OOHtawow9Aw8,1894
|
|
69
|
+
adam/commands/issues.py,sha256=6r6CbdTgzMbi-lMmyQMAjmKyJgVD-n05IUrGQ-lsnp4,2724
|
|
70
|
+
adam/commands/kubectl.py,sha256=PV_MTbqQOXRFoRPOnyhxOmJnAZaF7SXCT5FhPZWRtso,1048
|
|
71
|
+
adam/commands/login.py,sha256=FB6fESfgEyC8hYCK5ncqt7-M8bfQgu4KOWzE-J6ApyA,1975
|
|
72
|
+
adam/commands/logs.py,sha256=61iHB6iinNTGlYqdNad2c21pF7LlRjbdKiSjWTM5QTw,1197
|
|
73
|
+
adam/commands/ls.py,sha256=EScVO0oIZxBLCUMI3j0QXSA9A2lDlxiSdPYu9B7tbOw,6470
|
|
74
|
+
adam/commands/nodetool.py,sha256=_KjNH7LtZWZQS-01NSiTF5BwNYvh0wutQx_aLrmd7r8,2554
|
|
71
75
|
adam/commands/nodetool_commands.py,sha256=5IgWC3rmeDD1cgwqQjiiWzi-wJpJ3n_8pAzz_9phXuk,2635
|
|
72
76
|
adam/commands/param_get.py,sha256=kPAAppK2T0tEFRnSIVFLDPIIGHhgLA7drJhn8TRyvvE,1305
|
|
73
77
|
adam/commands/param_set.py,sha256=QDIuqfU80aWCB16OK49yf7XRaRTWwiLkwMsJuVikq9I,1271
|
|
74
|
-
adam/commands/preview_table.py,sha256=
|
|
75
|
-
adam/commands/pwd.py,sha256=
|
|
76
|
-
adam/commands/report.py,sha256=
|
|
78
|
+
adam/commands/preview_table.py,sha256=gKxqQ7wOjZTRKx4Tc7DDhPDIrAczpkQV5qqQz2uJRMM,2717
|
|
79
|
+
adam/commands/pwd.py,sha256=ebCtjYqtMaD9hlbrbVHmy-p3OF9tI85KXoPT2NnPZ7U,2529
|
|
80
|
+
adam/commands/report.py,sha256=hgLOF_yDxkfAd00DSAZWtAMT3ksNt-U-1rpDT6a8vE4,2069
|
|
77
81
|
adam/commands/restart.py,sha256=SAxWHvglTckQJ0tJe5t-HWsVerbreNMM-7Nb9PAqno4,2044
|
|
78
82
|
adam/commands/rollout.py,sha256=Db9P4Owd3aPcRLIGhwyEElBNm_2Ke54KbiXyVKmztcE,2959
|
|
79
83
|
adam/commands/shell.py,sha256=wY_PIx7Lt6vuxhFArlfxdEnBbrouCJ3yNHhFn17DEqw,848
|
|
80
84
|
adam/commands/watch.py,sha256=fU2LGll-Igl08HpUQALOnh8l3s3AMGFX26NCLhqbfcw,2438
|
|
81
85
|
adam/commands/audit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
82
|
-
adam/commands/audit/audit.py,sha256=
|
|
83
|
-
adam/commands/audit/audit_repair_tables.py,sha256=
|
|
86
|
+
adam/commands/audit/audit.py,sha256=mXSErSMTedpOn9J90iwZoB7hvEzdq-HxZ2MH4PbDm3Y,3069
|
|
87
|
+
adam/commands/audit/audit_repair_tables.py,sha256=n8JeKiasiW1S3ZmWN8M5Lr_ZY4zSRXCMjXWKrMzo7Ns,2700
|
|
88
|
+
adam/commands/audit/audit_run.py,sha256=xZFfz0jPMMbdwAMActKSaZDGb5NI8c0AHqOnyn2pnEQ,1875
|
|
89
|
+
adam/commands/audit/show_last10.py,sha256=_Pw2D-0U2l5ZFCK9bJvBaUKvw7otgqBWmw6K1--BHJ0,1452
|
|
90
|
+
adam/commands/audit/show_slow10.py,sha256=YocvcpoH8-dCx5Uu__HVasF6JsuADbG-QLW28Iq75EY,1471
|
|
91
|
+
adam/commands/audit/show_top10.py,sha256=ijSPYQdx0QfDV-50tlkE035R35aoGH7K3DRQ7xDYT7c,1539
|
|
92
|
+
adam/commands/audit/utils_show_top10.py,sha256=LtRZ0wDPDYQ9S3PlUIBbAP8zYzKPB58n1iIcHLca8P8,1865
|
|
93
|
+
adam/commands/bash/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
94
|
+
adam/commands/bash/bash.py,sha256=B_vcub2j6QK1RFr59n4BW-9sTZFFgFPHmpKiYIZ6FB0,4983
|
|
95
|
+
adam/commands/bash/bash_completer.py,sha256=IStUg5LLTqc3vjupw33WtXUG9zRQ37BctjDYGDyYEXU,3883
|
|
84
96
|
adam/commands/cql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
85
|
-
adam/commands/cql/cql_completions.py,sha256=
|
|
86
|
-
adam/commands/cql/
|
|
87
|
-
adam/commands/cql/
|
|
88
|
-
adam/commands/cql/cqlsh.py,sha256=qEQufaDVi9FXkvruum6OHQDfLX01DVWVDnWsAjyCZYQ,2661
|
|
97
|
+
adam/commands/cql/cql_completions.py,sha256=29TJmNHg2_EwGyBrgh04dtZl0BDxGEnLXf_hbPQF9no,660
|
|
98
|
+
adam/commands/cql/cql_utils.py,sha256=YHgm1vFuV9rfCZkYZV1P2WOxQQSuXWCubPc8_prTndM,7464
|
|
99
|
+
adam/commands/cql/cqlsh.py,sha256=4yhDqqeodxBiPKQl6pyPNOiedz_aiJVOV9HhJIsfkeE,2937
|
|
89
100
|
adam/commands/deploy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
90
101
|
adam/commands/deploy/code_start.py,sha256=-iH8HThTNM83IfBxT_LqTByuHVatV9d-Il4OYOfrwLI,1370
|
|
91
102
|
adam/commands/deploy/code_stop.py,sha256=ch7ZMgosvTHsGaIcDwQY5XYh_5HYrUjBkZFOI-d2gOU,1696
|
|
92
103
|
adam/commands/deploy/code_utils.py,sha256=cRvktxpAB2-QBX7-eYt9O57uio58X763uXWotTci3mc,3296
|
|
93
|
-
adam/commands/deploy/deploy.py,sha256=
|
|
104
|
+
adam/commands/deploy/deploy.py,sha256=t54wa0cKXUpNFT0jvwaK-mWszFwGxbcpLZjz94ujHk4,1402
|
|
94
105
|
adam/commands/deploy/deploy_frontend.py,sha256=S3SvJD4JZQ9kDOOP_mrTnZFDl54AHhio5xxNgIUBZVk,1704
|
|
95
|
-
adam/commands/deploy/deploy_pg_agent.py,sha256=
|
|
106
|
+
adam/commands/deploy/deploy_pg_agent.py,sha256=v1jVzNnNIxsemHVzGb6iDvvztjLTmHoCVRdZ_S1ATQM,1203
|
|
96
107
|
adam/commands/deploy/deploy_pod.py,sha256=QvNeBoTa_d3ERXQA7OcQm1awLi5ixj_nS94pqktYMb0,4663
|
|
97
108
|
adam/commands/deploy/deploy_utils.py,sha256=uQEl0gMOJw2TNjP0Q3pv5nrZYjAsoACtep0a15M0DCE,1524
|
|
98
|
-
adam/commands/deploy/undeploy.py,sha256=
|
|
109
|
+
adam/commands/deploy/undeploy.py,sha256=4Vces7YmTdYWnlXU6HCsjCjI3jCUFPV3AeWkUqwZoGY,1456
|
|
99
110
|
adam/commands/deploy/undeploy_frontend.py,sha256=gHekPn7l19JgVbhneKpQ7ModNoDFmzWRMyQv9v4FBxo,1261
|
|
100
|
-
adam/commands/deploy/undeploy_pg_agent.py,sha256=
|
|
111
|
+
adam/commands/deploy/undeploy_pg_agent.py,sha256=gWYaxxw9Hu1V-cI2bYynej9nMaZmR_uA8mRqrYP6zpY,1319
|
|
101
112
|
adam/commands/deploy/undeploy_pod.py,sha256=I-pNfdcfBGLJ5YssTjSHoM4miygqoiGN233wUSIUG9Y,1905
|
|
102
|
-
adam/commands/
|
|
103
|
-
adam/commands/
|
|
104
|
-
adam/commands/
|
|
105
|
-
adam/commands/
|
|
106
|
-
adam/commands/
|
|
107
|
-
adam/commands/
|
|
113
|
+
adam/commands/export/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
114
|
+
adam/commands/export/export.py,sha256=2A1cFkjFZVNUVXqci-adTS8J-NQVNGPB7KhkVir42cc,1903
|
|
115
|
+
adam/commands/export/export_on_x.py,sha256=ZOpDWuPHbmrQko1_f7YmIljSZranXBOd9JXrf5ikRCc,2289
|
|
116
|
+
adam/commands/export/export_rmdbs.py,sha256=ix_P17YXLxST6Pv_T8q4Df7VtqdvGvFgd6lrWMyyCUY,1951
|
|
117
|
+
adam/commands/export/export_select.py,sha256=5HuU4lLVnNHmUXE912YiUYGhEZhBGCB8Hism9jvBRfw,2132
|
|
118
|
+
adam/commands/export/export_use.py,sha256=_b_95AmC1w39nCg_-T34A3KMYAaLrwZKEqIh3LOxdyA,1695
|
|
119
|
+
adam/commands/export/utils_export.py,sha256=_zlR9IS2j0RzQtfGWS56WG8OWIEvrUzLPygpD61GJEU,9286
|
|
108
120
|
adam/commands/medusa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
109
121
|
adam/commands/medusa/medusa.py,sha256=KNFjStvilIuOJt3wTtcWmKvdm8FdCnrDY2ltEWbratk,1402
|
|
110
122
|
adam/commands/medusa/medusa_backup.py,sha256=Tns-nBbqTnry8zoCFtXCisco3ipcOgArQbN5rc7SRGY,1801
|
|
111
123
|
adam/commands/medusa/medusa_restore.py,sha256=yvqMZtGsZHlFfBNAfcvzfcCbe1NQdlP3H4JQfsQ0WvU,3274
|
|
112
|
-
adam/commands/medusa/medusa_show_backupjobs.py,sha256=
|
|
124
|
+
adam/commands/medusa/medusa_show_backupjobs.py,sha256=LPLyFOLH2Y3FxjZlW7DoyQKththaieh_gmBFC4YyA_4,1757
|
|
113
125
|
adam/commands/medusa/medusa_show_restorejobs.py,sha256=bj7afDJ7tgvssazOcxru9rCmcwPoDaTAgkYdvHKWhjI,1651
|
|
114
126
|
adam/commands/postgres/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
115
|
-
adam/commands/postgres/postgres.py,sha256=
|
|
127
|
+
adam/commands/postgres/postgres.py,sha256=4IepGZo3W7kiET7OemQQ6JivplZfW-QwhbIvgMIGUZM,3145
|
|
128
|
+
adam/commands/postgres/postgres_context.py,sha256=Bk7yKHuYCjq3eNhNQ7AT8bEaNvEzyx9WwdBMFJ128b0,9357
|
|
116
129
|
adam/commands/postgres/postgres_ls.py,sha256=HwZTgwGKXUqHX33S8aQPF6FqCrLqtoz4cLyJV2SpoE0,1186
|
|
117
130
|
adam/commands/postgres/postgres_preview.py,sha256=MLzdEc4mvNj6V1Q8jO5OPznXyYELJHgd35_eQgLlNIU,1274
|
|
118
|
-
adam/commands/postgres/
|
|
119
|
-
adam/commands/postgres/
|
|
120
|
-
adam/commands/postgres/psql_completions.py,sha256=IHcSy-fh028_rYw2gcXaPuf_4TidP5a2hPrl63N643M,322
|
|
121
|
-
adam/commands/postgres/psql_table_completer.py,sha256=WI9VvnI2w6U8HZOdPPiacpf4ShPjHuunHnOtrx7LYG8,509
|
|
131
|
+
adam/commands/postgres/postgres_utils.py,sha256=yzOdeo2opAgCb-hXurD2w2JfJ-g-D4EyBcFDw3ooGe4,889
|
|
132
|
+
adam/commands/postgres/psql_completions.py,sha256=Ep5BIjwH0ZnH1-YbkYdRMdT0r9R6GVVjCKmmUyfP54g,336
|
|
122
133
|
adam/commands/reaper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
123
|
-
adam/commands/reaper/reaper.py,sha256=
|
|
134
|
+
adam/commands/reaper/reaper.py,sha256=QUvJ9sFMiaUwMDbbCDpTlT8CfadafPa3O5yeJLh2TIo,1977
|
|
124
135
|
adam/commands/reaper/reaper_forward.py,sha256=mUp409MzT91cVXGxoPfBGceaR3qZ0rVdWKGdyzPNzSA,3177
|
|
125
136
|
adam/commands/reaper/reaper_forward_stop.py,sha256=mllxBGxOUkFYMvF0eaFbL5VGMVAiFuT5KY8rKWTIiOE,1384
|
|
126
137
|
adam/commands/reaper/reaper_restart.py,sha256=vqPm-8aY0PnIELxmWF-th3wQFE3f0-8DoJrgRIjb8xc,1290
|
|
@@ -134,30 +145,30 @@ adam/commands/reaper/reaper_schedules.py,sha256=-b7eKl0wJT7zMru8qKcLqG5JF0-LfeTc
|
|
|
134
145
|
adam/commands/reaper/reaper_session.py,sha256=bZyknDtsqlGc2JPMfUg0EXA7fOi_fEIzGiVn5x0HwNs,6650
|
|
135
146
|
adam/commands/reaper/reaper_status.py,sha256=g3Uep1AVYOThAaZoFjn4bWTKHElZnCleJyYYHP9HayY,1967
|
|
136
147
|
adam/commands/repair/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
137
|
-
adam/commands/repair/repair.py,sha256=
|
|
148
|
+
adam/commands/repair/repair.py,sha256=Dp-yTvsT2hJU3xeJ8PA05o2pTtKeCHGsV62TT4GMixk,1339
|
|
138
149
|
adam/commands/repair/repair_log.py,sha256=CZTOfNoJdrmimktZlvzr4Mk3h6ldrtyjsf2aGo7w5oA,1159
|
|
139
150
|
adam/commands/repair/repair_run.py,sha256=JMSr17C_1KanbaL-vtHVhz69fOXzuXAiCRenQVmws9s,2598
|
|
140
151
|
adam/commands/repair/repair_scan.py,sha256=WC79lE4TOw6M7TdG2Zdfswuq9gRejJWoL_B4YWBOm8c,2439
|
|
141
152
|
adam/commands/repair/repair_stop.py,sha256=OJAPeWYmaW7MzoAE4un_qGyegSIJlmykdFaqtGV-k64,1193
|
|
142
153
|
adam/commands/show/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
143
|
-
adam/commands/show/show.py,sha256=
|
|
154
|
+
adam/commands/show/show.py,sha256=goOS_gimZZS6cvl5qb4udjNpul4knNtNqXGFJVbt1NM,2128
|
|
144
155
|
adam/commands/show/show_adam.py,sha256=osuafMipN2My4O7bLdukBLsDHtTKguDfTagmgz7aZvw,1314
|
|
145
|
-
adam/commands/show/show_app_actions.py,sha256=
|
|
156
|
+
adam/commands/show/show_app_actions.py,sha256=TKhvjD5Br63-exbq11V48toXVxX8HhMppg5c1IZsAFE,1977
|
|
146
157
|
adam/commands/show/show_app_id.py,sha256=h2ezkJiu18dyDTIYA9F6crUGyelgOevsJuxh3jOUelg,1384
|
|
147
|
-
adam/commands/show/show_app_queues.py,sha256=
|
|
158
|
+
adam/commands/show/show_app_queues.py,sha256=1WUVI_PkM7m9vTO2we9Ky3hTkH12YY_R6JpF52uodnQ,1409
|
|
148
159
|
adam/commands/show/show_cassandra_status.py,sha256=j2kr0asSYQ-VTAsJW3Ikqkk2R6ltM-az3HXcACUM4rU,5157
|
|
149
160
|
adam/commands/show/show_cassandra_version.py,sha256=vq9F1O03tkYMlqENxEYFXXh8RnK30lXrFYVIgN4hP_I,1633
|
|
150
161
|
adam/commands/show/show_commands.py,sha256=ivjY3u3Ph969zOh0dYi0KjAfm7ClUGdQpkJLJAvpeUc,1893
|
|
151
162
|
adam/commands/show/show_host.py,sha256=nJZdk3guvHNZqoy5QDW9xff9bmqPgYVVpteXBp9RE8U,877
|
|
152
|
-
adam/commands/show/show_login.py,sha256
|
|
163
|
+
adam/commands/show/show_login.py,sha256=9sZYuRX_gdBKL1EJngJPPIBZyfqSlUoaQ0XWiIh1Pfk,1924
|
|
153
164
|
adam/commands/show/show_params.py,sha256=LoBj_ScmtsPrXSUH59p3IYAlmL-0Q_Gb01bp_7zrwQA,1008
|
|
154
165
|
adam/commands/show/show_processes.py,sha256=K7sBSyvCukp3bfoi0SBaqMV5a4Af8paEQXVZJT-gqgE,1770
|
|
155
166
|
adam/commands/show/show_repairs.py,sha256=m82ukc6YxjvJc9rdKXsiJLtXrEUCiaE-VPqgxDsIOeM,1477
|
|
156
167
|
adam/commands/show/show_storage.py,sha256=WuBB5AEFm4g7oBz_YCbtkrF2GEeJ-J2tqCVmvzwmwuI,1837
|
|
157
168
|
adam/sql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
158
|
-
adam/sql/sql_completer.py,sha256=
|
|
159
|
-
adam/sql/
|
|
160
|
-
adam/sql/term_completer.py,sha256=
|
|
169
|
+
adam/sql/sql_completer.py,sha256=nJ_Coq9hvvOgAJqb5IacMtUoO4YUUPm-mMqXM_3q9DQ,3678
|
|
170
|
+
adam/sql/sql_state_machine.py,sha256=waFXizcrHSmciovSPWp5WtPlhb3uclHkqL6N4bnNfII,33793
|
|
171
|
+
adam/sql/term_completer.py,sha256=HZjOV4fEV9LraoMjkk8lHxNvzRtSIYsGUJhSMOhuoHY,2599
|
|
161
172
|
adam/sso/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
162
173
|
adam/sso/authenticator.py,sha256=BCm16L9zf5aLU47-sTCnudn2zLPwd8M2wwRminJfsqw,615
|
|
163
174
|
adam/sso/authn_ad.py,sha256=fDW8UR3WWykny5Awa5dQjjBUSFzIDz4aMn-lwXoABl8,5857
|
|
@@ -169,22 +180,24 @@ adam/sso/idp_login.py,sha256=QAtCUeDTVWliJy40RK_oac8Vgybr13xH8wzeBoxPaa8,1754
|
|
|
169
180
|
adam/sso/idp_session.py,sha256=9BUHNRf70u4rVKrVY1HKPOEmOviXvkjam8WJxmXSKIM,1735
|
|
170
181
|
adam/sso/sso_config.py,sha256=5N8WZgIJQBtHUy585XLRWKjpU87_v6QluyNK9E27D5s,2459
|
|
171
182
|
adam/utils_k8s/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
172
|
-
adam/utils_k8s/
|
|
173
|
-
adam/utils_k8s/
|
|
183
|
+
adam/utils_k8s/app_clusters.py,sha256=VUi3deOIqFuvJc7Wobt1QkEDUhRe_k8wj9mAsur1mes,1394
|
|
184
|
+
adam/utils_k8s/app_pods.py,sha256=OM-Hr0tgSBoHXzUEdwzdIZY1KvI_DVa67uRQahNNc9E,1435
|
|
185
|
+
adam/utils_k8s/cassandra_clusters.py,sha256=i_kPRim0YELLxJDDlRcSSsQ0gmTBqvtBxW7wPH2LSkg,1455
|
|
186
|
+
adam/utils_k8s/cassandra_nodes.py,sha256=G6BjN7NAU6LN7xzsFw7BdNFNb3yR_UyJE0RFG_4dOLw,1514
|
|
174
187
|
adam/utils_k8s/config_maps.py,sha256=vc9A-2D1-1mindCMFL1wuysDOXb0RCl4BdjC6B6usXI,1194
|
|
175
188
|
adam/utils_k8s/custom_resources.py,sha256=cIeaZRQET2DelTGU2f5QsMckh7TddPpWZDFeNK3txeQ,7647
|
|
176
189
|
adam/utils_k8s/deployment.py,sha256=SLhnMm5GMXwEldj2OupSFBUsvNjynwSNrv5tIDvLMrc,2921
|
|
177
190
|
adam/utils_k8s/ingresses.py,sha256=ul3Z6fDGc_Cxcn-ExP0vXhZatoShCUZFtpwtCY4Qx7o,3460
|
|
178
191
|
adam/utils_k8s/jobs.py,sha256=gJpBpjcZ_FlkWJJIlavbHC_bqdmvv-GMVo8UZVh0sOQ,2610
|
|
179
192
|
adam/utils_k8s/kube_context.py,sha256=xJF_72vUJu-X9MpIYzOIfnj7KEWU7a_sLBR-H3994Y0,3311
|
|
180
|
-
adam/utils_k8s/pods.py,sha256=
|
|
193
|
+
adam/utils_k8s/pods.py,sha256=NSPL_bxWjbqWU4x_IQRric38rd7a9qDKJBuiksF1SEQ,12343
|
|
181
194
|
adam/utils_k8s/secrets.py,sha256=tBSKLknHlwdwyTzqvtJ2YS-y9x4gvW57Ug9sOkK_U50,2413
|
|
182
195
|
adam/utils_k8s/service_accounts.py,sha256=v2oQSqCrNvt2uRnKlNwR3fjtpUG7oF5nqgzEB7NnT-U,6349
|
|
183
196
|
adam/utils_k8s/services.py,sha256=EOJJGACVbbRvu5T3rMKqIJqgYic1_MSJ17EA0TJ6UOk,3156
|
|
184
|
-
adam/utils_k8s/statefulsets.py,sha256=
|
|
197
|
+
adam/utils_k8s/statefulsets.py,sha256=0J_cYRqH96PCcq3tdsRrs4Q4ewv5dT_FMBR0HGAJ3d8,4710
|
|
185
198
|
adam/utils_k8s/volumes.py,sha256=RIBmlOSWM3V3QVXLCFT0owVOyh4rGG1ETp521a-6ndo,1137
|
|
186
|
-
kaqing-2.0.
|
|
187
|
-
kaqing-2.0.
|
|
188
|
-
kaqing-2.0.
|
|
189
|
-
kaqing-2.0.
|
|
190
|
-
kaqing-2.0.
|
|
199
|
+
kaqing-2.0.115.dist-info/METADATA,sha256=3gO0cbSLVb04rtbESt3_xB76kuWf0X21xaFgfKfyZy0,133
|
|
200
|
+
kaqing-2.0.115.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
201
|
+
kaqing-2.0.115.dist-info/entry_points.txt,sha256=SkzhuQJUWsXOzHeZ5TgQ2c3_g53UGK23zzJU_JTZOZI,39
|
|
202
|
+
kaqing-2.0.115.dist-info/top_level.txt,sha256=8_2PZkwBb-xDcnc8a2rAbQeJhXKXskc7zTP7pSPa1fw,5
|
|
203
|
+
kaqing-2.0.115.dist-info/RECORD,,
|
adam/commands/bash.py
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
from adam.commands.command import Command
|
|
2
|
-
from adam.utils_k8s.cassandra_clusters import CassandraClusters
|
|
3
|
-
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
4
|
-
from adam.pod_exec_result import PodExecResult
|
|
5
|
-
from adam.repl_state import BashSession, ReplState, RequiredState
|
|
6
|
-
|
|
7
|
-
class Bash(Command):
|
|
8
|
-
COMMAND = 'bash'
|
|
9
|
-
|
|
10
|
-
# the singleton pattern
|
|
11
|
-
def __new__(cls, *args, **kwargs):
|
|
12
|
-
if not hasattr(cls, 'instance'): cls.instance = super(Bash, cls).__new__(cls)
|
|
13
|
-
|
|
14
|
-
return cls.instance
|
|
15
|
-
|
|
16
|
-
def __init__(self, successor: Command=None):
|
|
17
|
-
super().__init__(successor)
|
|
18
|
-
|
|
19
|
-
def command(self):
|
|
20
|
-
return Bash.COMMAND
|
|
21
|
-
|
|
22
|
-
def required(self):
|
|
23
|
-
return RequiredState.CLUSTER_OR_POD
|
|
24
|
-
|
|
25
|
-
def run(self, cmd: str, s0: ReplState):
|
|
26
|
-
if not(args := self.args(cmd)):
|
|
27
|
-
return super().run(cmd, s0)
|
|
28
|
-
|
|
29
|
-
state, args = self.apply_state(args, s0, args_to_check=2)
|
|
30
|
-
if not self.validate_state(state):
|
|
31
|
-
return state
|
|
32
|
-
|
|
33
|
-
if state.in_repl:
|
|
34
|
-
if s0.sts != state.sts or s0.pod != state.pod:
|
|
35
|
-
r = self.exec_with_dir(state, args)
|
|
36
|
-
else:
|
|
37
|
-
r = self.exec_with_dir(s0, args)
|
|
38
|
-
|
|
39
|
-
if not r:
|
|
40
|
-
state.exit_bash()
|
|
41
|
-
|
|
42
|
-
return 'inconsistent pwd'
|
|
43
|
-
|
|
44
|
-
return r
|
|
45
|
-
else:
|
|
46
|
-
command = ' '.join(args)
|
|
47
|
-
|
|
48
|
-
if state.pod:
|
|
49
|
-
CassandraNodes.exec(state.pod, state.namespace, command, show_out=True)
|
|
50
|
-
elif state.sts:
|
|
51
|
-
CassandraClusters.exec(state.sts, state.namespace, command, action='bash', show_out=True)
|
|
52
|
-
|
|
53
|
-
return state
|
|
54
|
-
|
|
55
|
-
def exec_with_dir(self, state: ReplState, args: list[str]) -> list[PodExecResult]:
|
|
56
|
-
session_just_created = False
|
|
57
|
-
if not args:
|
|
58
|
-
session_just_created = True
|
|
59
|
-
session = BashSession(state.device)
|
|
60
|
-
state.enter_bash(session)
|
|
61
|
-
|
|
62
|
-
if state.bash_session:
|
|
63
|
-
if args != ['pwd']:
|
|
64
|
-
if args:
|
|
65
|
-
args.append('&&')
|
|
66
|
-
args.extend(['pwd', '>', f'/tmp/.qing-{state.bash_session.session_id}'])
|
|
67
|
-
|
|
68
|
-
if not session_just_created:
|
|
69
|
-
if pwd := state.bash_session.pwd(state):
|
|
70
|
-
args = ['cd', pwd, '&&'] + args
|
|
71
|
-
|
|
72
|
-
command = ' '.join(args)
|
|
73
|
-
|
|
74
|
-
rs = []
|
|
75
|
-
|
|
76
|
-
if state.pod:
|
|
77
|
-
rs = [CassandraNodes.exec(state.pod, state.namespace, command,
|
|
78
|
-
show_out=not session_just_created, shell='bash')]
|
|
79
|
-
elif state.sts:
|
|
80
|
-
rs = CassandraClusters.exec(state.sts, state.namespace, command, action='bash',
|
|
81
|
-
show_out=not session_just_created, shell='bash')
|
|
82
|
-
|
|
83
|
-
return rs
|
|
84
|
-
|
|
85
|
-
def completion(self, state: ReplState):
|
|
86
|
-
if state.pod or state.sts:
|
|
87
|
-
return {Bash.COMMAND: None}
|
|
88
|
-
|
|
89
|
-
return {}
|
|
90
|
-
|
|
91
|
-
def help(self, _: ReplState):
|
|
92
|
-
return f'{Bash.COMMAND} [bash-commands]\t run bash on the Cassandra nodes'
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
from adam.sql.term_completer import TermCompleter
|
|
2
|
-
|
|
3
|
-
class CqlTableNameCompleter(TermCompleter):
|
|
4
|
-
def __init__(self, tables: list[str], ignore_case: bool = True):
|
|
5
|
-
super().__init__(tables, ignore_case=ignore_case)
|
|
6
|
-
|
|
7
|
-
def __repr__(self) -> str:
|
|
8
|
-
return "CqlTableCompleter(%r)" % (len(self.words))
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import click
|
|
2
|
-
|
|
3
|
-
from adam.commands.command import Command
|
|
4
|
-
from adam.commands.describe.describe_keyspace import DescribeKeyspace
|
|
5
|
-
from adam.commands.describe.describe_keyspaces import DescribeKeyspaces
|
|
6
|
-
from adam.commands.describe.describe_table import DescribeTable
|
|
7
|
-
from adam.commands.describe.describe_tables import DescribeTables
|
|
8
|
-
from adam.repl_state import ReplState, RequiredState
|
|
9
|
-
|
|
10
|
-
class Describe(Command):
|
|
11
|
-
COMMAND = 'describe'
|
|
12
|
-
reaper_login = None
|
|
13
|
-
|
|
14
|
-
# the singleton pattern
|
|
15
|
-
def __new__(cls, *args, **kwargs):
|
|
16
|
-
if not hasattr(cls, 'instance'): cls.instance = super(Describe, cls).__new__(cls)
|
|
17
|
-
|
|
18
|
-
return cls.instance
|
|
19
|
-
|
|
20
|
-
def __init__(self, successor: Command=None):
|
|
21
|
-
super().__init__(successor)
|
|
22
|
-
|
|
23
|
-
def required(self):
|
|
24
|
-
return RequiredState.CLUSTER
|
|
25
|
-
|
|
26
|
-
def command(self):
|
|
27
|
-
return Describe.COMMAND
|
|
28
|
-
|
|
29
|
-
def run(self, cmd: str, state: ReplState):
|
|
30
|
-
if not(args := self.args(cmd)):
|
|
31
|
-
return super().run(cmd, state)
|
|
32
|
-
|
|
33
|
-
return super().intermediate_run(cmd, state, args, Describe.cmd_list())
|
|
34
|
-
|
|
35
|
-
def cmd_list():
|
|
36
|
-
return [DescribeKeyspace(), DescribeKeyspaces(), DescribeTable(), DescribeTables()]
|
|
37
|
-
|
|
38
|
-
def completion(self, state: ReplState):
|
|
39
|
-
if state.sts:
|
|
40
|
-
return super().completion(state)
|
|
41
|
-
|
|
42
|
-
return {}
|
|
43
|
-
|
|
44
|
-
class DescribeCommandHelper(click.Command):
|
|
45
|
-
def get_help(self, ctx: click.Context):
|
|
46
|
-
Command.intermediate_help(super().get_help(ctx), Describe.COMMAND, Describe.cmd_list(), show_cluster_help=True)
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
from adam.commands.command import Command
|
|
2
|
-
from adam.commands.cql.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 DescribeKeyspace(Command):
|
|
8
|
-
COMMAND = 'describe keyspace'
|
|
9
|
-
|
|
10
|
-
# the singleton pattern
|
|
11
|
-
def __new__(cls, *args, **kwargs):
|
|
12
|
-
if not hasattr(cls, 'instance'): cls.instance = super(DescribeKeyspace, 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 DescribeKeyspace.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 keyspace name')
|
|
38
|
-
else:
|
|
39
|
-
log2('* keyspace name is missing.')
|
|
40
|
-
log2()
|
|
41
|
-
Command.display_help()
|
|
42
|
-
|
|
43
|
-
return 'missing-keyspace'
|
|
44
|
-
|
|
45
|
-
r: list[PodExecResult] = run_cql(state, f'describe keyspace {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, {ks: {'--all-nodes': None} for ks in keyspaces(state, on_any=True)})
|
|
56
|
-
|
|
57
|
-
return {}
|
|
58
|
-
|
|
59
|
-
def help(self, _: ReplState) -> str:
|
|
60
|
-
return f'{DescribeKeyspace.COMMAND} <keyspace-name> [--all-nodes]\t describe Cassandra keyspace'
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
from adam.commands.command import Command
|
|
2
|
-
from adam.commands.cql.cql_utils import 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'
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
from adam.commands.command import Command
|
|
2
|
-
from adam.commands.cql.cql_utils import run_cql, table_names
|
|
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'
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
from adam.commands.command import Command
|
|
2
|
-
from adam.commands.cql.cql_utils import 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 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,11 +0,0 @@
|
|
|
1
|
-
from adam.commands.postgres.postgres_utils import pg_table_names
|
|
2
|
-
from adam.sql.term_completer import TermCompleter
|
|
3
|
-
|
|
4
|
-
class PsqlTableNameCompleter(TermCompleter):
|
|
5
|
-
def __init__(self, namespace: str, pg_path: str, ignore_case: bool = True):
|
|
6
|
-
super().__init__(pg_table_names(namespace, pg_path), ignore_case=ignore_case)
|
|
7
|
-
self.namespace = namespace
|
|
8
|
-
self.pg_path = pg_path
|
|
9
|
-
|
|
10
|
-
def __repr__(self) -> str:
|
|
11
|
-
return "PsqlTableCompleter(%r, pg_path=%r)" % (self.namespace, self.pg_path)
|