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

index f0c2eb69873143f4b4470b5d5ae40a98332e6f0d..ead8b1c29ca7ccdc2a9e0df78003426086ea50fe 100644 (file)
@@ -42,6 +42,7 @@ from .. import print_section_start, print_section_end
 
 from .cobbler import HandlerCobblerMixin
 from .ldap import HandlerLdapMixin
+from .vm import HandlerVmMixin
 from .vmware import HandlerVmwareMixin
 
 from ..config import CrTplConfiguration
@@ -50,7 +51,7 @@ from ..cobbler import Cobbler
 
 from ..xlate import XLATOR
 
-__version__ = '2.4.5'
+__version__ = '2.4.6'
 
 LOG = logging.getLogger(__name__)
 TZ = pytz.timezone('Europe/Berlin')
@@ -59,7 +60,8 @@ _ = XLATOR.gettext
 ngettext = XLATOR.ngettext
 
 # =============================================================================
-class CrTplHandler(BaseHandler, HandlerLdapMixin, HandlerCobblerMixin, HandlerVmwareMixin):
+class CrTplHandler(
+        BaseHandler, HandlerLdapMixin, HandlerCobblerMixin, HandlerVmMixin, HandlerVmwareMixin):
     """
     A handler class for creating a vSphere template.
     """
diff --git a/lib/cr_vmware_tpl/handler/vm.py b/lib/cr_vmware_tpl/handler/vm.py
new file mode 100644 (file)
index 0000000..c322226
--- /dev/null
@@ -0,0 +1,46 @@
+#!/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 VM dependend methods.
+"""
+from __future__ import absolute_import, print_function
+
+# Standard modules
+import logging
+
+# Third party modules
+# from fb_tools.common import pp
+# from fb_tools.errors import HandlerError, ExpectedHandlerError
+
+# 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 HandlerVmMixin():
+    """
+    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