univention.appcenter package

Submodules

univention.appcenter.app module

class univention.appcenter.app.LooseVersion(vstring=None)[source]

Bases: distutils.version.LooseVersion

class univention.appcenter.app.CaseSensitiveConfigParser(defaults=None, dict_type=<class 'collections.OrderedDict'>, allow_no_value=False, *, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section='DEFAULT', interpolation=<object object>, converters=<object object>)[source]

Bases: configparser.RawConfigParser

optionxform(optionstr)[source]
class univention.appcenter.app.Requirement(actions, hard, func)[source]

Bases: univention.appcenter.meta.UniventionMetaInfo

save_as_list = '_requirements'
auto_set_name = True
pop = True
test(app, function, package_manager)[source]
contribute_to_class(klass, name)[source]
univention.appcenter.app.hard_requirement(*actions)[source]
univention.appcenter.app.soft_requirement(*actions)[source]
class univention.appcenter.app.AppAttribute(required=False, default=None, regex=None, choices=None, localisable=False, localisable_by_file=None, strict=True)[source]

Bases: univention.appcenter.meta.UniventionMetaInfo

save_as_list = '_attrs'
auto_set_name = True
test_regex(regex, value)[source]
test_choices(value)[source]
test_required(value)[source]
test_type(value, instance_type)[source]
test(value)[source]
parse(value)[source]
get_value(component_id, ini_parser, meta_parser, locale)[source]
post_creation(app)[source]
parse_with_ini_file(value, ini_file)[source]
get(value, ini_file)[source]
class univention.appcenter.app.AppComponentIDAttribute(required=False, default=None, regex=None, choices=None, localisable=False, localisable_by_file=None, strict=True)[source]

Bases: univention.appcenter.app.AppAttribute

get_value(component_id, ini_parser, meta_parser, locale)[source]
class univention.appcenter.app.AppUCSVersionAttribute(required=False, default=None, regex=None, choices=None, localisable=False, localisable_by_file=None, strict=True)[source]

Bases: univention.appcenter.app.AppAttribute

get_value(component_id, ini_parser, meta_parser, locale)[source]
class univention.appcenter.app.AppBooleanAttribute(required=False, default=None, regex=None, choices=None, localisable=False, localisable_by_file=None, strict=True)[source]

Bases: univention.appcenter.app.AppAttribute

test_type(value, instance_type)[source]
parse(value)[source]
class univention.appcenter.app.AppIntAttribute(required=False, default=None, regex=None, choices=None, localisable=False, localisable_by_file=None, strict=True)[source]

Bases: univention.appcenter.app.AppAttribute

test_type(value, instance_type)[source]
parse(value)[source]
class univention.appcenter.app.AppListAttribute(required=False, default=None, regex=None, choices=None, localisable=False, localisable_by_file=None, strict=True)[source]

Bases: univention.appcenter.app.AppAttribute

parse(value)[source]
test_required(value)[source]
test_type(value, instance_type)[source]
test_choices(value)[source]
test_regex(regex, value)[source]
class univention.appcenter.app.AppFromFileAttribute(klass)[source]

Bases: univention.appcenter.app.AppAttribute

get_value(component_id, ini_file, meta_parser, locale)[source]
post_creation(app)[source]
contribute_to_class(klass, name)[source]
class univention.appcenter.app.AppRatingAttribute(required=False, default=None, regex=None, choices=None, localisable=False, localisable_by_file=None, strict=True)[source]

Bases: univention.appcenter.app.AppListAttribute

post_creation(app)[source]
class univention.appcenter.app.AppLocalisedListAttribute(required=False, default=None, regex=None, choices=None, localisable=False, localisable_by_file=None, strict=True)[source]

Bases: univention.appcenter.app.AppListAttribute

get_value(component_id, ini_parser, meta_parser, locale)[source]
class univention.appcenter.app.AppLocalisedAppCategoriesAttribute(required=False, default=None, regex=None, choices=None, localisable=False, localisable_by_file=None, strict=True)[source]

Bases: univention.appcenter.app.AppListAttribute

post_creation(app)[source]
class univention.appcenter.app.AppAttributeOrFalseOrNone(required=False, default=None, regex=None, choices=None, localisable=False, localisable_by_file=None, strict=True)[source]

Bases: univention.appcenter.app.AppBooleanAttribute

parse(value)[source]
test_type(value, instance_type)[source]
class univention.appcenter.app.AppAttributeOrTrueOrNone(required=False, default=None, regex=None, choices=None, localisable=False, localisable_by_file=None, strict=True)[source]

Bases: univention.appcenter.app.AppBooleanAttribute

parse(value)[source]
test_type(value, instance_type)[source]
class univention.appcenter.app.AppFileAttribute(required=False, default=None, regex=None, choices=None, localisable=True)[source]

Bases: univention.appcenter.app.AppAttribute

get_value(component_id, ini_parser, meta_parser, locale)[source]
post_creation(app)[source]
get_filename(ini_file)[source]
class univention.appcenter.app.AppDockerScriptAttribute(required=False, default=None, regex=None, choices=None, localisable=False, localisable_by_file=None, strict=True)[source]

Bases: univention.appcenter.app.AppAttribute

set_name(name)[source]
class univention.appcenter.app.AppMetaClass(name, bases, attrs)[source]

Bases: univention.appcenter.meta.UniventionMetaClass

class univention.appcenter.app.App(_attrs, _cache, **kwargs)[source]

Bases: object

This is the main App class. It represents one version of the App in the Univention App Center. It is mainly a container for a parsed ini file.

The attributes are described below. Technically they are added to the class by the metaclass UniventionMetaClass. The magical parsing stuff happens in from_ini(). In __init__ you can pass any value you want and the App will just accept it.

Real work with the App class is done in the actions, not this class itself.

Attributes:
id: A unique ID for the App. Different versions of the same

App have the same ID, though.

code: An internal ID like 2-char value that has no meaning

other than some internal reporting processing. Univention handles this, not the App Provider.

component_id: The internal name of the repository on the App

Center server. Not necessarily (but often) named after the id. Not part of the ini file.

ucs_version: Not part of the ini file. name: The displayed name of the App. version: Version of the App. Needs to be unique together with

with the id. Versions are compared against each other using a very loose version comparison.

install_permissions: Whether a license needs to be bought in order

to install the App.

install_permissions_message: A message displayed to the user

when the App needs install_permissions, but the user has not yet bought the App.

logo: The file name of the logo of the App. It is used in the

App Center overview when all Apps are shown in a gallery. As the gallery items are squared, the logo should be squared, too. Not part of the App class.

logo_detail_page: The file name of a “bigger” logo. It is shown

in the detail page of the App Center. Useful when there is a stretched version with the logo, the name, maybe a claim. If not given, the logo is used on the detail page, too. Not part of the App class.

description: A short description of the App. Should not exceed

90 chars, otherwise it gets unreadable in the App Center.

long_description: A more complete description of the App. HTML

allowed and required! Shown before installation, so it should contain product highlights, use cases, etc.

thumbnails: A list of screenshots and / or YouTube video URLs. categories: Categories this App shall be filed under. app_categories: Categories this App is filed under in

the App catalog of univention.de.

website: Website for more information about the product (e.g.

landing page).

support_url: Website for getting support (or information about

how to buy a license).

contact: Contact email address for the customer. vendor: Display name of the vendor. The actual creator of the

Software. See also maintainer.

website_vendor: Website of the vendor itself for more

information.

maintainer: Display name of the maintainer, who actually put

the App into the App Center. Often, but not necessarily the vendor. If vendor and maintainer are the same, maintainer does not need to be specified again.

website_maintainer: Website of the maintainer itself for more

information.

license: An abbreviation of a license category. See also

license_agreement.

license_agreement: A file containing the license text the end

user has to agree to. The file is shipped along with the ini file. Not part of the ini file.

readme: A file containing information about first steps for

the end user. E.g., which UCS users have access to the App. Shown in the App Center if the App is installed. The file is shipped along with the ini file. Not part of the ini file.

readme_install: A file containing important information for

the end user which is shown just before the installation starts. The file is shipped along with the ini file. Not part of the ini file.

readme_post_install: A file containing important information

for the end user which is shown just after the installation is completed. The file is shipped along with the ini file. Not part of the ini file.

readme_update: A file containing important information for the

end user which is shown just before the update starts. Use case: Changelog. The file is shipped along with the ini file. Not part of the ini file.

readme_post_update: A file containing important information

for the end user which is shown just after the update is completed. The file is shipped along with the ini file. Not part of the ini file.

readme_uninstall: A file containing important information for

