kaqing 2.0.26__py3-none-any.whl → 2.0.27__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.
@@ -0,0 +1,111 @@
1
+ import click
2
+
3
+ from adam.commands.command import Command
4
+ from adam.commands.command_helpers import ClusterOrPodCommandHelper
5
+ from adam.commands.cql_utils import parse_cql_desc_tables, run_cql
6
+ from adam.config import Config
7
+ from adam.pod_exec_result import PodExecResult
8
+ from adam.repl_state import ReplState, RequiredState
9
+ from adam.utils import log, log2
10
+
11
+ class AlterTables(Command):
12
+ COMMAND = 'alter tables with'
13
+
14
+ # the singleton pattern
15
+ def __new__(cls, *args, **kwargs):
16
+ if not hasattr(cls, 'instance'): cls.instance = super(AlterTables, cls).__new__(cls)
17
+
18
+ return cls.instance
19
+
20
+ def __init__(self, successor: Command=None):
21
+ super().__init__(successor)
22
+
23
+ def required(self):
24
+ return RequiredState.CLUSTER
25
+
26
+ def command(self):
27
+ return AlterTables.COMMAND
28
+
29
+ def run(self, cmd: str, state: ReplState):
30
+ if not(args := self.args(cmd)):
31
+ return super().run(cmd, state)
32
+
33
+ state, args = self.apply_state(args, state)
34
+ if not self.validate_state(state):
35
+ return state
36
+
37
+ if not args:
38
+ if state.in_repl:
39
+ log2('Please enter gc grace in seconds. e.g. alter gc-grace-seconds 3600')
40
+ else:
41
+ log2('* gc grace second is missing.')
42
+ log2()
43
+ Command.display_help()
44
+
45
+ return 'missing-arg'
46
+
47
+ args, include_reaper = Command.extract_options(args, '--include-reaper')
48
+ arg_str = ' '.join(args)
49
+
50
+ r: list[PodExecResult] = run_cql(state, 'describe tables', show_out=False, on_any=True)
51
+ if not r:
52
+ log2('No pod is available')
53
+ return 'no-pod'
54
+
55
+ excludes = [e.strip(' \r\n') for e in Config().get(
56
+ 'cql.alter-tables.excludes',
57
+ 'system_auth,system_traces,system_distributed,system_views,system,system_schema,system_virtual_schema').split(',')]
58
+ batching = Config().get('cql.alter-tables.batching', True)
59
+ tables = parse_cql_desc_tables(r[0].stdout)
60
+ for k, v in tables.items():
61
+ if k not in excludes or k == 'reaper_db' and include_reaper:
62
+ if batching:
63
+ # alter table <table_name> with GC_GRACE_SECONDS = <timeout>;
64
+ cql = ';\n'.join([f'alter table {k}.{t} with {arg_str}' for t in v])
65
+ try:
66
+ run_cql(state, cql, [], show_out=Config().get('debug.show-out', False), on_any=True)
67
+ except Exception as e:
68
+ log2(e)
69
+ continue
70
+ else:
71
+ for t in v:
72
+ try:
73
+ # alter table <table_name> with GC_GRACE_SECONDS = <timeout>;
74
+ cql = f'alter table {k}.{t} with {arg_str}'
75
+ run_cql(state, cql, [], show_out=Config().get('debug.show-out', False), on_any=True)
76
+ except Exception as e:
77
+ log2(e)
78
+ continue
79
+
80
+ log2(f'{len(v)} tables altered in {k}.')
81
+
82
+ # do not continue to cql route
83
+ return state
84
+
85
+ def completion(self, state: ReplState) -> dict[str, any]:
86
+ if state.sts:
87
+ ps = Config().get('cql.alter-tables.gc-grace-periods', '3600,864000,7776000').split(',')
88
+ return super().completion(state, {
89
+ 'GC_GRACE_SECONDS': {'=': {p.strip(' \r\n'): {'--include-reaper': None} for p in ps}},
90
+ })
91
+
92
+ return {}
93
+
94
+ def help(self, _: ReplState) -> str:
95
+ return f'[{AlterTables.COMMAND}] <param = value> [--include-reaper] \t alter on all tables'
96
+
97
+ class CqlCommandHelper(click.Command):
98
+ def get_help(self, ctx: click.Context):
99
+ log(super().get_help(ctx))
100
+ log()
101
+ log(' e.g. qing cql <cluster or pod> select host_id from system.local')
102
+ log()
103
+ log('Advanced Usages:')
104
+ log(' 1. Use -- to specify what arguments are passed to the cqlsh.')
105
+ log(' 2. Use "" to avoid expansion on shell variables.')
106
+ log(' 3. Use ; to use multiple CQL statements')
107
+ log()
108
+ log(' e.g. qing cql <cluster or pod> -- "consistency quorum; select * from system.local" --request-timeout=3600')
109
+ log()
110
+
111
+ ClusterOrPodCommandHelper.cluter_or_pod_help()
@@ -5,7 +5,7 @@ from adam.k8s_utils.cassandra_nodes import CassandraNodes
5
5
  from adam.k8s_utils.secrets import Secrets
6
6
  from adam.repl_state import ReplState
7
7
 
8
- def run_cql(state: ReplState, cql: str, opts: list = [], show_out = False, use_single_quotes = False):
8
+ def run_cql(state: ReplState, cql: str, opts: list = [], show_out = False, use_single_quotes = False, on_any = False):
9
9
  user, pw = Secrets.get_user_pass(state.sts if state.sts else state.pod, state.namespace, secret_path='cql.secret')
10
10
  if use_single_quotes:
11
11
  command = f"cqlsh -u {user} -p {pw} {' '.join(opts)} -e '{cql}'"
@@ -15,7 +15,7 @@ def run_cql(state: ReplState, cql: str, opts: list = [], show_out = False, use_s
15
15
  if state.pod:
16
16
  return CassandraNodes.exec(state.pod, state.namespace, command, show_out=show_out)
17
17
  else:
18
- return CassandraClusters.exec(state.sts, state.namespace, command, action='cql')
18
+ return CassandraClusters.exec(state.sts, state.namespace, command, show_out=show_out, action='cql', on_any=on_any)
19
19
 
20
20
  def parse_cql_desc_tables(out: str):
21
21
  # Keyspace data_endpoint_auth
adam/embedded_params.py CHANGED
@@ -1,2 +1,2 @@
1
1
  def config():
2
- return {'app': {'console-endpoint': 'https://{host}/{env}/{app}/static/console/index.html', 'cr': {'cluster-regex': '(.*?-.*?)-.*', 'group': 'ops.c3.ai', 'v': 'v2', 'plural': 'c3cassandras'}, 'label': 'c3__app_id-0', 'login': {'admin-group': '{host}/C3.ClusterAdmin', 'ingress': '{app_id}-k8singr-appleader-001', 'timeout': 5, 'session-check-url': 'https://{host}/{env}/{app}/api/8/C3/userSessionToken', 'cache-creds': True, 'cache-username': True, 'url': 'https://{host}/{env}/{app}', 'another': "You're logged in to {has}. However, for this app, you need to log in to {need}.", 'token-server-url': 'http://localhost:{port}', 'password-max-length': 128}, 'strip': '0'}, 'bash': {'workers': 32}, 'cassandra': {'service-name': 'all-pods-service'}, 'cql': {'workers': 32, 'samples': 3, 'secret': {'cluster-regex': '(.*?-.*?)-.*', 'name': '{cluster}-superuser', 'password-item': 'password'}}, 'checks': {'compactions-threshold': 250, 'cpu-busy-threshold': 98.0, 'cpu-threshold': 0.0, 'cassandra-data-path': '/c3/cassandra', 'root-disk-threshold': 50, 'cassandra-disk-threshold': 50, 'snapshot-size-cmd': "ls /c3/cassandra/data/data/*/*/snapshots | grep snapshots | sed 's/:$//g' | xargs -I {} du -sk {} | awk '{print $1}' | awk '{s+=$1} END {print s}'", 'snapshot-size-threshold': '40G', 'table-sizes-cmd': "ls -Al /c3/cassandra/data/data/ | awk '{print $9}' | sed 's/\\^r//g' | xargs -I {} du -sk /c3/cassandra/data/data/{}"}, 'get-host-id': {'workers': 32}, 'idps': {'ad': {'email-pattern': '.*@c3.ai', 'uri': 'https://login.microsoftonline.com/53ad779a-93e7-485c-ba20-ac8290d7252b/oauth2/v2.0/authorize?response_type=id_token&response_mode=form_post&client_id=00ff94a8-6b0a-4715-98e0-95490012d818&scope=openid+email+profile&redirect_uri=https%3A%2F%2Fplat.c3ci.cloud%2Fc3%2Fc3%2Foidc%2Flogin&nonce={nonce}&state=EMPTY', 'jwks-uri': 'https://login.microsoftonline.com/common/discovery/keys', 'contact': 'Please contact ted.tran@c3.ai.', 'whitelist-file': '/kaqing/members'}, 'okta': {'default': True, 'email-pattern': '.*@c3iot.com', 'uri': 'https://c3energy.okta.com/oauth2/v1/authorize?response_type=id_token&response_mode=form_post&client_id={client_id}&scope=openid+email+profile+groups&redirect_uri=https%3A%2F%2F{host}%2Fc3%2Fc3%2Foidc%2Flogin&nonce={nonce}&state=EMPTY', 'jwks-uri': 'https://c3energy.okta.com/oauth2/v1/keys'}}, 'issues': {'workers': 32}, 'logs': {'path': '/c3/cassandra/logs/system.log'}, 'medusa': {'restore-auto-complete': False}, 'nodetool': {'workers': 32, 'samples': 3, 'commands_in_line': 40}, 'pg': {'name-pattern': '^{namespace}.*-k8spg-.*', 'excludes': '.helm., -admin-secret', 'agent': {'name': 'ops-pg-agent', 'just-in-time': False, 'timeout': 86400, 'image': 'seanahnsf/kaqing'}, 'default-db': 'postgres', 'default-schema': 'postgres', 'secret': {'endpoint-key': 'postgres-db-endpoint', 'port-key': 'postgres-db-port', 'username-key': 'postgres-admin-username', 'password-key': 'postgres-admin-password'}}, 'pod': {'name': 'ops', 'image': 'seanahnsf/kaqing-cloud', 'sa': {'name': 'ops', 'proto': 'c3', 'additional-cluster-roles': 'c3aiops-k8ssandra-operator'}, 'label-selector': 'run=ops'}, 'preview': {'rows': 10}, 'processes': {'columns': 'pod,cpu,mem', 'header': 'POD_NAME,CPU,MEM/LIMIT'}, 'reaper': {'service-name': 'reaper-service', 'port-forward': {'timeout': 86400, 'local-port': 9001}, 'abort-runs-batch': 10, 'show-runs-batch': 100, 'pod': {'cluster-regex': '(.*?-.*?-.*?-.*?)-.*', 'label-selector': 'k8ssandra.io/reaper={cluster}-reaper'}, 'secret': {'cluster-regex': '(.*?-.*?)-.*', 'name': '{cluster}-reaper-ui', 'password-item': 'password'}}, 'repair': {'log-path': '/home/cassrepair/logs/', 'image': 'ci-registry.c3iot.io/cloudops/cassrepair:2.0.14', 'secret': 'ciregistryc3iotio', 'env': {'interval': 24, 'timeout': 60, 'pr': False, 'runs': 1}}, 'repl': {'start-drive': 'a', 'auto-enter-app': 'c3/c3', 'auto-enter-only-cluster': True}, 'status': {'columns': 'status,address,load,tokens,owns,host_id,gossip,compactions', 'header': '--,Address,Load,Tokens,Owns,Host ID,GOSSIP,COMPACTIONS'}, 'storage': {'columns': 'pod,volume_root,volume_cassandra,snapshots,data,compactions', 'header': 'POD_NAME,VOLUME /,VOLUME CASS,SNAPSHOTS,DATA,COMPACTIONS'}, 'watch': {'auto': 'rollout', 'timeout': 3600, 'interval': 10}, 'debug': {'timings': False, 'exit-on-error': False, 'show-parallelism': False, 'show-out': False}}
2
+ return {'app': {'console-endpoint': 'https://{host}/{env}/{app}/static/console/index.html', 'cr': {'cluster-regex': '(.*?-.*?)-.*', 'group': 'ops.c3.ai', 'v': 'v2', 'plural': 'c3cassandras'}, 'label': 'c3__app_id-0', 'login': {'admin-group': '{host}/C3.ClusterAdmin', 'ingress': '{app_id}-k8singr-appleader-001', 'timeout': 5, 'session-check-url': 'https://{host}/{env}/{app}/api/8/C3/userSessionToken', 'cache-creds': True, 'cache-username': True, 'url': 'https://{host}/{env}/{app}', 'another': "You're logged in to {has}. However, for this app, you need to log in to {need}.", 'token-server-url': 'http://localhost:{port}', 'password-max-length': 128}, 'strip': '0'}, 'bash': {'workers': 32}, 'cassandra': {'service-name': 'all-pods-service'}, 'cql': {'workers': 32, 'samples': 3, 'secret': {'cluster-regex': '(.*?-.*?)-.*', 'name': '{cluster}-superuser', 'password-item': 'password'}, 'alter-tables': {'excludes': 'system_auth,system_traces,reaper_db,system_distributed,system_views,system,system_schema,system_virtual_schema', 'gc-grace-periods': '3600,864000,7776000', 'batching': True}}, 'checks': {'compactions-threshold': 250, 'cpu-busy-threshold': 98.0, 'cpu-threshold': 0.0, 'cassandra-data-path': '/c3/cassandra', 'root-disk-threshold': 50, 'cassandra-disk-threshold': 50, 'snapshot-size-cmd': "ls /c3/cassandra/data/data/*/*/snapshots | grep snapshots | sed 's/:$//g' | xargs -I {} du -sk {} | awk '{print $1}' | awk '{s+=$1} END {print s}'", 'snapshot-size-threshold': '40G', 'table-sizes-cmd': "ls -Al /c3/cassandra/data/data/ | awk '{print $9}' | sed 's/\\^r//g' | xargs -I {} du -sk /c3/cassandra/data/data/{}"}, 'get-host-id': {'workers': 32}, 'idps': {'ad': {'email-pattern': '.*@c3.ai', 'uri': 'https://login.microsoftonline.com/53ad779a-93e7-485c-ba20-ac8290d7252b/oauth2/v2.0/authorize?response_type=id_token&response_mode=form_post&client_id=00ff94a8-6b0a-4715-98e0-95490012d818&scope=openid+email+profile&redirect_uri=https%3A%2F%2Fplat.c3ci.cloud%2Fc3%2Fc3%2Foidc%2Flogin&nonce={nonce}&state=EMPTY', 'jwks-uri': 'https://login.microsoftonline.com/common/discovery/keys', 'contact': 'Please contact ted.tran@c3.ai.', 'whitelist-file': '/kaqing/members'}, 'okta': {'default': True, 'email-pattern': '.*@c3iot.com', 'uri': 'https://c3energy.okta.com/oauth2/v1/authorize?response_type=id_token&response_mode=form_post&client_id={client_id}&scope=openid+email+profile+groups&redirect_uri=https%3A%2F%2F{host}%2Fc3%2Fc3%2Foidc%2Flogin&nonce={nonce}&state=EMPTY', 'jwks-uri': 'https://c3energy.okta.com/oauth2/v1/keys'}}, 'issues': {'workers': 32}, 'logs': {'path': '/c3/cassandra/logs/system.log'}, 'medusa': {'restore-auto-complete': False}, 'nodetool': {'workers': 32, 'samples': 3, 'commands_in_line': 40}, 'pg': {'name-pattern': '^{namespace}.*-k8spg-.*', 'excludes': '.helm., -admin-secret', 'agent': {'name': 'ops-pg-agent', 'just-in-time': False, 'timeout': 86400, 'image': 'seanahnsf/kaqing'}, 'default-db': 'postgres', 'default-schema': 'postgres', 'secret': {'endpoint-key': 'postgres-db-endpoint', 'port-key': 'postgres-db-port', 'username-key': 'postgres-admin-username', 'password-key': 'postgres-admin-password'}}, 'pod': {'name': 'ops', 'image': 'seanahnsf/kaqing-cloud', 'sa': {'name': 'ops', 'proto': 'c3', 'additional-cluster-roles': 'c3aiops-k8ssandra-operator'}, 'label-selector': 'run=ops'}, 'preview': {'rows': 10}, 'processes': {'columns': 'pod,cpu,mem', 'header': 'POD_NAME,CPU,MEM/LIMIT'}, 'reaper': {'service-name': 'reaper-service', 'port-forward': {'timeout': 86400, 'local-port': 9001}, 'abort-runs-batch': 10, 'show-runs-batch': 100, 'pod': {'cluster-regex': '(.*?-.*?-.*?-.*?)-.*', 'label-selector': 'k8ssandra.io/reaper={cluster}-reaper'}, 'secret': {'cluster-regex': '(.*?-.*?)-.*', 'name': '{cluster}-reaper-ui', 'password-item': 'password'}}, 'repair': {'log-path': '/home/cassrepair/logs/', 'image': 'ci-registry.c3iot.io/cloudops/cassrepair:2.0.14', 'secret': 'ciregistryc3iotio', 'env': {'interval': 24, 'timeout': 60, 'pr': False, 'runs': 1}}, 'repl': {'start-drive': 'a', 'auto-enter-app': 'c3/c3', 'auto-enter-only-cluster': True}, 'status': {'columns': 'status,address,load,tokens,owns,host_id,gossip,compactions', 'header': '--,Address,Load,Tokens,Owns,Host ID,GOSSIP,COMPACTIONS'}, 'storage': {'columns': 'pod,volume_root,volume_cassandra,snapshots,data,compactions', 'header': 'POD_NAME,VOLUME /,VOLUME CASS,SNAPSHOTS,DATA,COMPACTIONS'}, 'watch': {'auto': 'rollout', 'timeout': 3600, 'interval': 10}, 'debug': {'timings': False, 'exit-on-error': False, 'show-parallelism': False, 'show-out': False}}
@@ -14,7 +14,7 @@ T = TypeVar('T')
14
14
 
15
15
  # utility collection on cassandra clusters; methods are all static
16
16
  class CassandraClusters:
17
- def exec(statefulset: str, namespace: str, command: str, action: str = 'action', max_workers=0, show_out=True) -> list[PodExecResult]:
17
+ def exec(statefulset: str, namespace: str, command: str, action: str = 'action', max_workers=0, show_out=True, on_any = False) -> list[PodExecResult]:
18
18
  def body(executor: ThreadPoolExecutor, pod: str, namespace: str, show_out: bool):
19
19
  if executor:
20
20
  return executor.submit(CassandraNodes.exec, pod, namespace, command, False, False,)
@@ -31,18 +31,4 @@ class CassandraClusters:
31
31
 
32
32
  return result
33
33
 
34
- return StatefulSets.on_cluster(statefulset, namespace, body, post=post, action=action, max_workers=max_workers, show_out=show_out)
35
-
36
- def on_cluster(statefulset: str,
37
- namespace: str,
38
- body: Callable[[ThreadPoolExecutor, str, str, bool], T],
39
- post: Callable[[T], T] = None,
40
- action: str = 'action', max_workers=0, show_out=True) -> list[T]:
41
- pods = StatefulSets.pod_names(statefulset, namespace)
42
-
43
- return Pods.on_pods(pods, namespace, body, post=post, action=action, max_workers=max_workers, show_out=show_out)
44
-
45
- def pod_names_by_host_id(ss: str, ns: str):
46
- pods = StatefulSets.pods(ss, ns)
47
-
48
- return {CassandraNodes.get_host_id(pod.metadata.name, ns): pod.metadata.name for pod in pods}
34
+ return StatefulSets.on_cluster(statefulset, namespace, body, post=post, action=action, max_workers=max_workers, show_out=show_out, on_any=on_any)
adam/k8s_utils/pods.py CHANGED
@@ -42,12 +42,12 @@ class Pods:
42
42
  namespace: str,
43
43
  body: Callable[[ThreadPoolExecutor, str, str, bool], T],
44
44
  post: Callable[[T], T] = None,
45
- action: str = 'action', max_workers=0, show_out=True) -> list[T]:
45
+ action: str = 'action', max_workers=0, show_out=True, on_any = False) -> list[T]:
46
46
  show_out = KubeContext.show_out(show_out)
