FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora/Linux Management Tools

 
 
LinkBack Thread Tools
 
Old 04-08-2008, 06:26 PM
James Laska
 
Default virtinst/ImageFetcher.patch

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@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@redhat.com
Quality Engineering -- Red Hat, Inc.
==========================================
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 
Old 04-08-2008, 07:24 PM
"Daniel P. Berrange"
 
Default virtinst/ImageFetcher.patch

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@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.

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@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 

Thread Tools




All times are GMT. The time now is 03:19 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org