the end user which is shown just before the uninstallation starts. Use case: Warning about broken services. The file is shipped along with the ini file. Not part of the ini file.

readme_post_uninstall: A file containing important information

for the end user which is shown just after the uninstallation is completed. Use case: Instructions how to clean up if the App was unable to do it automatically. The file is shipped along with the ini file. Not part of the ini file.

notify_vendor: Whether the App provider shall be informed

about (un)installation of the App by Univention via email.

notification_email: Email address that should be used to send

notifications. If none is provided the address from contact will be used. Note: An empty email (NotificationEmail=) is not valid! Remove the line (or put in comments) in this case.

web_interface: The path of the App’s web interface. web_interface_name: A name for the App’s web interface. If not

given, name is used.

web_interface_port_http: The port to the web interface (HTTP). web_interface_port_https: The port to the web interface (HTTPS). web_interface_proxy_scheme: Docker Apps only. Whether the web

interface in the container only supports HTTP, HTTPS or both.

auto_mod_proxy: Docker Apps only. Whether the web interface

should be included in the host’s apache configuration. If yes, the web interface ports of the container are used for a proxy configuration, so that the web interface is again available on 80/443. In this case the web_interface itself needs to have a distinct path even inside the container (like “/myapp” instead of “/” inside). If web_interface_proxy_scheme is set to http, both http and https are proxied to http in the container. If set to https, proxy points always to https. If set to both, http will go to http, https to https.

ucs_overview_category: Whether and if where on the start site

the web_interface should be registered automatically.

background_color: Which background color to use on tiles in

the App Center overview and the portal.

web_interface_link_target: Which link_target to add to a portal

entry. Currently supported: useportaldefault: let the portal decide embedded: in an iframe within the portal newwindow: new browser tab (default) samewindow: replaces portal (not recommended)

database: Which (if any) database an App wants to use. The App

Center will setup the database for the App. Useful for Docker Apps running against the Host’s database. Supported: “mysql”, “postgresql”.

database_name: Name of the database to be created. Defaults to

id.

database_user: Name of the database user to be created.

Defaults to id. May not be “root” or “postgres”.

database_password_file: Path to the file in which the password

will be stored. If not set, a default file will be created.

docker_env_database_host: Environment variable name for the DB

host inside the Docker Container.

docker_env_database_port: Environment variable name for the DB

port.

docker_env_database_name: Environment variable name for the DB

name.

docker_env_database_user: Environment variable name for the DB

user.

docker_env_database_password: Environment variable name for the

DB password (of “docker_env_database_user”).

docker_env_database_password_file: Environment variable name

for a file that holds the password for the DB. If set, this file is created in the Docker Container; docker_env_database_password will not be used.

plugin_of: App ID of the App the “base App” of this App. For

Docker Apps, the plugin is installed into the container of plugin_of. For Non-Docker Apps this is just like required_apps, but important for later migrations.

conflicted_apps: List of App IDs that may not be installed

together with this App. Works in both ways, one only needs to specify it on one App.

required_apps: List of App IDs that need to be installed along

with this App.

required_apps_in_domain: Like required_apps, but the Apps may

be installed anywhere in the domain, not necessarily on this very server.

conflicted_system_packages: List of debian package names that

cannot be installed along with the App.

required_ucs_version: The UCS version that is required for the

App to work (because a specific feature was added or a bug was fixed after the initial release of this UCS version). Examples: 4.1-1, 4.1-1 errata200.

supported_ucs_versions: List of UCS versions that may install

this App. Only makes sense for Docker Apps. Example: 4.1-4 errata370, 4.2-0

required_app_version_upgrade: The App version that has to be

installed before an upgrade to this version is allowed. Does nothing when installing (not upgrading) the App.

end_of_life: If specified, this App does no longer show up in

the App Center when not installed. For old installations, a warning is shown that the user needs to find an alternative for the App. Should be supported by an exhaustive readme file how to migrate the App data.

without_repository: Whether this App can be installed without

adding a dedicated repository on the App Center server.

default_packages: List of debian package names that shall be

installed (probably living in the App Center server’s repository).

default_packages_master: List of package names that shall be

installed on Primary and Backup Directory Node systems while this App is installed. Deprecated. Not supported for Docker Apps.

additional_packages_master: List of package names that shall be

installed along with default_packages when installed on a Primary Directory Node. Not supported for Docker Apps.

additional_packages_backup: List of package names that shall be

installed along with default_packages when installed on a Backup Directory Node. Not supported for Docker Apps.

additional_packages_slave: List of package names that shall be

installed along with default_packages when installed on a Replica Directory Node. Not supported for Docker Apps.

additional_packages_member: List of package names that shall be

installed along with default_packages when installed on a Managed Node. Not supported for Docker Apps.

rating: Positive rating on specific categories regarding the

App. Controlled by Univention. Not part of the ini file.

umc_module_name: If the App installs a UMC module, the ID can

specified so that a link may be generated by the App Center.

umc_module_flavor: If the App installs a UMC module with

flavors, it can be specified so that a link may be generated by the App Center.

user_activation_required: If domain users have to be somehow

modified (“activated”) to use the application, the App Center may generate a link to point the Users module of UMC.

generic_user_activation: Automatically registers an LDAP schema

and adds a flag to the UCS user management that should then be used to identify a user as “activated for the App”. If set to True, the name of the attribute is *id*Activated. If set to anything else, the value is used for the name of the attribute. If a schema file is shipped along with the App, this file is used instead of the auto generated one.

ports_exclusive: A list of ports the App requires to acquire

exclusively. Implicitly adds conflicted_apps. Docker Apps will have these exact ports forwarded. The App Center will also change the firewall rules.

ports_redirection: Docker Apps only. A list of ports the App

wants to get forwarded from the host to the container. Example: 2222:22 will enable an SSH connection to the container when the user is doing “ssh docker-host -p 2222”.

ports_redirection_udp: Just like ports_redirection, but opens

UDP ports. Can be combined with the same ports_redirection if needed.

server_role: List of UCS roles the App may be installed on. supported_architectures: Non-Docker Apps only. List of

architectures the App supports. Docker Apps always require amd64.

min_physical_ram: The minimal amount of memory in MB. This

value is compared with the currently available memory (without Swap) when trying to install the application. When the test fails, the user may still override it and install it.

min_free_disk_space: The minimal amount of free disk space in MB.

This value is compared with the current free disk space at the installation destination when trying to install the application. When the test fails, the user may still override it and install it.

shop_url: If given, a button is added to the App Center which

users can click to buy a license.

ad_member_issue_hide: When UCS is not managing the domain but

instead is only part of a Windows controlled Active Directory domain, the environment in which the App runs is different and certain services that this App relies on may not not be running. Thus, the App should not be shown at all in the App Center.

ad_member_issue_password: Like ad_member_issue_hide but only

shows a warning: The App needs a password service running on the Windows domain controller, e.g. because it needs the samba hashes to authenticate users. This can be set up, but not automatically. A link to the documentation how to set up that service in such environments is shown.

app_report_object_type: In some environments, App reports are

automatically generated by a metering tool. This tool counts a specific amount of LDAP objects. app_report_object_type is the object type of these objects. Example: users/user.

app_report_object_filter: Part of the App reporting. The

filter for app_report_object_type. Example: (myAppActivated=1).

app_report_object_attribute: Part of the App reporting. If

specified, not 1 is counted per object, but the number of values in this app_report_object_attribute. Useful for app_report_attribute_type = groups/group and app_report_object_attribute = uniqueMember.

app_report_attribute_type: Same as app_report_object_type

but regarding the list of DNs in app_report_object_attribute.

app_report_attribute_filter: Same as

app_report_object_filter but regarding app_report_object_type.

docker_image: Docker Image for the container. If specified the

App implicitly becomes a Docker App.

docker_inject_env_file: For Multi-Container Docker Apps, this

attribute specifies whether the (optional) environment file shall be injected into the main, all or no services in the docker compose file.

docker_main_service: For Multi-Container Docker Apps, this

attribute specifies the main service in the compose file. This service’s container will be used to run scripts like docker_script_setup, etc.

docker_migration_works: Whether it is safe to install this

version while a non Docker version is or was installed.

docker_migration_link: A link to document where the necessary

steps to migrate the App from a Non-Docker version to a Docker version are described. Only useful when docker_migration_works = False.

docker_allowed_images: List of other Docker Images. Used for

updates. If the new version has a new docker_image but the old App runs on an older image specified in this list, the image is not exchanged.

docker_shell_command: Default command when running

“univention-app APP shell”.

docker_volumes: List of volumes that shall be mounted from

the host to the container. Example: /var/lib/host/MYAPP/:/var/lib/container/MYAPP/ mounts the first directory in the container under the name of the second directory.

docker_server_role: Which computer object type shall be

created in LDAP as the docker container.

docker_script_init: The CMD for the Docker App. An

empty value will use the container’s entrypoint / CMD.

docker_script_setup: Path to the setup script in the container

run after the start of the container. If the App comes with a setup script living on the App Center server, this script is copied to this very path before being executed.

docker_script_store_data: Like docker_script_setup, but for a

script that is run to backup the data just before destroying the old container.

docker_script_restore_data_before_setup: Like

docker_script_setup, but for a script that is run to restore backuped data just before running the setup script.

docker_script_restore_data_after_setup: Like

docker_script_setup, but for a script that is run to restore backuped data just after running the setup script.

docker_script_update_available: Like docker_script_setup, but

for a script that is run to check whether an update is available (packag or distribution upgrade).

docker_script_update_packages: Like docker_script_setup, but

for a script that is run to install package updates (like security updates) in the container without destroying it.

docker_script_update_release: Like docker_script_setup, but

for a script that is run to install distribution updates (like new major releases of the OS) in the container without destroying it.

docker_script_update_app_version: Like docker_script_setup,

but for a script that is run to specifically install App package updates in the container without destroying it.

docker_script_configure: Like docker_script_setup,

but for a script that is run after settings inside the container were applied.

docker_ucr_style_env: Disable the passing of ucr style (“foo/bar”)

environment variables into the container.

host_certificate_access: Docker Apps only. The App gets access

to the host certificate.

listener_udm_modules: List of UDM modules that a listener

integration shall watch.

id = <univention.appcenter.app.AppAttribute object>

The required ID

code = <univention.appcenter.app.AppAttribute object>
component_id = <univention.appcenter.app.AppComponentIDAttribute object>
name = <univention.appcenter.app.AppAttribute object>
version = <univention.appcenter.app.AppAttribute object>
install_permissions = <univention.appcenter.app.AppBooleanAttribute object>
install_permissions_message = <univention.appcenter.app.AppAttribute object>
description = <univention.appcenter.app.AppAttribute object>
long_description = <univention.appcenter.app.AppAttribute object>
thumbnails = <univention.appcenter.app.AppListAttribute object>
categories = <univention.appcenter.app.AppListAttribute object>
app_categories = <univention.appcenter.app.AppLocalisedAppCategoriesAttribute object>
website = <univention.appcenter.app.AppAttribute object>
support_url = <univention.appcenter.app.AppAttribute object>
contact = <univention.appcenter.app.AppAttribute object>
vendor = <univention.appcenter.app.AppAttribute object>
website_vendor = <univention.appcenter.app.AppAttribute object>
maintainer = <univention.appcenter.app.AppAttribute object>
website_maintainer = <univention.appcenter.app.AppAttribute object>
license = <univention.appcenter.app.AppAttribute object>
license_agreement = <univention.appcenter.app.AppFileAttribute object>
readme = <univention.appcenter.app.AppFileAttribute object>
readme_install = <univention.appcenter.app.AppFileAttribute object>
readme_post_install = <univention.appcenter.app.AppFileAttribute object>
readme_update = <univention.appcenter.app.AppFileAttribute object>
readme_post_update = <univention.appcenter.app.AppFileAttribute object>
readme_uninstall = <univention.appcenter.app.AppFileAttribute object>
readme_post_uninstall = <univention.appcenter.app.AppFileAttribute object>
notify_vendor = <univention.appcenter.app.AppBooleanAttribute object>
notification_email = <univention.appcenter.app.AppAttribute object>
web_interface = <univention.appcenter.app.AppAttribute object>
web_interface_name = <univention.appcenter.app.AppAttribute object>
web_interface_port_http = <univention.appcenter.app.AppIntAttribute object>
web_interface_port_https = <univention.appcenter.app.AppIntAttribute object>
web_interface_proxy_scheme = <univention.appcenter.app.AppAttribute object>
ucs_overview_category = <univention.appcenter.app.AppAttributeOrFalseOrNone object>
background_color = <univention.appcenter.app.AppAttribute object>
database = <univention.appcenter.app.AppAttribute object>
database_name = <univention.appcenter.app.AppAttribute object>
database_user = <univention.appcenter.app.AppAttribute object>
database_password_file = <univention.appcenter.app.AppAttribute object>
docker_env_database_host = <univention.appcenter.app.AppAttribute object>
docker_env_database_port = <univention.appcenter.app.AppAttribute object>
docker_env_database_name = <univention.appcenter.app.AppAttribute object>
docker_env_database_user = <univention.appcenter.app.AppAttribute object>
docker_env_database_password = <univention.appcenter.app.AppAttribute object>
docker_env_database_password_file = <univention.appcenter.app.AppAttribute object>
plugin_of = <univention.appcenter.app.AppAttribute object>
conflicted_apps = <univention.appcenter.app.AppListAttribute object>
required_apps = <univention.appcenter.app.AppListAttribute object>
required_apps_in_domain = <univention.appcenter.app.AppListAttribute object>
conflicted_system_packages = <univention.appcenter.app.AppListAttribute object>
required_ucs_version = <univention.appcenter.app.AppAttribute object>
supported_ucs_versions = <univention.appcenter.app.AppListAttribute object>
required_app_version_upgrade = <univention.appcenter.app.AppAttribute object>
end_of_life = <univention.appcenter.app.AppBooleanAttribute object>
without_repository = <univention.appcenter.app.AppBooleanAttribute object>
default_packages = <univention.appcenter.app.AppListAttribute object>
default_packages_master = <univention.appcenter.app.AppListAttribute object>
additional_packages_master = <univention.appcenter.app.AppListAttribute object>
additional_packages_backup = <univention.appcenter.app.AppListAttribute object>
additional_packages_slave = <univention.appcenter.app.AppListAttribute object>
additional_packages_member = <univention.appcenter.app.AppListAttribute object>
settings = <univention.appcenter.app.AppFromFileAttribute object>
rating = <univention.appcenter.app.AppRatingAttribute object>
umc_module_name = <univention.appcenter.app.AppAttribute object>
umc_module_flavor = <univention.appcenter.app.AppAttribute object>
user_activation_required = <univention.appcenter.app.AppBooleanAttribute object>
generic_user_activation = <univention.appcenter.app.AppAttributeOrTrueOrNone object>
generic_user_activation_attribute = <univention.appcenter.app.AppAttributeOrTrueOrNone object>
generic_user_activation_option = <univention.appcenter.app.AppAttributeOrTrueOrNone object>
umc_options_attributes = <univention.appcenter.app.AppListAttribute object>
automatic_schema_creation = <univention.appcenter.app.AppBooleanAttribute object>
docker_env_ldap_user = <univention.appcenter.app.AppAttribute object>
ports_exclusive = <univention.appcenter.app.AppListAttribute object>
ports_redirection_udp = <univention.appcenter.app.AppListAttribute object>
server_role = <univention.appcenter.app.AppListAttribute object>
min_physical_ram = <univention.appcenter.app.AppIntAttribute object>
shop_url = <univention.appcenter.app.AppAttribute object>
ad_member_issue_hide = <univention.appcenter.app.AppBooleanAttribute object>
ad_member_issue_password = <univention.appcenter.app.AppBooleanAttribute object>
app_report_object_type = <univention.appcenter.app.AppAttribute object>
app_report_object_filter = <univention.appcenter.app.AppAttribute object>
app_report_object_attribute = <univention.appcenter.app.AppAttribute object>
app_report_attribute_type = <univention.appcenter.app.AppAttribute object>
app_report_attribute_filter = <univention.appcenter.app.AppAttribute object>
docker_image = <univention.appcenter.app.AppAttribute object>
docker_inject_env_file = <univention.appcenter.app.AppAttribute object>
docker_main_service = <univention.appcenter.app.AppAttribute object>
docker_migration_works = <univention.appcenter.app.AppBooleanAttribute object>
docker_allowed_images = <univention.appcenter.app.AppListAttribute object>
docker_shell_command = <univention.appcenter.app.AppAttribute object>
docker_volumes = <univention.appcenter.app.AppListAttribute object>
docker_server_role = <univention.appcenter.app.AppAttribute object>
docker_script_init = <univention.appcenter.app.AppAttribute object>
docker_script_setup = <univention.appcenter.app.AppDockerScriptAttribute object>
docker_script_store_data = <univention.appcenter.app.AppDockerScriptAttribute object>
docker_script_restore_data_before_setup = <univention.appcenter.app.AppDockerScriptAttribute object>
docker_script_restore_data_after_setup = <univention.appcenter.app.AppDockerScriptAttribute object>
docker_script_update_available = <univention.appcenter.app.AppDockerScriptAttribute object>
docker_script_update_packages = <univention.appcenter.app.AppDockerScriptAttribute object>
docker_script_update_release = <univention.appcenter.app.AppDockerScriptAttribute object>
docker_script_update_app_version = <univention.appcenter.app.AppDockerScriptAttribute object>
docker_script_configure = <univention.appcenter.app.AppAttribute object>
docker_ucr_style_env = <univention.appcenter.app.AppBooleanAttribute object>
docker_tmpfs = <univention.appcenter.app.AppListAttribute object>
host_certificate_access = <univention.appcenter.app.AppBooleanAttribute object>
listener_udm_modules = <univention.appcenter.app.AppListAttribute object>
vote_for_app = <univention.appcenter.app.AppBooleanAttribute object>
ucs_version = <univention.appcenter.app.AppUCSVersionAttribute object>
min_free_disk_space = <univention.appcenter.app.AppIntAttribute object>
supported_architectures = <univention.appcenter.app.AppListAttribute object>
auto_mod_proxy = <univention.appcenter.app.AppBooleanAttribute object>
ports_redirection = <univention.appcenter.app.AppListAttribute object>
attrs_dict()[source]
install_permissions_exist()[source]
get_docker_image_name()[source]
get_docker_images()[source]
has_local_web_interface()[source]
property license_description
classmethod from_ini(ini_file, locale=True, cache=None)[source]
property docker
uses_docker_compose()[source]
property ucr_status_key
property ucr_autoinstalled_key
property ucr_version_key
property ucr_ucs_version_key
property ucr_upgrade_key
property ucr_container_key
property ucr_hostdn_key
property ucr_image_key
property ucr_docker_params_key
property ucr_ip_key
property ucr_ports_key
property ucr_component_key
classmethod get_attr(attr_name)[source]
get_packages(additional=True)[source]
supports_ucs_version()[source]
is_installed()[source]
is_ucs_component()[source]
get_share_dir()[source]
get_share_file(ext)[source]
get_data_dir()[source]
get_conf_dir()[source]
get_conf_file(fname)[source]
get_compose_dir()[source]
get_compose_file(fname)[source]
get_ucs_version()[source]
get_locale()[source]
get_server()[source]
get_cache_dir()[source]
get_app_cache_obj()[source]
set_app_cache_obj(app_cache_obj)[source]
get_cache_file(ext)[source]
get_ini_file()[source]
property logo_name
property logo_detail_page_name
property secret_on_host
get_thumbnail_urls()[source]
get_localised(key, loc=None)[source]
get_localised_list(key, loc=None)[source]
must_have_install_permissions()[source]

