kaqing 2.0.188__py3-none-any.whl → 2.0.211__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 +7 -7
- adam/commands/app/utils_app.py +1 -1
- adam/commands/bash/bash.py +1 -1
- adam/commands/bash/utils_bash.py +1 -1
- adam/commands/cassandra/__init__.py +0 -0
- adam/commands/command.py +1 -1
- adam/commands/commands_utils.py +8 -13
- adam/commands/{alter_tables.py → cql/alter_tables.py} +1 -1
- adam/commands/cql/completions_c.py +1 -0
- adam/commands/cql/utils_cql.py +14 -13
- adam/commands/debug/__init__.py +0 -0
- adam/commands/debug/debug.py +22 -0
- adam/commands/debug/debug_completes.py +35 -0
- adam/commands/debug/debug_timings.py +35 -0
- adam/commands/devices/device.py +1 -1
- adam/commands/devices/devices.py +1 -1
- adam/commands/download_cassandra_log.py +45 -0
- adam/commands/export/export_databases.py +13 -8
- adam/commands/export/export_sessions.py +12 -11
- adam/commands/export/exporter.py +140 -53
- adam/commands/export/import_session.py +0 -4
- adam/commands/export/importer.py +11 -11
- adam/commands/export/importer_athena.py +15 -6
- adam/commands/export/importer_sqlite.py +19 -8
- adam/commands/export/utils_export.py +37 -15
- adam/commands/generate_report.py +52 -0
- adam/commands/medusa/medusa_restore.py +0 -16
- adam/commands/nodetool.py +1 -1
- adam/commands/os/__init__.py +0 -0
- adam/commands/postgres/postgres_databases.py +2 -3
- adam/commands/postgres/postgres_ls.py +1 -1
- adam/commands/postgres/utils_postgres.py +2 -1
- adam/commands/preview_table.py +1 -1
- adam/commands/restart_cluster.py +47 -0
- adam/commands/restart_node.py +51 -0
- adam/commands/restart_nodes.py +47 -0
- adam/commands/show/show_cassandra_status.py +3 -10
- adam/commands/show/show_cli_commands.py +1 -1
- adam/commands/show/show_processes.py +1 -1
- adam/commands/show/show_storage.py +2 -1
- adam/config.py +4 -6
- adam/embedded_params.py +1 -1
- adam/repl.py +5 -3
- adam/repl_commands.py +23 -17
- adam/repl_session.py +4 -3
- adam/repl_state.py +6 -0
- adam/sql/async_executor.py +44 -0
- adam/sql/lark_completer.py +6 -4
- adam/sql/qingl.lark +1076 -0
- adam/sso/cred_cache.py +2 -5
- adam/utils.py +206 -83
- adam/utils_k8s/app_clusters.py +11 -4
- adam/utils_k8s/app_pods.py +10 -5
- adam/utils_k8s/cassandra_clusters.py +8 -4
- adam/utils_k8s/cassandra_nodes.py +14 -5
- adam/utils_k8s/kube_context.py +1 -4
- adam/{pod_exec_result.py → utils_k8s/pod_exec_result.py} +8 -2
- adam/utils_k8s/pods.py +83 -24
- adam/utils_local.py +78 -2
- adam/utils_repl/repl_completer.py +10 -89
- adam/utils_sqlite.py +3 -8
- adam/version.py +1 -1
- {kaqing-2.0.188.dist-info → kaqing-2.0.211.dist-info}/METADATA +1 -1
- {kaqing-2.0.188.dist-info → kaqing-2.0.211.dist-info}/RECORD +67 -65
- adam/commands/cat.py +0 -36
- adam/commands/cd.py +0 -41
- adam/commands/download_file.py +0 -47
- adam/commands/find_files.py +0 -51
- adam/commands/find_processes.py +0 -76
- adam/commands/head.py +0 -36
- adam/commands/logs.py +0 -37
- adam/commands/ls.py +0 -41
- adam/commands/report.py +0 -61
- adam/commands/restart.py +0 -60
- adam/commands/shell.py +0 -41
- {kaqing-2.0.188.dist-info → kaqing-2.0.211.dist-info}/WHEEL +0 -0
- {kaqing-2.0.188.dist-info → kaqing-2.0.211.dist-info}/entry_points.txt +0 -0
- {kaqing-2.0.188.dist-info → kaqing-2.0.211.dist-info}/top_level.txt +0 -0
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
adam/__init__.py,sha256=is7iqn2nhRzPymhTEajITEFVyvROZ9GWfNsZX3L5g_o,45
|
|
2
2
|
adam/app_session.py,sha256=I2EX7eNRCP6T9u1BTVLs-5SB1ypyhSwNvVmi4nwoU-0,6836
|
|
3
3
|
adam/apps.py,sha256=f1qsIOYjn4fdpCvMfOBns5YEiA5fMm7yZu3cQrK6z2M,7049
|
|
4
|
-
adam/batch.py,sha256=
|
|
4
|
+
adam/batch.py,sha256=EHo97iZn8ZC-QOq9pSGQy-shXCh0XGWDx7DYpXOQxfM,24135
|
|
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=ra2pm1NsHWLUXhhn-ES_tI5MCZx44x2eBoHAjnCd1JA,2642
|
|
8
8
|
adam/embedded_apps.py,sha256=lKPx63mKzJbNmwz0rgL4gF76M9fDGxraYTtNAIGnZ_s,419
|
|
9
|
-
adam/embedded_params.py,sha256=
|
|
9
|
+
adam/embedded_params.py,sha256=LDI2ph8YRoB-t_rSR9B3JqsnXsk_AvNyT6CgFAly4is,6505
|
|
10
10
|
adam/log.py,sha256=vcJ1Q8LLnt3NSXqpVcKjAI2OZE6KaD3PEi1kfu_D8qs,1156
|
|
11
|
-
adam/
|
|
12
|
-
adam/
|
|
13
|
-
adam/
|
|
14
|
-
adam/
|
|
15
|
-
adam/
|
|
16
|
-
adam/utils.py,sha256=-3ptZSOIg4f8Uv_k8d9Qt-iuDoyYotUeJL5LQsTAh_Q,22374
|
|
11
|
+
adam/repl.py,sha256=V5q0AfFnFKPyOZNPdy9WZGJCH6_jyOTCxa3WS9jU9Ro,7623
|
|
12
|
+
adam/repl_commands.py,sha256=kvf5W5Lzs7VQgiOopIXD2D-kgmJ_d86VaU-Hn2pxUJY,7405
|
|
13
|
+
adam/repl_session.py,sha256=BWjPJq3lHrK6I5wxMqgKyv9_k98yEScn1-WHqsEk0k8,823
|
|
14
|
+
adam/repl_state.py,sha256=jdW56D2gjIEM40ttYtsr2MyIC8oW4KpxuhfQLUgTWZA,16168
|
|
15
|
+
adam/utils.py,sha256=AV32tqeGjDrk29oJqDTwY80WI9hgkQYUIJYitCbpvdw,26440
|
|
17
16
|
adam/utils_athena.py,sha256=13ZtBlOIDhIvZYRGRLtDrKrEcn4VIq87IZVrIkM1mAM,5389
|
|
18
17
|
adam/utils_audits.py,sha256=lZ2U1AcROxLB4652auG091QFTPs_YNzbtdXBiK6bY_Y,4063
|
|
19
18
|
adam/utils_issues.py,sha256=nWhzUXmD2IfbT8MzjdyvuvpKrtUoieF74O2joaWFpUU,1438
|
|
20
|
-
adam/utils_local.py,sha256=
|
|
19
|
+
adam/utils_local.py,sha256=Q4jqAenWQYvL6VLb0BlAJ4Z4VoWQIZBrrfyEDCS9qAw,2308
|
|
21
20
|
adam/utils_net.py,sha256=byEtNVr8iG9UaD7dM77dN2WEBClB7YNKult7LKFTCOc,428
|
|
22
|
-
adam/utils_sqlite.py,sha256=
|
|
23
|
-
adam/version.py,sha256=
|
|
21
|
+
adam/utils_sqlite.py,sha256=NexOm1Fxq99dLvBn7XhxCh1SinwBtVUzadbyS7lorkU,4233
|
|
22
|
+
adam/version.py,sha256=LA8oGVlPQjhR_LJojVqMHHE-hfv4XGeJq97PtcEYApY,140
|
|
24
23
|
adam/checks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
24
|
adam/checks/check.py,sha256=Qopr3huYcMu2bzQgb99dEUYjFzkjKHRI76S6KA9b9Rk,702
|
|
26
25
|
adam/checks/check_context.py,sha256=FEHkQ32jY1EDopQ2uYWqy9v7aEEX1orLpJWhopwAlh4,402
|
|
@@ -55,38 +54,31 @@ adam/columns/pod_name.py,sha256=IYw0ZKA7Fb9LaGXENqzZTiTgL98tahwFRtfy0KkKh2Q,280
|
|
|
55
54
|
adam/columns/volume_cassandra.py,sha256=9KRNOzjNYganI9avN6zaA5_-7yxD4rV-KNxro9CSUg4,753
|
|
56
55
|
adam/columns/volume_root.py,sha256=29ujLoCAf9LO75u62LxEaPD58s6ihV-tcK17OeLSOM0,556
|
|
57
56
|
adam/commands/__init__.py,sha256=xMC9cRhdshstKEgmu5-euiAE53vvWItKqUzlKhTteAg,1302
|
|
58
|
-
adam/commands/alter_tables.py,sha256=yNqIYDoZd2xZEl3hc8E6V1Br6_BEM3X7DCnXFGuR1pQ,3216
|
|
59
|
-
adam/commands/cat.py,sha256=6Gn3Veo-UJe6AaMexVcTPOxvzC-N4FfET4Y94gFL_B4,1290
|
|
60
|
-
adam/commands/cd.py,sha256=g6GGHqg72pfxjVL_s5KFne2GL8taikWRWgCEU1nDRqg,1338
|
|
61
57
|
adam/commands/check.py,sha256=5aa4DAIMB24HNY-zYwHGthQM_9qwB-vlKpzeaq65HBs,2314
|
|
62
58
|
adam/commands/cli_commands.py,sha256=sbGi1AoSlZsgUmaZ1p5Jk5gQ0VlkET9czUWq-Ars93w,3765
|
|
63
59
|
adam/commands/clipboard_copy.py,sha256=2FOBPbrb59D3unNUaKJhkEPJQ7f09O0JQkqqP567_a4,3171
|
|
64
60
|
adam/commands/code.py,sha256=q95MN9Ts7xjCAUZB50Q8MJYNPzny-4FeI2LdwMBzozQ,1890
|
|
65
|
-
adam/commands/command.py,sha256=
|
|
61
|
+
adam/commands/command.py,sha256=W9ynh5kIy7h3r-ksHFP2CbU9ZrukxfMr_LpRir2qzqc,9820
|
|
66
62
|
adam/commands/command_helpers.py,sha256=leOJJK1UXczNTJHN9TGMCbIpUpmpreULvQ-TvnsYS7w,1134
|
|
67
|
-
adam/commands/commands_utils.py,sha256=
|
|
68
|
-
adam/commands/
|
|
63
|
+
adam/commands/commands_utils.py,sha256=NmNQD_m6kcXp1aW4SuLssk4V6zOWzmcqzWOGXAsTQ5g,2948
|
|
64
|
+
adam/commands/download_cassandra_log.py,sha256=GXn4pqimt8zK5_7HqkFM_9Qir-ktkpY4Dw_JZcfpaZ8,1651
|
|
69
65
|
adam/commands/exit.py,sha256=T7bCEShd6MXQ8rXak7vGZTvqEOejPOUPtbdfy7d8WWA,753
|
|
70
|
-
adam/commands/
|
|
71
|
-
adam/commands/find_processes.py,sha256=_nF4YVBjg9RcvjPVpNtoFNeBLA5rjyuioE8Dr1RDQ3w,2916
|
|
72
|
-
adam/commands/head.py,sha256=o0Yq5QT8YJTFflp4PwcjNiN7wIn1sYc0Xs8IAb0aXZM,1296
|
|
66
|
+
adam/commands/generate_report.py,sha256=KNFnRxwKDfXi1kfoqQQBGd0NH0AathgyQwUMGJMDGM4,1743
|
|
73
67
|
adam/commands/help.py,sha256=SYaJL-7mApfSlfkDvY2uKl7onyr54ntDmMSQ18sfaZw,1886
|
|
74
68
|
adam/commands/intermediate_command.py,sha256=vT802djwMyMgcidZufa98GnFiWHgmNKU1XFp7Y_ovhU,1784
|
|
75
69
|
adam/commands/issues.py,sha256=5evrVBzc4sCMHwQ9LmuGAgoPBINr-OCa9FZMJVJDwH8,1431
|
|
76
70
|
adam/commands/kubectl.py,sha256=kCXIl_9vNDW6CBirCeowQjJ2UhidlCEDBP8XOVIloF8,993
|
|
77
71
|
adam/commands/login.py,sha256=rY8P3wpWZOBN-68QRZfDfBvd0wjLUkwbTNPduqAOoVA,2073
|
|
78
|
-
adam/commands/
|
|
79
|
-
adam/commands/ls.py,sha256=hv8EGlvoS0lgApapp2_IetZekYQy6fDZRqOdLc14VK4,1290
|
|
80
|
-
adam/commands/nodetool.py,sha256=kVbE-XlqcICoH2Kcye13645rATI75HvG0cvtzGFEW8E,2028
|
|
72
|
+
adam/commands/nodetool.py,sha256=3z55UTx7ZKPLwrgZXAUL9nFTKZtEx-jxH6y_gCJdue0,2024
|
|
81
73
|
adam/commands/nodetool_commands.py,sha256=5IgWC3rmeDD1cgwqQjiiWzi-wJpJ3n_8pAzz_9phXuk,2635
|
|
82
74
|
adam/commands/param_get.py,sha256=3IpAn4_T-_NlSkEXyv0jkBJ_aHE-e9hdY5YVaZlIKBI,1357
|
|
83
75
|
adam/commands/param_set.py,sha256=v1oKyr7Efv7YpnwuXj-dm4M_vo9F1FNIdQHSb6F_t1o,1351
|
|
84
|
-
adam/commands/preview_table.py,sha256=
|
|
76
|
+
adam/commands/preview_table.py,sha256=5iE5SLVUlgZdfQrUqvvlm4j4PaqoyAATRedwoQ1uNRs,1251
|
|
85
77
|
adam/commands/pwd.py,sha256=aQKMHEONxTM2h1nv3dT9rj6cUl3WUZC6SD8nrfNYrZI,1427
|
|
86
|
-
adam/commands/
|
|
87
|
-
adam/commands/
|
|
78
|
+
adam/commands/restart_cluster.py,sha256=uY7z5lRsNR7lWyoXSwqUwYPVmTpZfsYiu9dkz2Txaas,1609
|
|
79
|
+
adam/commands/restart_node.py,sha256=TDykeAxNT4avVcrrAisFKly9ZvP0kV2Nhev0II_7Tec,1598
|
|
80
|
+
adam/commands/restart_nodes.py,sha256=PIbTPDBF1jY9Rk7QL_-IfNhOZaUrdNmCLhhIOPxAE28,1653
|
|
88
81
|
adam/commands/rollout.py,sha256=BmlvnVffPGCERfXxdJJFnxtU3yDILp5016N7C-EWCOE,3032
|
|
89
|
-
adam/commands/shell.py,sha256=UQs4TEIDiZOjJrVsZJ_O9DDtn_k3K7-ifg1ZBsJFnsU,1155
|
|
90
82
|
adam/commands/watch.py,sha256=q3kJd6YSO_ZxQ107EeIWZsW8m2X7YIGT3QPXjKloTIo,2459
|
|
91
83
|
adam/commands/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
92
84
|
adam/commands/app/app.py,sha256=4N1bkXItOkuw_uXQNyB24eZ7vqUIbafbKRnf1DociSw,1152
|
|
@@ -94,7 +86,7 @@ adam/commands/app/app_ping.py,sha256=VOPaWE2DQjAXlN1uonH2chNItiTUt7HqltQDA2LkwrU
|
|
|
94
86
|
adam/commands/app/show_app_actions.py,sha256=A2voQ4cKZatQLNaTCf05Z0I7U77UPmtzoxeCaURiiYU,1731
|
|
95
87
|
adam/commands/app/show_app_id.py,sha256=4Y4uTZa7J5NJI6W8OTqtS5ynCoflYiPVz98c-h3hNBo,1359
|
|
96
88
|
adam/commands/app/show_app_queues.py,sha256=F6qFqnUqiNocvWROj8oXQmmLYU9e8S51N8ao6P0wp-Y,1234
|
|
97
|
-
adam/commands/app/utils_app.py,sha256=
|
|
89
|
+
adam/commands/app/utils_app.py,sha256=DTfRNmowCiYTR36R9MgjRCpR_ug4wtPMqlc2FeR9IGM,3345
|
|
98
90
|
adam/commands/audit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
99
91
|
adam/commands/audit/audit.py,sha256=ifo7A9h5H_nQASQVdAH9lg0WugSgd6Nt6x1gRqaMN38,2442
|
|
100
92
|
adam/commands/audit/audit_repair_tables.py,sha256=m2GKLoGw2TuwPmfMQxN0t9h1V3q-RHylVpPafQjUNkk,2577
|
|
@@ -105,13 +97,19 @@ adam/commands/audit/show_slow10.py,sha256=a0KU9Z6Z93eWqcrnJ-Ssz1U2488aUk62dLOZcn
|
|
|
105
97
|
adam/commands/audit/show_top10.py,sha256=7uqgkdrEfK0-ucsQrpyaa6_9i3nOpWJ116sNL-fkKUA,1033
|
|
106
98
|
adam/commands/audit/utils_show_top10.py,sha256=o37sWLEJD16eoWPM3Rql_H-noLHVMp4DH1VeTpnFeNA,2354
|
|
107
99
|
adam/commands/bash/__init__.py,sha256=K4BBF_T-6czi7uqBN-WQg3eNvG-ePJF3IPp8eyGyqmk,163
|
|
108
|
-
adam/commands/bash/bash.py,sha256=
|
|
100
|
+
adam/commands/bash/bash.py,sha256=wha8gxFoxZGnNoQjpAJzaoOYUWuz0neEKCFOKsrOYKo,1212
|
|
109
101
|
adam/commands/bash/bash_completer.py,sha256=IStUg5LLTqc3vjupw33WtXUG9zRQ37BctjDYGDyYEXU,3883
|
|
110
|
-
adam/commands/bash/utils_bash.py,sha256=
|
|
102
|
+
adam/commands/bash/utils_bash.py,sha256=Wsz0TdALDNTfgqWa7nRqh00kALvA67OqV3NdYMYy7_Q,429
|
|
103
|
+
adam/commands/cassandra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
111
104
|
adam/commands/cql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
112
|
-
adam/commands/cql/
|
|
105
|
+
adam/commands/cql/alter_tables.py,sha256=igFeIhvanSTUSRZOtZxdR7E4a8G4Mi_h7vTnUS5aiuA,3217
|
|
106
|
+
adam/commands/cql/completions_c.py,sha256=S5euGPerY6LlQXf4O0OWFc8z3dzeahB9mALdQB4pQgE,1646
|
|
113
107
|
adam/commands/cql/cqlsh.py,sha256=UpMQlCabsRwICebd37S655lRlPekHuv_dlXExlqNJ4k,2164
|
|
114
|
-
adam/commands/cql/utils_cql.py,sha256
|
|
108
|
+
adam/commands/cql/utils_cql.py,sha256=zIBRa_nqZniqkR5iwx58RSfADxC70wnX20YWlz4dpus,11855
|
|
109
|
+
adam/commands/debug/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
110
|
+
adam/commands/debug/debug.py,sha256=q2RtMKZ0OH-O3suY6rrSmiRXn_6nyGBNk49G2Y9vW4I,685
|
|
111
|
+
adam/commands/debug/debug_completes.py,sha256=jn1KxwF88YV8S0DUHSTFdhww091GfIxV9Qmp98uU7Zs,1161
|
|
112
|
+
adam/commands/debug/debug_timings.py,sha256=BBo0G_ylEdyWRinYRTP41y8fs6vXw4juxIjzW6Y0Q3k,1143
|
|
115
113
|
adam/commands/deploy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
116
114
|
adam/commands/deploy/code_start.py,sha256=0h8AIPjThC7uxa4HVkYMdC-7qCNXk0QXO1zDrzIOA4s,1335
|
|
117
115
|
adam/commands/deploy/code_stop.py,sha256=R9zvNVD4NLUD3J6ktZ53Rsalzn-t0ZxEpeyOoiizfgU,1153
|
|
@@ -126,13 +124,13 @@ adam/commands/deploy/undeploy_frontend.py,sha256=khgxZ94bXlQ8c737B_J-gE0pNBA0GaI
|
|
|
126
124
|
adam/commands/deploy/undeploy_pg_agent.py,sha256=X73_0dadpn_DFW1rQMQssE3NQbmovllEXkxFDAunPms,1259
|
|
127
125
|
adam/commands/deploy/undeploy_pod.py,sha256=Pc5xpU4z5_CHrtz3cAzReT4Qxyks2kQ-uWSRUnAYiJ4,1907
|
|
128
126
|
adam/commands/devices/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
129
|
-
adam/commands/devices/device.py,sha256=
|
|
127
|
+
adam/commands/devices/device.py,sha256=uSff7S57MtTHhWEyheTqaLD9QidloDyjScrtg5tm1Cs,4382
|
|
130
128
|
adam/commands/devices/device_app.py,sha256=ib32_a4qK3BOu2jCzedG5IZFua1OvZmXdVj_aforoxE,6373
|
|
131
129
|
adam/commands/devices/device_auit_log.py,sha256=kOP5QwDixwVPupd1A0PG2RY0fq_aeEdx4MRWegnj2Ow,1560
|
|
132
130
|
adam/commands/devices/device_cass.py,sha256=45tEDKETZF20Bj3lPyFLkcJ7VDmGVB8mVtBWq8YGcps,6754
|
|
133
131
|
adam/commands/devices/device_export.py,sha256=vaKpGtAhBpmBACw_bP7RwarWQoloUofRyfpEbjidSzE,2998
|
|
134
132
|
adam/commands/devices/device_postgres.py,sha256=u-A4uE_jN-3mqbwT9Oc51iEl3RERs10PWrbPvW9lT5U,5823
|
|
135
|
-
adam/commands/devices/devices.py,sha256
|
|
133
|
+
adam/commands/devices/devices.py,sha256=Gm3rqrWdooiu9Wp7gwQx5Rk0JYI1eH7Zs0fQ4j7Fdj0,961
|
|
136
134
|
adam/commands/export/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
137
135
|
adam/commands/export/clean_up_all_export_sessions.py,sha256=YpGBrOMYY2n_G-fQMpJPZSEHIC9zArWayYWbaOHOkY8,1161
|
|
138
136
|
adam/commands/export/clean_up_export_sessions.py,sha256=AaYaMG8x0lRCzOs8-vAH1J76Y-iLX1QOkwC4rMu8nXw,1328
|
|
@@ -141,36 +139,37 @@ adam/commands/export/download_export_session.py,sha256=hy8WJZZJhdaZta6VCUZicdCEc
|
|
|
141
139
|
adam/commands/export/drop_export_database.py,sha256=3S6yj0OuMknPZ1MpPad7eCm1V6BdDn6enHcjRC_fjek,1232
|
|
142
140
|
adam/commands/export/drop_export_databases.py,sha256=WzOm4Ykf1O_ZRjF8oZn_PaKTuIzxFeRJhqWfsENCstg,1095
|
|
143
141
|
adam/commands/export/export.py,sha256=MaEPS_QKmI9SGnLbwJRNKguk4ODx-YsbAziUYjf0_Dw,1293
|
|
144
|
-
adam/commands/export/export_databases.py,sha256=
|
|
142
|
+
adam/commands/export/export_databases.py,sha256=jrWGZiladBldht9mqcYJLSud4EbItR6fSXT_5pJpCdc,8513
|
|
145
143
|
adam/commands/export/export_select.py,sha256=tfy6JYEobbJ86-HRd5I02OnRqB_xEVtSIQaPYK6UThQ,984
|
|
146
|
-
adam/commands/export/export_sessions.py,sha256=
|
|
144
|
+
adam/commands/export/export_sessions.py,sha256=bk8cXJ4HRUu3RraFfEaRGI3acjhv9NwTV5Ota-b70_0,7386
|
|
147
145
|
adam/commands/export/export_use.py,sha256=H7F43ub944sCPxwd2Z0KpDiUhACg049BBak3uhQcT68,1412
|
|
148
146
|
adam/commands/export/export_x_select.py,sha256=kHDOd_RIz3JucXE-RGNpX9eBVaaBzwefEok5pdcroAM,1656
|
|
149
|
-
adam/commands/export/exporter.py,sha256=
|
|
147
|
+
adam/commands/export/exporter.py,sha256=YGsPNJ2R_YQ_13fg0SK8QXQpGfPCDdaU0V0NPLwzJnU,19159
|
|
150
148
|
adam/commands/export/import_files.py,sha256=nSgez-i1tO8sPQV4mlfplFy-cRBC3ETCJi-oU_EBnaY,1629
|
|
151
|
-
adam/commands/export/import_session.py,sha256=
|
|
152
|
-
adam/commands/export/importer.py,sha256=
|
|
153
|
-
adam/commands/export/importer_athena.py,sha256=
|
|
154
|
-
adam/commands/export/importer_sqlite.py,sha256=
|
|
149
|
+
adam/commands/export/import_session.py,sha256=Z2L26DHJzvXy4DtXs2E9cXl2cLFMeKbfqDPVwdK0t7s,1418
|
|
150
|
+
adam/commands/export/importer.py,sha256=y8Rg8hUKfWalL6pvDgcBhgH_njbiOzFjgElNDo0n_yI,2694
|
|
151
|
+
adam/commands/export/importer_athena.py,sha256=5tlwAPVikxYc3u9b6KjtjQOh6j8-oeO9MBwvfrmowHk,6640
|
|
152
|
+
adam/commands/export/importer_sqlite.py,sha256=7PLuuO1-xRAt1m0qu7wHMkbnqk4qtvHPExbOzBAt5J8,3113
|
|
155
153
|
adam/commands/export/show_column_counts.py,sha256=3kvS0tO2A-FOG2IM2N55mkOdUdxLucDcjGNbBikljJ4,1855
|
|
156
154
|
adam/commands/export/show_export_databases.py,sha256=zSjZ8tuMXj1dZ6iIXwFVqVk7hokH1hbnYwkXLZE7Sjk,1277
|
|
157
155
|
adam/commands/export/show_export_session.py,sha256=hrUJFIaycnCpcv5wZ8bxCbYtzvdRm-JIswm_gvjzk4g,1291
|
|
158
156
|
adam/commands/export/show_export_sessions.py,sha256=s5m9oGlrJe3NWE-TQZszis0WGbKBs4T6C_NeihfYdxs,1130
|
|
159
|
-
adam/commands/export/utils_export.py,sha256=
|
|
157
|
+
adam/commands/export/utils_export.py,sha256=_j9cW_NAkTAC2kIAa3g9aFKkaunYHVivYIVyDrgTLA4,12968
|
|
160
158
|
adam/commands/medusa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
161
159
|
adam/commands/medusa/medusa.py,sha256=Ey2kJpoKqPFP6m623B3ciMoLur5SVcHEBYsvW7G7aAY,958
|
|
162
160
|
adam/commands/medusa/medusa_backup.py,sha256=n-caJjd3WObm2tplVKUG-GahWoOwDS2pk_MZKQl0S7Q,1812
|
|
163
|
-
adam/commands/medusa/medusa_restore.py,sha256=
|
|
161
|
+
adam/commands/medusa/medusa_restore.py,sha256=uIeCrFU5SHajUrG1ALdXukTqmPtF0SWkKP1cJdAjNJ0,2945
|
|
164
162
|
adam/commands/medusa/medusa_show_backupjobs.py,sha256=rYP5r_NXAQcWrsstv4UngAb4gbQ8xOuyH9EFs1K00hA,1795
|
|
165
163
|
adam/commands/medusa/medusa_show_restorejobs.py,sha256=rgNg-fy0EbTBd2PghOM-w16PrtqL9QCE0Z0vhIcK8CE,1584
|
|
166
164
|
adam/commands/medusa/utils_medusa.py,sha256=7uwIFJDGYBATnl46coO24tGw4a-07mVLB82Os4pTkKo,594
|
|
165
|
+
adam/commands/os/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
167
166
|
adam/commands/postgres/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
168
167
|
adam/commands/postgres/completions_p.py,sha256=I4E88nKBzSegm0EY0qRcQq4pkz4iEQnS48CFXK9AXYU,727
|
|
169
168
|
adam/commands/postgres/postgres.py,sha256=kfqFYdcEdev8p9yjAxYXsTzC3hKrazge2zPBXHF37uw,3311
|
|
170
|
-
adam/commands/postgres/postgres_databases.py,sha256=
|
|
171
|
-
adam/commands/postgres/postgres_ls.py,sha256=
|
|
169
|
+
adam/commands/postgres/postgres_databases.py,sha256=DbDUJS3cVfkgyeSn5WoQte-Vb8SjjnwQP6M8zAXU7cI,11297
|
|
170
|
+
adam/commands/postgres/postgres_ls.py,sha256=ZnET7KfFZ9gxqsmji11dcU3SRci-_T7VsAnv77c3Vik,1114
|
|
172
171
|
adam/commands/postgres/postgres_preview.py,sha256=Bmw3YC98tFdjUx2CRHOakcvLHCOLtEiKxvNDjlDoRo0,1174
|
|
173
|
-
adam/commands/postgres/utils_postgres.py,sha256=
|
|
172
|
+
adam/commands/postgres/utils_postgres.py,sha256=0CAHiNlTuZFj1LrjcrRMenAwzBdGww1qSkpMZtYsPbg,2495
|
|
174
173
|
adam/commands/reaper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
175
174
|
adam/commands/reaper/reaper.py,sha256=Xrfjvqtn5txnaMwofBb77yEsmSYLO_-Bi43ABq2ZmaQ,1398
|
|
176
175
|
adam/commands/reaper/reaper_forward.py,sha256=O5L4SnZdeFMtJqc5SHYVCYQcfkQ2-JnDN9rEX7u_8Xg,3307
|
|
@@ -196,17 +195,19 @@ adam/commands/show/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
|
196
195
|
adam/commands/show/show.py,sha256=h8AAGyiilZ_Wc_SJvR1gT8Ie8RKQprZfNa07zy2e2lg,1728
|
|
197
196
|
adam/commands/show/show_adam.py,sha256=zmzgIvWo9hg0v6YyA26N-xGZipVome22AtrZ9iI6oSw,1298
|
|
198
197
|
adam/commands/show/show_cassandra_repairs.py,sha256=ygdUkiFgvaYxTEoJaJEONfpDOEzZLOPMXz1n_VZaiwc,1306
|
|
199
|
-
adam/commands/show/show_cassandra_status.py,sha256=
|
|
198
|
+
adam/commands/show/show_cassandra_status.py,sha256=8g035RwaWHrzu2VIX6Rit5lboAdilhyNej3aYXlXOqs,5177
|
|
200
199
|
adam/commands/show/show_cassandra_version.py,sha256=O-vTwnK5mSyhFNRDGQ2c-3YNAbW0TZo1pndvD6kMRMo,1144
|
|
201
|
-
adam/commands/show/show_cli_commands.py,sha256=
|
|
200
|
+
adam/commands/show/show_cli_commands.py,sha256=G3yT2UcreR05aT9OgU_BZnwZQ5S5mX8wyCLmNf_W77o,1894
|
|
202
201
|
adam/commands/show/show_host.py,sha256=b7UrC_n9qRp9jHuQqint1YDEmBbC2dZUjHr59Wff-nM,868
|
|
203
202
|
adam/commands/show/show_login.py,sha256=l5vwFvNQ9WcppSJU_f6xVKGznz32OYd76EImFdR0xEo,1816
|
|
204
203
|
adam/commands/show/show_params.py,sha256=6rM9IgHusa5MrqLdHOBzBMOh1mOnlkFDbZeFGdXLnKk,939
|
|
205
|
-
adam/commands/show/show_processes.py,sha256=
|
|
206
|
-
adam/commands/show/show_storage.py,sha256=
|
|
204
|
+
adam/commands/show/show_processes.py,sha256=92DUh_-Z6Z1vCKIXX6MdgDGtW9RAXokmz7zIuUWdVzo,2404
|
|
205
|
+
adam/commands/show/show_storage.py,sha256=gk9E5zOlvL6ugIeqO_UPwMJ94ZgnIgZCOkLTIDctEqk,1785
|
|
207
206
|
adam/sql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
208
|
-
adam/sql/
|
|
207
|
+
adam/sql/async_executor.py,sha256=-nf-ESyhJ9MMWZF7YtSeyvv_e7jVTGi6Ui3DK5bAC9Y,1681
|
|
208
|
+
adam/sql/lark_completer.py,sha256=_6L8Y_IqTd02tbR4wmlxlXCDPe_167wGvnyHFaVMhog,12659
|
|
209
209
|
adam/sql/lark_parser.py,sha256=oNuPKfVTS1QBJ0wB3OXhBydmzgdCDED3LAheRM5cbiM,21378
|
|
210
|
+
adam/sql/qingl.lark,sha256=HO0C5PropRKwxJ6sO940-bLEo5UTyRDw_wKNrTqIw9M,30643
|
|
210
211
|
adam/sql/sql_completer.py,sha256=RO-S4OiBuDPUL8EWiymB8JexIwgwNXx1QzErDxuL3y4,3939
|
|
211
212
|
adam/sql/sql_state_machine.py,sha256=3m8JsIg_tojwaHY5AdPl6UEE4ZnB5hbhOOApFfozhVo,39144
|
|
212
213
|
adam/sql/term_completer.py,sha256=HZjOV4fEV9LraoMjkk8lHxNvzRtSIYsGUJhSMOhuoHY,2599
|
|
@@ -214,25 +215,26 @@ adam/sso/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
214
215
|
adam/sso/authenticator.py,sha256=BCm16L9zf5aLU47-sTCnudn2zLPwd8M2wwRminJfsqw,615
|
|
215
216
|
adam/sso/authn_ad.py,sha256=FQbOJOT_goH7YSr2iqnHh8Ao-WL0jPaE3KyIe3T7g7Y,5786
|
|
216
217
|
adam/sso/authn_okta.py,sha256=e4DjNvCDw646L0SM0aWt_lT2q69MqtzTJiYQpo_EuAQ,4505
|
|
217
|
-
adam/sso/cred_cache.py,sha256=
|
|
218
|
+
adam/sso/cred_cache.py,sha256=dh8orKM_BzVxIf33-M7_2cCEZYFnUppcEhuU73MWvX0,1936
|
|
218
219
|
adam/sso/id_token.py,sha256=wmVZ8S0sjScnOxmSvOKlIEKgnvdWqhsgq9XjFe355O4,744
|
|
219
220
|
adam/sso/idp.py,sha256=Fml1IwP2n3e-j3SFtH3uqL8h9dhQ62J3oM4d37svIu8,5775
|
|
220
221
|
adam/sso/idp_login.py,sha256=QAtCUeDTVWliJy40RK_oac8Vgybr13xH8wzeBoxPaa8,1754
|
|
221
222
|
adam/sso/idp_session.py,sha256=9BUHNRf70u4rVKrVY1HKPOEmOviXvkjam8WJxmXSKIM,1735
|
|
222
223
|
adam/sso/sso_config.py,sha256=5N8WZgIJQBtHUy585XLRWKjpU87_v6QluyNK9E27D5s,2459
|
|
223
224
|
adam/utils_k8s/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
224
|
-
adam/utils_k8s/app_clusters.py,sha256=
|
|
225
|
-
adam/utils_k8s/app_pods.py,sha256=
|
|
226
|
-
adam/utils_k8s/cassandra_clusters.py,sha256=
|
|
227
|
-
adam/utils_k8s/cassandra_nodes.py,sha256=
|
|
225
|
+
adam/utils_k8s/app_clusters.py,sha256=RFR9YADapYfEG7t8UJ8B_VPrC9utki20ntAuHFBFbbs,1304
|
|
226
|
+
adam/utils_k8s/app_pods.py,sha256=JzhxkcDjpbS_x50646dxFrf582rzWnB9d4JoGy7_HMU,1484
|
|
227
|
+
adam/utils_k8s/cassandra_clusters.py,sha256=Izt30TKA6gCiY93zPvFpmT4d60INwbFfY5xtcyd1ZCI,1826
|
|
228
|
+
adam/utils_k8s/cassandra_nodes.py,sha256=Ovrv76iRL3bMYXFjQCWV-JV0GsfE9aLXBTLEZdAcgZo,1582
|
|
228
229
|
adam/utils_k8s/config_maps.py,sha256=vc9A-2D1-1mindCMFL1wuysDOXb0RCl4BdjC6B6usXI,1194
|
|
229
230
|
adam/utils_k8s/custom_resources.py,sha256=95zVZchFtFWGZ_P-jLaSMl6WYTObn7PqeTLxZ_HKoEo,7599
|
|
230
231
|
adam/utils_k8s/deployment.py,sha256=SLhnMm5GMXwEldj2OupSFBUsvNjynwSNrv5tIDvLMrc,2921
|
|
231
232
|
adam/utils_k8s/ingresses.py,sha256=q8nJTIoxa_dVrGMl1HS5yTS_11jLNBAnWlc2ZishMEE,3458
|
|
232
233
|
adam/utils_k8s/jobs.py,sha256=HbUBNXcKcuXaNzc8NmqR_Sq35yHQ_qeQtiQFFM-J2QY,2534
|
|
233
234
|
adam/utils_k8s/k8s.py,sha256=5LpIGIZH1-lrkS275zgjY6i_HEA5ZXmK_pcCoqMWK6g,3577
|
|
234
|
-
adam/utils_k8s/kube_context.py,sha256=
|
|
235
|
-
adam/utils_k8s/
|
|
235
|
+
adam/utils_k8s/kube_context.py,sha256=SEaRhlLNniEflHtMjYS_7lArvOQJUGPe-d4KTCxzD9U,3204
|
|
236
|
+
adam/utils_k8s/pod_exec_result.py,sha256=_kVEAzPtBU-BP5yyF50RzmsVChlzqStuGaCKpGIcsDg,1431
|
|
237
|
+
adam/utils_k8s/pods.py,sha256=BvkWL2OHQ30vTwGabBQNEv5mSlLArbh9S72OIvcvDms,13588
|
|
236
238
|
adam/utils_k8s/secrets.py,sha256=xnqRSumCIcPaASDcErzxjx1BCE-qJkPoG5wIP7YHzIo,2430
|
|
237
239
|
adam/utils_k8s/service_accounts.py,sha256=OF1-UwWupUAvn_rqNNTWsF3BWYgaLiGTJfinn8sreog,6342
|
|
238
240
|
adam/utils_k8s/services.py,sha256=7K6CxvYntbCsRjTZVcuYiBb5WPH7A5CTWTlUGvaVDRg,3154
|
|
@@ -241,13 +243,13 @@ adam/utils_k8s/volumes.py,sha256=RIBmlOSWM3V3QVXLCFT0owVOyh4rGG1ETp521a-6ndo,113
|
|
|
241
243
|
adam/utils_repl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
242
244
|
adam/utils_repl/appendable_completer.py,sha256=byLO9pZXExi13i6-fKY6gNzK-v0RtxIQtFYHdwdUbLE,158
|
|
243
245
|
adam/utils_repl/automata_completer.py,sha256=LJP_2WHHR7AtjX00MJ59VGQEL3t0XS-qYnDmMaZe-Tk,1641
|
|
244
|
-
adam/utils_repl/repl_completer.py,sha256=
|
|
246
|
+
adam/utils_repl/repl_completer.py,sha256=mTqkDSAB2eKgF1jcKLQrW0NWebqRRfEFpVlusfxj50Y,3516
|
|
245
247
|
adam/utils_repl/state_machine.py,sha256=kO4_oSi_M53f3QQjINzzb2VFptjbnqX3KRC0G8LqqeA,5426
|
|
246
248
|
teddy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
247
249
|
teddy/lark_parser.py,sha256=1ZasiCM94C0nOA4HFJX7uMj0h2TReCMqLd1Wx9C50uA,14701
|
|
248
250
|
teddy/lark_parser2.py,sha256=tXM6D8BimgG4FK5ANYS2K8MoATdcYed5QOKXivbPQHw,21499
|
|
249
|
-
kaqing-2.0.
|
|
250
|
-
kaqing-2.0.
|
|
251
|
-
kaqing-2.0.
|
|
252
|
-
kaqing-2.0.
|
|
253
|
-
kaqing-2.0.
|
|
251
|
+
kaqing-2.0.211.dist-info/METADATA,sha256=YMqqbdHQBZqlEaZCVIoWYKKKOzH8uGdYu2kRBvJvt-Q,133
|
|
252
|
+
kaqing-2.0.211.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
253
|
+
kaqing-2.0.211.dist-info/entry_points.txt,sha256=SkzhuQJUWsXOzHeZ5TgQ2c3_g53UGK23zzJU_JTZOZI,39
|
|
254
|
+
kaqing-2.0.211.dist-info/top_level.txt,sha256=spQlE6mz0lPv3DfQLw8FenXyU0O-P8pi_FUCjdI2H9s,11
|
|
255
|
+
kaqing-2.0.211.dist-info/RECORD,,
|
adam/commands/cat.py
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
from adam.commands import validate_args
|
|
2
|
-
from adam.commands.command import Command
|
|
3
|
-
from adam.commands.devices.devices import Devices
|
|
4
|
-
from adam.repl_state import ReplState, RequiredState
|
|
5
|
-
|
|
6
|
-
class Cat(Command):
|
|
7
|
-
COMMAND = 'cat'
|
|
8
|
-
|
|
9
|
-
# the singleton pattern
|
|
10
|
-
def __new__(cls, *args, **kwargs):
|
|
11
|
-
if not hasattr(cls, 'instance'): cls.instance = super(Cat, 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 Cat.COMMAND
|
|
20
|
-
|
|
21
|
-
def required(self):
|
|
22
|
-
return [RequiredState.CLUSTER_OR_POD, RequiredState.APP_APP, ReplState.P]
|
|
23
|
-
|
|
24
|
-
def run(self, cmd: str, state: ReplState):
|
|
25
|
-
if not(args := self.args(cmd)):
|
|
26
|
-
return super().run(cmd, state)
|
|
27
|
-
|
|
28
|
-
with self.validate(args, state) as (args, state):
|
|
29
|
-
with validate_args(args, state, name='file'):
|
|
30
|
-
return Devices.device(state).bash(state, state, cmd.split(' '))
|
|
31
|
-
|
|
32
|
-
def completion(self, state: ReplState):
|
|
33
|
-
return super().completion(state, lambda: {f: None for f in Devices.device(state).files(state)}, pods=Devices.device(state).pods(state, '-'), auto='jit')
|
|
34
|
-
|
|
35
|
-
def help(self, _: ReplState):
|
|
36
|
-
return f'{Cat.COMMAND} file [&]\t run cat command on the pod'
|
adam/commands/cd.py
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
from adam.commands import validate_args
|
|
2
|
-
from adam.commands.command import Command
|
|
3
|
-
from adam.commands.devices.device import Device
|
|
4
|
-
from adam.commands.devices.devices import Devices
|
|
5
|
-
from adam.repl_state import ReplState
|
|
6
|
-
|
|
7
|
-
class Cd(Command):
|
|
8
|
-
COMMAND = 'cd'
|
|
9
|
-
|
|
10
|
-
# the singleton pattern
|
|
11
|
-
def __new__(cls, *args, **kwargs):
|
|
12
|
-
if not hasattr(cls, 'instance'): cls.instance = super(Cd, 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 Cd.COMMAND
|
|
21
|
-
|
|
22
|
-
def required(self):
|
|
23
|
-
return ReplState.NON_L
|
|
24
|
-
|
|
25
|
-
def run(self, cmd: str, state: ReplState):
|
|
26
|
-
if not(args := self.args(cmd)):
|
|
27
|
-
return super().run(cmd, state)
|
|
28
|
-
|
|
29
|
-
with self.validate(args, state, apply=False) as (args, state):
|
|
30
|
-
with validate_args(args, state, name='directory') as arg_str:
|
|
31
|
-
device: Device = Devices.device(state)
|
|
32
|
-
for dir in arg_str.split('/'):
|
|
33
|
-
device.cd(dir, state)
|
|
34
|
-
|
|
35
|
-
return state
|
|
36
|
-
|
|
37
|
-
def completion(self, state: ReplState):
|
|
38
|
-
return Devices.device(state).cd_completion(Cd.COMMAND, state, default = {})
|
|
39
|
-
|
|
40
|
-
def help(self, _: ReplState):
|
|
41
|
-
return f'{Cd.COMMAND} <path> | .. \t move around on the operational device hierarchy'
|
adam/commands/download_file.py
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
from adam.commands import validate_args
|
|
2
|
-
from adam.commands.command import Command
|
|
3
|
-
from adam.commands.devices.devices import Devices
|
|
4
|
-
from adam.config import Config
|
|
5
|
-
from adam.pod_exec_result import PodExecResult
|
|
6
|
-
from adam.repl_state import ReplState, RequiredState
|
|
7
|
-
from adam.utils import log2
|
|
8
|
-
from adam.utils_k8s.pods import Pods
|
|
9
|
-
|
|
10
|
-
class DownloadFile(Command):
|
|
11
|
-
COMMAND = 'download file'
|
|
12
|
-
|
|
13
|
-
# the singleton pattern
|
|
14
|
-
def __new__(cls, *args, **kwargs):
|
|
15
|
-
if not hasattr(cls, 'instance'): cls.instance = super(DownloadFile, cls).__new__(cls)
|
|
16
|
-
|
|
17
|
-
return cls.instance
|
|
18
|
-
|
|
19
|
-
def __init__(self, successor: Command=None):
|
|
20
|
-
super().__init__(successor)
|
|
21
|
-
|
|
22
|
-
def command(self):
|
|
23
|
-
return DownloadFile.COMMAND
|
|
24
|
-
|
|
25
|
-
def required(self):
|
|
26
|
-
return [RequiredState.CLUSTER_OR_POD, RequiredState.APP_APP, ReplState.P]
|
|
27
|
-
|
|
28
|
-
def run(self, cmd: str, state: ReplState):
|
|
29
|
-
if not(args := self.args(cmd)):
|
|
30
|
-
return super().run(cmd, state)
|
|
31
|
-
|
|
32
|
-
with self.validate(args, state) as (args, state):
|
|
33
|
-
with validate_args(args, state, name='file'):
|
|
34
|
-
to_file = Pods.download_file(Devices.device(state).pod(state),
|
|
35
|
-
Devices.device(state).default_container(state),
|
|
36
|
-
state.namespace,
|
|
37
|
-
args[0],
|
|
38
|
-
args[1] if len(args) > 1 else None)
|
|
39
|
-
log2(f'Downloaded to {to_file}.')
|
|
40
|
-
|
|
41
|
-
return state
|
|
42
|
-
|
|
43
|
-
def completion(self, state: ReplState):
|
|
44
|
-
return super().completion(state, lambda: {f: None for f in Devices.device(state).files(state)}, pods=Devices.device(state).pods(state, '-'), auto='jit')
|
|
45
|
-
|
|
46
|
-
def help(self, _: ReplState):
|
|
47
|
-
return f'{DownloadFile.COMMAND} from-file [to-file]\t download file from pod'
|
adam/commands/find_files.py
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
|
|
3
|
-
from adam.commands.command import Command
|
|
4
|
-
from adam.repl_state import ReplState
|
|
5
|
-
from adam.utils import log2
|
|
6
|
-
from adam.utils_local import local_tmp_dir
|
|
7
|
-
|
|
8
|
-
class FindLocalFiles(Command):
|
|
9
|
-
COMMAND = 'find local'
|
|
10
|
-
|
|
11
|
-
# the singleton pattern
|
|
12
|
-
def __new__(cls, *args, **kwargs):
|
|
13
|
-
if not hasattr(cls, 'instance'): cls.instance = super(FindLocalFiles, cls).__new__(cls)
|
|
14
|
-
|
|
15
|
-
return cls.instance
|
|
16
|
-
|
|
17
|
-
def __init__(self, successor: Command=None):
|
|
18
|
-
super().__init__(successor)
|
|
19
|
-
|
|
20
|
-
def command(self):
|
|
21
|
-
return FindLocalFiles.COMMAND
|
|
22
|
-
|
|
23
|
-
def run(self, cmd: str, state: ReplState):
|
|
24
|
-
if not(args := self.args(cmd)):
|
|
25
|
-
return super().run(cmd, state)
|
|
26
|
-
|
|
27
|
-
with self.validate(args, state) as (args, state):
|
|
28
|
-
cmd = 'find'
|
|
29
|
-
|
|
30
|
-
if not args:
|
|
31
|
-
cmd = f'find {local_tmp_dir()}'
|
|
32
|
-
elif len(args) == 1:
|
|
33
|
-
cmd = f"find {local_tmp_dir()} -name '{args[0]}'"
|
|
34
|
-
else:
|
|
35
|
-
new_args = [f"'{arg}'" if '*' in arg else arg for arg in args]
|
|
36
|
-
cmd = 'find ' + ' '.join(new_args)
|
|
37
|
-
|
|
38
|
-
log2(cmd)
|
|
39
|
-
os.system(cmd)
|
|
40
|
-
|
|
41
|
-
return state
|
|
42
|
-
|
|
43
|
-
def completion(self, state: ReplState):
|
|
44
|
-
return super().completion(state, {
|
|
45
|
-
'*.csv': None,
|
|
46
|
-
'*.db': None,
|
|
47
|
-
'*': None
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
def help(self, _: ReplState):
|
|
51
|
-
return f'{FindLocalFiles.COMMAND} [linux-find-arguments]\t find files from local machine'
|
adam/commands/find_processes.py
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
from adam.commands import extract_options, validate_args
|
|
2
|
-
from adam.commands.command import Command
|
|
3
|
-
from adam.commands.devices.devices import Devices
|
|
4
|
-
from adam.commands.export.utils_export import state_with_pod
|
|
5
|
-
from adam.repl_state import ReplState, RequiredState
|
|
6
|
-
from adam.utils import log2, tabulize
|
|
7
|
-
|
|
8
|
-
class FindProcesses(Command):
|
|
9
|
-
COMMAND = 'find processes'
|
|
10
|
-
|
|
11
|
-
# the singleton pattern
|
|
12
|
-
def __new__(cls, *args, **kwargs):
|
|
13
|
-
if not hasattr(cls, 'instance'): cls.instance = super(FindProcesses, cls).__new__(cls)
|
|
14
|
-
|
|
15
|
-
return cls.instance
|
|
16
|
-
|
|
17
|
-
def __init__(self, successor: Command=None):
|
|
18
|
-
super().__init__(successor)
|
|
19
|
-
|
|
20
|
-
def command(self):
|
|
21
|
-
return FindProcesses.COMMAND
|
|
22
|
-
|
|
23
|
-
def required(self):
|
|
24
|
-
return [RequiredState.CLUSTER_OR_POD, RequiredState.APP_APP, ReplState.P]
|
|
25
|
-
|
|
26
|
-
def run(self, cmd: str, state: ReplState):
|
|
27
|
-
if not(args := self.args(cmd)):
|
|
28
|
-
return super().run(cmd, state)
|
|
29
|
-
|
|
30
|
-
with self.validate(args, state) as (args, state):
|
|
31
|
-
with extract_options(args, '-kill') as (args, kill):
|
|
32
|
-
with validate_args(args, state, name='words to look for'):
|
|
33
|
-
arg = ' | '.join([f'grep {a}' for a in args])
|
|
34
|
-
awk = "awk '{ print $1, $2, $8, $NF }'"
|
|
35
|
-
rs = Devices.device(state).bash(state, state, f"ps -ef | grep -v grep | {arg} | {awk}".split(' '))
|
|
36
|
-
|
|
37
|
-
lines: list[list[str]] = []
|
|
38
|
-
for r in rs:
|
|
39
|
-
for l in r.stdout.split('\n'):
|
|
40
|
-
l = l.strip(' \t\r\n')
|
|
41
|
-
if not l:
|
|
42
|
-
continue
|
|
43
|
-
|
|
44
|
-
tokens = [r.pod] + l.split(' ')
|
|
45
|
-
lines.append(tokens)
|
|
46
|
-
|
|
47
|
-
pids = []
|
|
48
|
-
for l in lines:
|
|
49
|
-
pids.append(f'{l[2]}@{l[0]}')
|
|
50
|
-
|
|
51
|
-
tabulize(lines, lambda l: '\t'.join(l), header = 'POD\tUSER\tPID\tCMD\tLAST_ARG', separator='\t')
|
|
52
|
-
log2()
|
|
53
|
-
log2(f'PIDS with {",".join(args)}: {",".join(pids)}')
|
|
54
|
-
|
|
55
|
-
if kill:
|
|
56
|
-
log2()
|
|
57
|
-
for pidp in pids:
|
|
58
|
-
pid_n_pod = pidp.split('@')
|
|
59
|
-
pid = pid_n_pod[0]
|
|
60
|
-
if len(pid_n_pod) < 2:
|
|
61
|
-
continue
|
|
62
|
-
|
|
63
|
-
pod = pid_n_pod[1]
|
|
64
|
-
|
|
65
|
-
log2(f'@{pod} bash kill -9 {pid}')
|
|
66
|
-
|
|
67
|
-
with state_with_pod(state, pod) as state1:
|
|
68
|
-
Devices.device(state).bash(state, state1, ['kill', '-9', pid])
|
|
69
|
-
|
|
70
|
-
return rs
|
|
71
|
-
|
|
72
|
-
def completion(self, state: ReplState):
|
|
73
|
-
return super().completion(state)
|
|
74
|
-
|
|
75
|
-
def help(self, _: ReplState):
|
|
76
|
-
return f'{FindProcesses.COMMAND} word... [-kill]\t find processes with words'
|
adam/commands/head.py
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
from adam.commands import validate_args
|
|
2
|
-
from adam.commands.command import Command
|
|
3
|
-
from adam.commands.devices.devices import Devices
|
|
4
|
-
from adam.repl_state import ReplState, RequiredState
|
|
5
|
-
|
|
6
|
-
class Head(Command):
|
|
7
|
-
COMMAND = 'head'
|
|
8
|
-
|
|
9
|
-
# the singleton pattern
|
|
10
|
-
def __new__(cls, *args, **kwargs):
|
|
11
|
-
if not hasattr(cls, 'instance'): cls.instance = super(Head, 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 Head.COMMAND
|
|
20
|
-
|
|
21
|
-
def required(self):
|
|
22
|
-
return [RequiredState.CLUSTER_OR_POD, RequiredState.APP_APP, ReplState.P]
|
|
23
|
-
|
|
24
|
-
def run(self, cmd: str, state: ReplState):
|
|
25
|
-
if not(args := self.args(cmd)):
|
|
26
|
-
return super().run(cmd, state)
|
|
27
|
-
|
|
28
|
-
with self.validate(args, state) as (args, state):
|
|
29
|
-
with validate_args(args, state, name='file'):
|
|
30
|
-
return Devices.device(state).bash(state, state, cmd.split(' '))
|
|
31
|
-
|
|
32
|
-
def completion(self, state: ReplState):
|
|
33
|
-
return super().completion(state, lambda: {f: None for f in Devices.device(state).files(state)}, pods=Devices.device(state).pods(state, '-'), auto='jit')
|
|
34
|
-
|
|
35
|
-
def help(self, _: ReplState):
|
|
36
|
-
return f'{Head.COMMAND} file [&]\t run head command on the pod'
|
adam/commands/logs.py
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
from adam.commands.command import Command
|
|
2
|
-
from adam.config import Config
|
|
3
|
-
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
4
|
-
from adam.repl_state import ReplState, RequiredState
|
|
5
|
-
|
|
6
|
-
class Logs(Command):
|
|
7
|
-
COMMAND = 'logs'
|
|
8
|
-
|
|
9
|
-
# the singleton pattern
|
|
10
|
-
def __new__(cls, *args, **kwargs):
|
|
11
|
-
if not hasattr(cls, 'instance'): cls.instance = super(Logs, 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 Logs.COMMAND
|
|
20
|
-
|
|
21
|
-
def required(self):
|
|
22
|
-
return RequiredState.POD
|
|
23
|
-
|
|
24
|
-
def run(self, cmd: str, state: ReplState):
|
|
25
|
-
if not(args := self.args(cmd)):
|
|
26
|
-
return super().run(cmd, state)
|
|
27
|
-
|
|
28
|
-
with self.validate(args, state) as (args, state):
|
|
29
|
-
path = Config().get('logs.path', '/c3/cassandra/logs/system.log')
|
|
30
|
-
return CassandraNodes.exec(state.pod, state.namespace, f'cat {path}')
|
|
31
|
-
|
|
32
|
-
def completion(self, _: ReplState):
|
|
33
|
-
# available only on cli
|
|
34
|
-
return {}
|
|
35
|
-
|
|
36
|
-
def help(self, _: ReplState):
|
|
37
|
-
return f'{Logs.COMMAND}\t show cassandra system log'
|
adam/commands/ls.py
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import copy
|
|
2
|
-
|
|
3
|
-
from adam.commands.command import Command
|
|
4
|
-
from adam.commands.devices.devices import Devices
|
|
5
|
-
from adam.repl_state import ReplState
|
|
6
|
-
|
|
7
|
-
class Ls(Command):
|
|
8
|
-
COMMAND = 'ls'
|
|
9
|
-
|
|
10
|
-
# the singleton pattern
|
|
11
|
-
def __new__(cls, *args, **kwargs):
|
|
12
|
-
if not hasattr(cls, 'instance'): cls.instance = super(Ls, 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 Ls.COMMAND
|
|
21
|
-
|
|
22
|
-
def run(self, cmd: str, state: ReplState):
|
|
23
|
-
if not(args := self.args(cmd)):
|
|
24
|
-
return super().run(cmd, state)
|
|
25
|
-
|
|
26
|
-
with self.validate(args, state) as (args, state):
|
|
27
|
-
if len(args) > 0:
|
|
28
|
-
arg = args[0]
|
|
29
|
-
if arg in ['p:', 'c:'] and arg != f'{state.device}:':
|
|
30
|
-
state = copy.copy(state)
|
|
31
|
-
state.device = arg.replace(':', '')
|
|
32
|
-
|
|
33
|
-
Devices.device(state).ls(cmd, state)
|
|
34
|
-
|
|
35
|
-
return state
|
|
36
|
-
|
|
37
|
-
def completion(self, state: ReplState):
|
|
38
|
-
return super().completion(state, {'&': None}, pods=Devices.device(state).pods(state, '-'))
|
|
39
|
-
|
|
40
|
-
def help(self, _: ReplState):
|
|
41
|
-
return f'{Ls.COMMAND} [device:]\t list apps, envs, clusters, nodes, pg hosts/databases or export databases'
|