PackageProvidesCommand - Command /bin/echo {command_package}

class insights.parsers.package_provides.PackageProvidesCommand(context, extra_bad_lines=None)[source]

Bases: insights.core.CommandParser, dict

Parser to parse the specified running commands and its provider packages.

This parser will receive a list of string pairs which is generated by several @datasource and functions. The first string is the full path of the specified running command and the second string is the package that provides this command. It works as a dict with the command as the key and the corresponding package name as the value.

To check the provider package of the specified command, please add the command to the COMMANDS of insights.specs.default.DefaultSpecs.cmd_and_pkg()

Sample output:

/usr/bin/java java-11-openjdk-
/usr/sbin/httpd httpd-2.4.22-7.el7.x86_64
/usr/lib/jvm/jre/bin/java java-1.8.0-openjdk-
/opt/rh/httpd24/root/usr/sbin/httpd httpd24-httpd-2.4.34-7.el7.x86_64


>>> '/usr/lib/jvm/jre/bin/java' in cmd_package.commands
>>> 'java-11-openjdk-' in cmd_package.packages
>>> '/usr/sbin/httpd' in cmd_package.commands
>>> 'httpd24-httpd-2.4.34-7.el7.x86_64' in cmd_package.packages
>>> cmd_package['/usr/lib/jvm/jre/bin/java']
>>> cmd_package['/usr/sbin/httpd']
property commands

Returns the list of specified commands that are running on this host.

property packages

Returns the list of the packages that provide the specified commands.


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