On Wed, Sep 11, 2013 at 06:31:14PM +0200, Klaus Aehlig wrote:
> On Wed, Sep 11, 2013 at 06:16:41PM +0200, Jose A. Lopes wrote:
> > * add 'daemonsPorts' and related constants used in the construction of
> >   the 'Map' that maps each daemon to its corresponding protocol and
> >   port.  This breaks constant 'daemonsPortsGanetiNoded' which is
> >   automatically generated from the Python dictionary 'DAEMONS_PORTS'
> > 
> > * replace reference from constant 'daemonsPortsGanetiNoded' to
> >   'defaultNodedPort' because constant 'daemonsPortsGanetiNoded' was a
> >   tuple containing the protocol and the port for node daemon, but only
> >   the port was needed.  And because this tuple was making Haskell to
> >   Python constant generation more difficult, it is preferable to
> >   replace this tuple with the actual port and use it directly, in
> >   module 'Ganeti.Rpc'
> > 
> > Signed-off-by: Jose A. Lopes <[email protected]>
> > ---
> >  src/Ganeti/HsConstants.hs | 23 +++++++++++++++++++++++
> >  src/Ganeti/Rpc.hs         |  2 +-
> >  2 files changed, 24 insertions(+), 1 deletion(-)
> > 
> 
> > +daemonsPorts :: Map String (Protocol, Int)
> > +daemonsPorts =
> > +  Map.fromList [(confd, (Udp, defaultConfdPort)),
> > +                (mond, (Tcp, defaultMondPort)),
> > +                (noded, (Tcp, defaultNodedPort)),
> > +                (rapi, (Tcp, defaultRapiPort)),
> > +                (ssh, (Tcp, 22))]
> > +
> > +defaultConfdPort :: Int
> > +defaultConfdPort = 1814
> > +
> > +defaultMondPort :: Int
> > +defaultMondPort = 1815
> > +
> > +defaultNodedPort :: Int
> > +defaultNodedPort = 1811
> > +
> > +defaultRapiPort :: Int
> > +defaultRapiPort = 5080
> > +
> 
> Please present definitions in logical order, i.e.,
> each definition before the defined value is used for
> the first time. This will allow linear reading of the
> code and is consistent with the rest of our code base.
> 
> Rest LGTM.

Will do.

Thanks,
Jose

Reply via email to