Mokutil Entries

Parsers provided in this module includes:

MokutilDbShort - command mokutil --db --short

MokutilSbstate - command mokutil --sb-state

class insights.parsers.mokutil.MokutilDbShort(context, extra_bad_lines=None)[source]

Bases: CommandParser, dict

Class for parsing the mokutil --db --short command. It stores the output into a dict. For each line, the hash key is stored as a key and the left part is the value.

Sample output of this command is:

b7b180e323 Signature Database key
46def63b5c Microsoft Corporation UEFI CA 2011
Raises:

SkipComponent -- When the content is empty or has no valid lines.

Examples

>>> type(mokutil_db_short)
<class 'insights.parsers.mokutil.MokutilDbShort'>
>>> len(mokutil_db_short)
2
>>> 'b7b180e323' in mokutil_db_short
True
>>> mokutil_db_short['b7b180e323']
'Signature Database key'
parse_content(content)[source]

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

class insights.parsers.mokutil.MokutilSbstate(context, extra_bad_lines=None)[source]

Bases: CommandParser

Class for parsing the mokutil --sb-state command.

secureboot_enabled

True if SecureBoot is enabled, False if SecureBoot is disabled, otherwise None.

Type:

bool

Sample output of this command is:

SecureBoot enabled

Examples

>>> type(mokutil)
<class 'insights.parsers.mokutil.MokutilSbstate'>
>>> mokutil.secureboot_enabled
True
parse_content(content)[source]

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