ganeti-3.1: Cluster-based virtualization management software
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ganeti.Ssconf

Description

Implementation of the Ganeti Ssconf interface.

Synopsis

Documentation

data SSKey #

Instances

Instances details
Bounded SSKey # 
Instance details

Defined in Ganeti.Ssconf

Enum SSKey # 
Instance details

Defined in Ganeti.Ssconf

Show SSKey # 
Instance details

Defined in Ganeti.Ssconf

Methods

showsPrec :: Int -> SSKey -> ShowS

show :: SSKey -> String

showList :: [SSKey] -> ShowS

HasStringRepr SSKey # 
Instance details

Defined in Ganeti.Ssconf

Methods

fromStringRepr :: MonadFail m => String -> m SSKey #

toStringRepr :: SSKey -> String #

Eq SSKey # 
Instance details

Defined in Ganeti.Ssconf

Methods

(==) :: SSKey -> SSKey -> Bool

(/=) :: SSKey -> SSKey -> Bool

Ord SSKey # 
Instance details

Defined in Ganeti.Ssconf

Methods

compare :: SSKey -> SSKey -> Ordering

(<) :: SSKey -> SSKey -> Bool

(<=) :: SSKey -> SSKey -> Bool

(>) :: SSKey -> SSKey -> Bool

(>=) :: SSKey -> SSKey -> Bool

max :: SSKey -> SSKey -> SSKey

min :: SSKey -> SSKey -> SSKey

sSKeyToRaw :: SSKey -> String #

sSKeyFromRaw :: forall m. (Monad m, MonadFail m) => String -> m SSKey #

hvparamsSSKey :: Hypervisor -> SSKey #

For a given hypervisor get the corresponding SSConf key that contains its parameters.

The corresponding SSKeys are generated automatically by TH, but since we don't have convenient infrastructure for generating this function, it's just manual. All constructors must be given explicitly so that adding another hypervisor will trigger "incomplete pattern" warning and force the corresponding addition.

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

Read the primary IP family.

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

Parse the nodes vm capable value from a String.

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

Read and parse the nodes vm capable.

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

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

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

Read the name of the master node.

parseHypervisorList :: String -> Result [Hypervisor] #

Parse the list of enabled hypervisors from a String.

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

Read and parse the list of enabled hypervisors.

parseEnabledUserShutdown :: String -> Result Bool #

Parse whether user shutdown is enabled from a String.

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

Read and parse whether user shutdown is enabled.

keyToFilename #

Arguments

:: FilePath

Config path root

-> SSKey

Ssconf key

-> FilePath

Full file name

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

sSFilePrefix :: FilePath #

ssconf file prefix, re-exported from Constants.

newtype SSConf #

The data type used for representing the ssconf.

Constructors

SSConf 

Fields

Instances

Instances details
Show SSConf # 
Instance details

Defined in Ganeti.Ssconf

Methods

showsPrec :: Int -> SSConf -> ShowS

show :: SSConf -> String

showList :: [SSConf] -> ShowS

Eq SSConf # 
Instance details

Defined in Ganeti.Ssconf

Methods

(==) :: SSConf -> SSConf -> Bool

(/=) :: SSConf -> SSConf -> Bool

Ord SSConf # 
Instance details

Defined in Ganeti.Ssconf

Methods

compare :: SSConf -> SSConf -> Ordering

(<) :: SSConf -> SSConf -> Bool

(<=) :: SSConf -> SSConf -> Bool

(>) :: SSConf -> SSConf -> Bool

(>=) :: SSConf -> SSConf -> Bool

max :: SSConf -> SSConf -> SSConf

min :: SSConf -> SSConf -> SSConf

JSON SSConf # 
Instance details

Defined in Ganeti.Ssconf

Methods

readJSON :: JSValue -> Result SSConf

showJSON :: SSConf -> JSValue

readJSONs :: JSValue -> Result [SSConf]

showJSONs :: [SSConf] -> JSValue