Example #1
0
def generate_report(args, *images):
    '''Generate a report based on the command line options'''
    logger.debug('Writing report...')
    report = ''
    if args.summary:
        for image in images:
            report = report + content.print_summary_report(image)
    else:
        for image in images:
            report = report + content.print_full_report(image)
    write_report(report)
Example #2
0
File: report.py Project: mptap/tern
def generate_report(args, *images):
    '''Generate a report based on the command line options'''
    logger.debug('Writing report...')
    report = formats.disclaimer.format(commit_sha=general.get_git_rev())
    if args.summary:
        for image in images:
            report = report + content.print_summary_report(image)
    else:
        for image in images:
            report = report + content.print_full_report(image)
    write_report(report)
Example #3
0
def generate_verbose(is_summary, images):
    '''Generate a verbose report'''
    report = formats.disclaimer.format(commit_sha=general.get_git_rev())
    if is_summary:
        logger.debug('Creating a summary of components in image...')
        for image in images:
            report = report + content.print_summary_report(image)
    else:
        logger.debug('Creating a detailed report of components in image...')
        for image in images:
            report = report + content.print_full_report(image)
    return report