47
47
 
48
48
  if not max_workers:
49
49
  max_workers = Config().action_workers(action, 0)
50
- if max_workers > 0:
50
+ if not on_any and max_workers > 0:
51
51
  # if parallel, node sampling is suppressed
52
52
  if KubeContext.show_parallelism():
53
53
  log2(f'Executing on all nodes from statefulset in parallel...')
@@ -70,7 +70,7 @@ class Pods:
70
70
  else:
71
71
  results: list[T] = []
72
72
 
73
- samples = Config().action_node_samples(action, sys.maxsize)
73
+ samples = 1 if on_any else Config().action_node_samples(action, sys.maxsize)
74
74
  l = min(len(pods), samples)
75
75
  adj = 'all'
76
76
  if l < len(pods):
@@ -233,9 +233,7 @@ class Pods:
233
233
  ))
234
234
  )
235
235
 
236
- def wait_for_running(namespace: str, pod_name: str, msg: str=None, label_selector: str = None):
237
- msged = False
238
-
236
+ def wait_for_running(namespace: str, pod_name: str, msg: str = None, label_selector: str = None):
239
237
  cnt = 2
240
238
  while (cnt < 302 and Pods.get_with_selector(namespace, label_selector) if label_selector else Pods.get(namespace, pod_name)).status.phase != 'Running':
