]> Frank Brehm's Git Trees - pixelpark/pp-admin-tools.git/commitdiff
Start reading in virtual alias files.
authorFrank Brehm <frank.brehm@pixelpark.com>
Tue, 23 May 2023 16:02:55 +0000 (18:02 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Tue, 23 May 2023 16:02:55 +0000 (18:02 +0200)
lib/pp_admintools/app/barracuda_sync.py

index 6cb6642805c0baa7d5bdc4d160748981139c0ad0..6805d0a52a22883d0f78e0884ea0093030b663c3 100644 (file)
@@ -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()
 
 
 # =============================================================================