Created
May 4, 2014 22:31
-
-
Save fluffybeing/130a9449531f6237df3c to your computer and use it in GitHub Desktop.
libcloudcli
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import click | |
@click.group() | |
@click.pass_context | |
def cli(ctx): | |
pass | |
@cli.command(cls=click.Group) | |
@click.pass_obj | |
def AWS(obj): | |
print("Loaded the AWS API") | |
@AWS.command(cls=click.Group) | |
@click.pass_obj | |
def COMPUTE(obj): | |
print("There are several resources") | |
@COMPUTE.command() | |
@click.option('--RAM', default=4, help='RAM for the node') | |
@click.option('--name', prompt='Name', | |
help='Name for the node', required=True) | |
@click.pass_obj | |
def CREATENODE(obj, RAM, name): | |
print('NODE CREATED %s!' % name) | |
if __name__ == '__main__': | |
cli(obj={}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment