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, 07:38 PM
James Laska
 
Default virtinst/ImageFetcher.patch

On Tue, 2008-04-08 at 20:24 +0100, Daniel P. Berrange wrote:
> 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.

subprocess doesn't exist on RHEL3 and RHEL4, so I had to provide a
helper to fill in the blanks in those environments.

Additionally, there is some snake.util.get_mtab() methods that would
need definition if that chunk is used.

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
 

Thread Tools




All times are GMT. The time now is 07:07 PM.

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