kaqing 2.0.91__tar.gz → 2.0.92__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.
- {kaqing-2.0.91 → kaqing-2.0.92}/PKG-INFO +1 -1
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/bash.py +6 -2
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/command.py +2 -2
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/nodetool.py +2 -2
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/repl_commands.py +1 -6
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/repl_state.py +2 -2
- kaqing-2.0.92/adam/version.py +5 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/kaqing.egg-info/PKG-INFO +1 -1
- {kaqing-2.0.91 → kaqing-2.0.92}/kaqing.egg-info/SOURCES.txt +0 -1
- {kaqing-2.0.91 → kaqing-2.0.92}/setup.py +1 -1
- kaqing-2.0.91/adam/commands/cat.py +0 -54
- kaqing-2.0.91/adam/version.py +0 -5
- {kaqing-2.0.91 → kaqing-2.0.92}/README +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/__init__.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/app_session.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/apps.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/batch.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/checks/__init__.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/checks/check.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/checks/check_context.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/checks/check_result.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/checks/check_utils.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/checks/compactionstats.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/checks/cpu.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/checks/disk.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/checks/gossip.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/checks/issue.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/checks/memory.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/checks/status.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/cli.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/cli_group.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/__init__.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/column.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/columns.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/compactions.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/cpu.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/dir_data.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/dir_snapshots.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/gossip.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/host_id.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/memory.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/node_address.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/node_load.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/node_owns.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/node_status.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/node_tokens.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/node_utils.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/pod_name.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/volume_cassandra.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/columns/volume_root.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/__init__.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/alter_tables.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/app.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/app_ping.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/audit/__init__.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/audit/audit.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/audit/audit_repair_tables.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/cd.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/check.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/cli_commands.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/command_helpers.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/commands_utils.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/cp.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/cql/__init__.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/cql/cql_completions.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/cql/cql_table_completer.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/cql/cql_utils.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/cql/cqlsh.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/deploy/__init__.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/deploy/code_start.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/deploy/code_stop.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/deploy/code_utils.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/deploy/deploy.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/deploy/deploy_frontend.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/deploy/deploy_pg_agent.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/deploy/deploy_pod.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/deploy/deploy_utils.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/deploy/undeploy.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/deploy/undeploy_frontend.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/deploy/undeploy_pg_agent.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/deploy/undeploy_pod.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/describe/__init__.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/describe/describe.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/describe/describe_keyspace.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/describe/describe_keyspaces.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/describe/describe_table.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/describe/describe_tables.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/devices.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/exit.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/help.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/issues.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/login.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/logs.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/ls.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/medusa/__init__.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/medusa/medusa.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/medusa/medusa_backup.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/medusa/medusa_restore.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/medusa/medusa_show_backupjobs.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/medusa/medusa_show_restorejobs.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/nodetool_commands.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/param_get.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/param_set.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/postgres/__init__.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/postgres/postgres.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/postgres/postgres_ls.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/postgres/postgres_preview.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/postgres/postgres_session.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/postgres/postgres_utils.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/postgres/psql_completions.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/postgres/psql_table_completer.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/preview_table.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/pwd.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/reaper/__init__.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/reaper/reaper.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/reaper/reaper_forward.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/reaper/reaper_forward_stop.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/reaper/reaper_restart.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/reaper/reaper_run_abort.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/reaper/reaper_runs.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/reaper/reaper_runs_abort.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/reaper/reaper_schedule_activate.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/reaper/reaper_schedule_start.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/reaper/reaper_schedule_stop.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/reaper/reaper_schedules.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/reaper/reaper_session.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/reaper/reaper_status.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/repair/__init__.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/repair/repair.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/repair/repair_log.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/repair/repair_run.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/repair/repair_scan.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/repair/repair_stop.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/report.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/restart.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/rollout.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/shell.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/show/__init__.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/show/show.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/show/show_adam.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/show/show_app_actions.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/show/show_app_id.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/show/show_app_queues.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/show/show_cassandra_status.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/show/show_cassandra_version.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/show/show_commands.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/show/show_host.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/show/show_login.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/show/show_params.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/show/show_processes.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/show/show_repairs.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/show/show_storage.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/commands/watch.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/config.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/embedded_apps.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/embedded_params.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/k8s_utils/__init__.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/k8s_utils/cassandra_clusters.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/k8s_utils/cassandra_nodes.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/k8s_utils/config_maps.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/k8s_utils/custom_resources.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/k8s_utils/deployment.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/k8s_utils/ingresses.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/k8s_utils/jobs.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/k8s_utils/kube_context.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/k8s_utils/pods.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/k8s_utils/secrets.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/k8s_utils/service_accounts.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/k8s_utils/services.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/k8s_utils/statefulsets.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/k8s_utils/volumes.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/log.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/pod_exec_result.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/repl.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/repl_session.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/sql/__init__.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/sql/sql_completer.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/sql/state_machine.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/sql/term_completer.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/sso/__init__.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/sso/authenticator.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/sso/authn_ad.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/sso/authn_okta.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/sso/cred_cache.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/sso/id_token.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/sso/idp.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/sso/idp_login.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/sso/idp_session.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/sso/sso_config.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/utils.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/utils_athena.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/adam/utils_net.py +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/kaqing.egg-info/dependency_links.txt +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/kaqing.egg-info/entry_points.txt +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/kaqing.egg-info/top_level.txt +0 -0
- {kaqing-2.0.91 → kaqing-2.0.92}/setup.cfg +0 -0
|
@@ -25,12 +25,16 @@ class Bash(Command):
|
|
|
25
25
|
if not(args := self.args(cmd)):
|
|
26
26
|
return super().run(cmd, s0)
|
|
27
27
|
|
|
28
|
-
state, args = self.apply_state(args, s0)
|
|
28
|
+
state, args = self.apply_state(args, s0, args_to_check=2)
|
|
29
29
|
if not self.validate_state(state):
|
|
30
30
|
return state
|
|
31
31
|
|
|
32
32
|
if state.in_repl:
|
|
33
|
-
|
|
33
|
+
if s0.sts != state.sts or s0.pod != state.pod:
|
|
34
|
+
r = self.exec_with_dir(state, args)
|
|
35
|
+
else:
|
|
36
|
+
r = self.exec_with_dir(s0, args)
|
|
37
|
+
|
|
34
38
|
if not r:
|
|
35
39
|
state.exit_bash()
|
|
36
40
|
|
|
@@ -53,8 +53,8 @@ class Command:
|
|
|
53
53
|
|
|
54
54
|
return a
|
|
55
55
|
|
|
56
|
-
def apply_state(self, args: list[str], state: ReplState, resolve_pg = True) -> tuple[ReplState, list[str]]:
|
|
57
|
-
return state.apply_args(args, cmd=self.command_tokens(), resolve_pg=resolve_pg)
|
|
56
|
+
def apply_state(self, args: list[str], state: ReplState, resolve_pg = True, args_to_check = 6) -> tuple[ReplState, list[str]]:
|
|
57
|
+
return state.apply_args(args, cmd=self.command_tokens(), resolve_pg=resolve_pg, args_to_check=args_to_check)
|
|
58
58
|
|
|
59
59
|
def command_tokens(self):
|
|
60
60
|
return self.command().split(' ')
|
|
@@ -43,13 +43,13 @@ class NodeTool(Command):
|
|
|
43
43
|
if state.pod:
|
|
44
44
|
results: PodExecResult = CassandraNodes.exec(state.pod, state.namespace, command, show_out=True)
|
|
45
45
|
if results and results.log_file and Config().get('repl.history.push-cat-remote-log-file', True):
|
|
46
|
-
ReplSession().prompt_session.history.append_string(f'cat {results.log_file}')
|
|
46
|
+
ReplSession().prompt_session.history.append_string(f'bash cat {results.log_file}')
|
|
47
47
|
elif state.sts:
|
|
48
48
|
results: list[PodExecResult] = CassandraClusters.exec(state.sts, state.namespace, command, action='nodetool', show_out=True)
|
|
49
49
|
if results and Config().get('repl.history.push-cat-remote-log-file', True):
|
|
50
50
|
for result in results:
|
|
51
51
|
if result.log_file:
|
|
52
|
-
ReplSession().prompt_session.history.append_string(f'
|
|
52
|
+
ReplSession().prompt_session.history.append_string(f'bash {result.pod} cat {result.log_file}')
|
|
53
53
|
|
|
54
54
|
return results
|
|
55
55
|
|
|
@@ -3,7 +3,6 @@ from adam.commands.app import App
|
|
|
3
3
|
from adam.commands.app_ping import AppPing
|
|
4
4
|
from adam.commands.audit.audit import Audit
|
|
5
5
|
from adam.commands.audit.audit_repair_tables import AuditRepairTables
|
|
6
|
-
from adam.commands.cat import Cat
|
|
7
6
|
from adam.commands.deploy.code_start import CodeStart
|
|
8
7
|
from adam.commands.deploy.code_stop import CodeStop
|
|
9
8
|
from adam.commands.deploy.deploy import Deploy
|
|
@@ -15,10 +14,6 @@ from adam.commands.deploy.undeploy_frontend import UndeployFrontend
|
|
|
15
14
|
from adam.commands.deploy.undeploy_pg_agent import UndeployPgAgent
|
|
16
15
|
from adam.commands.deploy.undeploy_pod import UndeployPod
|
|
17
16
|
from adam.commands.describe.describe import Describe
|
|
18
|
-
from adam.commands.describe.describe_keyspace import DescribeKeyspace
|
|
19
|
-
from adam.commands.describe.describe_keyspaces import DescribeKeyspaces
|
|
20
|
-
from adam.commands.describe.describe_table import DescribeTable
|
|
21
|
-
from adam.commands.describe.describe_tables import DescribeTables
|
|
22
17
|
from adam.commands.shell import Shell
|
|
23
18
|
from adam.commands.show.show_app_queues import ShowAppQueues
|
|
24
19
|
from adam.commands.cp import ClipboardCopy
|
|
@@ -80,7 +75,7 @@ class ReplCommands:
|
|
|
80
75
|
return deduped
|
|
81
76
|
|
|
82
77
|
def navigation() -> list[Command]:
|
|
83
|
-
return [Ls(), PreviewTable(), DeviceApp(), DevicePostgres(), DeviceCass(), DeviceAuditLog(), Cd(), Pwd(),
|
|
78
|
+
return [Ls(), PreviewTable(), DeviceApp(), DevicePostgres(), DeviceCass(), DeviceAuditLog(), Cd(), Pwd(), ClipboardCopy(),
|
|
84
79
|
GetParam(), SetParam(), ShowParams(), ShowKubectlCommands(), ShowLogin(), ShowAdam(), ShowHost()]
|
|
85
80
|
|
|
86
81
|
def cassandra_check() -> list[Command]:
|
|
@@ -84,12 +84,12 @@ class ReplState:
|
|
|
84
84
|
def __hash__(self):
|
|
85
85
|
return hash((self.sts, self.pod))
|
|
86
86
|
|
|
87
|
-
def apply_args(self, args: list[str], cmd: list[str] = None, resolve_pg = True) -> tuple['ReplState', list[str]]:
|
|
87
|
+
def apply_args(self, args: list[str], cmd: list[str] = None, resolve_pg = True, args_to_check = 6) -> tuple['ReplState', list[str]]:
|
|
88
88
|
state = self
|
|
89
89
|
|
|
90
90
|
new_args = []
|
|
91
91
|
for index, arg in enumerate(args):
|
|
92
|
-
if index <
|
|
92
|
+
if index < args_to_check:
|
|
93
93
|
state = copy.copy(state)
|
|
94
94
|
|
|
95
95
|
s, n = KubeContext.is_sts_name(arg)
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
from adam.commands.command import Command
|
|
2
|
-
from adam.k8s_utils.cassandra_nodes import CassandraNodes
|
|
3
|
-
from adam.repl_state import ReplState, RequiredState
|
|
4
|
-
from adam.utils import log2
|
|
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.NAMESPACE
|
|
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 len(args) < 1:
|
|
33
|
-
if state.in_repl:
|
|
34
|
-
log2('File name is required.')
|
|
35
|
-
else:
|
|
36
|
-
log2('* File name is missing.')
|
|
37
|
-
Command.display_help()
|
|
38
|
-
|
|
39
|
-
return 'command-missing'
|
|
40
|
-
|
|
41
|
-
arg = args[0]
|
|
42
|
-
if '@' in arg:
|
|
43
|
-
path_and_pod = arg.split('@')
|
|
44
|
-
CassandraNodes.exec(path_and_pod[1], state.namespace, f'cat {path_and_pod[0]}')
|
|
45
|
-
else:
|
|
46
|
-
CassandraNodes.exec(state.pod, state.namespace, f'cat {arg}')
|
|
47
|
-
|
|
48
|
-
return state
|
|
49
|
-
|
|
50
|
-
def completion(self, state: ReplState):
|
|
51
|
-
return super().completion(state)
|
|
52
|
-
|
|
53
|
-
def help(self, _: ReplState):
|
|
54
|
-
return f'{Cat.COMMAND} <path>[@<pod>] \t print content of the file'
|
kaqing-2.0.91/adam/version.py
DELETED
|
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
|
|
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
|
|
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
|
|
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
|