📂 FileMgr
📍
/
usr
/
lib
/
python3
/
dist-packages
/
sos
/
report
/
__pycache__
✏️ /usr/lib/python3/dist-packages/sos/report/__pycache__/__init__.cpython-312.pyc
✕ Tutup
� G%@iQ@ � �| � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZ d dlZd dl m Z d dl mZ d dl mZ d dlZd dlmZmZmZmZmZmZmZmZ d dlmZ d dlmZ d d lmZ d dlZd d l m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z* d dl+m,Z, d dl-m.Z. ej^ ej` fZ1dd �Z2d� Z3g d�Z4h d�Z5 G d� de� Z6y)� N)�datetime)�ThreadPoolExecutor)�TimeoutError)�rmtree)�ImporterHelper�SoSTimeoutError�bold�sos_get_command_output�TIMEOUT_DEFAULT�listdir� is_executable�scrub_url_credential)�_sos)�__version__)�SoSComponent) �Report�Section�Command� CopiedFile�CreatedFile�Alert�Note�PlainTextReport� JSONReport� HTMLReport)� SoSCleaner)� SoSUploadc �( � g }| }|rt | � dz }nd}|D ]C }t |� t |� z t |� z dkD r|j |� |}||z |z }�E |t |� d |k( r|d t |� }|j |� |S )N� � �H )�len�append)� first_line�items�indent�sep�lines�line�newline�items �5/usr/lib/python3/dist-packages/sos/report/__init__.py�_format_listr- . s� � ��E��D� ��j�/�C�'����� !���t�9�s�4�y� �3�s�8�+�b�0��L�L����D��d�{�S� �� !� �S��X�I�J��3���J�c�#�h�Y��� �L�L����L� c �2 � t j | d�d� S )z� This function will format --since arg to append 0s if enduser didn't. It's used in the _get_parser. This will also be a good place to add human readable and relative date parsing (like '2 days ago') in the future z<014sz%Y%m%d%H%M%S)r �strptime)�dates r, � _format_sincer2 @ s � � ����U�|�n�=�=r. )�auto�always�never> �NO_PROXY� ALL_PROXY� HTTP_PROXY� http_proxy�HTTPS_PROXY�https_proxyc � � � e Zd ZdZdZdZi dd�dd�dd�dd �d d�dd�d d�dd�dd �dg �dg �dg �dd�dd�dd�dg �dd�i dg �dd�dg �dd �dd�dd�d d�d!d"�d#d�d$d%�d&g �d'g �d(g �d)d�d*d�d+d�d,d��i d-d�d.d �d/g �d0d�d1e�d2e�d3g �d4d�d5d�d6d�d7g �d8d�d9d�d:d�d;d�d<d�d=d��dddddddddd d d>d?��Z� fd@�Ze dA� � Z e dB� � ZdC� ZdD� Z dE� ZdF� ZdG� ZdH� ZdI� ZdJ� ZdK� ZddL�ZdM� ZdN� ZdO� ZdP� ZdQ� ZdR� ZdS� ZdT� ZedU� � Zd�dV�Z dW� Z!dX� Z"dY� Z#dZ� Z$d[� Z%d\� Z&d�d]�Z'd^� Z(d_� Z)d`� Z*da� Z+db� Z,dc� Z-dd� Z.de� Z/df� Z0dg� Z1dh� Z2d�di�Z3dj� Z4dk� Z5dl� Z6dm� Z7dn� Z8do� Z9dp� Z:dq� Z;dr� Z<ds� Z=dt� Z>du� Z?dv� Z@dw� ZAdx� ZBdy� ZCdz� ZDd{� ZEd|� ZFd}� ZGd~� ZH� xZIS )�� SoSReportzaRun a set of commands and file collections and save them to a report for future analysis z.Collect files and command output in an archiveT� alloptionsF�all_logs�build�case_idr �chrootr3 �clean�container_runtime�keep_binary_files�desc�domains�disable_parsers�skip_cleaning_files�dry_run� estimate_only�experimental�enable_plugins�journal_size�d �keywords�keyword_fileN�plugopts�label�list_plugins�list_presets� list_profiles�log_size� �low_priority�map_file� /etc/sos/cleaner/default_mapping� skip_commands� skip_files�skip_plugins� namespaces� no_report�no_env_vars�no_postproc� no_update�note�only_plugins�preset�plugin_timeout�cmd_timeout�profiles�since�verify�allow_system_changes� usernames�upload� upload_url�upload_directory�upload_user�upload_pass� upload_method� obfuscate)�upload_no_ssl_verify�upload_protocol�upload_s3_endpoint�upload_s3_region�upload_s3_bucket�upload_s3_access_key�upload_s3_secret_key�upload_s3_object_prefix� upload_target� add_preset� del_preset�treat_certificatesc �4 �� t �| � |||� g | _ g | _ g | _ t | _ || _ d| _ i | _ | j � | j � | j j � | _ | j j j# d� | _ | j'