+
    iH  c                   s>    ^ RI t ^ RIt^ RIHtHt  ! R R]]4      tR# )i    N)PluginRedHatPluginc                   sJ   a  ] tR t^t o RtRtR
tR tR tR t	R t
R tRtV tR	# )XenzXen virtualizationZxenc                s:   \         P                  ! R\         P                  4      '       d"   V P                  R4      pVR,          ^ 8X  d   R# \         P                  ! R\         P                  4      '       d$   V P                  R4      pVR,          ^ 8X  d   R# R# R	# )
zDetermine xen host type z/proc/acpi/dsdtzgrep -qi xen /proc/acpi/dsdtZstatushvm/proc/xen/capabilitiesz(grep -q control_d /proc/xen/capabilitiesdom0domU	baremetal)osZaccessZR_OKexec_cmd)selfZresult   & ;/usr/lib/python3.14/site-packages/sos/report/plugins/xen.pydetermine_xen_hostZXen.determine_xen_host   sr    99&00]]#ABFh1$99-rww77]]#MNFh1$    c                s(    V P                  4       R 8H  # )r   )r   r
      &r   check_enabledZXen.check_enabled#   s    &&(K77r   c                s    V P                  R4      R,          p\        P                  ! RV4      ^ ,          pVP                  4       # )zCheck if xenstored is running zpidof xenstoredZoutputz
$)r	   reZsplitZisdigit)r
   Zxs_pidZ	xs_pidnums   &  r   is_running_xenstoredZXen.is_running_xenstored&   s:    01(;HHUF+A.	  ""r   c                sp    V P                  . RO4       V P                  R4       V P                  R4       R# )zCollect /proc/xen zgrep pae /proc/cpuinfoz egrep -e 'vmx|svm' /proc/cpuinfoN)z/proc/xen/balloonr   z/proc/xen/xsd_kvaz/proc/xen/xsd_port)add_copy_specadd_cmd_outputr   r   r   dom_collect_procZXen.dom_collect_proc,   s5     " 	# 	45>?r   c                s   V P                  4       pVR 8X  d#   V P                  4        V P                  R4       MVR8X  d   MVR8X  d   V P                  . R	O4       V P                  . R
O4       V P                  4        V P	                  4       '       d$   V P                  R4       V P                  R4       MV P                  R4       MR# V P                  RV,           4       R# )r   z/sys/hypervisorr   r   z/sys/hypervisor/uuidzxenstore-lsz/var/lib/xenstored/tdbNzXen hostType: )z/var/log/xenz/etc/xenz/sys/hypervisor/versionz/sys/hypervisor/compilationz/sys/hypervisor/propertiesz/sys/hypervisor/type)zxm dmesgzxm infozxm listzxm list --longzbridge link show)r   r   r   r   r   Zadd_custom_text)r
   Z	host_typer   r   setupZ	Xen.setup8   s    ++-	!!# 01%&   ( )  !  !!#((**""#9:##M2 ""#;< -i78r    N)Zvirt)Z__name__Z
__module__Z__qualname__Z__firstlineno__Z
short_descZplugin_nameZprofilesr   r   r   r   r   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r      s3     %JKH8#
@&9 &9r   r   )r   r   Zsos.report.pluginsr    r   r   r   r   r   <module>r      s     
 	 3P9&, P9r   