Current File : //usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/landscape.cpython-312.pyc |
�
-�_g� � �4 � d dl Z d dlmZmZ G d� dee� Zy)� N)�Plugin�UbuntuPluginc �, � e Zd ZdZdZdZdZdZd� Zd� Z y) � LandscapezUbuntu Landscape client� landscape)�sysmgmt)�/etc/landscape/client.conf�/etc/landscape/service.conf)zlandscape-clientzlandscape-serverc � � dD �cg c] }|t j v �� }}t |� s| j j d� n&| j g d�� | j g d�� | j
g d�� | j d� s| j
ddg� n| j
d d
g� | j g d�� y c c}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.txtzlsctl 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.setup s� � �.� ��A����O� �� � �8�}��K�K��� !8�
9�
��� !�
�
��� !�
�
���
� � ���z�*����*�1� �
�
���$�+� �
�
���
� ��]s �Cc �~ � | j ddd� g d�}| j dddj |� � d�d � y )
Nr zregistration_password(.*)zregistration_password[********])�password�store_passwordzsecret-tokenzoidc-client-secretzoidc-client-idz/etc/landscape/service.conf*�(�|z) = (.*)z\1 = [********])�do_file_sub�do_path_regex_sub�join)r �keyss r �postproczLandscape.postprocL sK � ����(�(�.�
�
��
���*�����$�� ��)��
� N)
�__name__�
__module__�__qualname__�
short_desc�plugin_name�profiles�files�packagesr r&