ganeti-htoolsSource codeContentsIndex
Ganeti.HTools.Rapi
Description
Implementation of the RAPI client interface.
Synopsis
getUrl :: Monad m => String -> IO (m String)
formatHost :: String -> String
getInstances :: NameAssoc -> String -> Result [(String, Instance)]
getNodes :: String -> Result [(String, Node)]
parseInstance :: [(String, Ndx)] -> [(String, JSValue)] -> Result (String, Instance)
parseNode :: [(String, JSValue)] -> Result (String, Node)
loadData :: String -> IO (Result (AssocList, AssocList, [String]))
Documentation
getUrl :: Monad m => String -> IO (m String)Source
Read an URL via curl and return the body if successful.
formatHost :: String -> StringSource
Append the default port if not passed in.
getInstances :: NameAssoc -> String -> Result [(String, Instance)]Source
Parse a instance list in JSON format.
getNodes :: String -> Result [(String, Node)]Source
Parse a node list in JSON format.
parseInstance :: [(String, Ndx)] -> [(String, JSValue)] -> Result (String, Instance)Source
Construct an instance from a JSON object.
parseNode :: [(String, JSValue)] -> Result (String, Node)Source
Construct a node from a JSON object.
loadDataSource
:: StringCluster or URL to use as source
-> IO (Result (AssocList, AssocList, [String]))
Builds the cluster data from an URL.
Produced by Haddock version 2.6.0