Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

Commit

Permalink
aqua/cli: improve help message
Browse files Browse the repository at this point in the history
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
  • Loading branch information
Kyr Shatskyy committed Sep 22, 2021
1 parent 01b03d0 commit df63ff4
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions tools/libaqua/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,14 @@ def _get_deployment(ctx: AppCtx, name: str) -> Deployment:
#
@app.command("create")
@click.option("-b", "--box", type=str, required=False,
help="Reuse existing box for deployment")
help="Deployment box, run 'box list' for all available boxes")
@click.option("-c", "--connect", type=str, required=False,
help="Libvirt connect URI, for example 'qemu+ssh://localhost/system'",
default='qemu:///system')
@click.option("-i", "--image", type=str, required=False,
help="Use image for deployment, use 'image list' to see all available")
help="Deployment image, run 'image list' for all available images")
@click.option("-f", "--force", flag_value=True,
help="Override corresponding box if image is used")
help="Override corresponding box if needed")
@click.option("-t", "--deployment-type", type=str, default='vagrant',
help="Deployment type: vagrant, libvirt")
@click.option("--num-nodes", required=False, type=int, default=2, show_default=True,
Expand All @@ -199,13 +199,19 @@ def cmd_create(
num_nics: Optional[int]
) -> None:
"""
Create a new deployment with given <name>.
Create a new deployment with given name and required type.
Checks if the given deployment exist and quit.
If deployment with the NAME exists, report about error and quit.
For vagrant deployments one of the box or image must be provided,
if both are requested then quit with error.
For vagrant deployments any of --box or --image options could be used.
When none of the --box or --image options provided, it will try to
find box with default name (aquarium) or the same name as the deployment.
If there is no suitable box, then it can be created using image with
the default name or same name as the deployment correspondingly.
If no image found in turn, fail with error message.
Fails with error message if both --box and --image provided.
For libvirt deployments --connect options is used.
"""
logger.debug(f"create: ctx = {ctx}, name: {name}, box: {box}, img: {image}")
Expand Down

0 comments on commit df63ff4

Please sign in to comment.