]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Start moving VMware related methods from lib/cr_vmware_tpl/handler/__init__.py into...
authorFrank Brehm <frank.brehm@pixelpark.com>
Tue, 10 Oct 2023 09:22:57 +0000 (11:22 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Tue, 10 Oct 2023 09:22:57 +0000 (11:22 +0200)
lib/cr_vmware_tpl/handler/__init__.py
lib/cr_vmware_tpl/handler/vmware.py [new file with mode: 0644]

index cdc08418c31db93fc169af11b56e4474aa34cfcc..c6ae2271d7d319e8f640d14285f795168f3ca725 100644 (file)
@@ -49,6 +49,7 @@ from .. import print_section_start, print_section_end
 
 from .cobbler import HandlerCobblerMixin
 from .ldap import HandlerLdapMixin
+from .vmware import HandlerVmwareMixin
 
 from ..config import CrTplConfiguration
 
@@ -58,7 +59,7 @@ from ..errors import MSG_NO_CLUSTER, TempVmExistsError, NoDatastoreFoundError
 
 from ..xlate import XLATOR
 
-__version__ = '2.4.3'
+__version__ = '2.4.4'
 
 LOG = logging.getLogger(__name__)
 TZ = pytz.timezone('Europe/Berlin')
@@ -67,7 +68,7 @@ _ = XLATOR.gettext
 ngettext = XLATOR.ngettext
 
 # =============================================================================
-class CrTplHandler(BaseHandler, HandlerLdapMixin, HandlerCobblerMixin):
+class CrTplHandler(BaseHandler, HandlerLdapMixin, HandlerCobblerMixin, HandlerVmwareMixin):
     """
     A handler class for creating a vSphere template.
     """
diff --git a/lib/cr_vmware_tpl/handler/vmware.py b/lib/cr_vmware_tpl/handler/vmware.py
new file mode 100644 (file)
index 0000000..50ff6a9
--- /dev/null
@@ -0,0 +1,48 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+"""
+@author: Frank Brehm
+@contact: frank.brehm@pixelpark.com
+@copyright: © 2023 by Frank Brehm, Berlin
+@summary: A mixin module for the CrTplHandler class for VMware/VSphere dependend methods.
+"""
+from __future__ import absolute_import, print_function
+
+# Standard modules
+import logging
+
+# Third party modules
+
+# from fb_tools.common import pp, is_sequence
+# from fb_tools.errors import HandlerError
+
+# Own modules
+
+# from .. import print_section_start, print_section_end
+
+from ..xlate import XLATOR
+
+__version__ = '0.1.0'
+
+LOG = logging.getLogger(__name__)
+
+_ = XLATOR.gettext
+ngettext = XLATOR.ngettext
+
+# =============================================================================
+class HandlerVmwareMixin():
+    """
+    A mixin class for extending the CrTplHandler class for VMware/VSphere dependend methods.
+    """
+
+    pass
+
+
+# =============================================================================
+if __name__ == "__main__":
+
+    pass
+
+# =============================================================================
+
+# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 list