kaqing 2.0.145__py3-none-any.whl → 2.0.174__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.

Files changed (174) hide show
  1. adam/__init__.py +0 -2
  2. adam/app_session.py +8 -11
  3. adam/batch.py +3 -3
  4. adam/checks/check_utils.py +14 -46
  5. adam/checks/cpu.py +7 -1
  6. adam/checks/cpu_metrics.py +52 -0
  7. adam/checks/disk.py +2 -3
  8. adam/columns/columns.py +3 -1
  9. adam/columns/cpu.py +3 -1
  10. adam/columns/cpu_metrics.py +22 -0
  11. adam/columns/memory.py +3 -4
  12. adam/commands/__init__.py +22 -0
  13. adam/commands/alter_tables.py +33 -48
  14. adam/commands/audit/audit.py +22 -23
  15. adam/commands/audit/audit_repair_tables.py +14 -17
  16. adam/commands/audit/audit_run.py +15 -23
  17. adam/commands/audit/show_last10.py +10 -13
  18. adam/commands/audit/show_slow10.py +10 -13
  19. adam/commands/audit/show_top10.py +10 -13
  20. adam/commands/audit/utils_show_top10.py +2 -3
  21. adam/commands/bash/__init__.py +5 -0
  22. adam/commands/bash/bash.py +7 -104
  23. adam/commands/bash/utils_bash.py +16 -0
  24. adam/commands/cat.py +7 -23
  25. adam/commands/cd.py +7 -11
  26. adam/commands/check.py +14 -23
  27. adam/commands/cli_commands.py +2 -3
  28. adam/commands/code.py +20 -23
  29. adam/commands/command.py +152 -37
  30. adam/commands/commands_utils.py +8 -17
  31. adam/commands/cp.py +18 -32
  32. adam/commands/cql/cql_completions.py +11 -7
  33. adam/commands/cql/cqlsh.py +10 -30
  34. adam/commands/cql/{cql_utils.py → utils_cql.py} +147 -15
  35. adam/commands/deploy/code_start.py +7 -10
  36. adam/commands/deploy/code_stop.py +4 -21
  37. adam/commands/deploy/code_utils.py +3 -3
  38. adam/commands/deploy/deploy.py +4 -27
  39. adam/commands/deploy/deploy_frontend.py +14 -17
  40. adam/commands/deploy/deploy_pg_agent.py +2 -5
  41. adam/commands/deploy/deploy_pod.py +64 -68
  42. adam/commands/deploy/undeploy.py +4 -27
  43. adam/commands/deploy/undeploy_frontend.py +4 -7
  44. adam/commands/deploy/undeploy_pg_agent.py +4 -7
  45. adam/commands/deploy/undeploy_pod.py +9 -12
  46. adam/commands/devices/device.py +93 -2
  47. adam/commands/devices/device_app.py +37 -10
  48. adam/commands/devices/device_auit_log.py +8 -2
  49. adam/commands/devices/device_cass.py +47 -7
  50. adam/commands/devices/device_export.py +9 -11
  51. adam/commands/devices/device_postgres.py +41 -6
  52. adam/commands/exit.py +1 -4
  53. adam/commands/export/clean_up_all_export_sessions.py +37 -0
  54. adam/commands/export/clean_up_export_sessions.py +12 -8
  55. adam/commands/export/drop_export_database.py +7 -26
  56. adam/commands/export/drop_export_databases.py +5 -14
  57. adam/commands/export/export.py +8 -38
  58. adam/commands/export/export_databases.py +86 -27
  59. adam/commands/export/export_select.py +25 -27
  60. adam/commands/export/export_select_x.py +3 -3
  61. adam/commands/export/export_sessions.py +124 -0
  62. adam/commands/export/export_use.py +8 -17
  63. adam/commands/export/exporter.py +88 -158
  64. adam/commands/export/import_session.py +7 -35
  65. adam/commands/export/importer.py +12 -5
  66. adam/commands/export/importer_athena.py +21 -20
  67. adam/commands/export/importer_sqlite.py +16 -21
  68. adam/commands/export/show_column_counts.py +7 -25
  69. adam/commands/export/show_export_databases.py +4 -6
  70. adam/commands/export/show_export_session.py +7 -18
  71. adam/commands/export/show_export_sessions.py +9 -12
  72. adam/commands/export/utils_export.py +26 -1
  73. adam/commands/intermediate_command.py +49 -0
  74. adam/commands/issues.py +11 -43
  75. adam/commands/kubectl.py +3 -6
  76. adam/commands/login.py +22 -24
  77. adam/commands/logs.py +3 -6
  78. adam/commands/ls.py +8 -9
  79. adam/commands/medusa/medusa.py +4 -22
  80. adam/commands/medusa/medusa_backup.py +20 -25
  81. adam/commands/medusa/medusa_restore.py +34 -36
  82. adam/commands/medusa/medusa_show_backupjobs.py +14 -18
  83. adam/commands/medusa/medusa_show_restorejobs.py +11 -18
  84. adam/commands/nodetool.py +6 -15
  85. adam/commands/param_get.py +11 -13
  86. adam/commands/param_set.py +8 -12
  87. adam/commands/postgres/postgres.py +22 -38
  88. adam/commands/postgres/postgres_context.py +47 -23
  89. adam/commands/postgres/postgres_ls.py +4 -8
  90. adam/commands/postgres/postgres_preview.py +5 -9
  91. adam/commands/postgres/psql_completions.py +1 -1
  92. adam/commands/postgres/utils_postgres.py +70 -0
  93. adam/commands/preview_table.py +6 -45
  94. adam/commands/pwd.py +13 -16
  95. adam/commands/reaper/reaper.py +4 -27
  96. adam/commands/reaper/reaper_forward.py +48 -55
  97. adam/commands/reaper/reaper_forward_session.py +6 -0
  98. adam/commands/reaper/reaper_forward_stop.py +10 -16
  99. adam/commands/reaper/reaper_restart.py +7 -14
  100. adam/commands/reaper/reaper_run_abort.py +8 -33
  101. adam/commands/reaper/reaper_runs.py +42 -57
  102. adam/commands/reaper/reaper_runs_abort.py +29 -49
  103. adam/commands/reaper/reaper_schedule_activate.py +9 -32
  104. adam/commands/reaper/reaper_schedule_start.py +9 -32
  105. adam/commands/reaper/reaper_schedule_stop.py +9 -32
  106. adam/commands/reaper/reaper_schedules.py +4 -14
  107. adam/commands/reaper/reaper_status.py +8 -16
  108. adam/commands/reaper/utils_reaper.py +196 -0
  109. adam/commands/repair/repair.py +4 -22
  110. adam/commands/repair/repair_log.py +5 -11
  111. adam/commands/repair/repair_run.py +27 -34
  112. adam/commands/repair/repair_scan.py +32 -38
  113. adam/commands/repair/repair_stop.py +5 -11
  114. adam/commands/report.py +27 -29
  115. adam/commands/restart.py +25 -26
  116. adam/commands/rollout.py +19 -24
  117. adam/commands/shell.py +10 -4
  118. adam/commands/show/show.py +10 -26
  119. adam/commands/show/show_cassandra_repairs.py +35 -0
  120. adam/commands/show/show_cassandra_status.py +32 -43
  121. adam/commands/show/show_cassandra_version.py +5 -18
  122. adam/commands/show/show_commands.py +19 -24
  123. adam/commands/show/show_host.py +1 -1
  124. adam/commands/show/show_login.py +20 -27
  125. adam/commands/show/show_processes.py +15 -19
  126. adam/commands/show/show_storage.py +10 -20
  127. adam/commands/watch.py +26 -29
  128. adam/config.py +4 -16
  129. adam/embedded_params.py +1 -1
  130. adam/log.py +4 -4
  131. adam/pod_exec_result.py +3 -3
  132. adam/repl.py +31 -32
  133. adam/repl_commands.py +11 -11
  134. adam/repl_state.py +52 -26
  135. adam/sql/sql_completer.py +4 -6
  136. adam/sql/sql_state_machine.py +21 -14
  137. adam/sso/authn_ad.py +6 -8
  138. adam/sso/authn_okta.py +4 -6
  139. adam/sso/cred_cache.py +3 -5
  140. adam/sso/idp.py +9 -12
  141. adam/utils.py +393 -33
  142. adam/utils_athena.py +14 -13
  143. adam/utils_audits.py +12 -12
  144. adam/utils_issues.py +32 -0
  145. adam/utils_k8s/app_clusters.py +13 -18
  146. adam/utils_k8s/app_pods.py +2 -0
  147. adam/utils_k8s/cassandra_clusters.py +21 -18
  148. adam/utils_k8s/custom_resources.py +16 -17
  149. adam/utils_k8s/ingresses.py +2 -2
  150. adam/utils_k8s/jobs.py +7 -11
  151. adam/utils_k8s/k8s.py +87 -0
  152. adam/utils_k8s/pods.py +14 -76
  153. adam/utils_k8s/secrets.py +4 -4
  154. adam/utils_k8s/service_accounts.py +5 -4
  155. adam/utils_k8s/services.py +2 -2
  156. adam/utils_k8s/statefulsets.py +1 -12
  157. adam/utils_repl/state_machine.py +3 -3
  158. adam/utils_sqlite.py +78 -42
  159. adam/version.py +1 -1
  160. {kaqing-2.0.145.dist-info → kaqing-2.0.174.dist-info}/METADATA +1 -1
  161. kaqing-2.0.174.dist-info/RECORD +230 -0
  162. adam/commands/app.py +0 -67
  163. adam/commands/app_ping.py +0 -44
  164. adam/commands/export/clean_up_export_session.py +0 -53
  165. adam/commands/postgres/postgres_utils.py +0 -31
  166. adam/commands/reaper/reaper_session.py +0 -159
  167. adam/commands/show/show_app_actions.py +0 -56
  168. adam/commands/show/show_app_id.py +0 -47
  169. adam/commands/show/show_app_queues.py +0 -45
  170. adam/commands/show/show_repairs.py +0 -47
  171. kaqing-2.0.145.dist-info/RECORD +0 -227
  172. {kaqing-2.0.145.dist-info → kaqing-2.0.174.dist-info}/WHEEL +0 -0
  173. {kaqing-2.0.145.dist-info → kaqing-2.0.174.dist-info}/entry_points.txt +0 -0
  174. {kaqing-2.0.145.dist-info → kaqing-2.0.174.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,230 @@
1
+ adam/__init__.py,sha256=is7iqn2nhRzPymhTEajITEFVyvROZ9GWfNsZX3L5g_o,45
2
+ adam/app_session.py,sha256=mRJWsSDCUlpKfW91UtYCvofZdquayUJANYabP6mA5V0,6862
3
+ adam/apps.py,sha256=okYibOEiCVoM5zsPUKaLJZlwlnvWSHKL7U2J1Yk3-Aw,6701
4
+ adam/batch.py,sha256=i63DTlmgNmA7OMCeIR3-iIJGa3kBuGIvRtWlxi475ko,24029
5
+ adam/cli.py,sha256=03pIZdomAu7IL-GSP6Eun_PKwwISShRAmfx6eVRPGC0,458
6
+ adam/cli_group.py,sha256=W3zy1BghCtVcEXizq8fBH-93ZRVVwgAyGPzy0sHno1Y,593
7
+ adam/config.py,sha256=LJWT9eiKhNj6qYDKx8TAkCmlBsxXTxLbYuSppnP5SGA,2697
8
+ adam/embedded_apps.py,sha256=lKPx63mKzJbNmwz0rgL4gF76M9fDGxraYTtNAIGnZ_s,419
9
+ adam/embedded_params.py,sha256=4q3Sc8tmlWyY5Yyfpqatl9urorJ_rW6KGxr_LCiQ5RI,5724
10
+ adam/log.py,sha256=vcJ1Q8LLnt3NSXqpVcKjAI2OZE6KaD3PEi1kfu_D8qs,1156
11
+ adam/pod_exec_result.py,sha256=85jy_5dS6TEEk5ijU0B62YfUycxmD3dG8mhIHFPipc8,1260
12
+ adam/repl.py,sha256=iQ16-x2kS-6Sak4CjqUE41-Af-MApGjPka4qPzKkhQc,7459
13
+ adam/repl_commands.py,sha256=vCKee-0smNPTK_SMegU-6GR4ShTh_nY_Ac3fFIdCMqc,6440
14
+ adam/repl_session.py,sha256=uIogcvWBh7wd8QQ-p_JgLsyJ8YJgINw5vOd6JIsd7Vo,472
15
+ adam/repl_state.py,sha256=ckyoj6j17cxQy0h1jVyxAgDvRRAzJeOS0SV01gzbEs0,15532
16
+ adam/utils.py,sha256=oOS86FBhiII5om4n8gMuRbHi58vtDnTF3wOc9llTGNk,19566
17
+ adam/utils_athena.py,sha256=vIcOPMtDrgA2SM2a2VpOVOjTJ2_Hss63lwlSgG3kuLM,5409
18
+ adam/utils_audits.py,sha256=lZ2U1AcROxLB4652auG091QFTPs_YNzbtdXBiK6bY_Y,4063
19
+ adam/utils_issues.py,sha256=XDiHDxQcYEvIxwL-fOeIXDRPpKinnggB5sSM3Yo2P-I,1458
20
+ adam/utils_net.py,sha256=byEtNVr8iG9UaD7dM77dN2WEBClB7YNKult7LKFTCOc,428
21
+ adam/utils_sqlite.py,sha256=kF1zTCJE_aIEhgbCDOIUH23XvnLufKpHiiyhkKqH6is,4340
22
+ adam/version.py,sha256=htfdPUqia9L7LzWep3oJtMmkyNtuf9mKyjtJsHQfT7g,140
23
+ adam/checks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
+ adam/checks/check.py,sha256=Qopr3huYcMu2bzQgb99dEUYjFzkjKHRI76S6KA9b9Rk,702
25
+ adam/checks/check_context.py,sha256=FEHkQ32jY1EDopQ2uYWqy9v7aEEX1orLpJWhopwAlh4,402
26
+ adam/checks/check_result.py,sha256=5_DVNgkCC9t7xFJYNsjd9bfXA1I4vYb6K3kmN8cdMrA,669
27
+ adam/checks/check_utils.py,sha256=Oo7Ps0g4n5BfZbOZgeWqHNAaypidWGkK1ITA_kzs0bc,2694
28
+ adam/checks/compactionstats.py,sha256=NFi9RcRImZqCJBZs3LH851RHmlu4BO0s_QOsvkdUxKQ,2304
29
+ adam/checks/cpu.py,sha256=j1CFzDO77uTpnYW7xUbx0OzHkQksc2IEXLPXenDo2wE,2978
30
+ adam/checks/cpu_metrics.py,sha256=ymDxof0l4PdRp527nFAJae7Yzn7zjAOvDMZiBwS50QY,2023
31
+ adam/checks/disk.py,sha256=pmjNUEF4rrYtQGcHfv9K78q8cCbAsZeg6qE3KN-IbBU,5215
32
+ adam/checks/gossip.py,sha256=60PeVkhtMWziiYILPwMKfesFjOanIn-nxeZZL5nUHQs,3119
33
+ adam/checks/issue.py,sha256=u3E6yCpDGGJiveKXdpkrKq7HQRTrG7aR2XLCoO-ys7U,498
34
+ adam/checks/memory.py,sha256=1TPoC_eL7QmMMJfaclW3hoSxudsUc4qvrzzb0Z4f5Kw,3056
35
+ adam/checks/status.py,sha256=4IFCesrovCbGKgbJxLr0VxjGGWmmF23ZQNfHUFb5Kyg,2140
36
+ adam/columns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
+ adam/columns/column.py,sha256=O_5ptfx136BKdLo8enDvSL3HlId1dkjMM2XUumg1tNA,956
38
+ adam/columns/columns.py,sha256=AqUhIdu8dlaZuA96rWW3TBnR6SdbvQkr02ZGyHZKKmU,1708
39
+ adam/columns/compactions.py,sha256=ybIEYTkDuRTBLIUNurGhu1jhVnf1UEpJ0abo3GTgmKw,928
40
+ adam/columns/cpu.py,sha256=b_kFLUwBFxAkZXmqu-L7stuJDT_5bbEUZPLiTOQaBKg,585
41
+ adam/columns/cpu_metrics.py,sha256=4CWz-hwJhAW00Yd-7jKWRYIPviyjY4THp_FulMW6otc,711
42
+ adam/columns/dir_data.py,sha256=gDLcrwMZ6dEVTmpvc35yX3iNY97mQ5q0eQojm8tZ2so,545
43
+ adam/columns/dir_snapshots.py,sha256=OSseuf7gAvT-_ujLvGt43jF-q7QVJNDcvqOK47QSJbk,451
44
+ adam/columns/gossip.py,sha256=KKUycFG-8YxMh9VYUrYOFwPVvnh-0i19k---DrpW93g,656
45
+ adam/columns/host_id.py,sha256=oqesvFCzUu0utkcH5mhYg0vx7lAW2EIDoezgY_CCP_Y,350
46
+ adam/columns/memory.py,sha256=yUjHcdhoiivJQB2kVimCSuzkhZTiPSugwtJ8invoub0,706
47
+ adam/columns/node_address.py,sha256=PqSm2FtR0NAhc-R17sPRJJ3c6eWlJLHPctu8RsCslcM,355
48
+ adam/columns/node_load.py,sha256=Oc-kdfezYBP5eWDug-ijgM48x6XRNjwxxoQDZt_MbQc,349
49
+ adam/columns/node_owns.py,sha256=Iv5FDYV0m3ZM2JK05Fl485ZxDgOxZHDIN9KYNJc6Zdg,349
50
+ adam/columns/node_status.py,sha256=im52GfdETXVJVM00fU5OjJM2FvLZrgqpLkWKCwWhjAs,353
51
+ adam/columns/node_tokens.py,sha256=38D9xJ3uA48gzEYBtIiIUbZJcteM1H4KryzJNn01uZ8,353
52
+ adam/columns/node_utils.py,sha256=ql2StXmASC7equuabZVZEQ_BPTu2KkS99gY_3JXpIvU,774
53
+ adam/columns/pod_name.py,sha256=IYw0ZKA7Fb9LaGXENqzZTiTgL98tahwFRtfy0KkKh2Q,280
54
+ adam/columns/volume_cassandra.py,sha256=9KRNOzjNYganI9avN6zaA5_-7yxD4rV-KNxro9CSUg4,753
55
+ adam/columns/volume_root.py,sha256=29ujLoCAf9LO75u62LxEaPD58s6ihV-tcK17OeLSOM0,556
56
+ adam/commands/__init__.py,sha256=6MGdr7yYIzW-igcxq44jZRVuKaoIhbaOOqdEiSyElbM,1173
57
+ adam/commands/alter_tables.py,sha256=yNqIYDoZd2xZEl3hc8E6V1Br6_BEM3X7DCnXFGuR1pQ,3216
58
+ adam/commands/cat.py,sha256=-Xx04XCYDVszR68IrJRnGbeu6RC1YRc_bnrY87xqkr4,1295
59
+ adam/commands/cd.py,sha256=g6GGHqg72pfxjVL_s5KFne2GL8taikWRWgCEU1nDRqg,1338
60
+ adam/commands/check.py,sha256=Hf2ukd2DDuWkfCpGYQFENZwQuPfuMqA_silmTVEfaQ0,2334
61
+ adam/commands/cli_commands.py,sha256=TGnm2uxtuDRmkNNMlPOpYAXJkgDQEuhDeimBcwsEtC8,3574
62
+ adam/commands/code.py,sha256=8SwSYuMx2QNFB3RUfVPfYVUAf_unEjADx4xvrstepJc,1906
63
+ adam/commands/command.py,sha256=AO9y4D00Ho8ThC8PQV53wUHm01w3ox3d3UXrooySwNw,7931
64
+ adam/commands/command_helpers.py,sha256=leOJJK1UXczNTJHN9TGMCbIpUpmpreULvQ-TvnsYS7w,1134
65
+ adam/commands/commands_utils.py,sha256=PjhJqqGdKNsUYry4ZU53tlR_NVwc0Fb8J-ZarN0uiD0,2856
66
+ adam/commands/cp.py,sha256=qYntAdgs5aUg9-_EXT6ngz4dxyzcsfGR8vkrFrs6hag,2879
67
+ adam/commands/exit.py,sha256=T7bCEShd6MXQ8rXak7vGZTvqEOejPOUPtbdfy7d8WWA,753
68
+ adam/commands/help.py,sha256=v8VPGfnMC_PY_oqJUlwdAqIeJ9-EicvMEVT1RDKSmyI,1907
69
+ adam/commands/intermediate_command.py,sha256=HBSV0tdocHtpe4g3BDagEp55SpDdMAtOVb_ZWVh8v78,1755
70
+ adam/commands/issues.py,sha256=5evrVBzc4sCMHwQ9LmuGAgoPBINr-OCa9FZMJVJDwH8,1431
71
+ adam/commands/kubectl.py,sha256=kCXIl_9vNDW6CBirCeowQjJ2UhidlCEDBP8XOVIloF8,993
72
+ adam/commands/login.py,sha256=rY8P3wpWZOBN-68QRZfDfBvd0wjLUkwbTNPduqAOoVA,2073
73
+ adam/commands/logs.py,sha256=CS4eh5JWzoXboYSXXpiE6CDsky1Jsu61Q1MZAqGjOB8,1142
74
+ adam/commands/ls.py,sha256=b6EBzjXdlagOkpD_OM77I_n18ikGub5obtuerruA9yA,1298
75
+ adam/commands/nodetool.py,sha256=QUgKWjtPCuoA2vsip7naaf-5XGqHVinhWjsxmIxd8AA,2161
76
+ adam/commands/nodetool_commands.py,sha256=5IgWC3rmeDD1cgwqQjiiWzi-wJpJ3n_8pAzz_9phXuk,2635
77
+ adam/commands/param_get.py,sha256=LOCjvqbfSYGOhX4p4I6kj2H6PFvmDyUiaRm28AOxH4w,1408
78
+ adam/commands/param_set.py,sha256=GMvd38jGBcjH1ElcpHmdKwuTvvGanm_CNZ8hJJRFXss,1358
79
+ adam/commands/preview_table.py,sha256=TfSipKOrd1avGQ4Au09wh0FkMKKRuHYqfShHHbTbe-w,1165
80
+ adam/commands/pwd.py,sha256=cdnmJv3-9uRtN-GFlqlktdWNKZLdKCTD55DAkSa065I,1441
81
+ adam/commands/report.py,sha256=IESGEq6akUY2IznKUZV90_5s2gRM4npexFQH7Pa3rAI,2086
82
+ adam/commands/restart.py,sha256=CUjHxdWznqgY2BdYcHHKH2eolj3cPeE5xbMjkIiyJ2A,2202
83
+ adam/commands/rollout.py,sha256=BmlvnVffPGCERfXxdJJFnxtU3yDILp5016N7C-EWCOE,3032
84
+ adam/commands/shell.py,sha256=PIDwnwYaXti3PM7RvLvRdyLMHIHdQdb9VJsMSNFrmWA,1028
85
+ adam/commands/watch.py,sha256=q3kJd6YSO_ZxQ107EeIWZsW8m2X7YIGT3QPXjKloTIo,2459
86
+ adam/commands/audit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
87
+ adam/commands/audit/audit.py,sha256=aWwQubA8M2smErneoRgGkoz2YCF7c_IYf26zq1140NU,3190
88
+ adam/commands/audit/audit_repair_tables.py,sha256=zM9euuedjSoZ4adczijdj95EgNzyp0qyY7xxy8RkG-g,2536
89
+ adam/commands/audit/audit_run.py,sha256=yFrLGRYblEwOgB2nxEjicSVD3ZzcYV4hmH0AoB7u8OE,1698
90
+ adam/commands/audit/show_last10.py,sha256=Jd0YUTPntkLh6YDK6pS-ZIaK2twkRkQCTGfrIe2J63c,1425
91
+ adam/commands/audit/show_slow10.py,sha256=10gI7kJhozSjl0OoqHFHkh0OjwoXV6z5-Iow6rWbMIU,1444
92
+ adam/commands/audit/show_top10.py,sha256=HiwrYtKBwQWwleJZaVn2bhOjfPDSs11R_ivbRWzyMuw,1475
93
+ adam/commands/audit/utils_show_top10.py,sha256=HrbDnHl6FHVdflXMW5jqf7gYZbHz4agFNyVmI8wuDnY,1874
94
+ adam/commands/bash/__init__.py,sha256=K4BBF_T-6czi7uqBN-WQg3eNvG-ePJF3IPp8eyGyqmk,163
95
+ adam/commands/bash/bash.py,sha256=AvXehWWltrT9sXttpeGFhRoNO0PAjyNEiqnbxSiNpZI,1168
96
+ adam/commands/bash/bash_completer.py,sha256=IStUg5LLTqc3vjupw33WtXUG9zRQ37BctjDYGDyYEXU,3883
97
+ adam/commands/bash/utils_bash.py,sha256=LmpTVPaM0aEMDqKPFnyEp5EidAyQQiiUkcvRjvOu-20,433
98
+ adam/commands/cql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
99
+ adam/commands/cql/cql_completions.py,sha256=Wr37WHWO4-zAYMRlG38GpfxFAIFHlmBUKSAHHsx7ftU,1465
100
+ adam/commands/cql/cqlsh.py,sha256=ddb1JBdCs8sMHt8L-1gDHIir9hbjxP0gJKpKCBFPFuM,2381
101
+ adam/commands/cql/utils_cql.py,sha256=H3XmGATVUfANhejwgPU1BoAcvRbq1Z0zpDeZXSp9g7M,12776
102
+ adam/commands/deploy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
103
+ adam/commands/deploy/code_start.py,sha256=0h8AIPjThC7uxa4HVkYMdC-7qCNXk0QXO1zDrzIOA4s,1335
104
+ adam/commands/deploy/code_stop.py,sha256=R9zvNVD4NLUD3J6ktZ53Rsalzn-t0ZxEpeyOoiizfgU,1153
105
+ adam/commands/deploy/code_utils.py,sha256=H0XgKxVV1Rt3JRjZlssUHwkttuRQ0n6JjjsYw-jn5kI,3285
106
+ adam/commands/deploy/deploy.py,sha256=TmJbWS6JPts8mfPakguTMA88xjstdiUgYfA2aacLA2E,821
107
+ adam/commands/deploy/deploy_frontend.py,sha256=msfDZW8aAlL8E5ve36VkWthuqmXONGRVe7djqLo3i7g,1689
108
+ adam/commands/deploy/deploy_pg_agent.py,sha256=WGFvoYBUbtnbXHROlRUGenYMtb5EZYU3q1Kr3HQNjp8,1144
109
+ adam/commands/deploy/deploy_pod.py,sha256=as7E-2bO1v7IY_3G8iOhrGajFxrGQFYfWebJKMWx16s,4541
110
+ adam/commands/deploy/deploy_utils.py,sha256=P_Z-8tY_ZZuucsHL-8r5rt1c0LfIM-CYpvPsTiM4oe8,1241
111
+ adam/commands/deploy/undeploy.py,sha256=QblQDQOjesNbMfi0Rx_D3oxC93LEPfTVqDj5sLAc84g,873
112
+ adam/commands/deploy/undeploy_frontend.py,sha256=khgxZ94bXlQ8c737B_J-gE0pNBA0GaIQmxCapnkI98c,1210
113
+ adam/commands/deploy/undeploy_pg_agent.py,sha256=t9l9XJiChiH61Z7Zc967b3zH_Tsj7Grntx-8op0wWmY,1253
114
+ adam/commands/deploy/undeploy_pod.py,sha256=Pc5xpU4z5_CHrtz3cAzReT4Qxyks2kQ-uWSRUnAYiJ4,1907
115
+ adam/commands/devices/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
116
+ adam/commands/devices/device.py,sha256=UPqHLQXar5a3ENQDaqimcX2DrX3OPILrbBTTfIB39F4,3336
117
+ adam/commands/devices/device_app.py,sha256=Wik6s_RB6vtCsQQvIEK6PelnAvutzQrzWewLiMvqCiw,6811
118
+ adam/commands/devices/device_auit_log.py,sha256=PaniVrADdqQM0xAkXtT3w5MFkERKWH0wdHl3mXnlMpo,1587
119
+ adam/commands/devices/device_cass.py,sha256=GlbjnEu92hKFOls-jLqMJ0y6y5WPk5KV9CQqvf72hDE,7059
120
+ adam/commands/devices/device_export.py,sha256=yROeaNC1e0HkUuXlPy_v1MUi9CmoDIta8KNVohzuVBI,2946
121
+ adam/commands/devices/device_postgres.py,sha256=Iriz4m3fKSbyk2CuLYIxZuNE60fGnkSLhHtzrEx8jNQ,5791
122
+ adam/commands/devices/devices.py,sha256=-VV8nU-Qcebx2g2ftOywmgrn8wW7-teCpxFQjU9wBR4,965
123
+ adam/commands/export/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
124
+ adam/commands/export/clean_up_all_export_sessions.py,sha256=yWDC9ts2HYachcfffqhbXwAIi5xwvsE3m7XNNFk-xLQ,1221
125
+ adam/commands/export/clean_up_export_sessions.py,sha256=ERLcGgzY5j3GoqkGJy-THYDgJLANAlpWnCnZ4vkH-y0,1600
126
+ adam/commands/export/drop_export_database.py,sha256=3S6yj0OuMknPZ1MpPad7eCm1V6BdDn6enHcjRC_fjek,1232
127
+ adam/commands/export/drop_export_databases.py,sha256=WzOm4Ykf1O_ZRjF8oZn_PaKTuIzxFeRJhqWfsENCstg,1095
128
+ adam/commands/export/export.py,sha256=l-3dSKXVdAteicfQvkLmELRJ42LBmCAqhOqL0uthrJA,2105
129
+ adam/commands/export/export_databases.py,sha256=aZogr6UZsSjvqTkPemF-pdscMZMDkwx3JXOAspmlmS4,7626
130
+ adam/commands/export/export_select.py,sha256=wVkw7Th3Abs-zRJO0Rk310GUl8nEOyWLbXNLaBZ3Mq8,3113
131
+ adam/commands/export/export_select_x.py,sha256=WuSkuhB4yfz0IVt3-Dd42GG7FTWoNzBhVsfieEN51W0,2020
132
+ adam/commands/export/export_sessions.py,sha256=vaT3o8K9uOXvJ5jzTxZONm6QcEAbhgCNqdK0-GXiY9s,4623
133
+ adam/commands/export/export_use.py,sha256=j7eNmlnNtyTrk3AyAZzA8kkU2C7e1pmAmNFwIMdDSA0,1354
134
+ adam/commands/export/exporter.py,sha256=qj0b6gXCmj7k0cCQFShHde54_l4n0zVhPCHkO559034,13858
135
+ adam/commands/export/import_session.py,sha256=tb_ybcQbUN4kbc7MuUqsg75NY9tXzXdJSh1zcXs0ILQ,1393
136
+ adam/commands/export/importer.py,sha256=V4EbanV-rEmbqP43u8_07YY98A7wdbwjo1j7BMNzfOU,2450
137
+ adam/commands/export/importer_athena.py,sha256=zNKWFi90wACmOgVEfzMyEt6V4yF1Hl7uo6wYOwIh84k,3373
138
+ adam/commands/export/importer_sqlite.py,sha256=0hvo3MoIs_J9vjsO0iCMRcYOzR7GpRx9Law7CVP5arQ,1720
139
+ adam/commands/export/show_column_counts.py,sha256=zsECHmHgwFATmsyshLbDgG2uBgAosGEwPmwhB_RJF04,1638
140
+ adam/commands/export/show_export_databases.py,sha256=G1Ue-c_fKs_xEesCZV7gVdPY6w-AbJ_M6jWSw-hf73Q,1229
141
+ adam/commands/export/show_export_session.py,sha256=Gzrj87PZDwevACL17P7dH2a91QYkSwFezguAfMdtv0Q,1481
142
+ adam/commands/export/show_export_sessions.py,sha256=xyuDu8oUkTdMKfBHhAUOcwIQdZWcl0ePkSM27wuomIA,1599
143
+ adam/commands/export/utils_export.py,sha256=5TUHfkt4Lx5iO6OizSBxiJxyNgAVDAslUaVMX2dKkF0,11311
144
+ adam/commands/medusa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
145
+ adam/commands/medusa/medusa.py,sha256=Ey2kJpoKqPFP6m623B3ciMoLur5SVcHEBYsvW7G7aAY,958
146
+ adam/commands/medusa/medusa_backup.py,sha256=1yWMGEipdZ_2vALAYdmyPjZWrX6kY7E0OuPxiBv0tfw,1759
147
+ adam/commands/medusa/medusa_restore.py,sha256=_v5-d_yAjvpTivpROS51IV95Jj0WE1qZvDkY_kczQrw,3271
148
+ adam/commands/medusa/medusa_show_backupjobs.py,sha256=rAlhpXH2mhY-1ScSGm32llLh5_fNbHS2wLR0pdi6LBw,1761
149
+ adam/commands/medusa/medusa_show_restorejobs.py,sha256=KxPgUOHGqik4G7B4GnsX9Ogr1yDIR5k1lf4fkJXPjwM,1556
150
+ adam/commands/postgres/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
151
+ adam/commands/postgres/postgres.py,sha256=1QCgDe_8b6-z02XoUpk9wbQ2j5ZMi6rRiZ_bXElE6K8,3478
152
+ adam/commands/postgres/postgres_context.py,sha256=y_3n5kWBT_XFFCdPS8qYm5_2v4bJ-PuwH2EO_-IZUiQ,10784
153
+ adam/commands/postgres/postgres_ls.py,sha256=yT-V1mGnvImaIr4s75FUsV5klcrOB7HHJwWbY6h1Kpk,1111
154
+ adam/commands/postgres/postgres_preview.py,sha256=Bmw3YC98tFdjUx2CRHOakcvLHCOLtEiKxvNDjlDoRo0,1174
155
+ adam/commands/postgres/psql_completions.py,sha256=LVw7LvKSRh61Dfqxh_FZp7wmIeejHjK_V6QGwUrePfw,336
156
+ adam/commands/postgres/utils_postgres.py,sha256=omriBzuW0NQ16IF1Hy6FeVLvfGSWJeTMk34jwigDxrw,2108
157
+ adam/commands/reaper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
158
+ adam/commands/reaper/reaper.py,sha256=Xrfjvqtn5txnaMwofBb77yEsmSYLO_-Bi43ABq2ZmaQ,1398
159
+ adam/commands/reaper/reaper_forward.py,sha256=Su3tFrx2MTTXvaPC0EsmCnTKDuUjziyED583IX2UJ84,3326
160
+ adam/commands/reaper/reaper_forward_session.py,sha256=CfKMYQPDZYQBtYQjxcPs7ns5e8AGZj9Q0LD8dOxvLl0,160
161
+ adam/commands/reaper/reaper_forward_stop.py,sha256=a8i6Zp4rYKFt6qC7iqpf57gDZTMAtZy1H1PXq5tTOHM,1375
162
+ adam/commands/reaper/reaper_restart.py,sha256=Ms3OWhV6pqEtmQiupvKO9ArTVBPlniPtg4BwPCgaFq8,1173
163
+ adam/commands/reaper/reaper_run_abort.py,sha256=f3D2EhtiPiLXBOx0vY-XmBivDrgLbppb4dgnStucNVk,1276
164
+ adam/commands/reaper/reaper_runs.py,sha256=hXfGdtlRyf6jOyoILGFEec_lL4RWn_Eqiw69Zge9SLo,3065
165
+ adam/commands/reaper/reaper_runs_abort.py,sha256=ykY8D5fcZwqMRebM2JxFClVksjeDIBTIQe5nSk5oyp0,2058
166
+ adam/commands/reaper/reaper_schedule_activate.py,sha256=PELW78_kblgGegyRFXtIOMf3eIHxJt2D3jNEYITwHFw,1485
167
+ adam/commands/reaper/reaper_schedule_start.py,sha256=VjZ2E-pm8QpnVuMYw53VhfXUgfORC-DjJoDiERKqxYM,1472
168
+ adam/commands/reaper/reaper_schedule_stop.py,sha256=FWaUF3j8R6v57bNQm2np96QwsvBUS3Ee7TDDl5avbRM,1464
169
+ adam/commands/reaper/reaper_schedules.py,sha256=vbvt0JojQecWCo5i4M-3HenWSnJU68F1MAoWcPhp8bo,1071
170
+ adam/commands/reaper/reaper_status.py,sha256=IuRbQwlZB4pDZu4iuPk5TXdTqvzBTMtAl68tHiiPZM0,1801
171
+ adam/commands/reaper/utils_reaper.py,sha256=jQIjpBfQxCPfD_63RpbRZ_tbW2335mBaYiBHalhijSc,7541
172
+ adam/commands/repair/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
173
+ adam/commands/repair/repair.py,sha256=tNNJk01Bo8KYeogoUO0oGzwErCfFZz_aW7CmzP81Fs4,830
174
+ adam/commands/repair/repair_log.py,sha256=UCdcTE_4gdZxgQ-suDPk5uKMEDytubzucT_zEMUQ6Ck,1063
175
+ adam/commands/repair/repair_run.py,sha256=l78BWpa8wcuSPvYoweVDko57e2fFP6u0ZYbMHQE4FsM,2560
176
+ adam/commands/repair/repair_scan.py,sha256=-7dS9i-_5WO9uHW_PhA0Wi0bY1RvP5sHeQJXl5VB6Ps,2424
177
+ adam/commands/repair/repair_stop.py,sha256=J-IMeQCDo9bA6GbY98rM4456uAMtezX40zVIECEMjws,1097
178
+ adam/commands/show/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
179
+ adam/commands/show/show.py,sha256=0kBGHeSNdnRsIarZO-MmNhYFARUoCONZlDLbX4OOfZk,1724
180
+ adam/commands/show/show_adam.py,sha256=osuafMipN2My4O7bLdukBLsDHtTKguDfTagmgz7aZvw,1314
181
+ adam/commands/show/show_cassandra_repairs.py,sha256=wmv_fOKr_SwZnMCFDjtRBNEFuXoQNbCSAxoxgPknDhA,1129
182
+ adam/commands/show/show_cassandra_status.py,sha256=rYM0qkNJBwKKBI3MS-6yKcP_jO-DfnRcFwwtJ5AxGPA,4742
183
+ adam/commands/show/show_cassandra_version.py,sha256=O-vTwnK5mSyhFNRDGQ2c-3YNAbW0TZo1pndvD6kMRMo,1144
184
+ adam/commands/show/show_commands.py,sha256=ShPz8Vk90Bc_MsjhFQL147T7H67mZQf-IGRizCOB9dY,1905
185
+ adam/commands/show/show_host.py,sha256=b7UrC_n9qRp9jHuQqint1YDEmBbC2dZUjHr59Wff-nM,868
186
+ adam/commands/show/show_login.py,sha256=WL5Voj3IN_K4oB1c3UUFjRywTd4HGbp3O0mNCe2E03Y,1837
187
+ adam/commands/show/show_params.py,sha256=LoBj_ScmtsPrXSUH59p3IYAlmL-0Q_Gb01bp_7zrwQA,1008
188
+ adam/commands/show/show_processes.py,sha256=Qh0R_fC4QfkC6B9mLeeiReZDmFCNf5emxdYAlztdQjw,2075
189
+ adam/commands/show/show_storage.py,sha256=RUG91-ae6yr1BVb8QOrvaM3pPp38255mIF1rkG2OmlQ,1561
190
+ adam/sql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
191
+ adam/sql/sql_completer.py,sha256=RO-S4OiBuDPUL8EWiymB8JexIwgwNXx1QzErDxuL3y4,3939
192
+ adam/sql/sql_state_machine.py,sha256=2qTp3AfzuaGyNP1JbaC1RlV3eRZM9v2f4xSwpZ_Y-i0,38618
193
+ adam/sql/term_completer.py,sha256=HZjOV4fEV9LraoMjkk8lHxNvzRtSIYsGUJhSMOhuoHY,2599
194
+ adam/sso/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
195
+ adam/sso/authenticator.py,sha256=BCm16L9zf5aLU47-sTCnudn2zLPwd8M2wwRminJfsqw,615
196
+ adam/sso/authn_ad.py,sha256=FQbOJOT_goH7YSr2iqnHh8Ao-WL0jPaE3KyIe3T7g7Y,5786
197
+ adam/sso/authn_okta.py,sha256=e4DjNvCDw646L0SM0aWt_lT2q69MqtzTJiYQpo_EuAQ,4505
198
+ adam/sso/cred_cache.py,sha256=9c-Cdz4xlJ3FakqVmVkBVfQ0XLweDivdlu3kdIMLbFs,2039
199
+ adam/sso/id_token.py,sha256=wmVZ8S0sjScnOxmSvOKlIEKgnvdWqhsgq9XjFe355O4,744
200
+ adam/sso/idp.py,sha256=Fml1IwP2n3e-j3SFtH3uqL8h9dhQ62J3oM4d37svIu8,5775
201
+ adam/sso/idp_login.py,sha256=QAtCUeDTVWliJy40RK_oac8Vgybr13xH8wzeBoxPaa8,1754
202
+ adam/sso/idp_session.py,sha256=9BUHNRf70u4rVKrVY1HKPOEmOviXvkjam8WJxmXSKIM,1735
203
+ adam/sso/sso_config.py,sha256=5N8WZgIJQBtHUy585XLRWKjpU87_v6QluyNK9E27D5s,2459
204
+ adam/utils_k8s/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
205
+ adam/utils_k8s/app_clusters.py,sha256=czH5UUu_nRzU-3i_KZl2sq4AKdBO8sXzC-mCMQNAKfA,1216
206
+ adam/utils_k8s/app_pods.py,sha256=ztPxQci2bwOiylaWtzb-lrQTIYOtlCOa6PEb_AmP8Cg,1479
207
+ adam/utils_k8s/cassandra_clusters.py,sha256=Hn5k7rFA5kgBHosp-htul0s8CIzmBxdMLmC6O56u5a0,1572
208
+ adam/utils_k8s/cassandra_nodes.py,sha256=SPYWPkjB3ETVcdFveLvvFAGYrrt6K_D6R_XB7Lpd0-k,1550
209
+ adam/utils_k8s/config_maps.py,sha256=vc9A-2D1-1mindCMFL1wuysDOXb0RCl4BdjC6B6usXI,1194
210
+ adam/utils_k8s/custom_resources.py,sha256=95zVZchFtFWGZ_P-jLaSMl6WYTObn7PqeTLxZ_HKoEo,7599
211
+ adam/utils_k8s/deployment.py,sha256=SLhnMm5GMXwEldj2OupSFBUsvNjynwSNrv5tIDvLMrc,2921
212
+ adam/utils_k8s/ingresses.py,sha256=q8nJTIoxa_dVrGMl1HS5yTS_11jLNBAnWlc2ZishMEE,3458
213
+ adam/utils_k8s/jobs.py,sha256=HbUBNXcKcuXaNzc8NmqR_Sq35yHQ_qeQtiQFFM-J2QY,2534
214
+ adam/utils_k8s/k8s.py,sha256=hq3kPTdDB9Fyny64mFLepOgtqpEEVw6wm6IveWzBRfY,3133
215
+ adam/utils_k8s/kube_context.py,sha256=xJF_72vUJu-X9MpIYzOIfnj7KEWU7a_sLBR-H3994Y0,3311
216
+ adam/utils_k8s/pods.py,sha256=Y3FnAxnmNJwpvUaIkXf2Wkdq2iSpw5AU2aJMKRLf9AQ,10865
217
+ adam/utils_k8s/secrets.py,sha256=xnqRSumCIcPaASDcErzxjx1BCE-qJkPoG5wIP7YHzIo,2430
218
+ adam/utils_k8s/service_accounts.py,sha256=OF1-UwWupUAvn_rqNNTWsF3BWYgaLiGTJfinn8sreog,6342
219
+ adam/utils_k8s/services.py,sha256=7K6CxvYntbCsRjTZVcuYiBb5WPH7A5CTWTlUGvaVDRg,3154
220
+ adam/utils_k8s/statefulsets.py,sha256=06ccJhkkFQekIG8gIS9BicMZV1FVX_FKZOOxzdaTUcA,4097
221
+ adam/utils_k8s/volumes.py,sha256=RIBmlOSWM3V3QVXLCFT0owVOyh4rGG1ETp521a-6ndo,1137
222
+ adam/utils_repl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
223
+ adam/utils_repl/automata_completer.py,sha256=LJP_2WHHR7AtjX00MJ59VGQEL3t0XS-qYnDmMaZe-Tk,1641
224
+ adam/utils_repl/repl_completer.py,sha256=lsu0vWFdTs8SSSY9gxHN-fQSap-Wqz1QhMF4FqGf7qA,1722
225
+ adam/utils_repl/state_machine.py,sha256=kO4_oSi_M53f3QQjINzzb2VFptjbnqX3KRC0G8LqqeA,5426
226
+ kaqing-2.0.174.dist-info/METADATA,sha256=RW9iMrX4oWDyFahuaYLnN--UVcZfqK3SP-x_1xgVR60,133
227
+ kaqing-2.0.174.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
228
+ kaqing-2.0.174.dist-info/entry_points.txt,sha256=SkzhuQJUWsXOzHeZ5TgQ2c3_g53UGK23zzJU_JTZOZI,39
229
+ kaqing-2.0.174.dist-info/top_level.txt,sha256=8_2PZkwBb-xDcnc8a2rAbQeJhXKXskc7zTP7pSPa1fw,5
230
+ kaqing-2.0.174.dist-info/RECORD,,
adam/commands/app.py DELETED
@@ -1,67 +0,0 @@
1
- import json
2
-
3
- from adam.apps import Apps
4
- from adam.commands.command import Command
5
- from adam.repl_state import ReplState, RequiredState
6
- from adam.app_session import AppSession
7
- from adam.utils import log2
8
-
9
- class App(Command):
10
- COMMAND = 'app'
11
-
12
- # the singleton pattern
13
- def __new__(cls, *args, **kwargs):
14
- if not hasattr(cls, 'instance'): cls.instance = super(App, cls).__new__(cls)
15
-
16
- return cls.instance
17
-
18
- def __init__(self, successor: Command=None):
19
- super().__init__(successor)
20
-
21
- def command(self):
22
- return App.COMMAND
23
-
24
- def required(self):
25
- return RequiredState.APP_APP
26
-
27
- def run(self, cmd: str, state: ReplState):
28
- if not(args := self.args(cmd)):
29
- return super().run(cmd, state)
30
-
31
- state, args = self.apply_state(args, state)
32
- if not self.validate_state(state):
33
- return state
34
-
35
- args, forced = Command.extract_options(args, '--force')
36
-
37
- if not args:
38
- return 'arg missing'
39
-
40
- t_f = args[0].split('.')
41
- if len(t_f) < 2:
42
- return 'arg missing'
43
-
44
- payload, valid = Apps().payload(t_f[0], t_f[1], args[1:] if len(args) > 1 else [])
45
- if not valid:
46
- log2('Missing one or more action arguments.')
47
- return state
48
-
49
- if payload:
50
- try:
51
- payload = json.loads(payload)
52
- except json.decoder.JSONDecodeError as e:
53
- log2(f'Invalid json argument: {e}')
54
- return state
55
-
56
- AppSession.run(state.app_env, state.app_app, state.namespace, t_f[0], t_f[1], payload=payload, forced=forced)
57
-
58
- return state
59
-
60
- def completion(self, state: ReplState):
61
- if state.app_app:
62
- return super().completion(state, {'--force': None})
63
-
64
- return {}
65
-
66
- def help(self, _: ReplState):
67
- return f"<AppType>.<AppAction> <args> [--force]\t post app action; check with 'show app actions' command"
adam/commands/app_ping.py DELETED
@@ -1,44 +0,0 @@
1
- from adam.commands.command import Command
2
- from adam.repl_state import ReplState, RequiredState
3
- from adam.app_session import AppSession
4
-
5
- class AppPing(Command):
6
- COMMAND = 'app ping'
7
-
8
- # the singleton pattern
9
- def __new__(cls, *args, **kwargs):
10
- if not hasattr(cls, 'instance'): cls.instance = super(AppPing, cls).__new__(cls)
11
-
12
- return cls.instance
13
-
14
- def __init__(self, successor: Command=None):
15
- super().__init__(successor)
16
-
17
- def command(self):
18
- return AppPing.COMMAND
19
-
20
- def required(self):
21
- return RequiredState.APP_APP
22
-
23
- def run(self, cmd: str, state: ReplState):
24
- if not(args := self.args(cmd)):
25
- return super().run(cmd, state)
26
-
27
- state, args = self.apply_state(args, state)
28
- if not self.validate_state(state):
29
- return state
30
-
31
- _, forced = Command.extract_options(args, '--force')
32
-
33
- AppSession.run(state.app_env, state.app_app, state.namespace, 'Echo', 'echoStatic', forced= forced)
34
-
35
- return state
36
-
37
- def completion(self, state: ReplState):
38
- if state.app_app:
39
- return super().completion(state, {'--force': None})
40
-
41
- return {}
42
-
43
- def help(self, _: ReplState):
44
- return f"{AppPing.COMMAND} [--force]\t ping app server with Echo.echoStatic()"
@@ -1,53 +0,0 @@
1
- from adam.commands.command import Command
2
- from adam.commands.export.exporter import Exporter
3
- from adam.repl_state import ReplState, RequiredState
4
- from adam.utils import log, log2
5
-
6
- class CleanUpExportSession(Command):
7
- COMMAND = 'clean up export session'
8
-
9
- # the singleton pattern
10
- def __new__(cls, *args, **kwargs):
11
- if not hasattr(cls, 'instance'): cls.instance = super(CleanUpExportSession, 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 CleanUpExportSession.COMMAND
20
-
21
- def required(self):
22
- return RequiredState.CLUSTER_OR_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
- state, args = self.apply_state(args, state)
29
- if not self.validate_state(state):
30
- return state
31
-
32
- if not args:
33
- if state.in_repl:
34
- log2('Specify export session name.')
35
- else:
36
- log2('* Session name is missing.')
37
-
38
- Command.display_help()
39
-
40
- return 'command-missing'
41
-
42
- csv_cnt, log_cnt = Exporter.clean_up_session(state.sts, state.pod, state.namespace, args[0])
43
- log(f'Removed {csv_cnt} csv and {log_cnt} log files.')
44
-
45
- Exporter.clear_export_session_cache()
46
-
47
- return state
48
-
49
- def completion(self, _: ReplState):
50
- return {}
51
-
52
- def help(self, _: ReplState):
53
- return f'{CleanUpExportSession.COMMAND} <export-session-name>\t clean up export session'
@@ -1,31 +0,0 @@
1
- import functools
2
-
3
- from adam.commands.postgres.postgres_context import PostgresContext
4
- from adam.config import Config
5
-
6
- TestPG = [False]
7
-
8
- @functools.lru_cache()
9
- def pg_database_names(ns: str, pg_path: str):
10
- if TestPG[0]:
11
- return ['azops88_c3ai_c3']
12
-
13
- Config().wait_log('Inspecting Postgres Databases...')
14
-
15
- pg = PostgresContext.apply(ns, pg_path)
16
- return [db['name'] for db in pg.databases() if db['owner'] == PostgresContext.default_owner()]
17
-
18
- @functools.lru_cache()
19
- def pg_table_names(ns: str, pg_path: str):
20
- if TestPG[0]:
21
- return ['C3_2_XYZ1']
22
-
23
- Config().wait_log('Inspecting Postgres Database...')
24
- return [table['name'] for table in pg_tables(ns, pg_path) if table['schema'] == PostgresContext.default_schema()]
25
-
26
- def pg_tables(ns: str, pg_path: str):
27
- pg = PostgresContext.apply(ns, pg_path)
28
- if pg.db:
29
- return pg.tables()
30
-
31
- return []
@@ -1,159 +0,0 @@
1
- from collections.abc import Callable
2
- import threading
3
- from kubernetes import client
4
- import portforward
5
- import re
6
- import requests
7
- from typing import List, cast
8
-
9
- from adam.config import Config
10
- from adam.utils_k8s.kube_context import KubeContext
11
- from adam.repl_state import ReplState
12
- from adam.utils import lines_to_tabular, log2
13
-
14
- class ReaperSession:
15
- is_forwarding = False
16
- stopping = threading.Event()
17
- schedules_ids_by_cluster: dict[str, list[str]] = {}
18
-
19
- def __init__(self, pod: str, headers: dict[str, str] = None):
20
- self.pod = pod
21
- self.headers = headers
22
-
23
- def login(self, state: ReplState, local_addr: str, remote_addr: str, show_output = True) -> str :
24
- user, pw = state.user_pass(secret_path='reaper.secret')
25
-
26
- response = requests.post(f'http://{local_addr}/login', headers={
27
- 'Accept': '*'
28
- },data={
29
- 'username':user,
30
- 'password':pw})
31
- if show_output:
32
- log2(f'POST {remote_addr}/login')
33
- log2(f' username={user}&password={pw}')
34
-
35
- if int(response.status_code / 100) != 2:
36
- if show_output:
37
- log2("login failed")
38
- return None
39
-
40
- return response.headers['Set-Cookie']
41
-
42
- def port_forwarded(self, state: ReplState, path: str, body: Callable[[str, dict[str, str]], requests.Response], method: str = None, show_output = True):
43
- local_port = Config().get('reaper.port-forward.local-port', 9001)
44
- target_port = 8080
45
-
46
- def f(local_addr: str, remote_addr: str):
47
- if not self.headers:
48
- self.headers = self.cookie_header(state, local_addr, remote_addr, show_output=show_output)
49
-
50
- if show_output and method:
51
- log2(f'{method} {remote_addr}/{path}')
52
- response = body(f'http://{local_addr}/{path}', self.headers)
53
-
54
- if response:
55
- if int(response.status_code / 100) != 2:
56
- if show_output:
57
- log2(response.status_code)
58
- return response
59
-
60
- if show_output:
61
- log2()
62
-
63
- return response if response else 'no-response'
64
-
65
- if KubeContext.in_cluster():
66
- # cs-a526330d23-cs-a526330d23-default-sts-0 ->
67
- # curl http://cs-a526330d23-cs-a526330d23-reaper-service.stgawsscpsr.svc.cluster.local:8080
68
- groups = re.match(r'^(.*?-.*?-.*?-.*?-).*', state.sts)
69
- if groups:
70
- svc_name = Config().get('reaper.service-name', 'reaper-service')
71
- svc = f'{groups[1]}{svc_name}.{state.namespace}.svc.cluster.local:{target_port}'
72
- return f(local_addr=svc, remote_addr=svc)
73
- else:
74
- return None
75
- else:
76
- with portforward.forward(state.namespace, self.pod, local_port, target_port):
77
- return f(local_addr=f'localhost:{local_port}', remote_addr=f'{self.pod}:{target_port}')
78
-
79
- def cookie_header(self, state: ReplState, local_addr, remote_addr, show_output = True):
80
- return {'Cookie': self.login(state, local_addr, remote_addr, show_output=show_output)}
81
-
82
- def create(state: ReplState) -> 'ReaperSession':
83
- pods = ReaperSession.list_reaper_pods(state.sts if state.sts else state.pod, state.namespace)
84
- if pods:
85
- return ReaperSession(pods[0].metadata.name)
86
- else:
87
- log2('No reaper found.')
88
-
89
- return None
90
-
91
- def list_reaper_pods(sts_name: str, namespace: str) -> List[client.V1Pod]:
92
- v1 = client.CoreV1Api()
93
-
94
- # k8ssandra.io/reaper: cs-d0767a536f-cs-d0767a536f-reaper
95
- groups = re.match(Config().get('reaper.pod.cluster-regex', r'(.*?-.*?-.*?-.*?)-.*'), sts_name)
96
- label_selector = Config().get('reaper.pod.label-selector', 'k8ssandra.io/reaper={cluster}-reaper').replace('{cluster}', groups[1])
97
-
98
- return cast(List[client.V1Pod], v1.list_namespaced_pod(namespace, label_selector=label_selector).items)
99
-
100
- def show_schedules(self, state: ReplState, filter: Callable[[list[dict]], dict] = None):
101
- schedules = self.list_schedules(state, filter=filter)
102
- # forced refresh of schedule list
103
- if not filter:
104
- self.schedules_ids_by_cluster[state.sts] = [schedule['id'] for schedule in schedules]
105
- self.show_schedules_tabular(schedules)
106
-
107
- def schedule_ids(self, state: ReplState, show_output = True, filter: Callable[[list[dict]], dict] = None):
108
- schedules = self.list_schedules(state, show_output=show_output, filter=filter)
109
- return [schedule['id'] for schedule in schedules]
110
-
111
- def list_schedules(self, state: ReplState, show_output = True, filter: Callable[[list[dict]], dict] = None) -> list[dict]:
112
- def body(uri: str, headers: dict[str, str]):
113
- return requests.get(uri, headers=headers)
114
-
115
- response = self.port_forwarded(state, 'repair_schedule', body, method='GET', show_output=show_output)
116
- if not response:
117
- return
118
-
119
- res = response.json()
120
- if filter:
121
- res = filter(res)
122
-
123
- return res
124
-
125
- def show_schedules_tabular(self, schedules: list[dict]):
126
- log2(lines_to_tabular([f"{schedule['id']} {schedule['state']} {schedule['cluster_name']} {schedule['keyspace_name']}" for schedule in schedules], 'ID STATE CLUSTER KEYSPACE'))
127
-
128
- def show_schedule(self, state: ReplState, schedule_id: str):
129
- def filter(schedules: list[dict]):
130
- return [schedule for schedule in schedules if schedule['id'] == schedule_id]
131
-
132
- self.show_schedules(state, filter)
133
-
134
- def reaper_spec(self, state: ReplState) -> dict[str, any]:
135
- user, pw = state.user_pass(secret_path='reaper.secret')
136
- local_port = Config().get('reaper.port-forward.local-port', 9001)
137
-
138
- return {
139
- 'pod': self.pod,
140
- 'exec': f'kubectl exec -it {self.pod} -n {state.namespace} -- bash',
141
- 'forward': f'kubectl port-forward pods/{self.pod} -n {state.namespace} {local_port}:8080',
142
- 'web-uri': f'http://localhost:{local_port}/webui',
143
- 'username': user,
144
- 'password': pw
145
- }
146
-
147
- def cached_schedule_ids(state: ReplState) -> list[str]:
148
- if state.sts in ReaperSession.schedules_ids_by_cluster:
149
- return ReaperSession.schedules_ids_by_cluster[state.sts]
150
-
151
- if reaper := ReaperSession.create(state):
152
- Config().wait_log('Inspecting Cassandra Reaper...')
153
-
154
- schedules = reaper.schedule_ids(state, show_output = False)
155
- ReaperSession.schedules_ids_by_cluster[state.sts] = schedules
156
-
157
- return schedules
158
-
159
- return []
@@ -1,56 +0,0 @@
1
- from adam.app_session import AppSession
2
- from adam.apps import AppAction, Apps
3
- from adam.commands.command import Command
4
- from adam.config import Config
5
- from adam.repl_state import ReplState
6
- from adam.utils import lines_to_tabular, log
7
-
8
- class ShowAppActions(Command):
9
- COMMAND = 'show app actions'
10
-
11
- # the singleton pattern
12
- def __new__(cls, *args, **kwargs):
13
- if not hasattr(cls, 'instance'): cls.instance = super(ShowAppActions, 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 ShowAppActions.COMMAND
22
-
23
- def required(self):
24
- return ReplState.A
25
-
26
- def run(self, cmd: str, state: ReplState):
27
- if not self.args(cmd):
28
- return super().run(cmd, state)
29
-
30
- lines = []
31
- for typ in Apps().app_types():
32
- for action in typ.actions:
33
- a: AppAction = action
34
- args = ','.join(a.arguments())
35
- if args:
36
- line = f'{typ.name}.{a.name},{args}'
37
- else:
38
- line = f'{typ.name}.{a.name},'
39
- if a.help:
40
- line = f'{line},{a.help}'
41
- lines.append(line)
42
- log(lines_to_tabular(lines, 'ACTION,ARGS,DESCRIPTION', separator=','))
43
- log()
44
-
45
- app_session: AppSession = AppSession.create(state.app_env or 'c3', state.app_app or 'c3')
46
- endpoint = Config().get('app.console-endpoint', 'https://{host}/{env}/{app}/static/console/index.html')
47
- endpoint = endpoint.replace('{host}', app_session.host).replace('{env}', app_session.env).replace('{app}', state.app_app or 'c3')
48
- log(lines_to_tabular([f'CONSOLE:,{endpoint}'], separator=','))
49
-
50
- return lines
51
-
52
- def completion(self, state: ReplState):
53
- return super().completion(state)
54
-
55
- def help(self, _: ReplState):
56
- return f"{ShowAppActions.COMMAND}\t show app actions"