From 57970848f99428d60c78ae7a974239a9b2d18c2b Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Tue, 23 May 2023 18:02:55 +0200 Subject: [PATCH] Start reading in virtual alias files. --- lib/pp_admintools/app/barracuda_sync.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) 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() # ============================================================================= -- 2.39.5