HEX
Server: Apache
System: Linux dinesh8189 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: cgmgerenciamento1 (814285)
PHP: 8.1.26
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/virsh.cpython-36.pyc
3

3��d��@s&ddlmZmZGdd�dee�ZdS)�)�Plugin�IndependentPluginc@s,eZdZdZdZdZdZdd�Zdd	�Zd
S)
�
LibvirtClientz%client for libvirt virtualization APIZvirsh�system�virt�libvirt-clientcCs�|jddg�d}dddddd	d
ddd
dg}x"|D]}|jd||fdd�q2W|jd|ddd�x�d)D]�}|jd||fdd�}|ddkrj|dj�}y|dj�jd�}Wntk
r�wjYnXxBtdd�|dd��D](}|j�|}	|jd |||	fdd�q�WqjW|jd|dd�}
|
ddk�r�|
dj�dd�}xLtd!d�|�D]:}|j�d"}
x&d*D]}|jd&|||
fdd��qlW�qVW|jd'j	|�dd�}|ddk�r�x,|dj�D]}	|jd(j	||	�dd��q�WdS)+Nz/root/.cache/virt-manager/*.logz/root/.virt-manager/*.logzvirsh -rZdomcapabilitiesZcapabilitiesZnodeinfozfreecell --allznode-memory-tune�versionzpool-capabilitiesZ
nodecpumapzmaxvcpus kvmZsysinfoznodedev-list --treez%s %sT)�
foregroundz
%s list --allZvirsh_list_all)Ztagsr	�net�nwfilter�poolz
%s %s-listZstatusr�output�NamecSs|S)N�)�xrr�/usr/lib/python3.6/virsh.py�<lambda>?sz%LibvirtClient.setup.<locals>.<lambda>�z%s %s-dumpxml %scSs|S)Nr)rrrrrIs��dumpxml�dominfo�
domblklistz%s %s %sz{0} nodedev-listz{0} nodedev-dumpxml {1})r
rr)rrr)
Z
add_copy_specZadd_cmd_outputZcollect_cmd_output�
splitlines�split�index�	Exception�filterZexec_cmd�format)�self�cmdZsubcmdsZsubcmd�kZk_listZk_lines�pos�j�nZdomains_outputZ
domains_linesZdomain�drZnodedev_outputrrr�setups\




zLibvirtClient.setupcCs,d}ddg}x|D]}|j||d�qWdS)Nz"(\s*passwd\s*=\s*\")([^\"]*)(\".*)z"/root/\.cache/virt-manager/.*\.logz/root/\.virt-manager/.*\.logz
\1******\3)Zdo_path_regex_sub)rZ	match_expZvirsh_path_expsZpath_exprrr�postprocVs

zLibvirtClient.postprocN)rr)r)	�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesZpackagesr%r&rrrrrsArN)Zsos.report.pluginsrrrrrrr�<module>	s