class documentation

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.

Class Method GetDevInfo Parse details about a given DRBD minor.
Class Method _ConstructShowParser Undocumented
Class Method _GetShowParser Return a parser for `drbd show` output.
Class Method _TransformParseResult Undocumented
Constant _PARSE_SHOW Undocumented
Class Variable _colon Undocumented
Class Variable _comment Undocumented
Class Variable _dbl_quote Undocumented
Class Variable _defa Undocumented
Class Variable _device_value Undocumented
Class Variable _ipv4_addr Undocumented
Class Variable _ipv6_addr Undocumented
Class Variable _keyword Undocumented
Class Variable _lbrace Undocumented
Class Variable _lbracket Undocumented
Class Variable _meta_value Undocumented
Class Variable _number Undocumented
Class Variable _quoted Undocumented
Class Variable _rbrace Undocumented
Class Variable _rbracket Undocumented
Class Variable _semi Undocumented
Class Variable _stmt Undocumented
Class Variable _value Undocumented
@classmethod
def GetDevInfo(cls, show_data):

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:

  • local_dev
  • meta_dev
  • meta_index
  • local_addr
  • remote_addr
@classmethod
def _ConstructShowParser(cls):
@classmethod
def _GetShowParser(cls):

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`.

@classmethod
def _TransformParseResult(cls, parse_result):
_PARSE_SHOW =

Undocumented

Value
None
_colon =

Undocumented

_comment =

Undocumented

_dbl_quote =

Undocumented

_defa =

Undocumented

_device_value =

Undocumented

_ipv4_addr =

Undocumented

_ipv6_addr =

Undocumented

_keyword =

Undocumented

_lbrace =

Undocumented

_lbracket =

Undocumented

_meta_value =

Undocumented

_number =

Undocumented

_quoted =

Undocumented

_rbrace =

Undocumented

_rbracket =

Undocumented

_semi =

Undocumented

_stmt =

Undocumented

_value =

Undocumented