HEX
Server: Apache
System: Linux insrv.serversdaddy.com 5.14.0-362.24.2.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 30 14:11:54 EDT 2024 x86_64
User: jsaha (1066)
PHP: 8.3.6
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3.9/site-packages/sos/report/plugins/__pycache__/maas.cpython-39.pyc
a

^��c�@s*ddlmZmZmZGdd�dee�ZdS)�)�Plugin�UbuntuPlugin�	PluginOptcs�eZdZdZdZdZdZdZedde	dd	�ed
de	dd	�edde	d
d	�gZ
dd�Zdd�Zdd�Z
�fdd�Zdd�Zdd�Z�ZS)�MaaszUbuntu Metal-As-A-Service�maas)Zsysmgmt)rzmaas-common)z
maas-dhcpdzmaas-dhcpd6z	maas-httpz
maas-proxyz
maas-rackdzmaas-regiondzmaas-syslogzsnap.maas.supervisor�profile-name�zName of the remote API)�defaultZval_typeZdesc�urlzURL of the remote API�credentialszCredentials, or the API keycCs|�d�o|�d�o|�d�S)Nr
rr)�
get_option��self�r�;/usr/lib/python3.9/site-packages/sos/report/plugins/maas.py�_has_login_options,s�zMaas._has_login_optionscCs2|�d|�d�|�d�|�d�f�}|ddkS)Nzmaas login %s %s %srr
r�statusr)�exec_cmdr)r�retrrr�_remote_api_login0s��zMaas._remote_api_logincCs|�d�ddkS)Nzsnap list maasrr)rr
rrr�_is_snap_installed;szMaas._is_snap_installedcst���rdS|��S)NT)�super�
check_enabledrr
��	__class__rrr>s
zMaas.check_enabledcCs�|��|_|jr8|�ddg�|�d�|�gd��n|�gd��|�ddg�|�d�rj|�d	g�|��r�|��r�|�d
|�d��n
|�	d�dS)
Nzsnap info maaszmaas statusz'/var/snap/maas/current/bind/session.key)	z/var/snap/maas/common/logz/var/snap/maas/common/snap_modez/var/snap/maas/current/*.confz/var/snap/maas/current/bindz/var/snap/maas/current/httpz"/var/snap/maas/current/supervisordz/var/snap/maas/current/preseedsz/var/snap/maas/current/proxyz/var/snap/maas/current/rsyslog)z/etc/squid-deb-proxyz	/etc/maasz/var/lib/maas/dhcp*z/var/log/apache2*z/var/log/maas*z/var/log/upstart/maas-*zapt-cache policy maas-*z apt-cache policy python-django-*zmaas-region-controllerzmaas-region dumpdataz"maas %s commissioning-results listrz6Cannot login into MAAS remote API with provided creds.)
r�_is_snapZadd_cmd_outputZadd_forbidden_pathZ
add_copy_specZis_installedrrrZ
_log_errorr
rrr�setupEs2
�
�
���z
Maas.setupcCs"|jrd}nd}|�|dd�dS)Nz(/var/snap/maas/current/maas/regiond.confz/etc/maas/regiond.confz(database_pass\s*:\s*)(.*)z
\1********)rZdo_file_sub)rZregiond_pathrrr�postprocts�z
Maas.postproc)�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesZpackagesZservicesr�strZoption_listrrrrrr�
__classcell__rrrrrs*����	/rN)Zsos.report.pluginsrrrrrrrr�<module>s