Sap

This combiner combines the result of insights.parsers.saphostctrl.SAPHostCtrlInstances` and :class:`insights.parsers.lssap.Lssap to get the available SAP instances. Prefer the SAPHostCtrlInstances to Lssap.

class insights.combiners.sap.SAPInstances(name, hostname, sid, type, number, fqdn, version)

Bases: tuple

namedtuple: Type for storing the SAP instance.

property fqdn
property hostname
property name
property number
property sid
property type
property version
class insights.combiners.sap.Sap(hostname, insts, lssap)[source]

Bases: dict

Combiner for combining the result of insights.parsers.lssap.Lssap generated by command lssap and insights.parsers.saphostctrl.SAPHostCtrlInstances generated by command saphostctrl.

Prefer SAPHostCtrlInstances to Lssap.

Examples

>>> type(saps)
<class 'insights.combiners.sap.Sap'>
>>> 'D16' in saps
True
>>> saps['D16'].number
'16'
>>> saps.sid('HDB16')
'HA2'
>>> saps.hostname('HDB16')
'lu0417'
>>> len(saps.business_instances)
3
>>> saps.is_hana
True
>>> saps.is_netweaver
True
>>> saps.is_ascs
False
all_instances

List of all the SAP instances listed by the command.

Type

list

function_instances

List of functional SAP instances E.g. Diagnostics Agents SMDA97/SMDA98

Type

list

business_instances

List of business SAP instances E.g. HANA, NetWeaver, ASCS, or others

Type

list

local_instances

List of all SAP instances running on this host

Type

list

FUNC_INSTS = ('SMDA',)

Tuple of the prefix string of the functional SAP instances

Type

tuple

property data

Dict with the instance name as the key and instance details as the value.

Type

dict

hostname(instance)[source]

str: Returns the hostname of the instance.

property is_ascs

Is any SAP System Central Services instance detected?

Type

bool

property is_hana

Is any SAP HANA instance detected?

Type

bool

property is_netweaver

Is any SAP NetWeaver instance detected?

Type

bool

number(instance)[source]

str: Returns the systeme number of the instance.

sid(instance)[source]

str: Returns the sid of the instance.

type(instance)[source]

str: Returns the type code of the instance.

version(instance)[source]

str: Returns the version of the instance.