SapHanaPython - Commands

Shared parser for parsing output of the SAP HANA python support scripts.

The following parsers are included in this module:

HanaLandscape - landscapeHostConfiguration.py

class insights.parsers.sap_hana_python_script.HanaLandscape(*args, **kwargs)[source]

Bases: SapHanaPython

Class for parsing the output of /usr/sap/<SID>/HDB<nr>/exe/python_support/landscapeHostConfiguration.py command.

Typical output of is:

| Host   | Host   | Host   | Failover | Remove | Storage   | Failover     | Failover     | NameServer  | NameServer  | IndexServer | IndexServer |
|        | Active | Status | Status   | Status | Partition | Config Group | Actual Group | Config Role | Actual Role | Config Role | Actual Role |
| ------ | ------ | ------ | -------- | ------ | --------- | ------------ | ------------ | ----------- | ----------- | ----------- | ----------- |
| node1  | yes    | ok     |          |        |         1 | default      | default      | master 1    | master      | worker      | master      |
overall host status: ok
scale_up

True for ‘Scale Up’ HANA System

Type:

bool

scale_out

True for ‘Scale Out’ HANA System

Type:

bool

Examples

>>> type(hana_sta)
<class 'insights.parsers.sap_hana_python_script.HanaLandscape'>
>>> hana_sta.scale_up
True
>>> len(hana_sta)
1
>>> hana_sta[0]['Host'] == 'node1'
True
>>> hana_sta.overall_status == 'ok'
True
class insights.parsers.sap_hana_python_script.SapHanaPython(context, extra_bad_lines=None)[source]

Bases: CommandParser, list

Base class for parsering the output of SAP HANA python support scripts.

overall_status

The overall host status.

Type:

bool

Raises:

SkipComponent -- When nothing is parsered.

parse_content(content)[source]

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