Skip to content

Commit eed3d5e

Browse files
committed
feat: add workspaces info
1 parent 581df36 commit eed3d5e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

silverback/_cli.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,20 @@ def update_workspace(
335335
click.echo(f"{click.style('SUCCESS', fg='green')}: Updated '{update_name}'")
336336

337337

338+
@workspaces.command(name="info", section="Platform Commands (https://silverback.apeworx.io)")
339+
@click.argument("workspace")
340+
@platform_client
341+
def workspace_info(platform: PlatformClient, workspace: str):
342+
"""Get Configuration information about a CLUSTER"""
343+
344+
if not (workspace_info := platform.workspaces.get(workspace)):
345+
raise click.BadOptionUsage("workspace", f"Unknown workspace '{workspace}'")
346+
347+
click.echo(f"{click.style('Name', fg='green')}: {workspace_info.name}")
348+
click.echo(f"{click.style('Slug', fg='green')}: '{workspace_info.slug}'")
349+
click.echo(f"{click.style('Date Created', fg='green')}: '{workspace_info.created}'")
350+
351+
338352
@cluster.command(name="list", section="Platform Commands (https://silverback.apeworx.io)")
339353
@click.argument("workspace")
340354
@platform_client

0 commit comments

Comments
 (0)