# Path: aeriscloud/cli/helpers.py
# class Command(click.Command):
#     # This is inherited by the Context to switch between pure POSIX and
#     # argparse-like argument parsing. Setting it to false will push any
#     # unknown flag to the argument located where the flag was declared
#     allow_interspersed_args = config.get('config', 'posix', default=False)
# 
#     def __init__(self, *args, **kwargs):
#         cs = dict(help_option_names=['-h', '--help'])
#         super(Command, self).__init__(context_settings=cs,
#                                       *args, **kwargs)
# 
# Path: aeriscloud/basebox.py
# def baseboxes():
#     """
#     Retrieve a list of base boxes from the remote S3 bucket, sorted by infra
# 
#     :return: dict[str,str]
#     """
#     if not basebox_bucket():
#         return {}
# 
#     # retrieve our bucket
#     bucket = S3(basebox_bucket())
# 
#     boxes = {}
#     current_infra = None
#     for obj in bucket.list_bucket():
#         # ignore objects that are not boxes
#         if not obj['Key'].endswith('.box'):
#             continue
# 
#         infra, box = obj['Key'].split('/')
# 
#         if current_infra != infra:
#             current_infra = infra
#             boxes[current_infra] = []
# 
#         boxes[current_infra].append(box)
# 
#     return boxes
# 
# Path: aeriscloud/config.py
# def basebox_bucket():
#     return config.get('config', 'basebox_bucket', default=None)


import click
import json
import os
import re
import sys
from ordereddict import OrderedDict
from aeriscloud.cli.helpers import Command
from aeriscloud.basebox import baseboxes
from aeriscloud.config import basebox_bucket
#!/usr/bin/env python





@click.group()
def cli():
    """
    Manage base boxes
    """
    pass



# Path: aeriscloud/cli/helpers.py
# class Command(click.Command):
#     # This is inherited by the Context to switch between pure POSIX and
#     # argparse-like argument parsing. Setting it to false will push any
#     # unknown flag to the argument located where the flag was declared
#     allow_interspersed_args = config.get('config', 'posix', default=False)
# 
#     def __init__(self, *args, **kwargs):
#         cs = dict(help_option_names=['-h', '--help'])
#         super(Command, self).__init__(context_settings=cs,
#                                       *args, **kwargs)
# 
# Path: aeriscloud/basebox.py
# def baseboxes():
#     """
#     Retrieve a list of base boxes from the remote S3 bucket, sorted by infra
# 
#     :return: dict[str,str]
#     """
#     if not basebox_bucket():
#         return {}
# 
#     # retrieve our bucket
#     bucket = S3(basebox_bucket())
# 
#     boxes = {}
#     current_infra = None
#     for obj in bucket.list_bucket():
#         # ignore objects that are not boxes
#         if not obj['Key'].endswith('.box'):
#             continue
# 
#         infra, box = obj['Key'].split('/')
# 
#         if current_infra != infra:
#             current_infra = infra
#             boxes[current_infra] = []
# 
#         boxes[current_infra].append(box)
# 
#     return boxes
# 
# Path: aeriscloud/config.py
# def basebox_bucket():
#     return config.get('config', 'basebox_bucket', default=None)


# Path: aeriscloud/cli/aeris/box.py
import click
import json
import os
import re
import sys
from ordereddict import OrderedDict
from aeriscloud.cli.helpers import Command
from aeriscloud.basebox import baseboxes
from aeriscloud.config import basebox_bucket

#!/usr/bin/env python





@click.group()
def cli():
    """
    Manage base boxes
    """
    pass



@cli.command(cls=Command)