from .xlate import XLATOR
-__version__ = '0.5.5'
+__version__ = '0.5.6'
LOG = logging.getLogger(__name__)
self.ensure_remote_directory(remote_dir)
self.ensure_remote_file(auth_keys_file, remote_file, check_parent=False)
+ # -------------------------------------------------------------------------
+ def ensure_repo_files(self):
+
+ files_dir = self.base_dir / 'files'
+ docroot = self.config.cobbler_ws_docroot / self.config.cobbler_ws_rel_filesdir
+ remote_dir = docroot / self.config.system_status / 'repos'
+
+ LOG.info(_("Ensuring currentness of snippets below {!r}.").format(
+ str(self.config.snippets_dir)))
+
+ for local_repo_dir in local_snippets_dir.glob('repos-*'):
+ if not local_repo_dir.is_dir():
+ LOG.warn(_("Local path {!r} is not a directory.").format(str(local_repo_dir)))
+ continue
+ dirname = str(local_repo_dir.name)
+ os_id = dirname.replace('repos-', '', 1)
+ LOG.debug(_("Ensuring repo files for {}.").format(os_id))
+ remote_dir_os = remote_dir / os_id
+ self.ensure_remote_directory(remote_dir_os)
+ for local_repo_file in local_repo_dir.glob('*.repo'):
+ remote_file = remote_dir_os / local_repo_file.name
+ self.ensure_remote_file(local_repo_file, remote_file)
+
# -------------------------------------------------------------------------
def get_dhcp_ip(self, mac_address):
from .xlate import XLATOR
-__version__ = '1.6.1'
+__version__ = '1.6.2'
LOG = logging.getLogger(__name__)
TZ = pytz.timezone('Europe/Berlin')
self.cobbler.ensure_system_ks()
self.cobbler.ensure_snippets()
self.cobbler.ensure_keys()
+ self.cobbler.ensure_repo_files()
self.vsphere.get_about()
self.vsphere.get_clusters()