mirror of https://git.48k.eu/ogclient
live: revisit logging for partition setup, image create and restore
parent
7d26f0f69b
commit
84c2944bf3
|
@ -151,7 +151,7 @@ class OgLiveOperations:
|
|||
if ogChangeRepo(repo, smb_user=self._smb_user, smb_pass=self._smb_pass) != 0:
|
||||
self._restartBrowser(self._url)
|
||||
raise OgError(f'Cannot change repository to {repo}')
|
||||
logging.debug(f'restore_image_unicast: name => {name}')
|
||||
|
||||
if cache:
|
||||
image_path = f'/opt/opengnsys/cache/opt/opengnsys/images/{name}.img'
|
||||
if (not os.path.exists(image_path) or
|
||||
|
@ -362,7 +362,7 @@ class OgLiveOperations:
|
|||
else:
|
||||
mkfs(fs, int(disk), partition)
|
||||
|
||||
logging.info('Setup command OK')
|
||||
logging.info('Partition setup command OK')
|
||||
result = self.refresh(ogRest)
|
||||
|
||||
self._restartBrowser(self._url)
|
||||
|
@ -382,11 +382,7 @@ class OgLiveOperations:
|
|||
self._ogbrowser_clear_logs()
|
||||
self._restartBrowser(self._url_log)
|
||||
|
||||
logging.debug('Image restore params:')
|
||||
logging.debug(f'\tname: {name}')
|
||||
logging.debug(f'\trepo: {repo}')
|
||||
logging.debug(f'\tprofile: {profile}')
|
||||
logging.debug(f'\tctype: {ctype}')
|
||||
logging.info(f'Request to restore image {name}.img via {ctype} from {repo}')
|
||||
|
||||
if shutil.which('restoreImageCustom'):
|
||||
restoreImageCustom(repo, name, disk, partition, ctype)
|
||||
|
@ -418,6 +414,8 @@ class OgLiveOperations:
|
|||
self._restartBrowser(self._url)
|
||||
raise OgError(f'Cannot change image repository to {repo}')
|
||||
|
||||
logging.info(f'Request to create image {name}.img at repository {repo}')
|
||||
|
||||
if ogRest.terminated:
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in New Issue