You need to buy the App to install this version.

must_have_fitting_app_version()[source]

To upgrade, at least version %(required_version)s needs to be installed.

must_have_fitting_ucs_version()[source]

The application requires UCS version %(required_version)s.

must_have_fitting_kernel_version()[source]
must_not_be_vote_for_app()[source]

The application is not yet installable. Vote for this app now and bring your favorite faster to the Univention App Center

must_not_be_docker_if_docker_is_disabled()[source]

The application uses a container technology while the App Center is configured to not not support it

must_not_be_docker_in_docker()[source]

The application uses a container technology while the system itself runs in a container. Using the application is not supported on this host

must_have_valid_license()[source]

For the installation of this application, a UCS license key with a key identification (Key ID) is required

must_not_be_installed()[source]

This application is already installed

must_not_be_end_of_life()[source]

This application was discontinued and may not be installed anymore

must_have_supported_architecture()[source]

This application only supports %(supported)s as architecture. %(msg)s

must_be_joined_if_master_packages()[source]

This application requires an extension of the LDAP schema

must_not_have_concurrent_operation(package_manager)[source]

Another package operation is in progress

must_have_correct_server_role()[source]

The application cannot be installed on the current server role (%(current_role)s). In order to install the application, one of the following roles is necessary: %(allowed_roles)r

must_have_no_conflicts_packages(package_manager)[source]

The application conflicts with the following packages: %r

must_have_no_conflicts_apps()[source]

The application conflicts with the following applications: %r

must_have_no_unmet_dependencies()[source]

The application requires the following applications: %r

must_not_be_depended_on()[source]

The application is required for the following applications to work: %r

must_not_remove_plugin()[source]

It is currently impossible to remove a plugin once it is installed. Remove %r instead.

shall_not_have_plugins_in_docker()[source]

Uninstalling the App will also remove the following plugins: %r

shall_have_enough_free_disk_space()[source]

The application requires %(minimum)d MB of free disk space but only %(current)d MB are available.

shall_have_enough_ram(function)[source]

The application requires %(minimum)d MB of free RAM but only %(current)d MB are available.

shall_only_be_installed_in_ad_env_with_password_service()[source]

The application requires the password service to be set up on the Active Directory domain controller server.

shall_not_be_docker_if_discouraged()[source]

The application has not been approved to migrate all existing data. Maybe there is a migration guide: %(migration_link)s

check(function)[source]
get_settings()

univention.appcenter.app_cache module

class univention.appcenter.app_cache.AppCache(app_class=None, ucs_version=None, server=None, locale=None, cache_dir=None)[source]

Bases: univention.appcenter.app_cache._AppCache

copy(app_class=None, ucs_version=None, server=None, locale=None, cache_dir=None)[source]
get_server()[source]
get_server_netloc()[source]
get_ucs_version()[source]
get_locale()[source]
get_cache_dir()[source]
get_cache_file()[source]
classmethod build(app_class=None, ucs_version=None, server=None, locale=None, cache_dir=None)[source]
get_appcenter_cache_obj()[source]
clear_cache()[source]
get_every_single_app()[source]
get_app_class()[source]
class univention.appcenter.app_cache.AppCenterCache(cache_class=None, server=None, ucs_versions=None, locale=None, cache_dir=None)[source]

Bases: univention.appcenter.app_cache._AppCache

classmethod build(cache_class=None, server=None, ucs_versions=None, locale=None, cache_dir=None)[source]
get_app_cache_class()[source]
get_server()[source]
get_server_netloc()[source]
get_ucs_versions()[source]
get_locale()[source]
get_cache_dir()[source]
get_cache_file(fname)[source]
get_app_caches()[source]
get_license_description(license_name)[source]
get_ratings()[source]
get_app_categories()[source]
get_every_single_app()[source]
clear_cache()[source]
class univention.appcenter.app_cache.Apps(cache_class=None, locale=None)[source]

Bases: univention.appcenter.app_cache._AppCache

get_appcenter_cache_class()[source]
get_locale()[source]
get_appcenter_caches()[source]
get_every_single_app()[source]
include_app(app)[source]
clear_cache()[source]
classmethod find_by_string(app_string)[source]
classmethod split_app_string(app_string)[source]
class univention.appcenter.app_cache.AllApps(cache_class=None, locale=None)[source]

Bases: univention.appcenter.app_cache.Apps

include_app(app)[source]
class univention.appcenter.app_cache.AppCenterVersion(**kwargs)[source]

Bases: univention.appcenter.ini_parser.IniSectionObject

class univention.appcenter.app_cache.LicenseType(**kwargs)[source]

Bases: univention.appcenter.ini_parser.IniSectionObject

class univention.appcenter.app_cache.Rating(**kwargs)[source]

Bases: univention.appcenter.ini_parser.IniSectionObject

univention.appcenter.app_cache.default_locale()[source]
univention.appcenter.app_cache.default_server()[source]
univention.appcenter.app_cache.default_ucs_version()[source]

univention.appcenter.database module

exception univention.appcenter.database.DatabaseError[source]

Bases: Exception

exception_value()[source]
exception univention.appcenter.database.DatabaseCreationFailed(msg, details=None)[source]

Bases: univention.appcenter.database.DatabaseError

exception_value()[source]
exception univention.appcenter.database.DatabaseConnectionFailed[source]

Bases: univention.appcenter.database.DatabaseError

exception univention.appcenter.database.DatabaseInfoError[source]

Bases: univention.appcenter.database.DatabaseError

class univention.appcenter.database.DatabaseConnector(app)[source]

Bases: object

get_db_port()[source]
get_db_host()[source]
get_db_name()[source]
get_db_user()[source]
get_db_password()[source]
get_db_password_file()[source]
get_autostart_variable()[source]
install()[source]
classmethod get_connector(app)[source]
start(attempts=2)[source]
db_exists()[source]
db_user_exists()[source]
create_db_and_user(password)[source]
setup()[source]
create_database()[source]
class univention.appcenter.database.PostgreSQL(app)[source]

