refactoring
This commit is contained in:
parent
dc283251d9
commit
436cb881b2
8 changed files with 39 additions and 93 deletions
|
|
@ -7,41 +7,41 @@ def user():
|
|||
pass
|
||||
|
||||
|
||||
@user.command("files")
|
||||
@user.command('files')
|
||||
@add_otp_options
|
||||
def list_files(**kwargs):
|
||||
make_request('user', 'files', data=kwargs)
|
||||
|
||||
|
||||
@user.command("vms")
|
||||
@user.command('vms')
|
||||
@add_otp_options
|
||||
def list_vms(**kwargs):
|
||||
make_request('user', 'vms', data=kwargs)
|
||||
|
||||
|
||||
@user.command("networks")
|
||||
@user.command('networks')
|
||||
@add_otp_options
|
||||
def list_networks(**kwargs):
|
||||
make_request('user', 'network', data=kwargs)
|
||||
|
||||
|
||||
@user.command("add-ssh")
|
||||
@user.command('add-ssh')
|
||||
@add_otp_options
|
||||
@click.option("--key-name", required=True)
|
||||
@click.option("--key", required=True)
|
||||
@click.option('--key-name', required=True)
|
||||
@click.option('--key', required=True)
|
||||
def add_ssh(**kwargs):
|
||||
make_request('user', 'add-ssh', data=kwargs)
|
||||
|
||||
|
||||
@user.command("remove-ssh")
|
||||
@user.command('remove-ssh')
|
||||
@add_otp_options
|
||||
@click.option("--key-name", required=True)
|
||||
@click.option('--key-name', required=True)
|
||||
def remove_ssh(**kwargs):
|
||||
make_request('user', 'remove-ssh', data=kwargs)
|
||||
|
||||
|
||||
@user.command("get-ssh")
|
||||
@user.command('get-ssh')
|
||||
@add_otp_options
|
||||
@click.option("--key-name", default="")
|
||||
@click.option('--key-name', default='')
|
||||
def get_ssh(**kwargs):
|
||||
make_request('user', 'get-ssh', data=kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue