Re: virtinst/ImageFetcher.patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 08, 2008 at 06:26:53PM +0000, James Laska wrote:
> 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@xxxxxxxxxx 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.

There's a couple  of chunks in this paatch which directly depend on
snake. eg

-        ret = subprocess.call(cmd)
+        ret = snake.util.pcall(cmd, stderr=open('/dev/null', 'w'))

Aside from that, it looks reasonable.

Dan
-- 
|: Red Hat, Engineering, Boston   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux