CorosyncCmapctl - Command corosync-cmapctl [params]

This module parses the output of the corosync-cmapctl [params] command.

class insights.parsers.corosync_cmapctl.CorosyncCmapctl(context)[source]

Bases: CommandParser, dict

Class for parsing the /usr/sbin/corosync-cmapctl [params] command. All lines are stored in the dictionary with the left part of the equal sign witout parenthese info as the key and the right part of equal sign as the value.

Typical output of the command is:

config.totemconfig_reload_in_progress (u8) = 0
internal_configuration.service.0.name (str) = corosync_cmap
internal_configuration.service.0.ver (u32) = 0
internal_configuration.service.1.name (str) = corosync_cfg
internal_configuration.service.1.ver (u32) = 0
internal_configuration.service.2.name (str) = corosync_cpg
internal_configuration.service.2.ver (u32) = 0

Examples

>>> type(corosync)
<class 'insights.parsers.corosync_cmapctl.CorosyncCmapctl'>
>>> 'internal_configuration.service.0.name' in corosync
True
>>> corosync['internal_configuration.service.0.name']
'corosync_cmap'
Raises:
parse_content(content)[source]

This method must be implemented by classes based on this class.