241
239
  if not msg:
@@ -255,7 +253,7 @@ class Pods:
255
253
  time.sleep(1)
256
254
 
257
255
  log2(f'\r{msg}..'.ljust(max_len), nl=False)
258
- if cnt < 300:
256
+ if cnt < 302:
259
257
  log2(' OK')
260
258
  else:
261
259
  log2(' Timed Out')
@@ -61,10 +61,10 @@ class StatefulSets:
61
61
  namespace: str,
62
62
  body: Callable[[ThreadPoolExecutor, str, str, bool], T],
63
63
  post: Callable[[T], T] = None,
64
- action: str = 'action', max_workers=0, show_out=True) -> list[T]:
64
+ action: str = 'action', max_workers=0, show_out=True, on_any = False) -> list[T]:
65
65
  pods = StatefulSets.pod_names(statefulset, namespace)
66
66
 
67
- return Pods.on_pods(pods, namespace, body, post=post, action=action, max_workers=max_workers, show_out=show_out)
67
+ return Pods.on_pods(pods, namespace, body, post=post, action=action, max_workers=max_workers, show_out=show_out, on_any=on_any)
68
68
 
69
69
  @functools.lru_cache()
70
70
  def pod_names(ss: str, ns: str):
adam/repl_commands.py CHANGED
@@ -1,3 +1,4 @@
1
+ from adam.commands.alter_tables import AlterTables
1
2
  from adam.commands.app import App
