DotNet- Comand /usr/bin/dotnet

The parsers related /usr/bin/dotnet --version is included in this module.

DotNetVersion - command dotnet --version

ContainerDotNetVersion - command dotnet --version for containers

class insights.parsers.dotnet.ContainerDotNetVersion(context)[source]

Bases: ContainerParser, DotNetVersion

Parses the output of the /usr/bin/dotnet --version command of the running containers which are based on RHEL images.

Sample output:

3.1.108

Examples

>>> type(con_dotnet_ver)
<class 'insights.parsers.dotnet.ContainerDotNetVersion'>
>>> con_dotnet_ver.container_id
'cc2883a1a369'
>>> con_dotnet_ver.image
'quay.io/rhel8'
>>> con_dotnet_ver.engine
'podman'
>>> con_dotnet_ver.major
3
>>> con_dotnet_ver.minor
1
>>> con_dotnet_ver.raw
'3.1.108'
class insights.parsers.dotnet.DotNetVersion(context, extra_bad_lines=None)[source]

Bases: CommandParser

Class for parsing the output of the /usr/bin/dotnet --version command.

Sample output:

3.1.108

Examples

>>> dotnet_ver.major
3
>>> dotnet_ver.minor
1
>>> dotnet_ver.raw
'3.1.108'
parse_content(content)[source]

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