Trees | Indices | Help |
|
---|
|
Base class for parsing the `drbdsetup show` output.
Holds various common pyparsing expressions which are used by subclasses. Also provides caching of the constructed parser.
|
|||
Inherited from |
|
|||
|
|||
|
|||
|
|||
|
|
|||
_PARSE_SHOW = None
|
|||
_lbrace = pyp.Literal("{").suppress()
|
|||
_rbrace = pyp.Literal("}").suppress()
|
|||
_lbracket = pyp.Literal("[").suppress()
|
|||
_rbracket = pyp.Literal("]").suppress()
|
|||
_semi = pyp.Literal(";").suppress()
|
|||
_colon = pyp.Literal(":").suppress()
|
|||
_number = pyp.Word(pyp.nums).setParseAction(lambda s, l, t: in
|
|||
_comment = pyp.Literal("#")+ pyp.Optional(pyp.restOfLine)
|
|||
_defa = pyp.Literal("_is_default").suppress()
|
|||
_dbl_quote = pyp.Literal('"').suppress()
|
|||
_keyword = pyp.Word(pyp.alphanums+ "-")
|
|||
_value = pyp.Word(pyp.alphanums+ "_-/.:")
|
|||
_quoted = _dbl_quote+ pyp.CharsNotIn('"')+ _dbl_quote
|
|||
_ipv4_addr = pyp.Optional(pyp.Literal("ipv4")).suppress()+ pyp
|
|||
_ipv6_addr = pyp.Optional(pyp.Literal("ipv6")).suppress()+ pyp
|
|||
_meta_value = _value ^ _quoted+ _lbracket+ _number+ _rbracket
|
|||
_device_value = pyp.Literal("minor").suppress()+ _number
|
|||
_stmt = ~ _rbrace+ _keyword+ ~ _lbrace+ pyp.Optional(_ipv4_add
|
|
|||
Inherited from |
|
Parse details about a given DRBD minor. This returns, if available, the local backing device (as a path) and the local and remote (ip, port) information from a string containing the output of the `drbdsetup show` command as returned by DRBD8Dev._GetShowData. This will return a dict with keys:
|
Return a parser for `drbd show` output. This will either create or return an already-created parser for the output of the command `drbd show`. |
|
_number
|
_ipv4_addr
|
_ipv6_addr
|
_stmt
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Jan 7 16:23:46 2016 | http://epydoc.sourceforge.net |