forked from uncloud/uncloud
Using click instead of argparse in uncloud script
This commit is contained in:
parent
2afb37daca
commit
cd2f0aaa0d
14 changed files with 279 additions and 20 deletions
24
uncloud/cli/main.py
Normal file
24
uncloud/cli/main.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import click
|
||||
|
||||
from uncloud.cli.commands.vm import vm
|
||||
from uncloud.cli.commands.user import user
|
||||
from uncloud.cli.commands.host import host
|
||||
from uncloud.cli.commands.image import image
|
||||
from uncloud.cli.commands.network import network
|
||||
|
||||
|
||||
@click.group()
|
||||
def cli():
|
||||
pass
|
||||
|
||||
|
||||
cli.add_command(vm)
|
||||
cli.add_command(user)
|
||||
cli.add_command(image)
|
||||
cli.add_command(host)
|
||||
cli.add_command(network)
|
||||
|
||||
if __name__ == '__main__':
|
||||
cli()
|
||||
Loading…
Add table
Add a link
Reference in a new issue