univention.management.console.modules.diagnostic package#
- exception univention.management.console.modules.diagnostic.Problem(description: str = '', **kwargs: Any)[source]#
Bases:
Exception
- exception univention.management.console.modules.diagnostic.Success(description: str = '', **kwargs: Any)[source]#
Bases:
Problem
- exception univention.management.console.modules.diagnostic.Conflict(description: str = '', **kwargs: Any)[source]#
Bases:
Problem
- exception univention.management.console.modules.diagnostic.Warning(description: str = '', **kwargs: Any)[source]#
Bases:
Problem
- exception univention.management.console.modules.diagnostic.Critical(description: str = '', **kwargs: Any)[source]#
Bases:
Problem
- exception univention.management.console.modules.diagnostic.ProblemFixed(description: str = '', **kwargs: Any)[source]#
Bases:
Problem
- class univention.management.console.modules.diagnostic.Instance(*args, **kwargs)[source]#
Bases:
Base,ProgressMixin- PLUGIN_DIR = '/builds/univention/infrastructure/ucsapidoc/py/univention/management/console/modules/diagnostic/plugins'#
- class univention.management.console.modules.diagnostic.Plugin(plugin: str)[source]#
Bases:
objectA wrapper for a Python module underneath of “univention.management.console.modules.diagnostic.plugins”.
These Python modules (plugins) may have the following properties:
- Attr dict actions:
A mapping of valid action names to function callbacks. These action names can be referenced by additional displayed buttons (see
buttons). If a called actions does not exists the run() function is taken as fallback. example:- actions = {
‘remove’: my_remove_funct,
}
- Attr str title:
A short description of the problem example:
title = _(‘No space left on device’)
- Attr str description:
A more detailed description of the problem. The description is able to contain HTML. The description may contain expressions which are replaced by either links to UMC modules or links to third party websites (e.g. an SDB article). Expressions which are replaced look like:
UMC-Modules: either {module_id:flavor} or {module_id} if no flavor exists Links: {link_name}
See attributes
umc_modulesandlinks. example:description = _(‘There is too few space left on the device /dev/sdb1. Please use {directory_browser} to remove unneeded files. Further information can be found at {sdb}.’)
- Attr list umc_modules:
A list containing dicts with the definitions of UMC modules to create links which are either displayed inline the
descriptiontext or underneath of it. The definition has the same signature as umc.tools.linkToModule(). example:- umc_modules = [{
‘module’: ‘udm’, ‘flavor’: ‘navigation’, ‘props’: {
- ‘openObject’: {
‘objectDN’: ‘uid=Administrator,cn=users,dc=foo,dc=bar’, ‘objectType’: ‘users/user’
}
}
}]
- Attr list links:
A list of dicts which define regular inline text links (e.g. to SDB articles). They are displayed either in the
descriptionor underneath of it. example:- links = [{
‘name’: ‘sdb’, ‘href’: ‘https://sdb.univention.de/foo’, ‘label’: _(‘Solve problem XYZ’),
}]
- Attr list buttons:
A list of umc.widgets.Button definitions which are displayed underneath of the description and are able to execute the actions defined in
actions. A callback is automatically added in the frontend. example:- [{
‘action’: ‘remove’, ‘name’: ‘remove’, ‘label’: _(‘Remove foo’)
}]
The plugin module have to define at least a :method:`run()` function. This function is executed as the primary default action for every interaction. Every defined action callback may raise any of the following exceptions. A callback gets the UMC instance as a first argument. These exceptions allow the same attributes as the module so that an action is able to overwrite the module attributes for the execution of that specific test.
Problem +– Success +– Conflict +– Warning +– Critical +– ProblemFixed
- property buttons: list[dict[str, str]]#
Buttons which are displayed e.g. to automatically solve the problem
Subpackages#
Submodules#
univention.management.console.modules.diagnostic.util module#
- univention.management.console.modules.diagnostic.util.is_service_active(service: str, hostname: str = 'runner-tbpxyrzk-project-79-concurrent-0') bool[source]#