projects
/
invirt/packages/invirt-images.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename load_image to update_image
[invirt/packages/invirt-images.git]
/
invirt-images
diff --git
a/invirt-images
b/invirt-images
index
1e77767
..
5d59438
100755
(executable)
--- a/
invirt-images
+++ b/
invirt-images
@@
-86,7
+86,7
@@
def copy_file(src, dest):
subprocess.run(['dd', f'if={src}', f'of={dest}', 'bs=1M'],
check_output=True, encoding='utf-8', check=True)
subprocess.run(['dd', f'if={src}', f'of={dest}', 'bs=1M'],
check_output=True, encoding='utf-8', check=True)
-def load_image(cdrom):
+def update_image(cdrom):
"""
Update a cdrom image by downloading the latest version,
transferring it into an LV, moving the old LV out of the way and
"""
Update a cdrom image by downloading the latest version,
transferring it into an LV, moving the old LV out of the way and
@@
-118,7
+118,7
@@
def reap_images():
"""
Remove stale cdrom images that are no longer in use
"""
Remove stale cdrom images that are no longer in use
- load_image doesn't attempt to remove the old image because it
+ update_image doesn't attempt to remove the old image because it
might still be in use. reap_images attempts to delete any LVs
starting with 'image-old_', but ignores errors, in case they're
still being used.
might still be in use. reap_images attempts to delete any LVs
starting with 'image-old_', but ignores errors, in case they're
still being used.
@@
-141,7
+141,7
@@
def action_add_cdrom(args):
database.session.add(cdrom)
database.session.commit()
database.session.add(cdrom)
database.session.commit()
- load_image(cdrom)
+ update_image(cdrom)
def action_add_mirror(args):
attrs = {key: vars(args)[key] for key in ('mirror_id', 'uri_prefix')}
def action_add_mirror(args):
attrs = {key: vars(args)[key] for key in ('mirror_id', 'uri_prefix')}
@@
-158,7
+158,7
@@
def action_update(args):
for cdrom in images:
if cdrom is not None:
for cdrom in images:
if cdrom is not None:
- load_image(cdrom)
+ update_image(cdrom)
def action_reap(args):
reap_images()
def action_reap(args):
reap_images()