On Mon, Jan 10, 2011 at 12:55:45PM +0000, Balazs Lecz wrote:
> On Fri, Jan 7, 2011 at 15:02, Iustin Pop <[email protected]> wrote:
> > +  vm_cap  <- annotateResult desc $ maybeFromObj a "vm_capable"
> > +  guuid   <- annotateResult desc $ maybeFromObj a "group.uuid"
> > +  guuid' <-  lookupGroup ktg name (fromMaybe defaultGroupID guuid)
> > +  node <- (if offline || drained || not (fromMaybe True vm_cap)
> > +           then return $ Node.create name 0 0 0 0 0 0 True guuid'
>
> LGTM

For the record, I added a vm_cap' variable here too (moving the
fromMaybe to the outer scope), as per your comment in patch 4/5.

I suspect this code could be cleaned further with a new abstraction
(fromObjWithDefault?), but it's good enough for now.

thanks,
iustin

Reply via email to