# Path: aeriscloud/ansible.py
# def ansible_env(env):
#     def __init__(self, inventory, hostname):
#     def ssh_host(self):
#     def ssh_key(self):
#     def ssh_user(self):
#     def variables(self):
# def get_organization_list():
# def get_env_path(organization):
# def get_env_file(organization, environment):
# def list_jobs():
# def get_job_file(job):
# def get_inventory_file(inventory):
# def get_inventory_list():
# def run_job(job, inventory, *args, **kwargs):
# def run_env(organization, environment, inventory, *args, **kwargs):
# def run_playbook(playbook, inventory, *args, **kwargs):
# def run(inventory, shell_cmd, limit, *args, **kwargs):
# def shell(inventory, *args, **kwargs):
#     def __init__(self, inventory_path):
#     def get_ansible_inventory(self):
#     def get_hosts(self, pattern='all'):
#     def get_groups(self):
# class ACHost(object):
# class Inventory(object):
# 
# 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/config.py
# def module_path():
#     def __init__(self):
#     def load(self):
#     def has(self, section, option):
#     def get(self, section, option, **kwargs):
#     def set(self, section, option, value):
#     def unset(self, section, option):
#     def save(self):
#     def dump(self):
#     def complete(self):
# def inventory_path():
# def config_dir():
# def data_dir():
# def config_ini_path():
# def projects_path():
# def basebox_bucket():
# def default_organization():
# def expose_username():
# def expose_url():
# def has_github_integration():
# def verbosity(val=None):
# class Config(object):


import click
import os
import glob
import re
import sys
from sh import Command as ShCommand, ErrorReturnCode
from aeriscloud.ansible import ansible_env, get_env_path, \
    ansible_path, organization_path
from aeriscloud.cli.helpers import Command
from aeriscloud.config import module_path, aeriscloud_path

                if res == 'ok':
                    res = click.style(res, fg='green', bold=True)
                elif res == 'FAIL':
                    res = click.style(res, fg='red', bold=True)

                line = ' '.join([
                    click.style(id, bold=True, fg='yellow'),
                    click.style(name, fg='blue'),
                    test_file,
                    ellipsis,
                    res
                ])
            elif line.startswith('FAIL:'):
                (_, name, test_file) = line.split(' ')

                line = ' '.join([
                    click.style('FAIL', bold=True, fg='red') + ':',
                    click.style(name, fg='blue'),
                    test_file
                ])

            click.echo('  ' + line)
            errors += 1
    return errors


def _run_ansible_lint(organization):
    al_bin = os.path.join(aeriscloud_path, 'venv/bin/ansible-lint')


# Path: aeriscloud/ansible.py
# def ansible_env(env):
#     def __init__(self, inventory, hostname):
#     def ssh_host(self):
#     def ssh_key(self):
#     def ssh_user(self):
#     def variables(self):
# def get_organization_list():
# def get_env_path(organization):
# def get_env_file(organization, environment):
# def list_jobs():
# def get_job_file(job):
# def get_inventory_file(inventory):
# def get_inventory_list():
# def run_job(job, inventory, *args, **kwargs):
# def run_env(organization, environment, inventory, *args, **kwargs):
# def run_playbook(playbook, inventory, *args, **kwargs):
# def run(inventory, shell_cmd, limit, *args, **kwargs):
# def shell(inventory, *args, **kwargs):
#     def __init__(self, inventory_path):
#     def get_ansible_inventory(self):
#     def get_hosts(self, pattern='all'):
#     def get_groups(self):
# class ACHost(object):
# class Inventory(object):
# 
# 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/config.py
# def module_path():
#     def __init__(self):
#     def load(self):
#     def has(self, section, option):
#     def get(self, section, option, **kwargs):
#     def set(self, section, option, value):
#     def unset(self, section, option):
#     def save(self):
#     def dump(self):
#     def complete(self):
# def inventory_path():
# def config_dir():
# def data_dir():
# def config_ini_path():
# def projects_path():
# def basebox_bucket():
# def default_organization():
# def expose_username():
# def expose_url():
# def has_github_integration():
# def verbosity(val=None):
# class Config(object):


# Path: aeriscloud/cli/aeris/test.py
import click
import os
import glob
import re
import sys
from sh import Command as ShCommand, ErrorReturnCode
from aeriscloud.ansible import ansible_env, get_env_path, \
    ansible_path, organization_path
from aeriscloud.cli.helpers import Command
from aeriscloud.config import module_path, aeriscloud_path


                if res == 'ok':
                    res = click.style(res, fg='green', bold=True)
                elif res == 'FAIL':
                    res = click.style(res, fg='red', bold=True)

                line = ' '.join([
                    click.style(id, bold=True, fg='yellow'),
                    click.style(name, fg='blue'),
                    test_file,
                    ellipsis,
                    res
                ])
            elif line.startswith('FAIL:'):
                (_, name, test_file) = line.split(' ')

                line = ' '.join([
                    click.style('FAIL', bold=True, fg='red') + ':',
                    click.style(name, fg='blue'),
                    test_file
                ])

            click.echo('  ' + line)
            errors += 1
    return errors


def _run_ansible_lint(organization):
    al_bin = os.path.join(aeriscloud_path, 'venv/bin/ansible-lint')


    env = ansible_env(os.environ.copy())