Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ganeti.Hypervisor.Xen.XlParser
Description
Parser for the output of the xl list --long
command of Xen
Synopsis
- xlListParser :: Parser (Map String Domain)
- lispConfigParser :: Parser LispConfig
- xlUptimeParser :: Parser (Map Int UptimeInfo)
- uptimeLineParser :: Parser UptimeInfo
Documentation
xlListParser :: Parser (Map String Domain) #
A parser for parsing the output of the xl list --long
command.
It adds the semantic layer on top of lispConfigParser.
It returns a map of domains, with their name as the key.
FIXME: This is efficient under the assumption that only a few fields of the
domain configuration are actually needed. If many of them are required, a
parser able to directly extract the domain config would actually be better.
lispConfigParser :: Parser LispConfig #
A parser for parsing generic config files written in the (LISP-like)
format that is the output of the xl list --long
command.
This parser only takes care of the syntactic parse, but does not care
about the semantics.
Note: parsing the double requires checking for the next character in order
to prevent string like "9a" to be recognized as the number 9.
xlUptimeParser :: Parser (Map Int UptimeInfo) #
A parser for parsing the output of the xl uptime
command.
uptimeLineParser :: Parser UptimeInfo #
A helper for parsing a single line of the xl uptime
output.