2
3
  from adam.commands.app_ping import AppPing
3
4
  from adam.commands.deploy.code_start import CodeStart
@@ -77,7 +78,8 @@ class ReplCommands:
77
78
  return [ShowCassandraStatus(), ShowCassandraVersion(), ShowRepairs(), ShowStorage(), ShowProcesses(), Check(), Issues(), NodeTool(), Report()]
78
79
 
79
80
  def cassandra_ops() -> list[Command]:
80
- return Medusa.cmd_list() + [Restart(), RollOut(), Watch()] + Reaper.cmd_list() + Repair.cmd_list()
81
+ # return Medusa.cmd_list() + [Restart(), RollOut(), Watch()] + Reaper.cmd_list() + Repair.cmd_list()
82
+ return [AlterTables()] + Medusa.cmd_list() + [Restart(), RollOut(), Watch()] + Reaper.cmd_list() + Repair.cmd_list()
81
83
 
82
84
  def tools() -> list[Command]:
83
85
  return [Cqlsh(), Postgres(), Bash(), Shell(), CodeStart(), CodeStop(), DeployFrontend(), UndeployFrontend(), DeployPod(), UndeployPod(), DeployPgAgent(), UndeployPgAgent()]
adam/sso/authn_ad.py CHANGED
@@ -137,7 +137,7 @@ class AdAuthenticator(Authenticator):
137
137
  return []
