KpatchPatches - report locally stored kpatch patches

This parser creates a list of the module names of locally stored kpatch modules returned by command ls /var/lib/kpatch/\`uname -r\`/. If no modules are installed, a ContentException will be raised.

class insights.parsers.kpatch_patches.KpatchPatches(context, extra_bad_lines=[])[source]

Bases: insights.core.CommandParser

A parser for getting modules names of locally stored kpatch-patch files.

Sample output of ls /var/lib/kpatch/`uname -r`/ looks like:

kpatch-3_10_0-1062-1-5.ko kpatch-3_10_0-1062-1-6.ko
patches

List of the name of kpatch patches. The dashes are converted to underscores, file suffix are removed, and duplicated names are removed as well

Type

str

Examples

>>> kp.patches
['kpatch_3_10_0_1062_1_5', 'kpatch_3_10_0_1062_1_6']
parse_content(content)[source]

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