On Wed, May 06, 2009 at 11:43:07AM +0200, Guido Trotter wrote:
> On Wed, May 6, 2009 at 11:40 AM, Iustin Pop <[email protected]> wrote:
> 
> Hi,
> 
> >>    create_env = OSEnvironment(instance)
> >> +  if reinstall:
> >> +    create_env['INSTANCE_REINSTALL'] = "1"
> >
> > Why not move this into the OSEnvironment proper?
> >
> 
> Because OSEnvironment applies to all OS scripts, while this is
> specific just for create on reinstall.

Ah, I see.

> >> diff --git a/lib/rpc.py b/lib/rpc.py
> >> index 70dd312..0f1d44d 100644
> >> --- a/lib/rpc.py
> >> +++ b/lib/rpc.py
> >> @@ -524,14 +524,14 @@ class RpcRunner(object):
> >>      return self._SingleNodeCall(node, "instance_reboot",
> >>                                  [self._InstDict(instance), reboot_type])
> >>
> >> -  def call_instance_os_add(self, node, inst):
> >> +  def call_instance_os_add(self, node, inst, reinstall=False):
> >>      """Installs an OS on the given instance.
> >
> > RPC calls with default arguments are not good; they will make very hard
> > to debug some cases, and if you need to change the function signature it
> > will be harder.
> >
> > Can you please actually change all the calls to this RPC?
> >
> 
> Ok, sure, will resend

thanks!
iustin

Reply via email to