138
138
 
139
139
  def parse_id_token(self, id_token: str) -> IdToken:
140
- jwks_url = Config().get('idps.ad.jwks-uri', 'https://login.microsoftonline.com/common/discovery/keys')
140
+ jwks_url = Config().get('idps.ad.jwks-uri', '')
141
141
  try:
142
142
  jwks_client = jwt.PyJWKClient(jwks_url, cache_jwk_set=True, lifespan=360)
143
143
  signing_key = jwks_client.get_signing_key_from_jwt(id_token)
adam/version.py CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
- __version__ = "2.0.26" #: the working version
4
+ __version__ = "2.0.27" #: the working version
5
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.26
3
+ Version: 2.0.27
4
4
  Summary: UNKNOWN
5
5
  Home-page: UNKNOWN
6
6
  License: UNKNOWN
@@ -6,15 +6,15 @@ adam/cli.py,sha256=03pIZdomAu7IL-GSP6Eun_PKwwISShRAmfx6eVRPGC0,458
6
6
  adam/cli_group.py,sha256=W3zy1BghCtVcEXizq8fBH-93ZRVVwgAyGPzy0sHno1Y,593
7
7
  adam/config.py,sha256=38UcmYRxf-Kq4iPbKS7tNPQqN64fam1bWNy6jhWREd0,2552
8
8
  adam/embedded_apps.py,sha256=lKPx63mKzJbNmwz0rgL4gF76M9fDGxraYTtNAIGnZ_s,419
9
- adam/embedded_params.py,sha256=Ea7Ls3AR85jp1Fj-ZDTRmw_V9BwCquLTu5j3gJwo-nI,4377
9
+ adam/embedded_params.py,sha256=3oIaLcv4VTiO-fmB4u-R9Jfw2mvfTeoEsbkNarnNIis,4582
10
10
  adam/log.py,sha256=gg5DK52wLPc9cjykeh0WFHyAk1qI3HEpGaAK8W2dzXY,1146
11
11
  adam/pod_exec_result.py,sha256=nq0xnCNOpUGBSijGF0H-YNrwBc9vUQs4DkvLMIFS5LQ,951
12
12
  adam/repl.py,sha256=5uGsu24qVAfATHIRdLJ4er44_9uUnVZ14pr-VXCILI0,7224
13
- adam/repl_commands.py,sha256=h5l-xLfB85qiaU71yyunhoTy2743zsC4ElQ0ZvHqo_k,4259
13
+ adam/repl_commands.py,sha256=a6LQV4sZ0UrHVu-MveCeX301IZdzEs_iIc9qYwOhnFc,4437
14
14
  adam/repl_session.py,sha256=uIogcvWBh7wd8QQ-p_JgLsyJ8YJgINw5vOd6JIsd7Vo,472
15
15
  adam/repl_state.py,sha256=QarrUAwYWOz3YTemtaf2opbHLa5a3LEsyuonNwhvOhk,7131
16
16
  adam/utils.py,sha256=-O47UmVG8S5N2LHAOE-UTMBHJOS_mXufU8ncupeNCHc,7043
17
- adam/version.py,sha256=jQjSL1L2HiuimPuBBox_LoqX997GYKbhlZ-Z5cHVELE,139
17
+ adam/version.py,sha256=TGNwKej8_C3bewii0T8US36CS8n2TD8e-NsNLR88QSs,139
18
18
  adam/checks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  adam/checks/check.py,sha256=Qopr3huYcMu2bzQgb99dEUYjFzkjKHRI76S6KA9b9Rk,702
