Skip to content

Commit

Permalink
add more progress status messages
Browse files Browse the repository at this point in the history
Change-Id: I893dd765a73d7856048748db0fe71a316d157d0d
  • Loading branch information
oliverkurth committed Dec 13, 2023
1 parent 1cd4f2b commit 098ee43
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions photon_installer/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,9 @@ def _ansible_run(self):
if 'ansible' not in self.install_config:
return

if self.install_config['ui']:
self.progress_bar.update_message('Running ansible scripts')

ansibles = self.install_config['ansible']
for ans_cfg in ansibles:
playbook = ans_cfg['playbook']
Expand Down Expand Up @@ -1135,12 +1138,18 @@ def _finalize_system(self):

def _cleanup_tdnf_cache(self):
# remove the tdnf cache directory
if self.install_config['ui']:
self.progress_bar.update_message('Cleaning up tdnf cache')

cache_dir = os.path.join(self.photon_root, 'var/cache/tdnf')
if (os.path.isdir(cache_dir)):
shutil.rmtree(cache_dir)


def _cleanup_install_repo(self):
if self.install_config['ui']:
self.progress_bar.update_message('Cleaning up tdnf install repo configs')

if os.path.exists(self.tdnf_conf_path):
os.remove(self.tdnf_conf_path)
if 'repos' in self.install_config:
Expand All @@ -1154,6 +1163,9 @@ def _cleanup_install_repo(self):
def _setup_grub(self):
bootmode = self.install_config['bootmode']

if self.install_config['ui']:
self.progress_bar.update_message('Setting up GRUB')

device = self.install_config['disks']['default']['device']
# Setup bios grub
if bootmode == 'dualboot' or bootmode == 'bios':
Expand Down Expand Up @@ -1226,6 +1238,10 @@ def _execute_modules(self, phase):
self.logger.error("Error: not able to execute module {}".format(module))
continue
self.logger.info("Executing: " + module)

if self.install_config.get('ui', False):
self.progress_bar.update_message('Setting up GRUB')

mod.execute(self)

def _adjust_packages_based_on_selected_flavor(self):
Expand Down

0 comments on commit 098ee43

Please sign in to comment.