Skip to content

Commit

Permalink
fix: docstrings and raise error
Browse files Browse the repository at this point in the history
  • Loading branch information
dtdang committed Oct 22, 2024
1 parent b581cd8 commit de54c53
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion silverback/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def cluster():

@cluster.group(cls=SectionedHelpGroup, section="Platform Commands (https://silverback.apeworx.io)")
def workspaces():
"""Manage a Silverback Workspace"""
"""Manage Workspaces on the Silverback Platform"""


@workspaces.command(name="list", section="Platform Commands (https://silverback.apeworx.io)")
Expand Down Expand Up @@ -269,6 +269,9 @@ def new_workspace(
elif workspace_slug:
click.echo(f"slug: {workspace_slug}")

else:
raise click.UsageError("Must provide a name or a slug/name combo")

workspace = platform.create_workspace(
workspace_name=workspace_name,
workspace_slug=workspace_slug,
Expand Down Expand Up @@ -326,6 +329,9 @@ def new_cluster(
elif cluster_slug:
click.echo(f"slug: {cluster_slug}")

else:
raise click.UsageError("Must provide a name or a slug/name combo")

cluster = workspace_client.create_cluster(
cluster_name=cluster_name,
cluster_slug=cluster_slug,
Expand Down

0 comments on commit de54c53

Please sign in to comment.