[et-mgmt-tools] virtinst/ImageFetcher.patch

James Laska jlaska at redhat.com
Tue Apr 8 18:26:53 UTC 2008


Greetings,

Spoke with Dan Berrangé on irc about using virtinst/ImageFetcher.py for
use in the snake project.  I've basically copied the contents with a few
tweaks.  Dan suggested sending the patch to et-mgmt-tools at redhat.com for
comments/thoughts.  The patch consists of 3 main hunks:

 1 Split acquireFile() into 2 new methods 
   > saveFile() - does what acquireFile() does now, downloads file,
writes contents to disk, returns its path
   > loadFile() - downloads file and returns file contents

 2 MountedImageFetcher().prepareLocation() will check if the requested
server:/path is already mounted
   > Supporting mtab code can be found at
http://git.fedorahosted.org/git/snake?p=snake;a=blob;f=snake/util.py;h=5815e28ce98e3a5c9dd0b0ec7b380cc05fd39d6c;hb=HEAD

 3 LocalImageFetcher()._acquireFile() will use grabber.urlopen so that
it can make use of of the progress callback when copying files via
saveTemp() calls.

Hope this is helpful.

Thanks,
James
-- 
==========================================
 James Laska         -- jlaska at redhat.com
 Quality Engineering -- Red Hat, Inc.
==========================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ImageFetcher.patch
Type: text/x-patch
Size: 6404 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/et-mgmt-tools/attachments/20080408/76464df0/attachment.bin>


More information about the et-mgmt-tools mailing list