ganeti
Safe HaskellNone

Ganeti.Storage.Lvm.LVParser

Description

Logical Volumer information parser

This module holds the definition of the parser that extracts status information about the logical volumes (LVs) of the system from the output of the lvs command.

Synopsis

Documentation

lvsSeparator :: Char Source #

The separator of the fields returned by lvs

Utility functions

skipSpaces :: Parser () Source #

Our own space-skipping function, because A.skipSpace also skips newline characters. It skips ZERO or more spaces, so it does not fail if there are no spaces.

bytesP :: Parser Int Source #

A parser recognizing a number of bytes, represented as a number preceeded by a separator and followed by the B character.

intP :: Parser Int Source #

A parser recognizing a number discarding the preceeding separator

stringP :: Parser String Source #

A parser recognizing a string starting with and closed by a separator (both are discarded)

Parser implementation

lvCommand :: String Source #

The command providing the data, in the format the parser expects

lvParams :: [String] Source #

The parameters for getting the data in the format the parser expects

oneLvParser :: Parser LVInfo Source #

The parser for one line of the diskstatus file.

lvParser :: Parser [LVInfo] Source #

The parser for a whole diskstatus file.