]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Fixing lib/cr_vmware_tpl/cobbler/profile.py
authorFrank Brehm <frank.brehm@pixelpark.com>
Mon, 20 Nov 2023 11:13:37 +0000 (12:13 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Mon, 20 Nov 2023 11:13:37 +0000 (12:13 +0100)
lib/cr_vmware_tpl/cobbler/profile.py

index 7af28c38642af648c116eb693e3ddf7567b88a87..d8cfb60efa46ff55392015c7b21d20bfb4acc364 100644 (file)
@@ -27,7 +27,7 @@ from .. import print_section_start, print_section_end
 from ..errors import ExpectedCobblerError
 from ..xlate import XLATOR
 
-__version__ = '0.2.2'
+__version__ = '0.2.3'
 
 LOG = logging.getLogger(__name__)
 
@@ -257,7 +257,7 @@ class CobblerProfile():
             ks_meta_list.append("SYSTEM_STATUS={}".format(status))
             ks_meta_list.append("WS_REL_FILESDIR={}".format(self.cfg.cobbler_ws_rel_filesdir))
             ks_meta_list.append("COBBLER_URL=http://{}".format(self.cfg.cobbler_host))
-            if self.current_distro.is_rhel:
+            if self.cfg.current_distro.is_rhel:
                 ks_meta_list.append(
                     "RHEL9_REPOSERVER_URL={}".format(self.cfg.rhel9_repo_server_url))
 
@@ -306,7 +306,7 @@ class CobblerProfile():
             LOG.debug(_('Profile ks_meta {!r} is not ok.').format('COBBLER_URL'))
             ks_meta_ok = False
 
-        if self.current_distro.is_rhel:
+        if self.cfg.current_distro.is_rhel:
             if 'RHEL9_REPOSERVER_URL' not in ks_meta_vars or \
                     ks_meta_vars['RHEL9_REPOSERVER_URL'] != self.cfg.rhel9_repo_server_url:
                 LOG.debug(_('Profile ks_meta {!r} is not ok.').format('RHEL9_REPOSERVER_URL'))
@@ -334,7 +334,7 @@ class CobblerProfile():
         ks_meta_list.append("SYSTEM_STATUS={}".format(status))
         ks_meta_list.append("WS_REL_FILESDIR={}".format(self.cfg.cobbler_ws_rel_filesdir))
         ks_meta_list.append("COBBLER_URL=http://{}".format(self.cfg.cobbler_host))
-        if self.current_distro.is_rhel:
+        if self.cfg.current_distro.is_rhel:
             ks_meta_list.append("RHEL9_REPOSERVER_URL={}".format(self.cfg.rhel9_repo_server_url))
 
         ks_meta = None