opsicommon.config package

Submodules

opsicommon.config.opsi module

This file is part of opsi - https://www.opsi.org

class opsicommon.config.opsi.OpsiConfig(upgrade_config=True)

Bases: object

Parameters:

upgrade_config (bool) –

config_file = '/etc/opsi/opsi.conf'
default_config = {'depot_user': {'home': '/var/lib/opsi', 'username': 'pcpatch'}, 'groups': {'admingroup': 'opsiadmin', 'fileadmingroup': 'opsifileadmins', 'readonly': ''}, 'host': {'id': '', 'key': '', 'server-role': ''}, 'ldap_auth': {'bind_user': '', 'ldap_url': ''}, 'packages': {'use_pigz': True}, 'service': {'url': ''}}
file_lock = <unlocked _thread.lock object>
get(category, config=None)
Parameters:
  • category (str) –

  • config (Optional[str]) –

Return type:

Any

read_config_file()
Return type:

None

set(category, config, value, persistent=False)
Parameters:
  • category (str) –

  • config (str) –

  • value (Any) –

  • persistent (bool) –

Return type:

None

property upgrade_config: bool
upgrade_config_file()
Return type:

None

write_config_file()
Return type:

None

opsicommon.config.opsi.get_host_id(server_role)
Parameters:

server_role (str) –

Return type:

str

opsicommon.config.opsi.get_host_key(server_role)
Parameters:

server_role (str) –

Return type:

str

opsicommon.config.opsi.get_role()
Return type:

str

opsicommon.config.opsi.get_service_url(server_role)
Parameters:

server_role (str) –

Return type:

str

opsicommon.config.opsi.read_backend_config_file(file)
Parameters:

file (Path) –

Return type:

dict[str, Any]

Module contents

This file is part of opsi - https://www.opsi.org