On Tue, Oct 8, 2013 at 9:39 AM, Jose A. Lopes <[email protected]> wrote:

> On Tue, Oct 08, 2013 at 08:47:46AM +0200, Thomas Thrainer wrote:
> > On Mon, Oct 7, 2013 at 4:37 PM, Jose A. Lopes <[email protected]>
> wrote:
> >
> > > Add confd request related constants to the Haskell to Python constant
> > > generation.
> > >
> > > Signed-off-by: Jose A. Lopes <[email protected]>
> > > ---
> > >  lib/constants.py          |  8 ++++----
> > >  src/Ganeti/HsConstants.hs | 14 ++++++++++++++
> > >  2 files changed, 18 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/lib/constants.py b/lib/constants.py
> > > index 5b11f75..30378c0 100644
> > > --- a/lib/constants.py
> > > +++ b/lib/constants.py
> > > @@ -2075,10 +2075,10 @@ CONFD_REQ_NODE_INSTANCES = 8
> > >  # Confd request query fields. These are used to narrow down queries.
> > >  # These must be strings rather than integers, because json-encoding
> > >  # converts them to strings anyway, as they're used as dict-keys.
> > >
> >
> > Maybe move this comment over to Haskell too, because here it's not clear
> > that these constants are strings. On the Haskell side, however, it's a
> bit
> > strange to have integers as strings without explanation.
>
> This is already in Haskell in 'Ganeti.Confd.Types'.  If you want, I
> can add them in 'Ganeti.ConstantUtils', which is where these constants
> are originally defined.
>

Oh, sorry, missed it then. I guess it's fine if it's documented once.
LGTM then.


>
> >
> >
> > > -CONFD_REQQ_LINK = "0"
> > > -CONFD_REQQ_IP = "1"
> > > -CONFD_REQQ_IPLIST = "2"
> > > -CONFD_REQQ_FIELDS = "3"
> > > +CONFD_REQQ_LINK = _constants.CONFD_REQQ_LINK
> > > +CONFD_REQQ_IP = _constants.CONFD_REQQ_IP
> > > +CONFD_REQQ_IPLIST = _constants.CONFD_REQQ_IPLIST
> > > +CONFD_REQQ_FIELDS = _constants.CONFD_REQQ_FIELDS
> > >
> > >  CONFD_REQFIELD_NAME = "0"
> > >  CONFD_REQFIELD_IP = "1"
> > > diff --git a/src/Ganeti/HsConstants.hs b/src/Ganeti/HsConstants.hs
> > > index f043ff2..c483ff3 100644
> > > --- a/src/Ganeti/HsConstants.hs
> > > +++ b/src/Ganeti/HsConstants.hs
> > > @@ -1236,6 +1236,20 @@ confdErrorInternal = 2
> > >  confdErrorUnknownEntry :: Int
> > >  confdErrorUnknownEntry = 1
> > >
> > > +-- Confd request query fields
> > > +
> > > +confdReqqLink :: String
> > > +confdReqqLink = ConstantUtils.confdReqqLink
> > > +
> > > +confdReqqIp :: String
> > > +confdReqqIp = ConstantUtils.confdReqqIp
> > > +
> > > +confdReqqIplist :: String
> > > +confdReqqIplist = ConstantUtils.confdReqqIplist
> > > +
> > > +confdReqqFields :: String
> > > +confdReqqFields = ConstantUtils.confdReqqFields
> > > +
> > >  -- | Each request is "salted" by the current timestamp.
> > >  --
> > >  -- This constant decides how many seconds of skew to accept.
> > > --
> > > 1.8.4
> > >
> > >
> > Rest LGTM, thanks.
> >
> >
> >
> > --
> > Thomas Thrainer | Software Engineer | [email protected] |
> >
> > Google Germany GmbH
> > Dienerstr. 12
> > 80331 München
> >
> > Registergericht und -nummer: Hamburg, HRB 86891
> > Sitz der Gesellschaft: Hamburg
> > Geschäftsführer: Graham Law, Christine Elizabeth Flores
>
> --
> Jose Antonio Lopes
> Ganeti Engineering
> Google Germany GmbH
> Dienerstr. 12, 80331, München
>
> Registergericht und -nummer: Hamburg, HRB 86891
> Sitz der Gesellschaft: Hamburg
> Geschäftsführer: Graham Law, Christine Elizabeth Flores
> Steuernummer: 48/725/00206
> Umsatzsteueridentifikationsnummer: DE813741370
>



-- 
Thomas Thrainer | Software Engineer | [email protected] |

Google Germany GmbH
Dienerstr. 12
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Christine Elizabeth Flores

Reply via email to