Alex Savatieiev | c905571 | 2019-03-01 14:43:56 -0600 | [diff] [blame] | 1 | import checker |
| 2 | |
| 3 | from cfg_checker.helpers import args_utils |
| 4 | |
| 5 | |
| 6 | def do_report(args): |
Alex | 4148552 | 2019-04-12 17:26:18 -0500 | [diff] [blame^] | 7 | """Create package versions report, HTML |
Alex Savatieiev | c905571 | 2019-03-01 14:43:56 -0600 | [diff] [blame] | 8 | |
| 9 | :args: - parser arguments |
| 10 | :return: - no return value |
| 11 | """ |
Alex | 4148552 | 2019-04-12 17:26:18 -0500 | [diff] [blame^] | 12 | _type, _filename = args_utils.get_report_type_and_filename(args) |
Alex Savatieiev | c905571 | 2019-03-01 14:43:56 -0600 | [diff] [blame] | 13 | |
| 14 | # init connection to salt and collect minion data |
| 15 | pChecker = checker.CloudPackageChecker() |
| 16 | # collect data on installed packages |
| 17 | pChecker.collect_installed_packages() |
| 18 | # diff installed and candidates |
Alex Savatieiev | 3db12a7 | 2019-03-22 16:32:31 -0500 | [diff] [blame] | 19 | pChecker.collect_packages() |
Alex Savatieiev | c905571 | 2019-03-01 14:43:56 -0600 | [diff] [blame] | 20 | # report it |
Alex | 4148552 | 2019-04-12 17:26:18 -0500 | [diff] [blame^] | 21 | pChecker.create_report(_filename, rtype=_type, full=args.full) |