Current File : //usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/landscape.cpython-312.pyc
�

-�_g���4�ddlZddlmZmZGd�dee�Zy)�N)�Plugin�UbuntuPluginc�,�eZdZdZdZdZdZdZd�Zd�Z	y)	�	LandscapezUbuntu Landscape client�	landscape)�sysmgmt)�/etc/landscape/client.conf�/etc/landscape/service.conf)zlandscape-clientzlandscape-serverc��dD�cgc]}|tjv��}}t|�s|jj	d�n&|jgd��|jgd��|j
gd��|jd�s|j
ddg�n|j
d	d
g�|jgd��ycc}w)N)�LANDSCAPE_API_KEY�LANDSCAPE_API_SECRET�LANDSCAPE_API_URIz�Not all environment variables set. Source the environment file for the user intended to connect to the Landscape environment so that the landscape-api commands can be used.)zlandscape-api get-distributionszlandscape-api get-apt-sourcesz%landscape-api get-repository-profilesz'landscape-api get activites --limit 100)z&landscape-api --json get-distributionsz$landscape-api --json get-apt-sourcesz,landscape-api --json get-repository-profilesz.landscape-api --json get activites --limit 100)z/etc/default/landscape-clientz/etc/default/landscape-serverr	r
z/etc/landscape/service.conf.oldz*/var/lib/landscape/landscape-oops/*/OOPS-*�all_logsz/var/log/landscape/*.logz/var/log/landscape-server/*.logz/var/log/landscapez/var/log/landscape-server)z'gpg --verify /etc/landscape/license.txtz$head -n 5 /etc/landscape/license.txtzlsctl status)�os�environ�all�soslog�warning�add_cmd_output�
add_copy_spec�
get_option)�self�p�vars_alls   �>/usr/lib/python3/dist-packages/sos/report/plugins/landscape.py�setupzLandscape.setups���.���A����O�����8�}��K�K���!8�
9�
���!�
�
���!�
�	
���
�	����z�*����*�1� �
�

���$�+� �
�
	
���
�	��]s�Cc�~�|jddd�gd�}|jdddj|��d�d	�y)
Nr	zregistration_password(.*)zregistration_password[********])�password�store_passwordzsecret-tokenzoidc-client-secretzoidc-client-idz/etc/landscape/service.conf*�(�|z) = (.*)z\1 = [********])�do_file_sub�do_path_regex_sub�join)r�keyss  r�postproczLandscape.postprocLsK�����(�(�.�	
�

��	
���*�����$�� ��)��	
�N)
�__name__�
__module__�__qualname__�
short_desc�plugin_name�profiles�files�packagesrr&�r'rrr
s&��*�J��K��H�I�E�7�H�4�l
r'r)r�sos.report.pluginsrrrr0r'r�<module>r2s��
�3�P
���P
r'