20
20
  adam/checks/check_context.py,sha256=FEHkQ32jY1EDopQ2uYWqy9v7aEEX1orLpJWhopwAlh4,402
@@ -47,6 +47,7 @@ adam/columns/pod_name.py,sha256=IYw0ZKA7Fb9LaGXENqzZTiTgL98tahwFRtfy0KkKh2Q,280
47
47
  adam/columns/volume_cassandra.py,sha256=9KRNOzjNYganI9avN6zaA5_-7yxD4rV-KNxro9CSUg4,753
48
48
  adam/columns/volume_root.py,sha256=29ujLoCAf9LO75u62LxEaPD58s6ihV-tcK17OeLSOM0,556
49
49
  adam/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
+ adam/commands/alter_tables.py,sha256=3sp6uIJAxZerCImz1bcu9CGAKg44exYA9Tgj1NmQAwk,4352
50
51
  adam/commands/app.py,sha256=7alV8wK801t67_rUe6EmhtHJTl-6K7fGCm6Uz1dDgpM,1963
51
52
  adam/commands/app_ping.py,sha256=Xk7cfefphXM2w-UvpnhNUTZ3BU38f0deehUb2FEyLCI,1337
52
53
  adam/commands/bash.py,sha256=1O9cCl9JHQdttqNAgdB44rO0NjCqHzHv4psAEQMJcjw,2714
@@ -57,7 +58,7 @@ adam/commands/command.py,sha256=SEAYAAw2RQy_EPIzUy0FSr90R6FsGDbVJTQujhhlfvY,2907
57
58
  adam/commands/command_helpers.py,sha256=leOJJK1UXczNTJHN9TGMCbIpUpmpreULvQ-TvnsYS7w,1134
58
59
  adam/commands/commands_utils.py,sha256=ShUcxtDSd9B3NM0GDj3NBvKdmjCGY8qXgeUJpzNF63E,3122
59
60
  adam/commands/cp.py,sha256=dyQViRDPNqsKRkxPb7WyEVIBNw7YB6IfYa2q3VtfzyA,3107
60
- adam/commands/cql_utils.py,sha256=NQQj622ywDuigFpLQvTxVJFqbCBbEXxT2vP_vDn1cvU,1962
61
+ adam/commands/cql_utils.py,sha256=KPMZtfRJf9WP_NEgosADt6zCLSBn9hGODbMJF4MMy3c,2012
61
62
  adam/commands/cqlsh.py,sha256=gyRZLTcO2d_DMsc64b3HLh5xwMx4Qhe8298_NwXf2XQ,2635
62
63
  adam/commands/devices.py,sha256=_f8j6aQzTL8_pFlWYawRuG2Ju1zPjYSPcRIlLnZng10,2397
63
64
  adam/commands/exit.py,sha256=5MWUAmzYBlsrp0CoiTDB13SUkX9Ya18UlGeOIPia6TA,798
@@ -136,7 +137,7 @@ adam/commands/show/show_processes.py,sha256=jAesWDD_l0T6ql6LawnGpev-Glz21tFkegtC
136
137
  adam/commands/show/show_repairs.py,sha256=qpbyeRyLPyBWmn_4yxFu8KIjfd58HGry5pvqNyMwn5I,1477
137
138
  adam/commands/show/show_storage.py,sha256=LUTkH_qnc1d9s4jKsps8jhB4rkUuN7ifMlHSwFqd8_c,1837
138
139
  adam/k8s_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
139
- adam/k8s_utils/cassandra_clusters.py,sha256=9gUn31SsyW32asSFM8cKdkDSw5LYqPY2Iv0r4fDg_fU,2017
140
+ adam/k8s_utils/cassandra_clusters.py,sha256=lx_jSuxSZEIUvlmDMzPw0d7j2AeiBClLsudNMlK7RaM,1399
140
141
  adam/k8s_utils/cassandra_nodes.py,sha256=jQlaxIQKnavvsXH7lMM8WPriusp7KO698UygytIA8Xw,1134
141
142
  adam/k8s_utils/config_maps.py,sha256=vc9A-2D1-1mindCMFL1wuysDOXb0RCl4BdjC6B6usXI,1194
142
143
  adam/k8s_utils/custom_resources.py,sha256=cIeaZRQET2DelTGU2f5QsMckh7TddPpWZDFeNK3txeQ,7647
@@ -144,15 +145,15 @@ adam/k8s_utils/deployment.py,sha256=3oZPfPgQfqtAQaxEFL4daUfRSieRAhysmuaWMzUYgXk,
144
145
  adam/k8s_utils/ingresses.py,sha256=ul3Z6fDGc_Cxcn-ExP0vXhZatoShCUZFtpwtCY4Qx7o,3460
