univention.management.console.modules.setup.netconf package#

Univention Setup: network configuration abstract base classes

class univention.management.console.modules.setup.netconf.ChangeSet(ucr: ConfigRegistry, profile: dict[str, str], options)[source]#

Bases: object

static only_network_config(profile: dict[str, str]) dict[str, str | None][source]#
update_config(changes: dict[str, str | None]) None[source]#
property no_act: bool#
property old_names: set[str]#
property new_names: set[str]#
property old_ipv4s: list[IPv4Interface]#
property new_ipv4s: list[IPv4Interface]#
property old_ipv6s: list[IPv6Interface]#
property new_ipv6s: list[IPv6Interface]#
exception univention.management.console.modules.setup.netconf.SkipPhase[source]#

Bases: Exception

class univention.management.console.modules.setup.netconf.Phase(changeset: ChangeSet)[source]#

Bases: object

Base-class for all phases.

priority = 0#
check() None[source]#

Check if the phase should be activated. Throw SkipPhase to skip this phase.

pre() None[source]#

Called before the changes are applied to UCR.

post() None[source]#

Called after the changes have been applied to UCR.

call(command: Sequence[str]) int[source]#

Call external command using subprocess.call(shell=False).

Subpackages#

Submodules#

univention.management.console.modules.setup.netconf.common module#

Univention Setup: network configuration abstract common classes

class univention.management.console.modules.setup.netconf.common.RestartService(changeset: ChangeSet)[source]#

Bases: Executable

Helper to restart a single service.

service = ''#
PREFIX = '/etc/init.d'#
property executable: str#

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.

pre() None[source]#

Called before the changes are applied to UCR.

post() None[source]#

Called after the changes have been applied to UCR.

class univention.management.console.modules.setup.netconf.common.AddressMap(changeset: ChangeSet)[source]#

Bases: AddressChange

Helper to provide a mapping from old addresses to new addresses.

ipv4_changes() dict[IPv4Interface, IPv4Interface | None][source]#
ipv6_changes() dict[IPv6Interface, IPv6Interface | None][source]#
class univention.management.console.modules.setup.netconf.common.LdapChange(changeset: ChangeSet)[source]#

Bases: AddressChange, Ldap

Helper to provide access to LDAP through UDM.

open_ldap() None[source]#
univention.management.console.modules.setup.netconf.common.convert_udm_subnet_to_network(subnet: str) IPv4Network | IPv6Network[source]#
univention.management.console.modules.setup.netconf.common.convert_udm_subnet_to_ipv4_network(subnet: str) IPv4Network[source]#
univention.management.console.modules.setup.netconf.common.convert_udm_subnet_to_ipv6_network(subnet: str) IPv6Network[source]#

univention.management.console.modules.setup.netconf.conditions module#

Univention Setup: network configuration conditions

class univention.management.console.modules.setup.netconf.conditions.AddressChange(changeset: ChangeSet)[source]#

Bases: Phase

Check for at least one removed or added address.

check() None[source]#

Check if the phase should be activated. Throw SkipPhase to skip this phase.

class univention.management.console.modules.setup.netconf.conditions.Server(changeset: ChangeSet)[source]#

Bases: Phase

Check server role for being a UCS server.

check() None[source]#

Check if the phase should be activated. Throw SkipPhase to skip this phase.

class univention.management.console.modules.setup.netconf.conditions.Executable(changeset: ChangeSet)[source]#

Bases: Phase

Check executable exists.

executable = ''#
check() None[source]#

Check if the phase should be activated. Throw SkipPhase to skip this phase.

class univention.management.console.modules.setup.netconf.conditions.Dhcp(changeset: ChangeSet)[source]#

Bases: Phase

Check for interfaces using DHCP.

property old_dhcps: set[str]#
property new_dhcps: set[str]#
class univention.management.console.modules.setup.netconf.conditions.NotNetworkOnly(changeset: ChangeSet)[source]#

Bases: Phase

Skip when not in network only mode.

check() None[source]#

Check if the phase should be activated. Throw SkipPhase to skip this phase.

class univention.management.console.modules.setup.netconf.conditions.Ldap(changeset: ChangeSet)[source]#

Bases: Phase

Check LDAP server is available.

binddn = None#
bindpwd = None#
available = None#
check() None[source]#

Check if the phase should be activated. Throw SkipPhase to skip this phase.

load_state() None[source]#
check_available() None[source]#
load_credentials() None[source]#
is_master() bool[source]#
is_master_or_backup() bool[source]#
load_admin_credentials() None[source]#
load_remote_credentials() None[source]#
lookup_user(username: str) None[source]#