|
|
|
|
|
| Description |
Parsing data from text-files.
This module holds the code for loading the cluster state from text
files, as produced by gnt-node and gnt-instance list command.
|
|
| Synopsis |
|
|
|
|
| Serialisation functions
|
|
|
| Serialize a single group.
|
|
|
| Generate group file data from a group list.
|
|
|
| :: List | The list of groups (needed for group uuid)
| | -> Node | The node to be serialised
| | -> String | | | Serialize a single node.
|
|
|
|
| Generate node file data from node objects.
|
|
|
| :: List | The node list (needed for
node names)
| | -> Instance | The instance to be serialised
| | -> String | | | Serialize a single instance.
|
|
|
|
| Generate instance file data from instance objects.
|
|
|
| Generate complete cluster data from node and instance lists.
|
|
| Parsing functions
|
|
|
| :: Monad m | | | => [String] | The result, a tuple of group
UUID and group object
| | -> m (String, Group) | | | Load a group from a field list.
|
|
|
|
| :: Monad m | | | => NameAssoc | Input data as a list of fields
| | -> [String] | The result, a tuple o node name
and node object
| | -> m (String, Node) | | | Load a node from a field list.
|
|
|
|
| :: NameAssoc | Association list with the current nodes
| | -> [String] | Input data as a list of fields
| | -> Result (String, Instance) | A tuple of
instance name and
the instance object
| | Load an instance from a field list.
|
|
|
|
| :: (Monad m, Element a) | | | => [String] | Conversion function
| | -> [String] -> m (String, a) | A tuple of an
association list (name
to object) and a set as
used in
Ganeti.HTools.Container
| | -> m (NameAssoc, Container a) | | Convert newline and delimiter-separated text.
This function converts a text in tabular format as generated by
gnt-instance list and gnt-node list to a list of objects using
a supplied conversion function.
|
|
|
|
| :: String | Path to the text file
| | -> IO String | Contents of the file
| Load the cluser data from disk.
This is an alias to readFile just for consistency with the other
modules.
|
|
|
|
|
|
|
| :: String | Path to the text file
| | -> IO (Result ClusterData) | | | Top level function for data loading.
|
|
|
| Produced by Haddock version 2.6.0 |