Revision 1db32048 htools/Ganeti/Path.hs
b/htools/Ganeti/Path.hs | ||
---|---|---|
33 | 33 |
, confdHmacKey |
34 | 34 |
, clusterConfFile |
35 | 35 |
, nodedCertFile |
36 |
, queueDir |
|
37 |
, jobQueueSerialFile |
|
38 |
, jobQueueArchiveSubDir |
|
36 | 39 |
) where |
37 | 40 |
|
38 | 41 |
import System.FilePath |
... | ... | |
61 | 64 |
dataDir :: IO FilePath |
62 | 65 |
dataDir = addNodePrefix $ C.autoconfLocalstatedir </> "lib" </> "ganeti" |
63 | 66 |
|
67 |
-- | Helper for building on top of dataDir (internal). |
|
68 |
dataDirP :: FilePath -> IO FilePath |
|
69 |
dataDirP = (dataDir `pjoin`) |
|
70 |
|
|
64 | 71 |
-- | Directory for runtime files. |
65 | 72 |
runDir :: IO FilePath |
66 | 73 |
runDir = addNodePrefix $ C.autoconfLocalstatedir </> "run" </> "ganeti" |
... | ... | |
83 | 90 |
|
84 | 91 |
-- | Path to file containing confd's HMAC key. |
85 | 92 |
confdHmacKey :: IO FilePath |
86 |
confdHmacKey = dataDir `pjoin` "hmac.key"
|
|
93 |
confdHmacKey = dataDirP "hmac.key"
|
|
87 | 94 |
|
88 | 95 |
-- | Path to cluster configuration file. |
89 | 96 |
clusterConfFile :: IO FilePath |
90 |
clusterConfFile = dataDir `pjoin` "config.data"
|
|
97 |
clusterConfFile = dataDirP "config.data"
|
|
91 | 98 |
|
92 | 99 |
-- | Path to the noded certificate. |
93 |
nodedCertFile :: IO FilePath |
|
94 |
nodedCertFile = dataDir `pjoin` "server.pem" |
|
100 |
nodedCertFile :: IO FilePath |
|
101 |
nodedCertFile = dataDirP "server.pem" |
|
102 |
|
|
103 |
-- | Job queue directory. |
|
104 |
queueDir :: IO FilePath |
|
105 |
queueDir = dataDirP "queue" |
|
106 |
|
|
107 |
-- | Job queue serial file. |
|
108 |
jobQueueSerialFile :: IO FilePath |
|
109 |
jobQueueSerialFile = dataDirP "serial" |
|
110 |
|
|
111 |
-- | Job queue archive directory. |
|
112 |
jobQueueArchiveSubDir :: FilePath |
|
113 |
jobQueueArchiveSubDir = "archive" |
Also available in: Unified diff