Univention Bugzilla – Attachment 10861 Details for
Bug 53969
univention-run-diagnostic-checks always runs all or only one diagnostic module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Proposed solution
univention-run-diagnostic-checks (text/plain), 1.15 KB, created by
Nikola Radovanovic
on 2021-11-10 10:07:36 CET
(
hide
)
Description:
Proposed solution
Filename:
MIME Type:
Creator:
Nikola Radovanovic
Created:
2021-11-10 10:07:36 CET
Size:
1.15 KB
patch
obsolete
>import argparse >import sys > >usage = ' %(prog)s [-h] [--bindpwdfile BINDPWDFILE] [--username USERNAME] [-l | -t T [T ...] -s S [S ...]]' >parser = argparse.ArgumentParser(description='Executes the diagnostic module checks', usage=usage) >parser.add_argument("--bindpwdfile", help='Path to a file that contains your password') >parser.add_argument("--username", help='Domain Admin username for Authentication') >parser.add_argument('-l', '--list', action='store_true', help='List all available tests and exit') >parser.add_argument('-t', '--test', default=['all'], nargs='+', dest='tests', type=str, help='List of tests to be performed. Default is: all') >parser.add_argument('-s', '--skip', default=[], nargs='+', dest='skip_tests', type=str, help='List of tests to be skipped. Default is: []') > >args = parser.parse_args() > ># fake plugin list for the purpose of the test >plugins = [f"plugin_{i}" for i in range(1, 6)] > >if args.list: > print("\n\t".join(['Available tests:'] + plugins)) > sys.exit(0) > >if 'all' in args.tests: > args.tests = plugins > >if args.skip_tests: > tests = list(set(plugins) - set(args.skip_tests)) > tests.sort() > args.tests = tests > >print(args)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 53969
: 10861