hac-client-cli 0.3.1__tar.gz → 0.3.2__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.
- {hac_client_cli-0.3.1/src/hac_client_cli.egg-info → hac_client_cli-0.3.2}/PKG-INFO +1 -1
- {hac_client_cli-0.3.1 → hac_client_cli-0.3.2}/pyproject.toml +1 -1
- {hac_client_cli-0.3.1 → hac_client_cli-0.3.2}/src/hac_client_cli/commands_session.py +24 -22
- {hac_client_cli-0.3.1 → hac_client_cli-0.3.2/src/hac_client_cli.egg-info}/PKG-INFO +1 -1
- {hac_client_cli-0.3.1 → hac_client_cli-0.3.2}/LICENSE +0 -0
- {hac_client_cli-0.3.1 → hac_client_cli-0.3.2}/README.md +0 -0
- {hac_client_cli-0.3.1 → hac_client_cli-0.3.2}/setup.cfg +0 -0
- {hac_client_cli-0.3.1 → hac_client_cli-0.3.2}/src/hac_client_cli/__init__.py +0 -0
- {hac_client_cli-0.3.1 → hac_client_cli-0.3.2}/src/hac_client_cli/app.py +0 -0
- {hac_client_cli-0.3.1 → hac_client_cli-0.3.2}/src/hac_client_cli/commands_endpoint.py +0 -0
- {hac_client_cli-0.3.1 → hac_client_cli-0.3.2}/src/hac_client_cli/commands_env.py +0 -0
- {hac_client_cli-0.3.1 → hac_client_cli-0.3.2}/src/hac_client_cli/commands_update.py +0 -0
- {hac_client_cli-0.3.1 → hac_client_cli-0.3.2}/src/hac_client_cli/config_loader.py +0 -0
- {hac_client_cli-0.3.1 → hac_client_cli-0.3.2}/src/hac_client_cli/environment_manager.py +0 -0
- {hac_client_cli-0.3.1 → hac_client_cli-0.3.2}/src/hac_client_cli.egg-info/SOURCES.txt +0 -0
- {hac_client_cli-0.3.1 → hac_client_cli-0.3.2}/src/hac_client_cli.egg-info/dependency_links.txt +0 -0
- {hac_client_cli-0.3.1 → hac_client_cli-0.3.2}/src/hac_client_cli.egg-info/entry_points.txt +0 -0
- {hac_client_cli-0.3.1 → hac_client_cli-0.3.2}/src/hac_client_cli.egg-info/requires.txt +0 -0
- {hac_client_cli-0.3.1 → hac_client_cli-0.3.2}/src/hac_client_cli.egg-info/top_level.txt +0 -0
|
@@ -306,25 +306,23 @@ def list_sessions(
|
|
|
306
306
|
@session_app.command("show")
|
|
307
307
|
def show_session(
|
|
308
308
|
environment: str = typer.Argument(..., help="Environment name"),
|
|
309
|
+
endpoint: Optional[str] = typer.Option(None, "--endpoint", "-n", help="Endpoint name (uses default if not specified)"),
|
|
309
310
|
json_output: bool = typer.Option(False, "--json", help="Output as JSON")
|
|
310
311
|
):
|
|
311
312
|
"""Show details of a specific session."""
|
|
312
313
|
try:
|
|
313
|
-
from hac_client_cli.
|
|
314
|
+
from hac_client_cli.config_loader import get_endpoint_config
|
|
314
315
|
from hac_client_core.session import SessionManager
|
|
315
316
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
if not env:
|
|
320
|
-
print(f"ERROR: Environment '{environment}' not found", file=sys.stderr)
|
|
321
|
-
raise typer.Exit(1)
|
|
322
|
-
|
|
317
|
+
env_name, endpoint_name, ep_config = get_endpoint_config(environment, endpoint)
|
|
318
|
+
session_id = f"{env_name}/{endpoint_name}"
|
|
319
|
+
|
|
323
320
|
session_manager = SessionManager()
|
|
324
|
-
|
|
321
|
+
sessions = session_manager.list_sessions()
|
|
322
|
+
session = next((s for s in sessions if s.environment == session_id), None)
|
|
325
323
|
|
|
326
324
|
if not session:
|
|
327
|
-
print(f"No active session for environment '{
|
|
325
|
+
print(f"No active session for environment '{session_id}'")
|
|
328
326
|
return
|
|
329
327
|
|
|
330
328
|
if json_output:
|
|
@@ -367,24 +365,28 @@ def show_session(
|
|
|
367
365
|
|
|
368
366
|
@session_app.command("clear")
|
|
369
367
|
def clear_session(
|
|
370
|
-
environment: str = typer.Argument(..., help="Environment name")
|
|
368
|
+
environment: str = typer.Argument(..., help="Environment name"),
|
|
369
|
+
endpoint: Optional[str] = typer.Option(None, "--endpoint", "-n", help="Endpoint name (uses default if not specified)")
|
|
371
370
|
):
|
|
372
371
|
"""Clear session for a specific environment."""
|
|
373
372
|
try:
|
|
374
|
-
from hac_client_cli.
|
|
373
|
+
from hac_client_cli.config_loader import get_endpoint_config
|
|
375
374
|
from hac_client_core.session import SessionManager
|
|
376
375
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
if not env:
|
|
381
|
-
print(f"ERROR: Environment '{environment}' not found", file=sys.stderr)
|
|
382
|
-
raise typer.Exit(1)
|
|
383
|
-
|
|
376
|
+
env_name, endpoint_name, ep_config = get_endpoint_config(environment, endpoint)
|
|
377
|
+
session_id = f"{env_name}/{endpoint_name}"
|
|
378
|
+
|
|
384
379
|
session_manager = SessionManager()
|
|
385
|
-
session_manager.
|
|
386
|
-
|
|
387
|
-
|
|
380
|
+
sessions = session_manager.list_sessions()
|
|
381
|
+
session = next((s for s in sessions if s.environment == session_id), None)
|
|
382
|
+
|
|
383
|
+
if not session:
|
|
384
|
+
print(f"No active session for environment '{session_id}'")
|
|
385
|
+
return
|
|
386
|
+
|
|
387
|
+
session_manager.remove_session(session.base_url, session.username, session_id)
|
|
388
|
+
|
|
389
|
+
print(f"Session cleared for environment '{session_id}'")
|
|
388
390
|
|
|
389
391
|
except Exception as e:
|
|
390
392
|
print(f"ERROR: {e}", file=sys.stderr)
|
|
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
|
{hac_client_cli-0.3.1 → hac_client_cli-0.3.2}/src/hac_client_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|