kaqing 2.0.77__tar.gz → 2.0.79__tar.gz

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 (191) hide show
  1. {kaqing-2.0.77 → kaqing-2.0.79}/PKG-INFO +1 -1
  2. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/show/show.py +2 -1
  3. kaqing-2.0.79/adam/commands/show/show_host.py +33 -0
  4. {kaqing-2.0.77 → kaqing-2.0.79}/adam/repl.py +8 -1
  5. {kaqing-2.0.77 → kaqing-2.0.79}/adam/repl_commands.py +2 -1
  6. kaqing-2.0.79/adam/utils_net.py +24 -0
  7. kaqing-2.0.79/adam/version.py +5 -0
  8. {kaqing-2.0.77 → kaqing-2.0.79}/kaqing.egg-info/PKG-INFO +1 -1
  9. {kaqing-2.0.77 → kaqing-2.0.79}/kaqing.egg-info/SOURCES.txt +2 -0
  10. {kaqing-2.0.77 → kaqing-2.0.79}/setup.py +1 -1
  11. kaqing-2.0.77/adam/version.py +0 -5
  12. {kaqing-2.0.77 → kaqing-2.0.79}/README +0 -0
  13. {kaqing-2.0.77 → kaqing-2.0.79}/adam/__init__.py +0 -0
  14. {kaqing-2.0.77 → kaqing-2.0.79}/adam/app_session.py +0 -0
  15. {kaqing-2.0.77 → kaqing-2.0.79}/adam/apps.py +0 -0
  16. {kaqing-2.0.77 → kaqing-2.0.79}/adam/batch.py +0 -0
  17. {kaqing-2.0.77 → kaqing-2.0.79}/adam/checks/__init__.py +0 -0
  18. {kaqing-2.0.77 → kaqing-2.0.79}/adam/checks/check.py +0 -0
  19. {kaqing-2.0.77 → kaqing-2.0.79}/adam/checks/check_context.py +0 -0
  20. {kaqing-2.0.77 → kaqing-2.0.79}/adam/checks/check_result.py +0 -0
  21. {kaqing-2.0.77 → kaqing-2.0.79}/adam/checks/check_utils.py +0 -0
  22. {kaqing-2.0.77 → kaqing-2.0.79}/adam/checks/compactionstats.py +0 -0
  23. {kaqing-2.0.77 → kaqing-2.0.79}/adam/checks/cpu.py +0 -0
  24. {kaqing-2.0.77 → kaqing-2.0.79}/adam/checks/disk.py +0 -0
  25. {kaqing-2.0.77 → kaqing-2.0.79}/adam/checks/gossip.py +0 -0
  26. {kaqing-2.0.77 → kaqing-2.0.79}/adam/checks/issue.py +0 -0
  27. {kaqing-2.0.77 → kaqing-2.0.79}/adam/checks/memory.py +0 -0
  28. {kaqing-2.0.77 → kaqing-2.0.79}/adam/checks/status.py +0 -0
  29. {kaqing-2.0.77 → kaqing-2.0.79}/adam/cli.py +0 -0
  30. {kaqing-2.0.77 → kaqing-2.0.79}/adam/cli_group.py +0 -0
  31. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/__init__.py +0 -0
  32. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/column.py +0 -0
  33. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/columns.py +0 -0
  34. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/compactions.py +0 -0
  35. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/cpu.py +0 -0
  36. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/dir_data.py +0 -0
  37. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/dir_snapshots.py +0 -0
  38. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/gossip.py +0 -0
  39. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/host_id.py +0 -0
  40. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/memory.py +0 -0
  41. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/node_address.py +0 -0
  42. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/node_load.py +0 -0
  43. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/node_owns.py +0 -0
  44. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/node_status.py +0 -0
  45. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/node_tokens.py +0 -0
  46. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/node_utils.py +0 -0
  47. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/pod_name.py +0 -0
  48. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/volume_cassandra.py +0 -0
  49. {kaqing-2.0.77 → kaqing-2.0.79}/adam/columns/volume_root.py +0 -0
  50. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/__init__.py +0 -0
  51. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/alter_tables.py +0 -0
  52. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/app.py +0 -0
  53. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/app_ping.py +0 -0
  54. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/bash.py +0 -0
  55. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/cd.py +0 -0
  56. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/check.py +0 -0
  57. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/cli_commands.py +0 -0
  58. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/command.py +0 -0
  59. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/command_helpers.py +0 -0
  60. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/commands_utils.py +0 -0
  61. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/cp.py +0 -0
  62. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/cql/__init__.py +0 -0
  63. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/cql/cql_completions.py +0 -0
  64. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/cql/cql_table_completer.py +0 -0
  65. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/cql/cql_utils.py +0 -0
  66. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/cql/cqlsh.py +0 -0
  67. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/deploy/__init__.py +0 -0
  68. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/deploy/code_start.py +0 -0
  69. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/deploy/code_stop.py +0 -0
  70. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/deploy/code_utils.py +0 -0
  71. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/deploy/deploy.py +0 -0
  72. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/deploy/deploy_frontend.py +0 -0
  73. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/deploy/deploy_pg_agent.py +0 -0
  74. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/deploy/deploy_pod.py +0 -0
  75. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/deploy/deploy_utils.py +0 -0
  76. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/deploy/undeploy.py +0 -0
  77. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/deploy/undeploy_frontend.py +0 -0
  78. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/deploy/undeploy_pg_agent.py +0 -0
  79. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/deploy/undeploy_pod.py +0 -0
  80. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/describe/__init__.py +0 -0
  81. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/describe/describe.py +0 -0
  82. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/describe/describe_keyspace.py +0 -0
  83. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/describe/describe_keyspaces.py +0 -0
  84. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/describe/describe_table.py +0 -0
  85. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/describe/describe_tables.py +0 -0
  86. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/devices.py +0 -0
  87. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/exit.py +0 -0
  88. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/help.py +0 -0
  89. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/issues.py +0 -0
  90. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/login.py +0 -0
  91. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/logs.py +0 -0
  92. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/ls.py +0 -0
  93. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/medusa/__init__.py +0 -0
  94. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/medusa/medusa.py +0 -0
  95. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/medusa/medusa_backup.py +0 -0
  96. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/medusa/medusa_restore.py +0 -0
  97. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/medusa/medusa_show_backupjobs.py +0 -0
  98. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/medusa/medusa_show_restorejobs.py +0 -0
  99. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/nodetool.py +0 -0
  100. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/nodetool_commands.py +0 -0
  101. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/param_get.py +0 -0
  102. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/param_set.py +0 -0
  103. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/postgres/__init__.py +0 -0
  104. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/postgres/postgres.py +0 -0
  105. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/postgres/postgres_ls.py +0 -0
  106. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/postgres/postgres_preview.py +0 -0
  107. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/postgres/postgres_session.py +0 -0
  108. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/postgres/postgres_utils.py +0 -0
  109. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/postgres/psql_completions.py +0 -0
  110. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/postgres/psql_table_completer.py +0 -0
  111. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/preview_table.py +0 -0
  112. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/pwd.py +0 -0
  113. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/reaper/__init__.py +0 -0
  114. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/reaper/reaper.py +0 -0
  115. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/reaper/reaper_forward.py +0 -0
  116. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/reaper/reaper_forward_stop.py +0 -0
  117. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/reaper/reaper_restart.py +0 -0
  118. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/reaper/reaper_run_abort.py +0 -0
  119. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/reaper/reaper_runs.py +0 -0
  120. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/reaper/reaper_runs_abort.py +0 -0
  121. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/reaper/reaper_schedule_activate.py +0 -0
  122. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/reaper/reaper_schedule_start.py +0 -0
  123. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/reaper/reaper_schedule_stop.py +0 -0
  124. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/reaper/reaper_schedules.py +0 -0
  125. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/reaper/reaper_session.py +0 -0
  126. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/reaper/reaper_status.py +0 -0
  127. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/repair/__init__.py +0 -0
  128. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/repair/repair.py +0 -0
  129. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/repair/repair_log.py +0 -0
  130. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/repair/repair_run.py +0 -0
  131. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/repair/repair_scan.py +0 -0
  132. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/repair/repair_stop.py +0 -0
  133. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/report.py +0 -0
  134. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/restart.py +0 -0
  135. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/rollout.py +0 -0
  136. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/shell.py +0 -0
  137. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/show/__init__.py +0 -0
  138. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/show/show_adam.py +0 -0
  139. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/show/show_app_actions.py +0 -0
  140. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/show/show_app_id.py +0 -0
  141. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/show/show_app_queues.py +0 -0
  142. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/show/show_cassandra_status.py +0 -0
  143. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/show/show_cassandra_version.py +0 -0
  144. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/show/show_commands.py +0 -0
  145. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/show/show_login.py +0 -0
  146. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/show/show_params.py +0 -0
  147. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/show/show_processes.py +0 -0
  148. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/show/show_repairs.py +0 -0
  149. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/show/show_storage.py +0 -0
  150. {kaqing-2.0.77 → kaqing-2.0.79}/adam/commands/watch.py +0 -0
  151. {kaqing-2.0.77 → kaqing-2.0.79}/adam/config.py +0 -0
  152. {kaqing-2.0.77 → kaqing-2.0.79}/adam/embedded_apps.py +0 -0
  153. {kaqing-2.0.77 → kaqing-2.0.79}/adam/embedded_params.py +0 -0
  154. {kaqing-2.0.77 → kaqing-2.0.79}/adam/k8s_utils/__init__.py +0 -0
  155. {kaqing-2.0.77 → kaqing-2.0.79}/adam/k8s_utils/cassandra_clusters.py +0 -0
  156. {kaqing-2.0.77 → kaqing-2.0.79}/adam/k8s_utils/cassandra_nodes.py +0 -0
  157. {kaqing-2.0.77 → kaqing-2.0.79}/adam/k8s_utils/config_maps.py +0 -0
  158. {kaqing-2.0.77 → kaqing-2.0.79}/adam/k8s_utils/custom_resources.py +0 -0
  159. {kaqing-2.0.77 → kaqing-2.0.79}/adam/k8s_utils/deployment.py +0 -0
  160. {kaqing-2.0.77 → kaqing-2.0.79}/adam/k8s_utils/ingresses.py +0 -0
  161. {kaqing-2.0.77 → kaqing-2.0.79}/adam/k8s_utils/jobs.py +0 -0
  162. {kaqing-2.0.77 → kaqing-2.0.79}/adam/k8s_utils/kube_context.py +0 -0
  163. {kaqing-2.0.77 → kaqing-2.0.79}/adam/k8s_utils/pods.py +0 -0
  164. {kaqing-2.0.77 → kaqing-2.0.79}/adam/k8s_utils/secrets.py +0 -0
  165. {kaqing-2.0.77 → kaqing-2.0.79}/adam/k8s_utils/service_accounts.py +0 -0
  166. {kaqing-2.0.77 → kaqing-2.0.79}/adam/k8s_utils/services.py +0 -0
  167. {kaqing-2.0.77 → kaqing-2.0.79}/adam/k8s_utils/statefulsets.py +0 -0
  168. {kaqing-2.0.77 → kaqing-2.0.79}/adam/k8s_utils/volumes.py +0 -0
  169. {kaqing-2.0.77 → kaqing-2.0.79}/adam/log.py +0 -0
  170. {kaqing-2.0.77 → kaqing-2.0.79}/adam/pod_exec_result.py +0 -0
  171. {kaqing-2.0.77 → kaqing-2.0.79}/adam/repl_session.py +0 -0
  172. {kaqing-2.0.77 → kaqing-2.0.79}/adam/repl_state.py +0 -0
  173. {kaqing-2.0.77 → kaqing-2.0.79}/adam/sql/__init__.py +0 -0
  174. {kaqing-2.0.77 → kaqing-2.0.79}/adam/sql/sql_completer.py +0 -0
  175. {kaqing-2.0.77 → kaqing-2.0.79}/adam/sql/state_machine.py +0 -0
  176. {kaqing-2.0.77 → kaqing-2.0.79}/adam/sql/term_completer.py +0 -0
  177. {kaqing-2.0.77 → kaqing-2.0.79}/adam/sso/__init__.py +0 -0
  178. {kaqing-2.0.77 → kaqing-2.0.79}/adam/sso/authenticator.py +0 -0
  179. {kaqing-2.0.77 → kaqing-2.0.79}/adam/sso/authn_ad.py +0 -0
  180. {kaqing-2.0.77 → kaqing-2.0.79}/adam/sso/authn_okta.py +0 -0
  181. {kaqing-2.0.77 → kaqing-2.0.79}/adam/sso/cred_cache.py +0 -0
  182. {kaqing-2.0.77 → kaqing-2.0.79}/adam/sso/id_token.py +0 -0
  183. {kaqing-2.0.77 → kaqing-2.0.79}/adam/sso/idp.py +0 -0
  184. {kaqing-2.0.77 → kaqing-2.0.79}/adam/sso/idp_login.py +0 -0
  185. {kaqing-2.0.77 → kaqing-2.0.79}/adam/sso/idp_session.py +0 -0
  186. {kaqing-2.0.77 → kaqing-2.0.79}/adam/sso/sso_config.py +0 -0
  187. {kaqing-2.0.77 → kaqing-2.0.79}/adam/utils.py +0 -0
  188. {kaqing-2.0.77 → kaqing-2.0.79}/kaqing.egg-info/dependency_links.txt +0 -0
  189. {kaqing-2.0.77 → kaqing-2.0.79}/kaqing.egg-info/entry_points.txt +0 -0
  190. {kaqing-2.0.77 → kaqing-2.0.79}/kaqing.egg-info/top_level.txt +0 -0
  191. {kaqing-2.0.77 → kaqing-2.0.79}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kaqing