Bases: univention.appcenter.database.DatabaseConnector

get_db_port()[source]
get_db_password_file()[source]
get_autostart_variable()[source]
execute(query)[source]
db_exists()[source]
db_user_exists()[source]
create_db_and_user(password)[source]
class univention.appcenter.database.MySQL(app)[source]

Bases: univention.appcenter.database.DatabaseConnector

get_db_port()[source]
get_db_password_file()[source]
get_autostart_variable()[source]
get_root_connection()[source]
get_cursor()[source]
execute(query, *args)[source]
db_exists()[source]
db_user_exists()[source]
escape(value)[source]
create_db_and_user(password)[source]

univention.appcenter.exceptions module

exception univention.appcenter.exceptions.Abort(*args, **kwargs)[source]

Bases: Exception

The Abort class is the base class for a “controlled” abortion of an action (meaning: univention-app <action>). This means that this situation was foreseen by the developers and is less critical. The “code” variable is sent to the App Center server for Univention to get a clue what went wrong. You should only use one class in different places in the code if you are confident that sending this error from two places does not lead to irritation. (This explicitly holds for Abort itself, you better subclass it) If you give a “default_error_msg” variable, you may also use %(var)s for formatting in this string. In this case, the __init__ method will require the class to be initiated with “var” (either positional or non-positional). The last argument (or an argument named “message”) can overwrite any “default_error_msg”.

