From: Frank Brehm Date: Tue, 23 May 2023 16:02:55 +0000 (+0200) Subject: Start reading in virtual alias files. X-Git-Tag: 0.9.0~1^2~37 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=57970848f99428d60c78ae7a974239a9b2d18c2b;p=pixelpark%2Fpp-admin-tools.git Start reading in virtual alias files. --- diff --git a/lib/pp_admintools/app/barracuda_sync.py b/lib/pp_admintools/app/barracuda_sync.py index 6cb6642..6805d0a 100644 --- a/lib/pp_admintools/app/barracuda_sync.py +++ b/lib/pp_admintools/app/barracuda_sync.py @@ -26,7 +26,7 @@ from fb_tools.xlate import format_list from .ldap import BaseLdapApplication from ..xlate import XLATOR -__version__ = '0.6.5' +__version__ = '0.7.0' LOG = logging.getLogger(__name__) _ = XLATOR.gettext @@ -315,10 +315,25 @@ class BarracudaSyncApp(BaseLdapApplication): "The last modification time of {db!r} and {va!r} are " "okay.").format(db=str(db_file), va=str(va_file))) + # ------------------------------------------------------------------------- + def read_local_virtual_aliases(self): + """Reading virtual alias files.""" + LOG.info(_("Reading in virtual alias files ...")) + + self.existing_aliases = [] + + for va_file in self.virtaliases_files: + self.read_virtual_alias_file(va_file) + + # ------------------------------------------------------------------------- + def read_virtual_alias_file(self, va_file): + """Reading virtual aliases from given file.""" + LOG.info(_("Reading in from virtual alias file {!r} ...").format(str(va_file))) + # ------------------------------------------------------------------------- def _run(self): - LOG.info('And here we go ...') + self.read_local_virtual_aliases() # =============================================================================