3
- Version: 2.0.77
3
+ Version: 2.0.79
4
4
  Summary: UNKNOWN
5
5
  Home-page: UNKNOWN
6
6
  License: UNKNOWN
@@ -5,6 +5,7 @@ from adam.commands.medusa.medusa_show_backupjobs import MedusaShowBackupJobs
5
5
  from adam.commands.medusa.medusa_show_restorejobs import MedusaShowRestoreJobs
6
6
  from adam.commands.show.show_app_actions import ShowAppActions
7
7
  from adam.commands.show.show_app_queues import ShowAppQueues
8
+ from adam.commands.show.show_host import ShowHost
8
9
  from adam.commands.show.show_login import ShowLogin
9
10
  from .show_params import ShowParams
10
11
  from .show_app_id import ShowAppId
@@ -39,7 +40,7 @@ class Show(Command):
39
40
  return super().intermediate_run(cmd, state, args, Show.cmd_list())
40
41
 
41
42
  def cmd_list():
42
- return [ShowAppActions(), ShowAppId(), ShowAppQueues(), ShowLogin(), ShowKubectlCommands(),
43
+ return [ShowAppActions(), ShowAppId(), ShowAppQueues(), ShowHost(), ShowLogin(), ShowKubectlCommands(),
43
44
  ShowParams(), ShowProcesses(), ShowRepairs(), ShowStorage(), ShowAdam(),
44
45
  ShowCassandraStatus(), ShowCassandraVersion(), MedusaShowRestoreJobs(), MedusaShowBackupJobs()]
45
46
 
@@ -0,0 +1,33 @@
1
+ from adam.commands.command import Command
2
+ from adam.repl_state import ReplState
3
+ from adam.utils import log
4
+ from adam.utils_net import get_my_host
5
+
6
+ class ShowHost(Command):
7
+ COMMAND = 'show host'
8
+
9
+ # the singleton pattern
10
+ def __new__(cls, *args, **kwargs):
11
+ if not hasattr(cls, 'instance'): cls.instance = super(ShowHost, 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 ShowHost.COMMAND
20
+
21
+ def run(self, cmd: str, state: ReplState):
22
+ if not(args := self.args(cmd)):
23
+ return super().run(cmd, state)
24
+
25
+ log(get_my_host())
26
+
27
+ return state
28
+
29
+ def completion(self, state: ReplState):
30
+ return super().completion(state)
31
+
32
+ def help(self, _: ReplState):
33
+ return f'{ShowHost.COMMAND}\t show host'
@@ -23,6 +23,7 @@ from adam.repl_session import ReplSession
23
23
  from adam.repl_state import ReplState
24
24
  from adam.utils import deep_merge_dicts, deep_sort_dict, lines_to_tabular, log2
25
25
  from adam.apps import Apps
26
+ from adam.utils_net import get_my_host
26
27
  from . import __version__
27
28
 
28
29
  def enter_repl(state: ReplState):
@@ -169,7 +170,13 @@ def enter_repl(state: ReplState):
169
170
  executor.submit(audit_log, cmd, state)
170
171
 
171
172
  def audit_log(cmd: str, state: ReplState):
172
- payload = {"line": cmd.replace('"', '""').replace('\n', ' '), "ts": time.time(), "cluster": state.namespace if state.namespace else 'NA', "user": getpass.getuser()}
173
+ payload = {
174
+ 'cluster': state.namespace if state.namespace else 'NA',
175
+ 'ts': time.time(),
176
+ 'host': get_my_host(),
177
+ 'user': getpass.getuser(),
178
+ 'line': cmd.replace('"', '""').replace('\n', ' '),
179
+ }
173
180
  audit_endpoint = Config().get("audit.endpoint", "https://sex7je4h2e.execute-api.us-west-2.amazonaws.com/prod")
174
181
  response = requests.post(audit_endpoint, json=payload, timeout=Config().get("audit.timeout", 10))
175
182
  if response.status_code in [200, 201]:
@@ -46,6 +46,7 @@ from adam.commands.show.show_app_id import ShowAppId
46
46
  from adam.commands.show.show_cassandra_status import ShowCassandraStatus
47
47
  from adam.commands.show.show_cassandra_version import ShowCassandraVersion
48
48
  from adam.commands.show.show_commands import ShowKubectlCommands
49
+ from adam.commands.show.show_host import ShowHost
49
50
  from adam.commands.show.show_login import ShowLogin
50
51
  from adam.commands.show.show_params import ShowParams
51
52
  from adam.commands.show.show_processes import ShowProcesses
@@ -77,7 +78,7 @@ class ReplCommands:
77
78
 
78
79
  def navigation() -> list[Command]:
79
80
  return [Ls(), PreviewTable(), DeviceApp(), DevicePostgres(), DeviceCass(), Cd(), Pwd(), ClipboardCopy(),
80
- GetParam(), SetParam(), ShowParams(), ShowKubectlCommands(), ShowLogin(), ShowAdam()]
81
+ GetParam(), SetParam(), ShowParams(), ShowKubectlCommands(), ShowLogin(), ShowAdam(), ShowHost()]
81
82
 
82
83
  def cassandra_check() -> list[Command]:
83
84
  return Describe.cmd_list() + [ShowCassandraStatus(),
@@ -0,0 +1,24 @@
1
+ import socket
2
+
3
+ MY_HOST = None
4
+
5
+ def get_my_host():
6
+ global MY_HOST
7
+
8
+ if MY_HOST:
9
+ return MY_HOST
10
+
11
+ MY_HOST = get_ip_from_hostname('host.docker.internal')
12
+ if not MY_HOST:
13
+ MY_HOST = socket.gethostname()
14
+
15
+ if not MY_HOST:
16
+ MY_HOST = 'NA'
17
+
18
+ return MY_HOST
19
+
20
+ def get_ip_from_hostname(hostname):
21
+ try:
22
+ return socket.gethostbyname(hostname)
23
+ except socket.gaierror:
24
+ return None
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+
4
+ __version__ = "2.0.79" #: the working version
5
+ __release__ = "1.0.0" #: the release version
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kaqing
3
- Version: 2.0.77
3
+ Version: 2.0.79
4
4
  Summary: UNKNOWN
5
5
  Home-page: UNKNOWN
6
6
  License: UNKNOWN
@@ -16,6 +16,7 @@ adam/repl_commands.py
16
16
  adam/repl_session.py
17
17
  adam/repl_state.py
18
18
  adam/utils.py
19
+ adam/utils_net.py
19
20
  adam/version.py
20
21
  adam/checks/__init__.py
21
22
  adam/checks/check.py
@@ -145,6 +146,7 @@ adam/commands/show/show_app_queues.py
145
146
  adam/commands/show/show_cassandra_status.py
146
147
  adam/commands/show/show_cassandra_version.py
147
148
  adam/commands/show/show_commands.py
149
+ adam/commands/show/show_host.py
148
150
  adam/commands/show/show_login.py
149
151
  adam/commands/show/show_params.py
150
152
  adam/commands/show/show_processes.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='kaqing',
5
- version='2.0.77',
5
+ version='2.0.79',
6
6
  packages=find_packages(),
7
7
  entry_points={
8
8
  'console_scripts': [
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env python
2
- # -*- coding: utf-8 -*-
3
-
4
- __version__ = "2.0.77" #: the working version
5
- __release__ = "1.0.0" #: the release version
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes