, sSKeyToRaw
, sSKeyFromRaw
, getPrimaryIPFamily
+ , keyToFilename
+ , sSFilePrefix
) where
import Ganeti.THH
maxFileSize :: Int
maxFileSize = 131072
+-- | ssconf file prefix, re-exported from Constants.
+sSFilePrefix :: FilePath
+sSFilePrefix = C.ssconfFileprefix
+
$(declareSADT "SSKey"
[ ("SSClusterName", 'C.ssClusterName)
, ("SSClusterTags", 'C.ssClusterTags)
keyToFilename :: Maybe FilePath -- ^ Optional config path override
-> SSKey -- ^ ssconf key
-> FilePath
-keyToFilename optpath key = fromMaybe C.dataDir optpath </> sSKeyToRaw key
+keyToFilename optpath key = fromMaybe C.dataDir optpath </>
+ sSFilePrefix ++ sSKeyToRaw key
-- | Runs an IO action while transforming any error into 'Bad'
-- values. It also accepts an optional value to use in case the error