from ..xlate import XLATOR
-__version__ = '0.11.4'
+__version__ = '0.11.5'
LOG = logging.getLogger(__name__)
if initialized:
self.initialized = True
+ # ------------------------------------------------------
+ @property
+ def url(self):
+ """The URL, which is used by new initiated VMs, to access resources on the cobbler host."""
+ return self.cfg.cobbler_ws_base_url
+
+ # -------------------------------------------------------------------------
+ def as_dict(self, short=True):
+ """
+ Transforms the elements of the object into a dict
+
+ @param short: don't include local properties in resulting dict.
+ @type short: bool
+
+ @return: structure as dict
+ @rtype: dict
+ """
+
+ res = super(Cobbler, self).as_dict(short=short)
+ res['url'] = self.url
+
+ return res
+
# -------------------------------------------------------------------------
def __del__(self):
from ..errors import ExpectedCobblerError
from ..xlate import XLATOR
-__version__ = '0.2.3'
+__version__ = '0.2.4'
LOG = logging.getLogger(__name__)
ks_meta_list.append("SWAP_SIZE_MB={}".format(self.cfg.swap_size_mb))
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))
+ ks_meta_list.append("COBBLER_URL={}".format(self.url))
if self.cfg.current_distro.is_rhel:
ks_meta_list.append(
"RHEL9_REPOSERVER_URL={}".format(self.cfg.rhel9_repo_server_url))
LOG.debug(_('Profile ks_meta {!r} is not ok.').format('WS_REL_FILESDIR'))
ks_meta_ok = False
- if 'COBBLER_URL' not in ks_meta_vars or \
- ks_meta_vars['COBBLER_URL'] != "http://{}".format(self.cfg.cobbler_host):
+ if 'COBBLER_URL' not in ks_meta_vars or ks_meta_vars['COBBLER_URL'] != self.url:
LOG.debug(_('Profile ks_meta {!r} is not ok.').format('COBBLER_URL'))
ks_meta_ok = False
ks_meta_list.append("SWAP_SIZE_MB={}".format(self.cfg.swap_size_mb))
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))
+ ks_meta_list.append("COBBLER_URL={}".format(self.url))
if self.cfg.current_distro.is_rhel:
ks_meta_list.append("RHEL9_REPOSERVER_URL={}".format(self.cfg.rhel9_repo_server_url))
from ..errors import ExpectedCobblerError
from ..xlate import XLATOR
-__version__ = '0.2.0'
+__version__ = '0.2.1'
LOG = logging.getLogger(__name__)
ks_meta_list.append("SWAP_SIZE_MB={}".format(self.cfg.swap_size_mb))
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))
+ ks_meta_list.append("COBBLER_URL={}".format(self.url))
if self.cfg.rhsm_user:
ks_meta_list.append("RHSM_USER={}".format(self.cfg.rhsm_user))
if self.cfg.rhsm_pwd:
from .ldap import LdapConnectionInfo, LdapConnectionDict
from .timeouts import ConfigTimeouts
-__version__ = '3.3.1'
+__version__ = '3.3.2'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
resolv_conf = Path('/etc/resolv.conf')
evaluated_resolv_conf = False
- default_cobbler_ws_base_url = 'http://cobbler.pixelpark.com'
+ default_cobbler_ws_base_url = 'https://cobbler.pixelpark.com'
default_cobbler_ws_docroot = Path('/var/www/html')
default_cobbler_ws_rel_filesdir = Path('custom/vmware-template-files')