145
146
  adam/k8s_utils/jobs.py,sha256=gJpBpjcZ_FlkWJJIlavbHC_bqdmvv-GMVo8UZVh0sOQ,2610
146
147
  adam/k8s_utils/kube_context.py,sha256=nocEyVNjXWG-N-GNnEYHDvnot7H5LQUFmpZIwIyE7As,3310
147
- adam/k8s_utils/pods.py,sha256=g374JUo1t_3kKmcMCCorOmc_z9EgRjvMoeABoX8Ja7I,10425
148
+ adam/k8s_utils/pods.py,sha256=waj02Av78DWFVUIvVhru1fZNm2uZtgG5nhKspsURhzo,10453
148
149
  adam/k8s_utils/secrets.py,sha256=pYaVKXTpx3-QgFtBjznWFq0N6ZcBdxnx21FRe5nBCCo,2305
149
150
  adam/k8s_utils/service_accounts.py,sha256=v2oQSqCrNvt2uRnKlNwR3fjtpUG7oF5nqgzEB7NnT-U,6349
150
151
  adam/k8s_utils/services.py,sha256=EOJJGACVbbRvu5T3rMKqIJqgYic1_MSJ17EA0TJ6UOk,3156
151
- adam/k8s_utils/statefulsets.py,sha256=PZDEhy34aXxLkbW1-RsOC0E4D0w0pHyoIQGHvcAzSAk,4606
152
+ adam/k8s_utils/statefulsets.py,sha256=TaUVqXcJ7L5CwWbhYdfFxwUxiHG67C5ddx7Et0cgiyE,4637
152
153
  adam/k8s_utils/volumes.py,sha256=RIBmlOSWM3V3QVXLCFT0owVOyh4rGG1ETp521a-6ndo,1137
153
154
  adam/sso/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
154
155
  adam/sso/authenticator.py,sha256=BCm16L9zf5aLU47-sTCnudn2zLPwd8M2wwRminJfsqw,615
155
- adam/sso/authn_ad.py,sha256=BfKoltUG3jP0vNe-MImhnjkufBo79aH1HGZcQtHFH_Q,5912
156
+ adam/sso/authn_ad.py,sha256=fDW8UR3WWykny5Awa5dQjjBUSFzIDz4aMn-lwXoABl8,5857
156
157
  adam/sso/authn_okta.py,sha256=TV5vg7OEQPGFG_DSUQnWn37nbMX_qszZB0GRuQl6kGM,4529
157
158
  adam/sso/cred_cache.py,sha256=7WA5rIy1wlr_GCF-Z6xRb6LzRu-Cvou-IkY7hWC3Zpc,2099
158
159
  adam/sso/id_token.py,sha256=wmVZ8S0sjScnOxmSvOKlIEKgnvdWqhsgq9XjFe355O4,744
@@ -160,8 +161,8 @@ adam/sso/idp.py,sha256=fvcwUw_URTgsO6ySaqTIw0zQT2qRO1IPSGhf6rPtybo,5804
160
161
  adam/sso/idp_login.py,sha256=QAtCUeDTVWliJy40RK_oac8Vgybr13xH8wzeBoxPaa8,1754
161
162
  adam/sso/idp_session.py,sha256=9BUHNRf70u4rVKrVY1HKPOEmOviXvkjam8WJxmXSKIM,1735
162
163
  adam/sso/sso_config.py,sha256=5N8WZgIJQBtHUy585XLRWKjpU87_v6QluyNK9E27D5s,2459
163
- kaqing-2.0.26.dist-info/METADATA,sha256=nbIOeVQe32kEX4II0IH1WYwQHz97Q6v0Q0vficvtEvM,132
164
- kaqing-2.0.26.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
165
- kaqing-2.0.26.dist-info/entry_points.txt,sha256=SkzhuQJUWsXOzHeZ5TgQ2c3_g53UGK23zzJU_JTZOZI,39
166
- kaqing-2.0.26.dist-info/top_level.txt,sha256=8_2PZkwBb-xDcnc8a2rAbQeJhXKXskc7zTP7pSPa1fw,5
167
- kaqing-2.0.26.dist-info/RECORD,,
164
+ kaqing-2.0.27.dist-info/METADATA,sha256=UvA4w76hn_XYq-HgGFqBbOtgb7gv-l8ZYiLhZLotXd8,132
165
+ kaqing-2.0.27.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
166
+ kaqing-2.0.27.dist-info/entry_points.txt,sha256=SkzhuQJUWsXOzHeZ5TgQ2c3_g53UGK23zzJU_JTZOZI,39
167
+ kaqing-2.0.27.dist-info/top_level.txt,sha256=8_2PZkwBb-xDcnc8a2rAbQeJhXKXskc7zTP7pSPa1fw,5
168
+ kaqing-2.0.27.dist-info/RECORD,,