
    -_g
                     ,    d dl mZmZ  G d dee      Zy)    )PluginRedHatPluginc                   (    e Zd ZdZdZdZdZd Zd Zy)SaphanazSAP HANAsaphana)sap)z/hanac                 |   g }| j                  d      r(| j                  d      }|D ]2  }t        |      dk(  s|j                         }|j	                  |       4 |D ]  }|j                          d}d| d}| j                  | d| d       | j                  | d	| d
       | j                  | d| d       | j                  | d| d       | j                  d| d      s| j                  d| d      D ]-  }d|v s|j                         dd  }| j                  |||       /  y y )Nz/hana/shared   admzsu - z -cz "HDB info"	_HDB_infosuggest_filenamez "hdbsrvutil -v"_versionz 'hdbcons "mm l -s -S -p"'	_memusagezS 'hdbcons -e hdbindexserver                                     "replication info"'_replicainfoz/hana/shared//HDB)
path_isdirlistdirlenstripappendloweradd_cmd_outputget_inst_info)selfsidssharedsidsidadmprefixinsts          </usr/lib/python3/dist-packages/sos/report/plugins/saphana.pysetupzSaphana.setup   s   ??>*\\.1F %s8q=))+CKK$%
  BIIK=, ,##vhk$:8;uI5F $ H ##vh.>$?8;uH5E $ G ##vh.J$K8;uI5F $ H ##vh /9 %:8;uL5I $ K ??]3%q#9: $}SE-C D B D=#'::<#4D ..sFDAB%B +    c                     d}| d| d}| j                  |||fz  |       d| d| d}| j                  |      r#d}| d| d	}| j                  |||fz  |       y
y
)z! Collect the given instance info z7su - %s -c "sapcontrol -nr %s -function GetProcessList"__statusr   z	/usr/sap/z/HDBz/exe/python_supportz4su - %s -c "python %s/landscapeHostConfiguration.py"_landscapeConfigN)r   r   )	r   r    r!   r#   proc_cmdstatus_fnamepathpy_cmdpy_fnames	            r$   r   zSaphana.get_inst_info5   s    LavW-~%) 	 	

 3%tD6)<=??4 KFav%56H&$'!)    !r&   N)	__name__
__module____qualname__
short_descplugin_nameprofilesfilesr%   r    r&   r$   r   r      s"    JKHE BDr&   r   N)sos.report.pluginsr   r   r   r7   r&   r$   <module>r9      s    49fl 9r&   