code = 401
default_error_msg = ''
get_exc_details()[source]
exception univention.appcenter.exceptions.AbortWithDetails(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

get_exc_details()[source]
exception univention.appcenter.exceptions.NetworkError(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 402
exception univention.appcenter.exceptions.CredentialsNoUsernameError(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 403
exception univention.appcenter.exceptions.CredentialsNoPasswordError(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 404
exception univention.appcenter.exceptions.ConnectionFailed(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 405
default_error_msg = 'No connection possible'
exception univention.appcenter.exceptions.ConnectionFailedSecretFile(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.ConnectionFailed

code = 406
default_error_msg = '/etc/machine.secret not readable'
exception univention.appcenter.exceptions.ConnectionFailedInvalidAdminCredentials(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.ConnectionFailed

code = 407
default_error_msg = 'LDAP server does not accept admin password!'
exception univention.appcenter.exceptions.ConnectionFailedInvalidMachineCredentials(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.ConnectionFailed

code = 408
default_error_msg = 'LDAP server does not accept machine password!'
exception univention.appcenter.exceptions.ConnectionFailedInvalidUserCredentials(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.ConnectionFailed

code = 409
default_error_msg = 'Too many failed attempts!'
exception univention.appcenter.exceptions.ConnectionFailedServerDown(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.ConnectionFailed

code = 410
default_error_msg = 'LDAP server is not running!'
exception univention.appcenter.exceptions.UpdateSignatureVerificationFailed(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 411
default_error_msg = 'Signature verification for %(filename)s failed'
exception univention.appcenter.exceptions.UpdateUnpackArchiveFailed(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 412
default_error_msg = 'Failed to unpack "%(filename)s"'
exception univention.appcenter.exceptions.ConfigureFailed(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 413
default_error_msg = 'Failed to configure: %(app)s: %(exc)s'
exception univention.appcenter.exceptions.ShellNoCommandError(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 414
default_error_msg = 'Cannot run command: No command specified'
exception univention.appcenter.exceptions.ShellAppNotRunning(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 415
default_error_msg = 'Cannot run command: %(app)s is not running in a container'
exception univention.appcenter.exceptions.InstallSetupFailed(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.AbortWithDetails

code = 416
default_error_msg = 'Setup script failed!'
exception univention.appcenter.exceptions.DockerCouldNotStartContainer(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 417
default_error_msg = 'Unable to start the container!'
get_exc_details()[source]
exception univention.appcenter.exceptions.DatabaseConnectorError(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 418
get_exc_details()[source]
exception univention.appcenter.exceptions.InstallNonDockerVersionError(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 419
default_error_msg = 'Cannot use %(app)s as docker is to be ignored, yet, only non-docker versions could be found'
exception univention.appcenter.exceptions.InstallFailed(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 420
default_error_msg = 'Failed to install the App'
exception univention.appcenter.exceptions.InstallMasterPackagesNoninteractiveError(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 421
exception univention.appcenter.exceptions.InstallMasterPackagesPasswordError(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 422
exception univention.appcenter.exceptions.RemoveBackupFailed(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 423
default_error_msg = 'Could not backup container!'
exception univention.appcenter.exceptions.RemovePluginUnsupported(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 424
default_error_msg = 'Uninstallation of a plugin is not supported!'
exception univention.appcenter.exceptions.RegisterSchemaFailed(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.AbortWithDetails

code = 425
default_error_msg = 'Registration of schema extension failed (Code: %(code)s)'
get_exc_details()[source]
exception univention.appcenter.exceptions.RegisterSchemaFileFailed(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 426
default_error_msg = 'Registering schema file %(filename)s failed'
get_exc_details()[source]
exception univention.appcenter.exceptions.DockerVerificationFailed(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 427
get_exc_details()[source]
exception univention.appcenter.exceptions.LocalAppCenterError(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 428
exception univention.appcenter.exceptions.UpgradeStartContainerFailed(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 429
default_error_msg = 'Could not start the app container. It needs to be running to be upgraded!'
exception univention.appcenter.exceptions.UpgradeBackupFailed(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 430
default_error_msg = 'Could not backup container!'
exception univention.appcenter.exceptions.UpgradeAppFailed(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 431
default_error_msg = 'App upgrade script failed'
exception univention.appcenter.exceptions.UpgradePackagesFailed(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 432
default_error_msg = 'Package upgrade script failed'
exception univention.appcenter.exceptions.UpgradeReleaseFailed(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 433
default_error_msg = 'Release upgrade script failed'
exception univention.appcenter.exceptions.ConnectionFailedConnectError(exc)[source]

Bases: univention.appcenter.exceptions.ConnectionFailed

code = 434
exception univention.appcenter.exceptions.DockerImagePullFailed(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.AbortWithDetails

code = 435
default_error_msg = 'Downloading Docker image %(image)s failed: %(out)s'
exception univention.appcenter.exceptions.RemoveFailed(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 436
default_error_msg = 'Failed to uninstall the App'
exception univention.appcenter.exceptions.ParallelOperationInProgress(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 437
default_error_msg = 'Another package operation is in progress'
exception univention.appcenter.exceptions.InstallWithoutPermissionError(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 438
default_error_msg = 'The App requires install permissions which are missing. Please contact the App Provider.'
exception univention.appcenter.exceptions.ReinitializeError(*args, **kwargs)[source]

Bases: univention.appcenter.exceptions.Abort

code = 439
default_error_msg = 'Reinitializing the App failed.'
exception univention.appcenter.exceptions.AppCenterError[source]

Bases: Exception

A “real” exception that developers cannot handle very well. The difference between AppCenterError and Abort is that Abort is a somewhat defined behavior, i.e. App installation has to fail if the setup script fails. AppCenterError happens where it was not supposed to. The difference between AppCenterError and Exception is that AppCenterError gives a nicer feedback for the Administrator than a scary traceback. You can even put custom information into the proposed feedback mail (raise AppCenterError(str(custom))). As with Abort, AppCenterError should be subclassed and get a different code.

code = 500
title = 'An error occurred!'
info = 'We are sorry for the inconvenience. Please help us to improve the App Center and the Apps by sending us the information below.'
exception univention.appcenter.exceptions.AppCenterErrorContainerStart[source]

Bases: univention.appcenter.exceptions.AppCenterError

code = 501
title = 'The docker container could not be started!'
exception univention.appcenter.exceptions.ResidualInstallationError[source]

Bases: univention.appcenter.exceptions.AppCenterError

code = 502
title = 'An unexpected error occured before the installation started!'

univention.appcenter.extended_attributes module

class univention.appcenter.extended_attributes.Attribute(default_value=None)[source]

Bases: univention.appcenter.meta.UniventionMetaInfo

pop = True
save_as_list = '_attrs'
auto_set_name = True
ldap_name()[source]
escape_value(value)[source]
to_schema(obj)[source]
get_value(obj)[source]
class univention.appcenter.extended_attributes.HiddenAttribute(default_value=None)[source]

Bases: univention.appcenter.extended_attributes.Attribute

to_schema(obj)[source]
class univention.appcenter.extended_attributes.StringAttribute(default_value=None)[source]

Bases: univention.appcenter.extended_attributes.Attribute

escape_value(value)[source]
class univention.appcenter.extended_attributes.DescAttribute(default_value=None)[source]

Bases: univention.appcenter.extended_attributes.StringAttribute

ldap_name()[source]
escape_value(value)[source]
class univention.appcenter.extended_attributes.BooleanAttribute(default_value=None)[source]

Bases: univention.appcenter.extended_attributes.Attribute

to_schema(obj)[source]
class univention.appcenter.extended_attributes.AttributeListAttribute(default_value=None)[source]

Bases: univention.appcenter.extended_attributes.Attribute

escape_value(value)[source]
class univention.appcenter.extended_attributes.SyntaxAttribute(default_value=None)[source]

Bases: univention.appcenter.extended_attributes.Attribute

to_schema(obj)[source]
class univention.appcenter.extended_attributes.SchemaObject(app, **kwargs)[source]

Bases: object

ldap_type = None
ldap_type_oid_suffix = None
to_schema()[source]
set_standard_oid(app, suffix)[source]
class univention.appcenter.extended_attributes.ExtendedAttribute(app, **kwargs)[source]

Bases: univention.appcenter.extended_attributes.SchemaObject

ldap_type = 'attributetype'
ldap_type_oid_suffix = 1
property dn
class univention.appcenter.extended_attributes.ExtendedOption(app, **kwargs)[source]

Bases: univention.appcenter.extended_attributes.SchemaObject

property icon
property dn
class univention.appcenter.extended_attributes.ObjectClass(app, **kwargs)[source]

Bases: univention.appcenter.extended_attributes.SchemaObject

ldap_type = 'objectclass'
ldap_type_oid_suffix = 2
univention.appcenter.extended_attributes.get_extended_attributes(app)[source]
univention.appcenter.extended_attributes.get_schema(app)[source]
univention.appcenter.extended_attributes.create_extended_attribute(attribute, app, layout_position, lo, pos)[source]
univention.appcenter.extended_attributes.remove_extended_attribute(attribute, lo, pos)[source]
univention.appcenter.extended_attributes.create_extended_option(option, app, lo, pos)[source]
univention.appcenter.extended_attributes.create_option_icon(app)[source]
univention.appcenter.extended_attributes.remove_extended_option(option, lo, pos)[source]

univention.appcenter.ini_parser module

exception univention.appcenter.ini_parser.NoValueError(name, section)[source]

Bases: Exception

exception univention.appcenter.ini_parser.ParseError(name, section, message)[source]

Bases: Exception

univention.appcenter.ini_parser.read_ini_file(filename, parser_class=<class 'configparser.RawConfigParser'>)[source]
class univention.appcenter.ini_parser.IniSectionAttribute(required=False, default=None, localisable=False, choices=None)[source]

Bases: univention.appcenter.meta.UniventionMetaInfo

save_as_dict = '_attrs'
pop = True
auto_set_name = True
get(parser, section, locale)[source]
parse(value)[source]
class univention.appcenter.ini_parser.IniSectionBooleanAttribute(required=False, default=None, localisable=False, choices=None)[source]

Bases: univention.appcenter.ini_parser.IniSectionAttribute

class univention.appcenter.ini_parser.IniSectionListAttribute(required=False, default=[], localisable=False, choices=None)[source]

Bases: univention.appcenter.ini_parser.IniSectionAttribute

parse(value)[source]

Returns a list; splits on “,” (stripped, whitespaces before and after are removed). If a single value needs to contain a “,”, it can be escaped with backslash: “My , value”.

class univention.appcenter.ini_parser.IniSectionObject(**kwargs)[source]

Bases: object

to_dict()[source]
classmethod from_parser(parser, section, locale)[source]
classmethod build(parser, section, locale)[source]
classmethod all_from_file(fname, locale=None)[source]
class univention.appcenter.ini_parser.TypedIniSectionObjectMetaClass(name, bases, attrs)[source]

Bases: univention.appcenter.meta.UniventionMetaClass

class univention.appcenter.ini_parser.TypedIniSectionObject(**kwargs)[source]

Bases: univention.appcenter.ini_parser.IniSectionObject

classmethod get_class(name)[source]
classmethod from_parser(parser, section, locale)[source]

univention.appcenter.install_checks module

class univention.appcenter.install_checks.RequirementMetaClass(name, bases, attrs)[source]

Bases: univention.appcenter.meta.UniventionMetaClass

class univention.appcenter.install_checks.Requirement(apps, action)[source]

Bases: object

test()[source]
classmethod get_name()[source]
other_apps(app)[source]
class univention.appcenter.install_checks.SingleRequirement(apps, action)[source]

Bases: univention.appcenter.install_checks.Requirement

test_install(app)[source]
test_upgrade(app)[source]
test_remove(app)[source]
class univention.appcenter.install_checks.MultiRequirement(apps, action)[source]

Bases: univention.appcenter.install_checks.Requirement

test_install(apps)[source]
test_upgrade(apps)[source]
test_remove(apps)[source]
class univention.appcenter.install_checks.HardRequirement[source]

Bases: object

is_error()[source]
class univention.appcenter.install_checks.SoftRequirement[source]

Bases: object

is_error()[source]
class univention.appcenter.install_checks.MustHaveCorrectServerRole(apps, action)[source]

Bases: univention.appcenter.install_checks.SingleRequirement, univention.appcenter.install_checks.HardRequirement

The application cannot be installed on the current server role (%(current_role)s). In order to install the application, one of the following roles is necessary: %(allowed_roles)r

test_install(app)[source]
test_upgrade(app)
class univention.appcenter.install_checks.MustHaveFittingAppVersion(apps, action)[source]

Bases: univention.appcenter.install_checks.SingleRequirement, univention.appcenter.install_checks.HardRequirement

To upgrade, at least version %(required_version)s needs to be installed.

test_upgrade(app)[source]
class univention.appcenter.install_checks.MustHaveFittingKernelVersion(apps, action)[source]

Bases: univention.appcenter.install_checks.MultiRequirement, univention.appcenter.install_checks.HardRequirement

The Kernel version has to be upgraded and the system rebootet.

test_install(apps)[source]
test_upgrade(apps)
class univention.appcenter.install_checks.MustHaveCandidate(apps, action)[source]

Bases: univention.appcenter.install_checks.SingleRequirement, univention.appcenter.install_checks.HardRequirement

The application is either not installed or no newer version is available

test_upgrade(app)[source]
class univention.appcenter.install_checks.MustHaveFittingUcsVersion(apps, action)[source]

Bases: univention.appcenter.install_checks.SingleRequirement, univention.appcenter.install_checks.HardRequirement

The application requires UCS version %(required_version)s.

test_install(app)[source]
test_upgrade(app)
class univention.appcenter.install_checks.MustHaveInstallPermissions(apps, action)[source]

Bases: univention.appcenter.install_checks.SingleRequirement, univention.appcenter.install_checks.HardRequirement

You need to buy the App to install this version.

test_install(app)[source]
test_upgrade(app)
class univention.appcenter.install_checks.MustHaveNoConflictsApps(apps, action)[source]

Bases: univention.appcenter.install_checks.SingleRequirement, univention.appcenter.install_checks.HardRequirement

The application conflicts with the following applications: %r

test_install(app)[source]
test_upgrade(app)
class univention.appcenter.install_checks.MustHaveNoConflictsPackages(apps, action)[source]

Bases: univention.appcenter.install_checks.SingleRequirement, univention.appcenter.install_checks.HardRequirement

The application conflicts with the following packages: %r

test_install(app)[source]
test_upgrade(app)
class univention.appcenter.install_checks.MustHaveNoUnmetDependencies(apps, action)[source]

Bases: univention.appcenter.install_checks.SingleRequirement, univention.appcenter.install_checks.HardRequirement

The application requires the following applications: %r

test_install(app)[source]
test_upgrade(app)
class univention.appcenter.install_checks.MustHaveSupportedArchitecture(apps, action)[source]

Bases: univention.appcenter.install_checks.SingleRequirement, univention.appcenter.install_checks.HardRequirement

This application only supports %(supported)s as architecture. %(msg)s

test_install(app)[source]
test_upgrade(app)
class univention.appcenter.install_checks.MustHaveValidLicense(apps, action)[source]

Bases: univention.appcenter.install_checks.MultiRequirement, univention.appcenter.install_checks.HardRequirement

For the installation, a UCS license key with a key identification (Key ID) is required

test_install(apps)[source]
test_upgrade(apps)
class univention.appcenter.install_checks.MustNotBeDependedOn(apps, action)[source]

Bases: univention.appcenter.install_checks.SingleRequirement, univention.appcenter.install_checks.HardRequirement

The application is required for the following applications to work: %r

test_remove(app)[source]
class univention.appcenter.install_checks.MustNotBeDockerIfDockerIsDisabled(apps, action)[source]

Bases: univention.appcenter.install_checks.SingleRequirement, univention.appcenter.install_checks.HardRequirement

The application uses a container technology while the App Center is configured to not not support it

test_install(app)[source]
test_upgrade(app)
class univention.appcenter.install_checks.MustNotBeDockerInDocker(apps, action)[source]

Bases: univention.appcenter.install_checks.SingleRequirement, univention.appcenter.install_checks.HardRequirement

The application uses a container technology while the system itself runs in a container. Using the application is not supported on this host

test_install(app)[source]
test_upgrade(app)
class univention.appcenter.install_checks.MustNotBeEndOfLife(apps, action)[source]

Bases: univention.appcenter.install_checks.SingleRequirement, univention.appcenter.install_checks.HardRequirement

This application was discontinued and may not be installed anymore

test_install(app)[source]
class univention.appcenter.install_checks.MustNotBeInstalled(apps, action)[source]

Bases: univention.appcenter.install_checks.SingleRequirement, univention.appcenter.install_checks.HardRequirement

This application is already installed

test_install(app)[source]
class univention.appcenter.install_checks.MustNotBeVoteForApp(apps, action)[source]

Bases: univention.appcenter.install_checks.SingleRequirement, univention.appcenter.install_checks.HardRequirement

The application is not yet installable. Vote for this app now and bring your favorite faster to the Univention App Center

test_install(app)[source]
test_upgrade(app)
class univention.appcenter.install_checks.MustNotHaveConcurrentOperation(apps, action)[source]

Bases: univention.appcenter.install_checks.SingleRequirement, univention.appcenter.install_checks.HardRequirement

Another package operation is in progress

test_install(app)[source]
test_upgrade(app)
test_remove(app)
class univention.appcenter.install_checks.ShallHaveEnoughFreeDiskSpace(apps, action)[source]

Bases: univention.appcenter.install_checks.MultiRequirement, univention.appcenter.install_checks.SoftRequirement

The system needs %(minimum)d MB of free disk space but only %(current)d MB are available.

test_install(apps)[source]
class univention.appcenter.install_checks.ShallHaveEnoughRam(apps, action)[source]

Bases: univention.appcenter.install_checks.MultiRequirement, univention.appcenter.install_checks.SoftRequirement

The system need at least %(minimum)d MB of free RAM but only %(current)d MB are available.

test_install(apps)[source]
test_upgrade(apps)[source]
class univention.appcenter.install_checks.ShallNotBeDockerIfDiscouraged(apps, action)[source]

Bases: univention.appcenter.install_checks.SingleRequirement, univention.appcenter.install_checks.HardRequirement

The application has not been approved to migrate all existing data. Maybe there is a migration guide: %(migration_link)s

test_install(app)[source]
test_upgrade(app)
class univention.appcenter.install_checks.ShallOnlyBeInstalledInAdEnvWithPasswordService(apps, action)[source]

Bases: univention.appcenter.install_checks.SingleRequirement, univention.appcenter.install_checks.SoftRequirement

The application requires the password service to be set up on the Active Directory domain controller server.

test_install(app)[source]
test_upgrade(app)
univention.appcenter.install_checks.check(apps, action)[source]
univention.appcenter.install_checks.get_requirement(name)[source]

univention.appcenter.listener module

class univention.appcenter.listener.AppListener(*args, **kwargs)[source]

Bases: univention.listener.handler.ListenerModuleHandler

When subclassing, in __init__() first call must be:

super(.., self).__init__(*args, **kwargs)

self.config will be set by the metaclass.

initialize()[source]

Called once when the Univention Directory Listener loads the module for the first time or when a resync it triggered.

create(dn, new)[source]

Called when a new object was created.

Parameters
  • dn (str) – current objects DN

  • new (dict) – new LDAP objects attributes

modify(dn, old, new, old_dn)[source]

Called when an existing object was modified or moved.

A move can be be detected by looking at old_dn. Attributes can be modified during a move.

Parameters
  • dn (str) – current objects DN

  • old (dict) – previous LDAP objects attributes

  • new (dict) – new LDAP objects attributes

  • old_dn (str or None) – previous DN if object was moved/renamed, None otherwise

remove(dn, old)[source]

Called when an object was deleted.

Parameters
  • dn (str) – current objects DN

  • old (dict) – previous LDAP objects attributes

class Configuration(*args, **kwargs)[source]

Bases: univention.listener.handler.ListenerModuleHandler.Configuration

get_description()[source]
Returns

description string of module

Return type

str

get_ldap_filter()[source]
Returns

LDAP filter of module

Return type

str

univention.appcenter.log module

Univention App Center library:

Logging module

The library logs various messages to logger objects (python stdlib logging) univention.appcenter.log defines the appcenter base logger, as well as functions to link the logger objects to the application using the library.

>>> from univention.appcenter.log import *
>>> log_to_logfile()
>>> # logs all messages to '/var/log/univention/appcenter.log'
>>> log_to_stream()
>>> # logs messages other than debug to stdout or (warning/error) stderr
>>> base_logger = get_base_logger()
>>> base_logger.info('This is an info message')
>>> base_logger.warn('And this is a warning')
univention.appcenter.log.get_base_logger()[source]

Returns the base logger for univention.appcenter

class univention.appcenter.log.RangeFilter(min_level=None, max_level=None)[source]

Bases: logging.Filter

A Filter object that filters messages in a certain range of logging levels

Initialize a filter.

Initialize with the name of the logger which, together with its children, will have its events allowed through the filter. If no name is specified, allow every event.

filter(record)[source]

Determine if the specified record is to be logged.

Is the specified record to be logged? Returns 0 for no, nonzero for yes. If deemed appropriate, the record may be modified in-place.

class univention.appcenter.log.UMCHandler(level=0)[source]

Bases: logging.Handler

Handler to link a logger to the UMC logging mechanism

Initializes the instance - basically setting the formatter to None and the filter list to empty.

emit(record)[source]

Do whatever it takes to actually log the specified logging record.

This version is intended to be implemented by subclasses and so raises a NotImplementedError.

class univention.appcenter.log.StreamReader(logger, level)[source]

Bases: object

write(msg)[source]
flush()[source]
class univention.appcenter.log.LogCatcher(logger=None)[source]

Bases: object

getChild(name)[source]
debug(msg)[source]
info(msg)[source]
warn(msg)[source]
fatal(msg)[source]
has_stdout()[source]
has_stderr()[source]
stdout()[source]
stderr()[source]
stdstream()[source]
univention.appcenter.log.catch_stdout(logger=None)[source]

Helper function to redirect stdout output to a logger. Or, if not given, suppress completely. Useful when calling other libs that do not use logging, instead just print statements.

univention.appcenter.log.log_to_stream()[source]

Call this function to log to stdout/stderr stdout: logging.INFO stderr: logging.WARN and upwards logging.DEBUG: suppressed only the message is logged, no further formatting stderr is logged in red (if its a tty)

class univention.appcenter.log.ShortNameFormatter(fmt=None, datefmt=None, style='%')[source]

Bases: logging.Formatter

Simple formatter to cut out unneeded bits of the logger’s name

Initialize the formatter with specified format strings.

Initialize the formatter either with the specified format string, or a default as described above. Allow for specialized date formatting with the optional datefmt argument. If datefmt is omitted, you get an ISO8601-like (or RFC 3339-like) format.

Use a style parameter of ‘%’, ‘{‘ or ‘$’ to specify that you want to use one of %-formatting, str.format() ({}) formatting or string.Template formatting in your format string.

Changed in version 3.2: Added the style parameter.

shorten = 'univention.appcenter'
format(record)[source]

Format the specified record as text.

The record’s attribute dictionary is used as the operand to a string formatting operation which yields the returned string. Before formatting the dictionary, a couple of preparatory steps are carried out. The message attribute of the record is computed using LogRecord.getMessage(). If the formatting string uses the time (as determined by a call to usesTime(), formatTime() is called to format the event time. If there is exception information, it is formatted using formatException() and appended to the message.

univention.appcenter.log.get_logfile_logger(name)[source]
univention.appcenter.log.log_to_logfile()[source]

Call this function to log to /var/log/univention/appcenter.log Needs rights to write to it (i.e. should be root) Formats the message so that it can be analyzed later (i.e. process id) Logs DEBUG as well

univention.appcenter.meta module

class univention.appcenter.meta.UniventionMetaInfo[source]

Bases: object

pop = False
save_as_list = False
save_as_dict = False
inheriting = True
auto_set_name = False
set_name(name)[source]
contribute_to_class(klass, name)[source]
class univention.appcenter.meta.UniventionMetaClass(name, bases, attrs)[source]

Bases: type

univention.appcenter.packages module

univention.appcenter.packages.get_package_manager()[source]
univention.appcenter.packages.reload_package_manager()[source]
univention.appcenter.packages.packages_are_installed(pkgs, strict=True)[source]
univention.appcenter.packages.package_lock()[source]
univention.appcenter.packages.wait_for_dpkg_lock(timeout=120)[source]
univention.appcenter.packages.install_packages_dry_run(pkgs)[source]
univention.appcenter.packages.dist_upgrade_dry_run()[source]
univention.appcenter.packages.install_packages(pkgs)[source]
univention.appcenter.packages.remove_packages_dry_run(pkgs)[source]
univention.appcenter.packages.remove_packages(pkgs)[source]
univention.appcenter.packages.dist_upgrade()[source]
univention.appcenter.packages.update_packages()[source]
univention.appcenter.packages.mark_packages_as_manually_installed(pkgs)[source]

univention.appcenter.settings module

exception univention.appcenter.settings.SettingValueError[source]

Bases: Exception

class univention.appcenter.settings.Setting(**kwargs)[source]

Bases: univention.appcenter.ini_parser.TypedIniSectionObject

Based on the .settings file, models additional settings for Apps that can be configured before installation, during run-time, etc.

classmethod get_class(name)[source]
is_outside(app)[source]
is_inside(app)[source]
get_initial_value(app)[source]
get_value(app, phase='Settings')[source]

Get the current value for this Setting. Easy implementation

set_value(app, value, together_config_settings, part)[source]
set_value_together(app, value, together_config_settings)[source]
sanitize_value(app, value)[source]
value_for_setting(app, value)[source]
should_go_into_image_configuration(app)[source]
class univention.appcenter.settings.StringSetting(**kwargs)[source]

Bases: univention.appcenter.settings.Setting

class univention.appcenter.settings.IntSetting(**kwargs)[source]

Bases: univention.appcenter.settings.Setting

sanitize_value(app, value)[source]
class univention.appcenter.settings.BoolSetting(**kwargs)[source]

Bases: univention.appcenter.settings.Setting

sanitize_value(app, value)[source]
value_for_setting(app, value)[source]
class univention.appcenter.settings.ListSetting(**kwargs)[source]

Bases: univention.appcenter.settings.Setting

sanitize_value(app, value)[source]
class univention.appcenter.settings.UDMListSetting(**kwargs)[source]

Bases: univention.appcenter.settings.ListSetting

class univention.appcenter.settings.FileSetting(**kwargs)[source]

Bases: univention.appcenter.settings.Setting

get_value(app, phase='Settings')[source]

Get the current value for this Setting. Easy implementation

set_value(app, value, together_config_settings, part)[source]
should_go_into_image_configuration(app)[source]
class univention.appcenter.settings.PasswordSetting(**kwargs)[source]

Bases: univention.appcenter.settings.Setting

class univention.appcenter.settings.PasswordFileSetting(**kwargs)[source]

Bases: univention.appcenter.settings.FileSetting, univention.appcenter.settings.PasswordSetting

class univention.appcenter.settings.StatusSetting(**kwargs)[source]

Bases: univention.appcenter.settings.Setting

set_value(app, value, together_config_settings, part)[source]

univention.appcenter.ucr module

univention.appcenter.ucr.ucr_load()[source]
univention.appcenter.ucr.ucr_get(key, default=None)[source]
univention.appcenter.ucr.ucr_save(values)[source]
univention.appcenter.ucr.ucr_includes(key)[source]
univention.appcenter.ucr.ucr_is_true(key, default=False, value=None)[source]
univention.appcenter.ucr.ucr_is_false(key)[source]
univention.appcenter.ucr.ucr_keys()[source]
univention.appcenter.ucr.ucr_evaluated_as_true(value)[source]
univention.appcenter.ucr.ucr_run_filter(string, additional=None)[source]
univention.appcenter.ucr.ucr_instance()[source]

univention.appcenter.udm module

class univention.appcenter.udm.FakeApp(id, version)[source]

Bases: object

univention.appcenter.udm.init_object(module, lo, pos, dn='', attrs=None)[source]
univention.appcenter.udm.remove_object_if_exists(module, lo, pos, dn)[source]
univention.appcenter.udm.create_object_if_not_exists(_module, _lo, _pos, **kwargs)[source]
univention.appcenter.udm.modify_object(_module, _lo, _pos, _dn, **kwargs)[source]
univention.appcenter.udm.search_objects(_module, _lo, _pos, _base='', **kwargs)[source]
univention.appcenter.udm.dn_exists(dn, lo)[source]
univention.appcenter.udm.get_machine_connection()[source]
univention.appcenter.udm.get_admin_connection()[source]
univention.appcenter.udm.get_connection(userdn, password)[source]
univention.appcenter.udm.get_read_connection(userdn, password)[source]
class univention.appcenter.udm.ApplicationLDAPObject(app, lo, pos, create_if_not_exists=False)[source]

Bases: object

property dn
classmethod from_udm_obj(udm_obj, lo, pos)[source]
add_localhost()[source]
remove_localhost()[source]
remove_from_directory()[source]
installed_on_servers()[source]
get_siblings()[source]
anywhere_installed()[source]
univention.appcenter.udm.get_app_ldap_object(app, lo=None, pos=None, or_create=False)[source]
univention.appcenter.udm.create_recursive_container(dn, lo, pos)[source]

univention.appcenter.utils module

univention.appcenter.utils.read_ini_file(filename, parser_class=<class 'configparser.RawConfigParser'>)[source]
univention.appcenter.utils.docker_bridge_network_conflict()[source]
univention.appcenter.utils.app_is_running(app)[source]
univention.appcenter.utils.docker_is_running()[source]
univention.appcenter.utils.app_ports()[source]

Returns a list for ports of an App: [(app_id, container_port, host_port), …]

univention.appcenter.utils.app_ports_with_protocol()[source]

Returns a list for ports of an App: [(app_id, container_port, host_port, protocol), …]

exception univention.appcenter.utils.NoMorePorts[source]

Bases: Exception

univention.appcenter.utils.currently_free_port_in_range(lower_bound, upper_bound, blacklist)[source]
univention.appcenter.utils.generate_password()[source]
univention.appcenter.utils.underscore(value)[source]
univention.appcenter.utils.capfirst(value)[source]
univention.appcenter.utils.camelcase(value)[source]
univention.appcenter.utils.shell_safe(value)[source]
univention.appcenter.utils.mkdir(directory)[source]
univention.appcenter.utils.rmdir(directory)[source]
univention.appcenter.utils.call_process2(cmd, logger=None, env=None, cwd=None)[source]
univention.appcenter.utils.call_process(args, logger=None, env=None, cwd=None)[source]
univention.appcenter.utils.call_process_as(user, args, logger=None, env=None)[source]
univention.appcenter.utils.verbose_http_error(exc)[source]
class univention.appcenter.utils.HTTPSConnection(host, port=None, key_file=None, cert_file=None, timeout=<object object>, source_address=None, *, context=None, check_hostname=None, blocksize=8192)[source]

Bases: http.client.HTTPSConnection

connect()[source]

Connect to a host on a given (SSL) port.

class univention.appcenter.utils.HTTPSHandler(debuglevel=0, context=None, check_hostname=None)[source]

Bases: urllib.request.HTTPSHandler

https_open(req)[source]
univention.appcenter.utils.urlopen(request)[source]
univention.appcenter.utils.get_md5(content)[source]
univention.appcenter.utils.get_md5_from_file(filename)[source]
univention.appcenter.utils.get_sha256(content)[source]
univention.appcenter.utils.get_sha256_from_file(filename)[source]
univention.appcenter.utils.get_current_ram_available()[source]

Returns RAM currently available in MB, excluding Swap

univention.appcenter.utils.get_free_disk_space()[source]

Returns disk space currently free in MB

univention.appcenter.utils.flatten(list_of_lists)[source]
univention.appcenter.utils.unique(sequence)[source]
univention.appcenter.utils.get_locale()[source]
univention.appcenter.utils.gpg_verify(filename, signature=None)[source]
univention.appcenter.utils.get_local_fqdn()[source]
univention.appcenter.utils.get_server()[source]
univention.appcenter.utils.container_mode()[source]

returns True if this system is a container

univention.appcenter.utils.send_information(action, app=None, status=200, value=None)[source]
univention.appcenter.utils.find_hosts_for_master_packages()[source]
univention.appcenter.utils.resolve_dependencies(apps, action)[source]