Hs2Py constants: add SSH key files
authorJose A. Lopes <jabolopes@google.com>
Fri, 4 Oct 2013 15:10:00 +0000 (17:10 +0200)
committerJose A. Lopes <jabolopes@google.com>
Tue, 8 Oct 2013 12:57:27 +0000 (14:57 +0200)
Add SSH key file constants to the Haskell to Python constant
generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

lib/pathutils.py
src/Ganeti/HsConstants.hs

index 3620ca6..756aec4 100644 (file)
@@ -66,10 +66,10 @@ RUN_DIR = LOCALSTATEDIR + "/run/ganeti"
 #: Script to configure master IP address
 DEFAULT_MASTER_SETUP_SCRIPT = TOOLSDIR + "/master-ip-setup"
 
-SSH_HOST_DSA_PRIV = SSH_CONFIG_DIR + "/ssh_host_dsa_key"
-SSH_HOST_DSA_PUB = SSH_HOST_DSA_PRIV + ".pub"
-SSH_HOST_RSA_PRIV = SSH_CONFIG_DIR + "/ssh_host_rsa_key"
-SSH_HOST_RSA_PUB = SSH_HOST_RSA_PRIV + ".pub"
+SSH_HOST_DSA_PRIV = _constants.SSH_HOST_DSA_PRIV
+SSH_HOST_DSA_PUB = _constants.SSH_HOST_DSA_PUB
+SSH_HOST_RSA_PRIV = _constants.SSH_HOST_RSA_PRIV
+SSH_HOST_RSA_PUB = _constants.SSH_HOST_RSA_PUB
 
 BDEV_CACHE_DIR = RUN_DIR + "/bdev-cache"
 DISK_LINKS_DIR = RUN_DIR + "/instance-disks"
index bd8e066..8a100ea 100644 (file)
@@ -1739,6 +1739,20 @@ qemuimgPath = AutoConf.qemuimgPath
 htools :: Bool
 htools = AutoConf.htools
 
+-- * Key files for SSH daemon
+
+sshHostDsaPriv :: String
+sshHostDsaPriv = sshConfigDir ++ "/ssh_host_dsa_key"
+
+sshHostDsaPub :: String
+sshHostDsaPub = sshHostDsaPriv ++ ".pub"
+
+sshHostRsaPriv :: String
+sshHostRsaPriv = sshConfigDir ++ "/ssh_host_rsa_key"
+
+sshHostRsaPub :: String
+sshHostRsaPub = sshHostRsaPriv ++ ".pub"
+
 -- | Path generating random UUID
 randomUuidFile :: String
 randomUuidFile = ConstantUtils.randomUuidFile