On Mon, Oct 7, 2013 at 4:37 PM, Jose A. Lopes <[email protected]> wrote:
> Add remote import/export related constants to the Haskell to Python > constant generation. > > Signed-off-by: Jose A. Lopes <[email protected]> > --- > lib/constants.py | 26 +++++++------------------- > src/Ganeti/HsConstants.hs | 28 ++++++++++++++++++++++++++++ > 2 files changed, 35 insertions(+), 19 deletions(-) > > diff --git a/lib/constants.py b/lib/constants.py > index 42fdf9e..33f3827 100644 > --- a/lib/constants.py > +++ b/lib/constants.py > @@ -378,25 +378,13 @@ INSTANCE_IMPORT = _constants.INSTANCE_IMPORT > INSTANCE_REMOTE_IMPORT = _constants.INSTANCE_REMOTE_IMPORT > INSTANCE_CREATE_MODES = _constants.INSTANCE_CREATE_MODES > > -# Remote import/export handshake message and version > -RIE_VERSION = 0 > -RIE_HANDSHAKE = "Hi, I'm Ganeti" > - > -# Remote import/export certificate validity in seconds > -RIE_CERT_VALIDITY = 24 * 60 * 60 > - > -# Overall timeout for establishing connection > -RIE_CONNECT_TIMEOUT = 180 > - > -# Export only: how long to wait per connection attempt (seconds) > -RIE_CONNECT_ATTEMPT_TIMEOUT = 20 > - > -# Export only: number of attempts to connect > -RIE_CONNECT_RETRIES = 10 > - > -#: Give child process up to 5 seconds to exit after sending a signal > -CHILD_LINGER_TIMEOUT = 5.0 > - > +RIE_VERSION = _constants.RIE_VERSION > +RIE_HANDSHAKE = _constants.RIE_HANDSHAKE > +RIE_CERT_VALIDITY = _constants.RIE_CERT_VALIDITY > +RIE_CONNECT_TIMEOUT = _constants.RIE_CONNECT_TIMEOUT > +RIE_CONNECT_ATTEMPT_TIMEOUT = _constants.RIE_CONNECT_ATTEMPT_TIMEOUT > +RIE_CONNECT_RETRIES = _constants.RIE_CONNECT_RETRIES > +CHILD_LINGER_TIMEOUT = _constants.CHILD_LINGER_TIMEOUT > > # import/export config options > INISECT_EXP = "export" > diff --git a/src/Ganeti/HsConstants.hs b/src/Ganeti/HsConstants.hs > index ea36d2e..9c8afdf 100644 > --- a/src/Ganeti/HsConstants.hs > +++ b/src/Ganeti/HsConstants.hs > @@ -962,6 +962,34 @@ instanceCreateModes :: FrozenSet String > instanceCreateModes = > ConstantUtils.mkSet $ map Types.instCreateModeToRaw [minBound..] > > +-- * Remote import/export handshake message and version > + > +rieHandshake :: String > +rieHandshake = "Hi, I\'m Ganeti" > Is the escaping of ' here actually required? > + > +rieVersion :: Int > +rieVersion = 0 > + > +-- | Remote import/export certificate validity in seconds > +rieCertValidity :: Int > +rieCertValidity = 24 * 60 * 60 > + > +-- | Export only: how long to wait per connection attempt (seconds) > +rieConnectAttemptTimeout :: Int > +rieConnectAttemptTimeout = 20 > + > +-- | Export only: number of attempts to connect > +rieConnectRetries :: Int > +rieConnectRetries = 10 > + > +-- | Overall timeout for establishing connection > +rieConnectTimeout :: Int > +rieConnectTimeout = 180 > + > +-- | Give child process up to 5 seconds to exit after sending a signal > +childLingerTimeout :: Double > +childLingerTimeout = 5.0 > + > -- * Dynamic device modification > > ddmAdd :: String > -- > 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
