From: Ben Steffen Date: Mon, 25 Nov 2019 06:53:39 +0000 (-0500) Subject: Rename load_image to update_image X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-images.git/commitdiff_plain/45ad06628e7f9a12d3f65b093c6c6b700c600dfc Rename load_image to update_image --- diff --git a/debian/changelog b/debian/changelog index ee86058..0febe00 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +invirt-images (0.0.9) precise; urgency=medium + + * Rename load_image to update_image + + -- Ben Steffen Mon, 25 Nov 2019 01:52:32 -0500 + invirt-images (0.0.8) precise; urgency=medium * Use argparse instead of optparse diff --git a/invirt-images b/invirt-images index 1e77767..5d59438 100755 --- 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) -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 @@ -118,7 +118,7 @@ def reap_images(): """ 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. @@ -141,7 +141,7 @@ def action_add_cdrom(args): 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')} @@ -158,7 +158,7 @@ def action_update(args): for cdrom in images: if cdrom is not None: - load_image(cdrom) + update_image(cdrom) def action_reap(args): reap_images()