'Get remote profiles and distros and sync them locally
1. Handles original report output
2. Handles all fields of report outputs as table given a format
3. Handles specific fields of report outputs as table given a format'

def run(self, report_what=None, report_name=None, report_type=None, report_fields=None, report_noheaders=None):

    if ((report_type == 'text') and (report_fields == 'all')):
        for collection_name in ['distro', 'profile', 'system', 'repo', 'network', 'image', 'mgmtclass', 'package', 'file']:
            if ((report_what == 'all') or (report_what == collection_name) or (report_what == ('%ss' % collection_name)) or (report_what == ('%ses' % collection_name))):
                if report_name:
                    self.reporting_list_names2(self.api.get_items(collection_name), report_name)
                else:
                    self.reporting_print_sorted(self.api.get_items(collection_name))
    elif ((report_type == 'text') and (report_fields != 'all')):
        utils.die(self.logger, "The    'text'    type    can    only    be    used    with    field    set    to    'all'")
    elif ((report_type != 'text') and (report_fields == 'all')):
        for collection_name in ['distro', 'profile', 'system', 'repo', 'network', 'image', 'mgmtclass', 'package', 'file']:
            if ((report_what == 'all') or (report_what == collection_name) or (report_what == ('%ss' % collection_name)) or (report_what == ('%ses' % collection_name))):
                self.reporting_print_all_fields(self.api.get_items(collection_name), report_name, report_type, report_noheaders)
    else:
        for collection_name in ['distro', 'profile', 'system', 'repo', 'network', 'image', 'mgmtclass', 'package', 'file']:
            if ((report_what == 'all') or (report_what == collection_name) or (report_what == ('%ss' % collection_name)) or (report_what == ('%ses' % collection_name))):
                self.reporting_print_x_fields(self.api.get_items(collection_name), report_name, report_type, report_fields, report_noheaders)
