kaqing 2.0.93__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/apps.py +2 -2
- adam/batch.py +2 -16
- adam/checks/check_utils.py +4 -4
- adam/checks/compactionstats.py +1 -1
- adam/checks/cpu.py +2 -2
- adam/checks/disk.py +1 -1
- adam/checks/gossip.py +1 -1
- adam/checks/memory.py +3 -3
- adam/checks/status.py +1 -1
- 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 +39 -4
- 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 +26 -14
- adam/commands/check.py +6 -0
- adam/commands/cli_commands.py +3 -3
- adam/commands/code.py +60 -0
- adam/commands/command.py +9 -4
- adam/commands/commands_utils.py +4 -5
- adam/commands/cql/cql_completions.py +7 -3
- adam/commands/cql/cql_utils.py +103 -11
- adam/commands/cql/cqlsh.py +10 -5
- adam/commands/deploy/code_utils.py +2 -2
- adam/commands/deploy/deploy.py +7 -1
- adam/commands/deploy/deploy_pg_agent.py +2 -2
- adam/commands/deploy/deploy_pod.py +6 -6
- adam/commands/deploy/deploy_utils.py +2 -2
- adam/commands/deploy/undeploy.py +7 -1
- adam/commands/deploy/undeploy_pg_agent.py +2 -2
- adam/commands/deploy/undeploy_pod.py +4 -4
- adam/commands/devices.py +29 -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 +2 -1
- adam/commands/ls.py +43 -31
- adam/commands/medusa/medusa_backup.py +2 -2
- adam/commands/medusa/medusa_restore.py +2 -2
- adam/commands/medusa/medusa_show_backupjobs.py +3 -2
- adam/commands/medusa/medusa_show_restorejobs.py +2 -2
- adam/commands/nodetool.py +11 -16
- adam/commands/postgres/postgres.py +4 -4
- adam/commands/postgres/{postgres_session.py → postgres_context.py} +29 -30
- 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/reaper/reaper_restart.py +1 -1
- adam/commands/reaper/reaper_session.py +1 -1
- adam/commands/repair/repair.py +3 -3
- adam/commands/repair/repair_log.py +1 -1
- adam/commands/repair/repair_run.py +2 -2
- adam/commands/repair/repair_scan.py +1 -1
- adam/commands/repair/repair_stop.py +1 -1
- adam/commands/report.py +6 -0
- adam/commands/restart.py +2 -2
- adam/commands/rollout.py +1 -1
- adam/commands/show/show.py +3 -1
- adam/commands/show/show_app_actions.py +3 -0
- adam/commands/show/show_app_id.py +1 -1
- adam/commands/show/show_app_queues.py +3 -2
- adam/commands/show/show_cassandra_status.py +3 -3
- adam/commands/show/show_cassandra_version.py +3 -3
- adam/commands/show/show_login.py +3 -0
- adam/commands/show/show_processes.py +1 -1
- adam/commands/show/show_repairs.py +2 -2
- adam/commands/show/show_storage.py +1 -1
- adam/commands/watch.py +1 -1
- adam/config.py +2 -1
- adam/embedded_params.py +1 -1
- adam/pod_exec_result.py +7 -1
- adam/repl.py +125 -99
- adam/repl_commands.py +29 -17
- adam/repl_state.py +229 -49
- adam/sql/sql_completer.py +86 -62
- adam/sql/sql_state_machine.py +563 -0
- adam/sql/term_completer.py +3 -0
- adam/sso/cred_cache.py +1 -1
- adam/sso/idp.py +1 -1
- adam/utils_athena.py +108 -74
- adam/utils_audits.py +104 -0
- adam/utils_export.py +42 -0
- adam/utils_k8s/__init__.py +0 -0
- adam/utils_k8s/app_clusters.py +33 -0
- adam/utils_k8s/app_pods.py +31 -0
- adam/{k8s_utils → utils_k8s}/cassandra_clusters.py +5 -6
- adam/{k8s_utils → utils_k8s}/cassandra_nodes.py +11 -4
- adam/{k8s_utils → utils_k8s}/deployment.py +2 -2
- adam/{k8s_utils → utils_k8s}/pods.py +54 -11
- adam/{k8s_utils → utils_k8s}/statefulsets.py +2 -2
- adam/version.py +1 -1
- {kaqing-2.0.93.dist-info → kaqing-2.0.115.dist-info}/METADATA +1 -1
- kaqing-2.0.115.dist-info/RECORD +203 -0
- adam/commands/bash.py +0 -91
- 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
- kaqing-2.0.93.dist-info/RECORD +0 -190
- /adam/commands/{describe → bash}/__init__.py +0 -0
- /adam/{k8s_utils → commands/export}/__init__.py +0 -0
- /adam/{k8s_utils → utils_k8s}/config_maps.py +0 -0
- /adam/{k8s_utils → utils_k8s}/custom_resources.py +0 -0
- /adam/{k8s_utils → utils_k8s}/ingresses.py +0 -0
- /adam/{k8s_utils → utils_k8s}/jobs.py +0 -0
- /adam/{k8s_utils → utils_k8s}/kube_context.py +0 -0
- /adam/{k8s_utils → utils_k8s}/secrets.py +0 -0
- /adam/{k8s_utils → utils_k8s}/service_accounts.py +0 -0
- /adam/{k8s_utils → utils_k8s}/services.py +0 -0
- /adam/{k8s_utils → utils_k8s}/volumes.py +0 -0
- {kaqing-2.0.93.dist-info → kaqing-2.0.115.dist-info}/WHEEL +0 -0
- {kaqing-2.0.93.dist-info → kaqing-2.0.115.dist-info}/entry_points.txt +0 -0
- {kaqing-2.0.93.dist-info → kaqing-2.0.115.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
adam/__init__.py,sha256=oVw1FNd9HZPJ7wm6BNn5ybyNGJLjJ8kopMeBiwgMaOI,59
|
|
2
|
+
adam/app_session.py,sha256=Klypm4JYHOlovaRCHAZ2P_Mj_nheMlcQgX403R0TJGk,6969
|
|
3
|
+
adam/apps.py,sha256=okYibOEiCVoM5zsPUKaLJZlwlnvWSHKL7U2J1Yk3-Aw,6701
|
|
4
|
+
adam/batch.py,sha256=V_2DvL4p6FVHda-d1EysXK47-9vYNR3Gc7FPj9E0JOo,23974
|
|
5
|
+
adam/cli.py,sha256=03pIZdomAu7IL-GSP6Eun_PKwwISShRAmfx6eVRPGC0,458
|
|
6
|
+
adam/cli_group.py,sha256=W3zy1BghCtVcEXizq8fBH-93ZRVVwgAyGPzy0sHno1Y,593
|
|
7
|
+
adam/config.py,sha256=GRtfpGgGwfeYdVSPfk3LKCRXlOEJZ2vmXM3ADr7IhVk,2880
|
|
8
|
+
adam/embedded_apps.py,sha256=lKPx63mKzJbNmwz0rgL4gF76M9fDGxraYTtNAIGnZ_s,419
|
|
9
|
+
adam/embedded_params.py,sha256=dqIS4yUzGMud7D6_KD8PobyYqU0JWl2xeozGNMpuRzs,5175
|
|
10
|
+
adam/log.py,sha256=gg5DK52wLPc9cjykeh0WFHyAk1qI3HEpGaAK8W2dzXY,1146
|
|
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
|
+
adam/repl_session.py,sha256=uIogcvWBh7wd8QQ-p_JgLsyJ8YJgINw5vOd6JIsd7Vo,472
|
|
15
|
+
adam/repl_state.py,sha256=GYk5zJGVhH029FGksxzRxui49lElEa6eZJPJqgd9TQ0,14601
|
|
16
|
+
adam/utils.py,sha256=sbsNZP3qGJtb6fXCa4dDXHry5ay9ev583cCZIQzy07s,7382
|
|
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
|
|
20
|
+
adam/utils_net.py,sha256=65fhBnWMCkhGtyHqz95qcHaCo35q-WX1RBkkXG8dKpI,416
|
|
21
|
+
adam/version.py,sha256=x8_TLPZv7E6mDyCNY2xrTl8OFXXqKJa2jg3vAM4QJvA,140
|
|
22
|
+
adam/checks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
|
+
adam/checks/check.py,sha256=Qopr3huYcMu2bzQgb99dEUYjFzkjKHRI76S6KA9b9Rk,702
|
|
24
|
+
adam/checks/check_context.py,sha256=FEHkQ32jY1EDopQ2uYWqy9v7aEEX1orLpJWhopwAlh4,402
|
|
25
|
+
adam/checks/check_result.py,sha256=5_DVNgkCC9t7xFJYNsjd9bfXA1I4vYb6K3kmN8cdMrA,669
|
|
26
|
+
adam/checks/check_utils.py,sha256=z6MqlCZg1YMJZgDe0GGq4sYBaQ2w0_wXsbTLjlAEz1Q,3772
|
|
27
|
+
adam/checks/compactionstats.py,sha256=NFi9RcRImZqCJBZs3LH851RHmlu4BO0s_QOsvkdUxKQ,2304
|
|
28
|
+
adam/checks/cpu.py,sha256=5KK-t1_2TSbT0lX6syEBRF1kZPoFQMOr1EJejFFq5gs,2666
|
|
29
|
+
adam/checks/disk.py,sha256=y0gwfh-MuEx0Ot7EXf8d7Q0ovbkThFMS1yWrIeeVe84,5214
|
|
30
|
+
adam/checks/gossip.py,sha256=60PeVkhtMWziiYILPwMKfesFjOanIn-nxeZZL5nUHQs,3119
|
|
31
|
+
adam/checks/issue.py,sha256=u3E6yCpDGGJiveKXdpkrKq7HQRTrG7aR2XLCoO-ys7U,498
|
|
32
|
+
adam/checks/memory.py,sha256=1TPoC_eL7QmMMJfaclW3hoSxudsUc4qvrzzb0Z4f5Kw,3056
|
|
33
|
+
adam/checks/status.py,sha256=4IFCesrovCbGKgbJxLr0VxjGGWmmF23ZQNfHUFb5Kyg,2140
|
|
34
|
+
adam/columns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
+
adam/columns/column.py,sha256=O_5ptfx136BKdLo8enDvSL3HlId1dkjMM2XUumg1tNA,956
|
|
36
|
+
adam/columns/columns.py,sha256=AzovFIwOhBDQHc4bFEbhMoxxuOCIbxIzXfp6fQyiRYk,1645
|
|
37
|
+
adam/columns/compactions.py,sha256=ybIEYTkDuRTBLIUNurGhu1jhVnf1UEpJ0abo3GTgmKw,928
|
|
38
|
+
adam/columns/cpu.py,sha256=rPb4pOFNZDOplggaUmSZbpCPgZxyWVXO_JXLcE4YPlM,493
|
|
39
|
+
adam/columns/dir_data.py,sha256=gDLcrwMZ6dEVTmpvc35yX3iNY97mQ5q0eQojm8tZ2so,545
|
|
40
|
+
adam/columns/dir_snapshots.py,sha256=OSseuf7gAvT-_ujLvGt43jF-q7QVJNDcvqOK47QSJbk,451
|
|
41
|
+
adam/columns/gossip.py,sha256=KKUycFG-8YxMh9VYUrYOFwPVvnh-0i19k---DrpW93g,656
|
|
42
|
+
adam/columns/host_id.py,sha256=oqesvFCzUu0utkcH5mhYg0vx7lAW2EIDoezgY_CCP_Y,350
|
|
43
|
+
adam/columns/memory.py,sha256=GinntQroWK6kxn6PrumkJd9ok2skTWXLepM1U6lzc4g,701
|
|
44
|
+
adam/columns/node_address.py,sha256=PqSm2FtR0NAhc-R17sPRJJ3c6eWlJLHPctu8RsCslcM,355
|
|
45
|
+
adam/columns/node_load.py,sha256=Oc-kdfezYBP5eWDug-ijgM48x6XRNjwxxoQDZt_MbQc,349
|
|
46
|
+
adam/columns/node_owns.py,sha256=Iv5FDYV0m3ZM2JK05Fl485ZxDgOxZHDIN9KYNJc6Zdg,349
|
|
47
|
+
adam/columns/node_status.py,sha256=im52GfdETXVJVM00fU5OjJM2FvLZrgqpLkWKCwWhjAs,353
|
|
48
|
+
adam/columns/node_tokens.py,sha256=38D9xJ3uA48gzEYBtIiIUbZJcteM1H4KryzJNn01uZ8,353
|
|
49
|
+
adam/columns/node_utils.py,sha256=ql2StXmASC7equuabZVZEQ_BPTu2KkS99gY_3JXpIvU,774
|
|
50
|
+
adam/columns/pod_name.py,sha256=IYw0ZKA7Fb9LaGXENqzZTiTgL98tahwFRtfy0KkKh2Q,280
|
|
51
|
+
adam/columns/volume_cassandra.py,sha256=9KRNOzjNYganI9avN6zaA5_-7yxD4rV-KNxro9CSUg4,753
|
|
52
|
+
adam/columns/volume_root.py,sha256=29ujLoCAf9LO75u62LxEaPD58s6ihV-tcK17OeLSOM0,556
|
|
53
|
+
adam/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
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
|
|
60
|
+
adam/commands/cli_commands.py,sha256=vZMgXBQpTfiJ9E4v9yHB6WwcJgO6UcqWF3NuRspicq8,3620
|
|
61
|
+
adam/commands/code.py,sha256=x1xCNlm5eb33SJUbvFLTUTbqNdOJhhTAt7PSgwvIO8I,1905
|
|
62
|
+
adam/commands/command.py,sha256=8SXYJiBo_umDS6w5G4BcGQqIKcvHXnuXScdeoxIGrUo,4219
|
|
63
|
+
adam/commands/command_helpers.py,sha256=leOJJK1UXczNTJHN9TGMCbIpUpmpreULvQ-TvnsYS7w,1134
|
|
64
|
+
adam/commands/commands_utils.py,sha256=lRzLrgDklmDPDDS3brG_ZVBabpG4M9W-fi_1bw799dE,3093
|
|
65
|
+
adam/commands/cp.py,sha256=dyQViRDPNqsKRkxPb7WyEVIBNw7YB6IfYa2q3VtfzyA,3107
|
|
66
|
+
adam/commands/devices.py,sha256=UsJBju6-3ztbZt-2zpuMmrH4-LoDGD7pETG1WRxNS88,3971
|
|
67
|
+
adam/commands/exit.py,sha256=5MWUAmzYBlsrp0CoiTDB13SUkX9Ya18UlGeOIPia6TA,798
|
|
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
|
|
75
|
+
adam/commands/nodetool_commands.py,sha256=5IgWC3rmeDD1cgwqQjiiWzi-wJpJ3n_8pAzz_9phXuk,2635
|
|
76
|
+
adam/commands/param_get.py,sha256=kPAAppK2T0tEFRnSIVFLDPIIGHhgLA7drJhn8TRyvvE,1305
|
|
77
|
+
adam/commands/param_set.py,sha256=QDIuqfU80aWCB16OK49yf7XRaRTWwiLkwMsJuVikq9I,1271
|
|
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
|
|
81
|
+
adam/commands/restart.py,sha256=SAxWHvglTckQJ0tJe5t-HWsVerbreNMM-7Nb9PAqno4,2044
|
|
82
|
+
adam/commands/rollout.py,sha256=Db9P4Owd3aPcRLIGhwyEElBNm_2Ke54KbiXyVKmztcE,2959
|
|
83
|
+
adam/commands/shell.py,sha256=wY_PIx7Lt6vuxhFArlfxdEnBbrouCJ3yNHhFn17DEqw,848
|
|
84
|
+
adam/commands/watch.py,sha256=fU2LGll-Igl08HpUQALOnh8l3s3AMGFX26NCLhqbfcw,2438
|
|
85
|
+
adam/commands/audit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
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
|
|
96
|
+
adam/commands/cql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
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
|
|
100
|
+
adam/commands/deploy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
101
|
+
adam/commands/deploy/code_start.py,sha256=-iH8HThTNM83IfBxT_LqTByuHVatV9d-Il4OYOfrwLI,1370
|
|
102
|
+
adam/commands/deploy/code_stop.py,sha256=ch7ZMgosvTHsGaIcDwQY5XYh_5HYrUjBkZFOI-d2gOU,1696
|
|
103
|
+
adam/commands/deploy/code_utils.py,sha256=cRvktxpAB2-QBX7-eYt9O57uio58X763uXWotTci3mc,3296
|
|
104
|
+
adam/commands/deploy/deploy.py,sha256=t54wa0cKXUpNFT0jvwaK-mWszFwGxbcpLZjz94ujHk4,1402
|
|
105
|
+
adam/commands/deploy/deploy_frontend.py,sha256=S3SvJD4JZQ9kDOOP_mrTnZFDl54AHhio5xxNgIUBZVk,1704
|
|
106
|
+
adam/commands/deploy/deploy_pg_agent.py,sha256=v1jVzNnNIxsemHVzGb6iDvvztjLTmHoCVRdZ_S1ATQM,1203
|
|
107
|
+
adam/commands/deploy/deploy_pod.py,sha256=QvNeBoTa_d3ERXQA7OcQm1awLi5ixj_nS94pqktYMb0,4663
|
|
108
|
+
adam/commands/deploy/deploy_utils.py,sha256=uQEl0gMOJw2TNjP0Q3pv5nrZYjAsoACtep0a15M0DCE,1524
|
|
109
|
+
adam/commands/deploy/undeploy.py,sha256=4Vces7YmTdYWnlXU6HCsjCjI3jCUFPV3AeWkUqwZoGY,1456
|
|
110
|
+
adam/commands/deploy/undeploy_frontend.py,sha256=gHekPn7l19JgVbhneKpQ7ModNoDFmzWRMyQv9v4FBxo,1261
|
|
111
|
+
adam/commands/deploy/undeploy_pg_agent.py,sha256=gWYaxxw9Hu1V-cI2bYynej9nMaZmR_uA8mRqrYP6zpY,1319
|
|
112
|
+
adam/commands/deploy/undeploy_pod.py,sha256=I-pNfdcfBGLJ5YssTjSHoM4miygqoiGN233wUSIUG9Y,1905
|
|
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
|
|
120
|
+
adam/commands/medusa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
121
|
+
adam/commands/medusa/medusa.py,sha256=KNFjStvilIuOJt3wTtcWmKvdm8FdCnrDY2ltEWbratk,1402
|
|
122
|
+
adam/commands/medusa/medusa_backup.py,sha256=Tns-nBbqTnry8zoCFtXCisco3ipcOgArQbN5rc7SRGY,1801
|
|
123
|
+
adam/commands/medusa/medusa_restore.py,sha256=yvqMZtGsZHlFfBNAfcvzfcCbe1NQdlP3H4JQfsQ0WvU,3274
|
|
124
|
+
adam/commands/medusa/medusa_show_backupjobs.py,sha256=LPLyFOLH2Y3FxjZlW7DoyQKththaieh_gmBFC4YyA_4,1757
|
|
125
|
+
adam/commands/medusa/medusa_show_restorejobs.py,sha256=bj7afDJ7tgvssazOcxru9rCmcwPoDaTAgkYdvHKWhjI,1651
|
|
126
|
+
adam/commands/postgres/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
127
|
+
adam/commands/postgres/postgres.py,sha256=4IepGZo3W7kiET7OemQQ6JivplZfW-QwhbIvgMIGUZM,3145
|
|
128
|
+
adam/commands/postgres/postgres_context.py,sha256=Bk7yKHuYCjq3eNhNQ7AT8bEaNvEzyx9WwdBMFJ128b0,9357
|
|
129
|
+
adam/commands/postgres/postgres_ls.py,sha256=HwZTgwGKXUqHX33S8aQPF6FqCrLqtoz4cLyJV2SpoE0,1186
|
|
130
|
+
adam/commands/postgres/postgres_preview.py,sha256=MLzdEc4mvNj6V1Q8jO5OPznXyYELJHgd35_eQgLlNIU,1274
|
|
131
|
+
adam/commands/postgres/postgres_utils.py,sha256=yzOdeo2opAgCb-hXurD2w2JfJ-g-D4EyBcFDw3ooGe4,889
|
|
132
|
+
adam/commands/postgres/psql_completions.py,sha256=Ep5BIjwH0ZnH1-YbkYdRMdT0r9R6GVVjCKmmUyfP54g,336
|
|
133
|
+
adam/commands/reaper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
134
|
+
adam/commands/reaper/reaper.py,sha256=QUvJ9sFMiaUwMDbbCDpTlT8CfadafPa3O5yeJLh2TIo,1977
|
|
135
|
+
adam/commands/reaper/reaper_forward.py,sha256=mUp409MzT91cVXGxoPfBGceaR3qZ0rVdWKGdyzPNzSA,3177
|
|
136
|
+
adam/commands/reaper/reaper_forward_stop.py,sha256=mllxBGxOUkFYMvF0eaFbL5VGMVAiFuT5KY8rKWTIiOE,1384
|
|
137
|
+
adam/commands/reaper/reaper_restart.py,sha256=vqPm-8aY0PnIELxmWF-th3wQFE3f0-8DoJrgRIjb8xc,1290
|
|
138
|
+
adam/commands/reaper/reaper_run_abort.py,sha256=vp69f1zoNodwqx61N0CQaevYoR7qF2rccrzjJuF47qY,1858
|
|
139
|
+
adam/commands/reaper/reaper_runs.py,sha256=uVfAK3Pca_N10XKZ1aeMTrCCM8vDExXBWo84_2UmSqo,3253
|
|
140
|
+
adam/commands/reaper/reaper_runs_abort.py,sha256=HZm8Re66XwgURgd0sJtIF2UIwrdozHQJf1O_ZAsLy-I,2538
|
|
141
|
+
adam/commands/reaper/reaper_schedule_activate.py,sha256=HbwaSeKaDoR2qgiWgglwM5gm-4iTN2xKofiOlhUpvrQ,1952
|
|
142
|
+
adam/commands/reaper/reaper_schedule_start.py,sha256=oDwH99QVyeKgu-jk5-pB7BzUH_rablCbtumNHXjBnpU,1940
|
|
143
|
+
adam/commands/reaper/reaper_schedule_stop.py,sha256=_Ld5BRX5pqfIis5i1KG8yif0q5u9RTaFBmmQwkZuOMY,1929
|
|
144
|
+
adam/commands/reaper/reaper_schedules.py,sha256=-b7eKl0wJT7zMru8qKcLqG5JF0-LfeTcNmlxut9t93E,1263
|
|
145
|
+
adam/commands/reaper/reaper_session.py,sha256=bZyknDtsqlGc2JPMfUg0EXA7fOi_fEIzGiVn5x0HwNs,6650
|
|
146
|
+
adam/commands/reaper/reaper_status.py,sha256=g3Uep1AVYOThAaZoFjn4bWTKHElZnCleJyYYHP9HayY,1967
|
|
147
|
+
adam/commands/repair/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
148
|
+
adam/commands/repair/repair.py,sha256=Dp-yTvsT2hJU3xeJ8PA05o2pTtKeCHGsV62TT4GMixk,1339
|
|
149
|
+
adam/commands/repair/repair_log.py,sha256=CZTOfNoJdrmimktZlvzr4Mk3h6ldrtyjsf2aGo7w5oA,1159
|
|
150
|
+
adam/commands/repair/repair_run.py,sha256=JMSr17C_1KanbaL-vtHVhz69fOXzuXAiCRenQVmws9s,2598
|
|
151
|
+
adam/commands/repair/repair_scan.py,sha256=WC79lE4TOw6M7TdG2Zdfswuq9gRejJWoL_B4YWBOm8c,2439
|
|
152
|
+
adam/commands/repair/repair_stop.py,sha256=OJAPeWYmaW7MzoAE4un_qGyegSIJlmykdFaqtGV-k64,1193
|
|
153
|
+
adam/commands/show/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
154
|
+
adam/commands/show/show.py,sha256=goOS_gimZZS6cvl5qb4udjNpul4knNtNqXGFJVbt1NM,2128
|
|
155
|
+
adam/commands/show/show_adam.py,sha256=osuafMipN2My4O7bLdukBLsDHtTKguDfTagmgz7aZvw,1314
|
|
156
|
+
adam/commands/show/show_app_actions.py,sha256=TKhvjD5Br63-exbq11V48toXVxX8HhMppg5c1IZsAFE,1977
|
|
157
|
+
adam/commands/show/show_app_id.py,sha256=h2ezkJiu18dyDTIYA9F6crUGyelgOevsJuxh3jOUelg,1384
|
|
158
|
+
adam/commands/show/show_app_queues.py,sha256=1WUVI_PkM7m9vTO2we9Ky3hTkH12YY_R6JpF52uodnQ,1409
|
|
159
|
+
adam/commands/show/show_cassandra_status.py,sha256=j2kr0asSYQ-VTAsJW3Ikqkk2R6ltM-az3HXcACUM4rU,5157
|
|
160
|
+
adam/commands/show/show_cassandra_version.py,sha256=vq9F1O03tkYMlqENxEYFXXh8RnK30lXrFYVIgN4hP_I,1633
|
|
161
|
+
adam/commands/show/show_commands.py,sha256=ivjY3u3Ph969zOh0dYi0KjAfm7ClUGdQpkJLJAvpeUc,1893
|
|
162
|
+
adam/commands/show/show_host.py,sha256=nJZdk3guvHNZqoy5QDW9xff9bmqPgYVVpteXBp9RE8U,877
|
|
163
|
+
adam/commands/show/show_login.py,sha256=9sZYuRX_gdBKL1EJngJPPIBZyfqSlUoaQ0XWiIh1Pfk,1924
|
|
164
|
+
adam/commands/show/show_params.py,sha256=LoBj_ScmtsPrXSUH59p3IYAlmL-0Q_Gb01bp_7zrwQA,1008
|
|
165
|
+
adam/commands/show/show_processes.py,sha256=K7sBSyvCukp3bfoi0SBaqMV5a4Af8paEQXVZJT-gqgE,1770
|
|
166
|
+
adam/commands/show/show_repairs.py,sha256=m82ukc6YxjvJc9rdKXsiJLtXrEUCiaE-VPqgxDsIOeM,1477
|
|
167
|
+
adam/commands/show/show_storage.py,sha256=WuBB5AEFm4g7oBz_YCbtkrF2GEeJ-J2tqCVmvzwmwuI,1837
|
|
168
|
+
adam/sql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
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
|
|
172
|
+
adam/sso/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
173
|
+
adam/sso/authenticator.py,sha256=BCm16L9zf5aLU47-sTCnudn2zLPwd8M2wwRminJfsqw,615
|
|
174
|
+
adam/sso/authn_ad.py,sha256=fDW8UR3WWykny5Awa5dQjjBUSFzIDz4aMn-lwXoABl8,5857
|
|
175
|
+
adam/sso/authn_okta.py,sha256=TV5vg7OEQPGFG_DSUQnWn37nbMX_qszZB0GRuQl6kGM,4529
|
|
176
|
+
adam/sso/cred_cache.py,sha256=Y86PDrTsuzoZSd8iae14SAv-YVEnxeaf6LukX35iTnw,2099
|
|
177
|
+
adam/sso/id_token.py,sha256=wmVZ8S0sjScnOxmSvOKlIEKgnvdWqhsgq9XjFe355O4,744
|
|
178
|
+
adam/sso/idp.py,sha256=tt6SjpZ2ix_zgfi3hQS9UUis9fvUWl6b4RLaEJ--ruY,5804
|
|
179
|
+
adam/sso/idp_login.py,sha256=QAtCUeDTVWliJy40RK_oac8Vgybr13xH8wzeBoxPaa8,1754
|
|
180
|
+
adam/sso/idp_session.py,sha256=9BUHNRf70u4rVKrVY1HKPOEmOviXvkjam8WJxmXSKIM,1735
|
|
181
|
+
adam/sso/sso_config.py,sha256=5N8WZgIJQBtHUy585XLRWKjpU87_v6QluyNK9E27D5s,2459
|
|
182
|
+
adam/utils_k8s/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
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
|
|
187
|
+
adam/utils_k8s/config_maps.py,sha256=vc9A-2D1-1mindCMFL1wuysDOXb0RCl4BdjC6B6usXI,1194
|
|
188
|
+
adam/utils_k8s/custom_resources.py,sha256=cIeaZRQET2DelTGU2f5QsMckh7TddPpWZDFeNK3txeQ,7647
|
|
189
|
+
adam/utils_k8s/deployment.py,sha256=SLhnMm5GMXwEldj2OupSFBUsvNjynwSNrv5tIDvLMrc,2921
|
|
190
|
+
adam/utils_k8s/ingresses.py,sha256=ul3Z6fDGc_Cxcn-ExP0vXhZatoShCUZFtpwtCY4Qx7o,3460
|
|
191
|
+
adam/utils_k8s/jobs.py,sha256=gJpBpjcZ_FlkWJJIlavbHC_bqdmvv-GMVo8UZVh0sOQ,2610
|
|
192
|
+
adam/utils_k8s/kube_context.py,sha256=xJF_72vUJu-X9MpIYzOIfnj7KEWU7a_sLBR-H3994Y0,3311
|
|
193
|
+
adam/utils_k8s/pods.py,sha256=NSPL_bxWjbqWU4x_IQRric38rd7a9qDKJBuiksF1SEQ,12343
|
|
194
|
+
adam/utils_k8s/secrets.py,sha256=tBSKLknHlwdwyTzqvtJ2YS-y9x4gvW57Ug9sOkK_U50,2413
|
|
195
|
+
adam/utils_k8s/service_accounts.py,sha256=v2oQSqCrNvt2uRnKlNwR3fjtpUG7oF5nqgzEB7NnT-U,6349
|
|
196
|
+
adam/utils_k8s/services.py,sha256=EOJJGACVbbRvu5T3rMKqIJqgYic1_MSJ17EA0TJ6UOk,3156
|
|
197
|
+
adam/utils_k8s/statefulsets.py,sha256=0J_cYRqH96PCcq3tdsRrs4Q4ewv5dT_FMBR0HGAJ3d8,4710
|
|
198
|
+
adam/utils_k8s/volumes.py,sha256=RIBmlOSWM3V3QVXLCFT0owVOyh4rGG1ETp521a-6ndo,1137
|
|
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,91 +0,0 @@
|
|
|
1
|
-
from adam.commands.command import Command
|
|
2
|
-
from adam.k8s_utils.cassandra_clusters import CassandraClusters
|
|
3
|
-
from adam.k8s_utils.cassandra_nodes import CassandraNodes
|
|
4
|
-
from adam.repl_state import BashSession, ReplState, RequiredState
|
|
5
|
-
|
|
6
|
-
class Bash(Command):
|
|
7
|
-
COMMAND = 'bash'
|
|
8
|
-
|
|
9
|
-
# the singleton pattern
|
|
10
|
-
def __new__(cls, *args, **kwargs):
|
|
11
|
-
if not hasattr(cls, 'instance'): cls.instance = super(Bash, cls).__new__(cls)
|
|
12
|
-
|
|
13
|
-
return cls.instance
|
|
14
|
-
|
|
15
|
-
def __init__(self, successor: Command=None):
|
|
16
|
-
super().__init__(successor)
|
|
17
|
-
|
|
18
|
-
def command(self):
|
|
19
|
-
return Bash.COMMAND
|
|
20
|
-
|
|
21
|
-
def required(self):
|
|
22
|
-
return RequiredState.CLUSTER_OR_POD
|
|
23
|
-
|
|
24
|
-
def run(self, cmd: str, s0: ReplState):
|
|
25
|
-
if not(args := self.args(cmd)):
|
|
26
|
-
return super().run(cmd, s0)
|
|
27
|
-
|
|
28
|
-
state, args = self.apply_state(args, s0, args_to_check=2)
|
|
29
|
-
if not self.validate_state(state):
|
|
30
|
-
return state
|
|
31
|
-
|
|
32
|
-
if state.in_repl:
|
|
33
|
-
if s0.sts != state.sts or s0.pod != state.pod:
|
|
34
|
-
r = self.exec_with_dir(state, args)
|
|
35
|
-
else:
|
|
36
|
-
r = self.exec_with_dir(s0, args)
|
|
37
|
-
|
|
38
|
-
if not r:
|
|
39
|
-
state.exit_bash()
|
|
40
|
-
|
|
41
|
-
return 'inconsistent pwd'
|
|
42
|
-
|
|
43
|
-
return r
|
|
44
|
-
else:
|
|
45
|
-
command = ' '.join(args)
|
|
46
|
-
|
|
47
|
-
if state.pod:
|
|
48
|
-
CassandraNodes.exec(state.pod, state.namespace, command, show_out=True)
|
|
49
|
-
elif state.sts:
|
|
50
|
-
CassandraClusters.exec(state.sts, state.namespace, command, action='bash', show_out=True)
|
|
51
|
-
|
|
52
|
-
return state
|
|
53
|
-
|
|
54
|
-
def exec_with_dir(self, state: ReplState, args: list[str]):
|
|
55
|
-
session_just_created = False
|
|
56
|
-
if not args:
|
|
57
|
-
session_just_created = True
|
|
58
|
-
session = BashSession(state.device)
|
|
59
|
-
state.enter_bash(session)
|
|
60
|
-
|
|
61
|
-
if state.bash_session:
|
|
62
|
-
if args != ['pwd']:
|
|
63
|
-
if args:
|
|
64
|
-
args.append('&&')
|
|
65
|
-
args.extend(['pwd', '>', f'/tmp/.qing-{state.bash_session.session_id}'])
|
|
66
|
-
|
|
67
|
-
if not session_just_created:
|
|
68
|
-
if pwd := state.bash_session.pwd(state):
|
|
69
|
-
args = ['cd', pwd, '&&'] + args
|
|
70
|
-
|
|
71
|
-
command = ' '.join(args)
|
|
72
|
-
|
|
73
|
-
rs = []
|
|
74
|
-
|
|
75
|
-
if state.pod:
|
|
76
|
-
rs = [CassandraNodes.exec(state.pod, state.namespace, command,
|
|
77
|
-
show_out=not session_just_created, shell='bash')]
|
|
78
|
-
elif state.sts:
|
|
79
|
-
rs = CassandraClusters.exec(state.sts, state.namespace, command, action='bash',
|
|
80
|
-
show_out=not session_just_created, shell='bash')
|
|
81
|
-
|
|
82
|
-
return rs
|
|
83
|
-
|
|
84
|
-
def completion(self, state: ReplState):
|
|
85
|
-
if state.pod or state.sts:
|
|
86
|
-
return {Bash.COMMAND: None}
|
|
87
|
-
|
|
88
|
-
return {}
|
|
89
|
-
|
|
90
|
-
def help(self, _: ReplState):
|
|
91
|
-
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)
|