The getInstReasonFilename is built to resemble the python corresponding function.
Signed-off-by: Michele Tartara <[email protected]> --- src/Ganeti/Path.hs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Ganeti/Path.hs b/src/Ganeti/Path.hs index 9383c18..1c54966 100644 --- a/src/Ganeti/Path.hs +++ b/src/Ganeti/Path.hs @@ -36,6 +36,8 @@ module Ganeti.Path , queueDir , jobQueueSerialFile , jobQueueArchiveSubDir + , instanceReasonDir + , getInstReasonFilename ) where import System.FilePath @@ -111,3 +113,13 @@ jobQueueSerialFile = dataDirP "serial" -- | Job queue archive directory. jobQueueArchiveSubDir :: FilePath jobQueueArchiveSubDir = "archive" + +-- | Directory containing the reason trails for the last change of status of +-- instances. +instanceReasonDir :: IO FilePath +instanceReasonDir = runDir `pjoin` "instance-reason" + +-- | The path of the file containing the reason trail for an instance, given the +-- instance name. +getInstReasonFilename :: String -> IO FilePath +getInstReasonFilename instName = instanceReasonDir `pjoin` instName -- 1.8.2.1
