Skip to content
Snippets Groups Projects
Commit 74b25887 authored by Michele Tartara's avatar Michele Tartara
Browse files

Add HS functions for getting the instance reason path


The getInstReasonFilename is built to resemble the python corresponding
function.

Signed-off-by: default avatarMichele Tartara <mtartara@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 74685117
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment