On Thu, Nov 26, 2009 at 05:37:51PM +0000, Michael Hanselmann wrote: > 2009/11/26 Iustin Pop <[email protected]>: > > --- a/tools/burnin > > +++ b/tools/burnin > > @@ -38,6 +38,16 @@ from ganeti import cli > > from ganeti import errors > > from ganeti import utils > > > > +from ganeti.opcodes import (OpActivateInstanceDisks, OpCreateInstance, > > + OpDeactivateInstanceDisks, OpDiagnoseOS, > > […] > > I really don't like this. Quoting > <http://google-styleguide.googlecode.com/svn/trunk/pyguide.html?showone=Imports#Imports>: > “from foo import * or from foo import Bar is very nasty and can lead > to serious maintenance issues because it makes it hard to find module > dependencies”.
If we talk about libraries, yes. But this is an leaf program, so it would be hard to miss this dependency. > > + op = OpCreateInstance(instance_name=instance, disks=disks, > > + disk_template=self.opts.disk_template, > > + nics=self.opts.nics, > > + mode=constants.INSTANCE_CREATE, > > + os_type=self.opts.os, pnode=pnode, snode=snode, > > + start=True, ip_check=True, wait_for_sync=True, > > […] > > For non-trivial keyword parameter counts, please try to keep one > parameter per line. I'm fine with moving the parameter value to a > separate variable instead of creating it in-place. Meh, then what I wanted - simplify the page-long argument lists - is not achieved anymore, and as such I'll drop the patch. iustin
