
    -_g                     4    d dl Z d dlmZmZ  G d dee      Zy)    N)PluginUbuntuPluginc                   ,    e Zd ZdZdZdZdZdZd Zd Z	y)		LandscapezUbuntu Landscape client	landscape)sysmgmt)/etc/landscape/client.conf/etc/landscape/service.conf)zlandscape-clientzlandscape-serverc                    dD cg c]  }|t         j                  v  }}t        |      s| j                  j	                  d       n&| j                  g d       | j                  g d       | j                  g d       | j                  d      s| j                  ddg       n| j                  d	d
g       | j                  g d       y c c}w )N)LANDSCAPE_API_KEYLANDSCAPE_API_SECRETLANDSCAPE_API_URIzNot 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.)zlandscape-api get-distributionszlandscape-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setupzLandscape.setup   s    . AO   8}KK !8 9  !   !  	 
 	 z**1  
 $+  
 	 
 	]s   Cc                 ~    | j                  ddd       g d}| j                  dddj                  |       dd	       y )
Nr	   zregistration_password(.*)zregistration_password[********])passwordstore_passwordzsecret-tokenzoidc-client-secretzoidc-client-idz/etc/landscape/service.conf*(|z) = (.*)z\1 = [********])do_file_subdo_path_regex_subjoin)r   keyss     r   postproczLandscape.postprocL   sK    ((.	


 	*$ )	
    N)
__name__
__module____qualname__
short_descplugin_nameprofilesfilespackagesr   r&    r'   r   r   r      s&    *JKHIE7H4l
r'   r   )r   sos.report.pluginsr   r   r   r0   r'   r   <module>r2      s    
 3P
 P
r'   