From: Frank Brehm Date: Tue, 10 Oct 2023 09:22:57 +0000 (+0200) Subject: Start moving VMware related methods from lib/cr_vmware_tpl/handler/__init__.py into... X-Git-Tag: 3.0.0^2~10 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=dc87750a31ba01d2946d4ddae7c14fa042797d20;p=pixelpark%2Fcreate-vmware-tpl.git Start moving VMware related methods from lib/cr_vmware_tpl/handler/__init__.py into lib/cr_vmware_tpl/handler/vmware.py --- diff --git a/lib/cr_vmware_tpl/handler/__init__.py b/lib/cr_vmware_tpl/handler/__init__.py index cdc0841..c6ae227 100644 --- a/lib/cr_vmware_tpl/handler/__init__.py +++ b/lib/cr_vmware_tpl/handler/__init__.py @@ -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 index 0000000..50ff6a9 --- /dev/null +++ b/lib/cr_vmware_tpl/handler/vmware.py @@ -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