Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ganeti.Ssconf
Description
Implementation of the Ganeti Ssconf interface.
Synopsis
- data SSKey
- = SSClusterName
- | SSClusterTags
- | SSEnabledUserShutdown
- | SSFileStorageDir
- | SSGlusterStorageDir
- | SSHvparamsChroot
- | SSHvparamsFake
- | SSHvparamsKvm
- | SSHvparamsLxc
- | SSHvparamsXenHvm
- | SSHvparamsXenPvm
- | SSHypervisorList
- | SSInstanceList
- | SSMaintainNodeHealth
- | SSMasterCandidates
- | SSMasterCandidatesCerts
- | SSMasterCandidatesIps
- | SSMasterIp
- | SSMasterNetdev
- | SSMasterNetmask
- | SSMasterNode
- | SSNetworks
- | SSNodeList
- | SSNodePrimaryIps
- | SSNodeSecondaryIps
- | SSNodeVmCapable
- | SSNodegroups
- | SSOfflineNodes
- | SSOnlineNodes
- | SSPrimaryIpFamily
- | SSReleaseVersion
- | SSSharedFileStorageDir
- | SSSshPorts
- | SSUidPool
- sSKeyToRaw :: SSKey -> String
- sSKeyFromRaw :: forall m. (Monad m, MonadFail m) => String -> m SSKey
- hvparamsSSKey :: Hypervisor -> SSKey
- getPrimaryIPFamily :: Maybe FilePath -> IO (Result Family)
- parseNodesVmCapable :: String -> Result [(String, Bool)]
- getNodesVmCapable :: Maybe FilePath -> IO (Result [(String, Bool)])
- getMasterCandidatesIps :: Maybe FilePath -> IO (Result [String])
- getMasterNode :: Maybe FilePath -> IO (Result String)
- parseHypervisorList :: String -> Result [Hypervisor]
- getHypervisorList :: Maybe FilePath -> IO (Result [Hypervisor])
- parseEnabledUserShutdown :: String -> Result Bool
- getEnabledUserShutdown :: Maybe FilePath -> IO (Result Bool)
- keyToFilename :: FilePath -> SSKey -> FilePath
- sSFilePrefix :: FilePath
- newtype SSConf = SSConf {}
- emptySSConf :: SSConf
Documentation
Constructors
Instances
Bounded SSKey # | |
Defined in Ganeti.Ssconf | |
Enum SSKey # | |
Show SSKey # | |
HasStringRepr SSKey # | |
Defined in Ganeti.Ssconf | |
Eq SSKey # | |
Ord 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.
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.
The data type used for representing the ssconf.
emptySSConf :: SSConf #