LGTM, thanks.
On Mon, Oct 7, 2013 at 4:38 PM, Jose A. Lopes <[email protected]> wrote: > Add hail, opcode, and SSH related constants to the Haskell to Python > constant generation. > > Signed-off-by: Jose A. Lopes <[email protected]> > --- > lib/constants.py | 43 +++++++++++++++++------------------------ > src/Ganeti/HsConstants.hs | 49 > +++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 67 insertions(+), 25 deletions(-) > > diff --git a/lib/constants.py b/lib/constants.py > index db20968..197a023 100644 > --- a/lib/constants.py > +++ b/lib/constants.py > @@ -1496,31 +1496,24 @@ BLOCKDEV_DRIVER_MANUAL = > _constants.BLOCKDEV_DRIVER_MANUAL > QEMUIMG_PATH = _constants.QEMUIMG_PATH > > HTOOLS = _constants.HTOOLS > -# The hail iallocator > -IALLOC_HAIL = "hail" > - > -# Fake opcodes for functions that have hooks attached to them via > -# backend.RunLocalHooks > -FAKE_OP_MASTER_TURNUP = "OP_CLUSTER_IP_TURNUP" > -FAKE_OP_MASTER_TURNDOWN = "OP_CLUSTER_IP_TURNDOWN" > - > -# SSH key types > -SSHK_RSA = "rsa" > -SSHK_DSA = "dsa" > -SSHK_ALL = compat.UniqueFrozenset([SSHK_RSA, SSHK_DSA]) > - > -# SSH authorized key types > -SSHAK_RSA = "ssh-rsa" > -SSHAK_DSS = "ssh-dss" > -SSHAK_ALL = compat.UniqueFrozenset([SSHAK_RSA, SSHAK_DSS]) > - > -# SSH setup > -SSHS_CLUSTER_NAME = "cluster_name" > -SSHS_SSH_HOST_KEY = "ssh_host_key" > -SSHS_SSH_ROOT_KEY = "ssh_root_key" > -SSHS_NODE_DAEMON_CERTIFICATE = "node_daemon_certificate" > - > -#: Key files for SSH daemon > +IALLOC_HAIL = _constants.IALLOC_HAIL > + > +FAKE_OP_MASTER_TURNUP = _constants.FAKE_OP_MASTER_TURNUP > +FAKE_OP_MASTER_TURNDOWN = _constants.FAKE_OP_MASTER_TURNDOWN > + > +SSHK_RSA = _constants.SSHK_RSA > +SSHK_DSA = _constants.SSHK_DSA > +SSHK_ALL = _constants.SSHK_ALL > + > +SSHAK_RSA = _constants.SSHAK_RSA > +SSHAK_DSS = _constants.SSHAK_DSS > +SSHAK_ALL = _constants.SSHAK_ALL > + > +SSHS_CLUSTER_NAME = _constants.SSHS_CLUSTER_NAME > +SSHS_SSH_HOST_KEY = _constants.SSHS_SSH_HOST_KEY > +SSHS_SSH_ROOT_KEY = _constants.SSHS_SSH_ROOT_KEY > +SSHS_NODE_DAEMON_CERTIFICATE = _constants.SSHS_NODE_DAEMON_CERTIFICATE > + > SSH_DAEMON_KEYFILES = { > SSHK_RSA: (pathutils.SSH_HOST_RSA_PRIV, pathutils.SSH_HOST_RSA_PUB), > SSHK_DSA: (pathutils.SSH_HOST_DSA_PRIV, pathutils.SSH_HOST_DSA_PUB), > diff --git a/src/Ganeti/HsConstants.hs b/src/Ganeti/HsConstants.hs > index ca7a729..515c5b2 100644 > --- a/src/Ganeti/HsConstants.hs > +++ b/src/Ganeti/HsConstants.hs > @@ -3671,6 +3671,55 @@ qemuimgPath = AutoConf.qemuimgPath > htools :: Bool > htools = AutoConf.htools > > +-- | The hail iallocator > +iallocHail :: String > +iallocHail = "hail" > + > +-- * Fake opcodes for functions that have hooks attached to them via > +-- backend.RunLocalHooks > + > +fakeOpMasterTurndown :: String > +fakeOpMasterTurndown = "OP_CLUSTER_IP_TURNDOWN" > + > +fakeOpMasterTurnup :: String > +fakeOpMasterTurnup = "OP_CLUSTER_IP_TURNUP" > + > +-- * SSH key types > + > +sshkDsa :: String > +sshkDsa = "dsa" > + > +sshkRsa :: String > +sshkRsa = "rsa" > + > +sshkAll :: FrozenSet String > +sshkAll = ConstantUtils.mkSet [sshkRsa, sshkDsa] > + > +-- * SSH authorized key types > + > +sshakDss :: String > +sshakDss = "ssh-dss" > + > +sshakRsa :: String > +sshakRsa = "ssh-rsa" > + > +sshakAll :: FrozenSet String > +sshakAll = ConstantUtils.mkSet [sshakDss, sshakRsa] > + > +-- * SSH setup > + > +sshsClusterName :: String > +sshsClusterName = "cluster_name" > + > +sshsSshHostKey :: String > +sshsSshHostKey = "ssh_host_key" > + > +sshsSshRootKey :: String > +sshsSshRootKey = "ssh_root_key" > + > +sshsNodeDaemonCertificate :: String > +sshsNodeDaemonCertificate = "node_daemon_certificate" > + > -- * Key files for SSH daemon > > sshHostDsaPriv :: String > -- > 1.8.4 > > -- 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
