ganeti

Safe HaskellNone

Ganeti.Ssconf

Description

Implementation of the Ganeti Ssconf interface.

Synopsis

Documentation

sSFilePrefix :: FilePathSource

ssconf file prefix, re-exported from Constants.

sSKeyFromRaw :: forall m. Monad m => String -> m SSKeySource

sSKeyToRaw :: SSKey -> StringSource

keyToFilenameSource

Arguments

:: FilePath

Config path root

-> SSKey

Ssconf key

-> FilePath

Full file name

Convert a ssconf key into a (full) file path.

catchIOErrors :: Maybe a -> IO a -> IO (Result a)Source

readSSConfFile :: Maybe FilePath -> Maybe String -> SSKey -> IO (Result String)Source

parseKeyValue :: Monad m => String -> String -> m (String, String)Source

parseIPFamily :: Int -> Result FamilySource

getPrimaryIPFamily :: Maybe FilePath -> IO (Result Family)Source

Read the primary IP family.

parseNodesVmCapable :: String -> Result [(String, Bool)]Source

Parse the nodes vm capable value from a String.

getNodesVmCapable :: Maybe FilePath -> IO (Result [(String, Bool)])Source

Read and parse the nodes vm capable.

getMasterCandidatesIps :: Maybe FilePath -> IO (Result [String])Source

Read the list of IP addresses of the master candidates of the cluster.

getMasterNode :: Maybe FilePath -> IO (Result String)Source

Read the name of the master node.

parseHypervisorList :: String -> Result [Hypervisor]Source

Parse the list of enabled hypervisors from a String.

getHypervisorList :: Maybe FilePath -> IO (Result [Hypervisor])Source

Read and parse the list of enabled hypervisors.

parseEnabledUserShutdown :: String -> Result BoolSource

Parse whether user shutdown is enabled from a String.

getEnabledUserShutdown :: Maybe FilePath -> IO (Result Bool)Source

Read and parse whether user shutdown is enabled.