saphostctrl - Commands saphostctrl

Parsers included in this module are:

SAPHostCtrlInstances - Command saphostctrl -function GetCIMObject -enuminstances SAPInstance

class insights.parsers.saphostctrl.SAPHostCtrlInstances(context, extra_bad_lines=[])[source]

Bases: insights.core.CommandParser

This class provides processing for the output of the /usr/sap/hostctrl/exe/saphostctrl -function GetCIMObject -enuminstances SAPInstance command on SAP systems.

Sample output of the command:

*********************************************************
 CreationClassName , String , SAPInstance
 SID , String , D89
 SystemNumber , String , 88
 InstanceName , String , HDB88
 Hostname , String , hdb88
 FullQualifiedHostname , String , hdb88.example.com
 IPAddress , String , 10.0.0.88
 SapVersionInfo , String , 749, patch 211, changelist 1754007
*********************************************************
 CreationClassName , String , SAPInstance
 SID , String , D90
 SystemNumber , String , 90
 InstanceName , String , HDB90
 Hostname , String , hdb90
 FullQualifiedHostname , String , hdb90.example.com
 IPAddress , String , 10.0.0.90
 SapVersionInfo , String , 749, patch 211, changelist 1754007

Examples

>>> type(sap_inst)
<class 'insights.parsers.saphostctrl.SAPHostCtrlInstances'>
>>> sap_inst.data[-1]['CreationClassName']
'SAPInstance'
>>> sap_inst.data[-1]['SID']
'D90'
>>> sap_inst.data[-1]['SapVersionInfo']  # Note: captured as one string
'749, patch 211, changelist 1754007'
>>> sap_inst.data[0]['InstanceType']  # Inferred code from InstanceName
'HDB'
data

List of dicts where keys are the lead name of each line and values are the string value.

Type

list

instances

The list of instances found in the cluster output.

Type

list

sids

The list of SID found in the cluster output.

Type

list

types

The list of instance types found in the cluster output.

Type

list

Raises
parse_content(content)[source]

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