On Mon, Jan 21, 2013 at 11:26 +0100, Iustin Pop <[email protected]> wrote:
> >   - First I wanted to just re-specify the default values, getting them
> >     from somewhere; but it seems the corresponding field accessors are
> >     not exported from Ganeti.THH (and perhaps they shouldn't be,
> >     indeed).

> The field accessors for sure are exported, but most probably with
> different names, and not from Ganeti.THH, but rather directly from
> Ganeti.OpCodes:

> *Ganeti.OpCodes> :i OpInstanceCreate 
> data OpCode
>   = ...
>   | OpInstanceCreate {opInstanceName :: String,
>                       opForceVariant :: Bool,
>                       opWaitForSync :: Bool,
>                       opNameCheck :: Bool,

> So not p* - those are helper names.

Just to clarify, what I wanted to do was something like:

    opShutdownTimeout = fieldDefault pShutdownTimeout

The accesor I was referring to was "fieldDefault", in this case.

> >   - So then I tried to just hard-code the values: how do you suggest I
> >     handle the NonNegative case? Would it be okay to just export
> >     forceNonNegative from OpParams.hs?

> Hmmm, that I was hoping to avoid. Please do so for now, but add a FIXME
> both in your code and near the export, as this shouldn't be done.

Ok, thanks!

-- 
Dato Simó | [email protected]
Corp Fleet Management / Ganeti SRE (Dublin)

Reply via email to