def audit(configs='',
          tags='*',
          verbose=None,
          show_success=None,
          show_compliance=None):
    if __salt__['config.get']('hubblestack.nova.autoload', True):
        load()
    if not __nova__:
        return False, 'No nova modules/data have been loaded.'

    if verbose is None:
        verbose = __salt__['config.get']('hubblestack.nova.verbose', False)
    if show_success is None:
        show_success = __salt__['config.get']('hubblestack.nova.show_success', True)
    if show_compliance is None:
        show_compliance = __salt__['config.get']('hubblestack.nova.show_compliance', True)

    if not isinstance(configs, list):
        # Convert string
        configs = configs.split(',')

    # Convert config list to paths, with leading slashes
    configs = [os.path.join(os.path.sep, os.path.join(*(con.split('.yaml')[0]).split('.')))
               for con in configs]

    results = {'Success': [], 'Failure': []}

    # Compile a list of audit data sets which we need to run
    to_run = set()
    for config in configs:
        for key in __nova__.__data__:
            key_path_split = key.split('.yaml')[0].split(os.path.sep)
            matches = True
            for i, path in enumerate(config.split(os.path.sep)):
                if i >= len(key_path_split) or path != key_path_split[i]:
                    matches = False
            if matches:
                # Found a match, add the audit data to the set
                to_run.add(key)
    data_list = [__nova__.__data__[key] for key in to_run]
    log.trace('hubble.py data_list:')
    log.trace(data_list)
    # Run the audits
    # This is currently pretty brute-force -- we just run all the modules we
    # have available with the data list, so data will be processed multiple
    # times. However, for the scale we're working at this should be fine.
    # We can revisit if this ever becomes a big bottleneck
    for key, func in __nova__._dict.iteritems():
        try:
            ret = func(data_list, tags, verbose=verbose)
        except Exception as exc:
            if 'Errors' not in results:
                results['Errors'] = {}
            results['Errors'][key] = {'error': 'exception occurred',
                                      'data': str(exc)}
            continue
        else:
            if not isinstance(ret, dict):
                if 'Errors' not in results:
                    results['Errors'] = {}
                results['Errors'][key] = {'error': 'bad return type',
                                          'data': ret}
                continue

        # Compile the results
        results['Success'].extend(ret.get('Success', []))
        results['Failure'].extend(ret.get('Failure', []))

    total_audits = len(results['Success']) + len(results['Failure'])
    if show_compliance and total_audits:
        compliance = float(len(results['Success']))/total_audits
        compliance = int(compliance * 100)
        results['Compliance'] = '{0}%'.format(compliance)

    if not show_success:
        results.pop('Success')

    return results
Primary entry point for audit calls.
dataset/ETHPy150Open HubbleStack/Nova/_modules/hubble.py/audit